1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#include "system.h" // all the needed headers and definitions are included here (level.h,...)
int main()
{
System system;
Level level;
Item item;
Character player;
system.Setup();
BITMAP *buffer = create_bitmap(WIDTH, HEIGHT);
int iCnt = 0;
/* Game loop */
while (!key[KEY_ESC])
{
iCnt++;
/*player.GetInput();
player.Update();*/
level.Draw(buffer); // this is where the exception happens
//item.Draw(buffer);
//player.Draw(buffer);
//textprintf_ex(buffer, font, 200, 300, makecol(255, 0, 255), -1, "i = %d", iCnt);
blit(buffer, screen, 0, 0, 0, 0, WIDTH, HEIGHT);
clear_bitmap(buffer);
}
destroy_bitmap(buffer);
return 0;
}
END_OF_MAIN();
|