Re: SDL roguelike example in C (or C++)
- From: Sherm Pendley <sherm@xxxxxxxxxxx>
- Date: Wed, 14 Sep 2005 23:03:41 -0400
"Jeff Lait" <torespondisfutile@xxxxxxxxxxx> writes:
> Sherm Pendley wrote:
>>
>> Out of curiousity, why'd you do it that way? SDL_ttf has nice antialiased
>> text rendering, with transparency if you want it.
>
> I had already knew how to do the tile blitting from my POWDER code
> (which uses tiles) so it was the fastest path to success.
Not much difference between blitting a bitmap and blitting text. Instead
of calling an Image_Load*() function, you call one of the TTF_Render*()
functions, which returns an SDL_Surface*. There are functions to render
single glyphs or whole strings, at three different quality settings.
As is typical of SDL though, only the low-level functions are provided.
For instance, I had to write my own word-wrap function.
> Does ttf support bitmap fonts? For small text, like in roguelikes, I
> prefer bitmapped fonts...
No, no bitmapped fonts - although the fastest rendering functions don't
do antialiasing, which is the #1 gripe most people have with TTF or PS
fonts at small sizes.
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
.
- Follow-Ups:
- Re: SDL roguelike example in C (or C++)
- From: Jeff Lait
- Re: SDL roguelike example in C (or C++)
- References:
- SDL roguelike example in C (or C++)
- From: copx
- Re: SDL roguelike example in C (or C++)
- From: Jeff Lait
- Re: SDL roguelike example in C (or C++)
- From: Sherm Pendley
- Re: SDL roguelike example in C (or C++)
- From: Jeff Lait
- SDL roguelike example in C (or C++)
- Prev by Date: Re: Surveying potential features
- Next by Date: Re: SDL roguelike example in C (or C++)
- Previous by thread: Re: SDL roguelike example in C (or C++)
- Next by thread: Re: SDL roguelike example in C (or C++)
- Index(es):
Relevant Pages
|