Now that the source code is available, I think you should give away this proggie as well. Maybe people would like to use your engine to code games.
About the C port, have you thought of porting it to openGl? There is some kinda useful gadget, AllegroGL, that let's you interface both libraries, so you can use OpenGL for 3D and Allegro for the rest. Really neat, and portable as well.
Porting it to OpenGL would allow 3D acceleration to be used, letting your engine to be playable in lower spec computers, which would be a neato thing.
EDIT:
I've downloaded the source code distro that Fling provided before (hadn't noticed it until now) and I see the source code for the screen initialization is this:
Code:
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) != 0)
{
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
allegro_message("Error setting graphics mode!\n%s\n", allegro_error);
return(true);
}
This is what's causing problems. For the program to work in windowed mode, you should try all the colour depths available, 'cause you don't know if the user has his/her desktop in 8, 15, 16, 24 or 32 bits. The best way is doing something like this (taken from one proggie by me):
Code:
set_color_depth(32);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,400,0,0)!=0)
{
set_color_depth(24);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,400,0,0)!=0)
{
set_color_depth(16);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,400,0,0)!=0)
{
set_color_depth(15);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,400,0,0)!=0)
{
set_color_depth(8);
if(set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,400,0,0)!=0)
{
allegro_message("Can't init graphics window!");
exit(-1);
}
}
}
}
}
Basicly, this code tries all the colour depths one by one. If none worked, it exits.