This compiles fine but won't work and I have no I dea why the screen just flashes twice and goes away. Heres the code.
Code:
#include <allegro.h>
volatile long speed_counter = 0;
void increment_speed()
{ speed_counter++;
}
END_OF_FUNCTION(increment_speed);
int main(int argc, char *argv[])
{
//Initialize Allegro
allegro_init();
install_keyboard();
install_timer();
install_int_ex(increment_speed, BPS_TO_TIMER(60));
set_color_depth(24);
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
LOCK_VARIABLE(speed_counter);
LOCK_FUNCTION(increment_speed_counter);
// BITMAPS
BITMAP *fwd1=load_bitmap("fwd1.bmp",NULL);
BITMAP *fwd2=load_bitmap("fwd2.bmp",NULL);
BITMAP *idle=load_bitmap("idle.bmp",NULL);
BITMAP *buffer=create_bitmap(640,480);
//Main Loop
draw_sprite(buffer, fwd1, 0, 0);
draw_sprite(buffer, fwd2, 200, 0);
draw_sprite(buffer, fwd1, 200, 200);
// Clean Up/Exit
destroy_bitmap(fwd1);
destroy_bitmap(fwd2);
destroy_bitmap(idle);
return 0;
}
END_OF_MAIN();
By the way does anyone know of any allegro specific message boards that are anygood I went looking for one to post this question but never found one. So anyway any help would be greatly appreciated.
--Kas2002--