Jump to content
  • Advertisement
Sign in to follow this  
vaneger

allegro issue

This topic is 4622 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


#include<allegro.h>

BITMAP* buffer;

int ticks  = 0;
const int FPS = 60;

void ticker()
{
     ticks++;
}
END_OF_FUNCTION(ticker);

int main()
{
	allegro_init();
	install_keyboard();
	set_color_depth(16);
	set_gfx_mode( GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);
	
	buffer = create_bitmap(640, 480);
	
	int frames = ticks;
    install_int_ex(ticker, BPS_TO_TIMER(FPS));
	
	while( !key[KEY_ESC])
	{
		if (frames <= ticks)
    	        {
			clear_bitmap(buffer);
			blit(buffer, screen, 0, 0, 0, 0, 640, 480);
			frames++;
		}
	}

	destroy_bitmap(buffer);
	return 0;

}
END_OF_MAIN();


thats my current code for a bare bones allegro program, but it gives me some kind of link error. what can i do to fix this?

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!