Hi!
I’m not new to this list (I was suscribed 1-2 years ago when
I was trying to decide between using SDL and Allegro as my
library of choice to code small games and programs), but I’ll
introduce myself another time
I’m Santiago Romero, from Spain. I work as a System Administrator
and on spare time I work on my Spectrum emulator (written in
Allegro at this time) and some other graphical projects.
1 year ago I was trying to decide between using Allegro or SDL
for my graphical programs. I selected allegro for different
reasons:
1.- SDL didn’t work under MSDOS, and allegro did.
(this reason is not valuable today).
2.- SDL works oriented to events/messages (like Windows, and
like pure XLib) with PollEvent/GetEvent loops. I do prefer
the classic style (not message oriented) like:
void main()
{
initall();
while(!done)
{
get_user_input();
move_all();
wait_some_time(),
draw_frame();
}
}
instead of:
getevent(&event);
switch(event.type)
{
case key_down: blahhh
case …
}
Is there any change SDL to work as Allegro in a linear-code-fashion?
I just would like to know how to read keypresses, check for mouse
X,Y and status, and so on, in any part of my program, and don’t
bother with events… This is quite important to me, in order to
port my Allegro emulator to SDL
3.- I also noticed that Allegro provided lots of functions to the
programmer, while SDL was more “surface oriented” and the programmer
needs to recode (or find) libraries to draw sprites, fonts, and so
on. Is there any nice wrapper (with sprites, fonts…) for SDL?
4.- Having to check the pixel depth each time (as the SDL drawpixel
code does) for all the routines (sprites, etc) is not inefficient?
Sorry all for the big message and thanks a lot to all SDL developers.
PS: If someone wants to know why I’m looking for SDL now instead of
allegro, it’s due to SDL being bundled in almost all the Linux
distributions by default. Allegro has to be installed by the user.
Lots of apps/games use SDL, so the user probably already has SDL
installed on the system.–
Santiago Romero
Departamento de Sistemas
sromero at servicom2000.com
Av. Primado Reig 189, entlo
46020 Valencia - Spain
Telf. (+34) 96 332 12 00
Fax. (+34) 96 332 12 01
http://www.servicom2000.com