[SDL] Reading and Writing

Igor Castro castrolima at gmail.com
Mon May 21 08:40:11 PDT 2007


Ok.. and how to wirte? i download SDL_ttf and put the .h in my lib folder,
put the .dll in windows/system32.
After i include SDL_tff.h in my project and i get the error:"undefined
reference to TTF_Init()"
i'm using DEV-CPP
thanks!

On 5/21/07, Peter Ketting <peterketting at sysmatrix.net> wrote:
>
> <snip>
>
> > how can i read the key strokes? using the queue events?
>
> > Yes: first you retrieve the event and look at its type. If it is a
> > SDL_KEYDOWN
> > event, it means that you can extract a SDL_KeyboardEvent from it, which
> in
> > turn has a SDL_keysym variable which says which key was pressed (look at
> > the
> > documentation). Depending of what you are looking for (wait for a
> certain
> > keypress or get what character was typed), you'll find useful any of the
> > SDL_keysym fields:
>
> I find that it's best to use the event loop just to check for special
> keys,
> like escape,
> or keys to toggle full-screen / windowed modes. When reading actual game
> keys
> it is better to use SDL_GetKeyState(), since you can check for multiple
> keys
> being
> pressed at once.
>
> Cheers,
> Peter
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070521/ccd7384a/attachment.html 


More information about the SDL mailing list