GP2X Sdl_ttf Printf Functions


Orkie

Super Duper Mega GP Mania
Joined
Mar 22, 2006
Messages
2,373
Location
UK
Website
www.gp2x.dev
I needed some functions that worked like printf() for SDL_ttf but I couldn't find any pre-written ones. I thought somebody may be interested (and it'll save them 5 minutes) so I uploaded them to the archives.

The only requirement is that the screen surface pointer is called 'screen' and is global so the functions can access it. Although the functions were written for C++, they'll work with C if you remove the 'using namespace std;' line from font.cpp.

Anybody can use them - they're under the MIT license.

http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,19,2293
 
i havnt looked at the code but how hard can it be to vsprintf to a buffer then use sdl_ttf to print that string that we need a lib for it thats licensed??
 
YakumoFuji said:
i havnt looked at the code but how hard can it be to vsprintf to a buffer then use sdl_ttf to print that string that we need a lib for it thats licensed??
It isn't hard, but like I said it'll save 5 minutes (longer if for people who've never used stdarg before). It's not really a library as such, just a few functions you may want to use. You should never release code without a license of some kind, as that implies nobody can use it.

Why was your post really needed?
 
Last edited by a moderator:
Back
Top