Jump to content
  • Advertisement
Sign in to follow this  
MrDuskling

Allegro 4.0 Crashing? help!

This topic is 2954 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made a quick test app, that runs fine just like this:

***********************************
***********************************
***********************************
***********************************
***********************************
#include <allegro.h>

int main()
{
allegro_init();
install_keyboard();
install_timer();
install_mouse();
install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, 0);
set_color_depth( 16 );
return 0;
}
END_OF_MAIN();



***********************************
but then as soon as i add a bitmap:
**********************************
#include <allegro.h>

int main()
{
allegro_init();
install_keyboard();
install_timer();
install_mouse();
install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, 0);
set_color_depth( 16 );
BITMAP *buffer = create_bitmap(640, 480);
while (!key[KEY_ESC])
{
rectfill( buffer, 0, 0, 640, 480,
makecol (255, 0, 0));
blit(buffer, screen, 0, 0, 0, 0,
640, 480);
clear_bitmap(buffer);
}
destroy_bitmap( buffer );
return 0;
}
END_OF_MAIN();

***********************************
it crashes. i dont know why it keeps crashing >:(
***********************************

Share this post


Link to post
Share on other sites
Advertisement
Also, If you really are using Allegro 4.0, then update. 4.0 was released in 2001, and there have been many updates since.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!