Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: So DF doesn't use a graphics library to display the character-set?  (Read 1029 times)

guitarxe

  • Bay Watcher
    • View Profile

Hey guys, I'm just curious... does anyone that knows how these things work, does DF use a graphics library? Or since there is no graphics but just characters then there is no need for one? Then in that case, how does the program get those characters to display on the screen?
Logged
Feeling down? Click Here!

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #1 on: May 24, 2012, 07:51:51 pm »

Check your data/art folder.

guitarxe

  • Bay Watcher
    • View Profile
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #2 on: May 24, 2012, 08:00:37 pm »

Yeah, that's what I don't really understand... did Toady have to code it himself, how the program displays these images? Or is there a library that provides most of this functionality?
Logged
Feeling down? Click Here!

therahedwig

  • Bay Watcher
    • View Profile
    • wolthera.info
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #3 on: May 24, 2012, 08:05:51 pm »

It does use a graphics library from what I understand. (At the least, I'd hope so, it be a bit of a bother to start coding your own libraries when there's perfectly fine ones already existing and everone and their dog using it)

It's a tile-based program, with in this case the tiles displaying pictures of letters. So it's still as graphical as other tile-based programs. Thing is though, recently the actual text-text display was turned into truetype display.
Logged
Stonesense Grim Dark 0.2 Alternate detailed and darker tiles for stonesense. Now with all ores!

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #4 on: May 24, 2012, 08:21:49 pm »

DF uses SDL.

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #5 on: May 25, 2012, 03:03:55 am »

Well all but the Legacy version do. I think the legacy version uses a custom blitter.

EDIT: And "printmode: text" (IIRC?) on linux just writes characters to the console.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

Urist McDepravity

  • Bay Watcher
    • View Profile
Re: So DF doesn't use a graphics library to display the character-set?
« Reply #6 on: May 26, 2012, 08:36:50 am »

Graphics part is open-sourced, you can check it at Baughn's github.
Logged