• Advertisement
Sign in to follow this  

allegro issue

This topic is 4509 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
i fixed it i just made the wrong type of application is all delete this post mods

Share this post


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

  • Advertisement