hello ive been using allegro for maybe a week now and ive noticed when i load to many BITMAPS my program starts to not respond. Well how am i supposed to have items and such if im only aloud like 2 BITMAP images. i will paste my code and maybe i made a mistake. pls help, im using dev c++ with all allegro installed, libraries and everything
void player()
{
if(key[KEY_A])
{
PX -= pspeed;
dir = 180;
}else if(key[KEY_D])
{
PX += pspeed;
dir = 0;
}else if(key[KEY_S])
{
PY += pspeed;
dir = 270;
}else if(key[KEY_W])
{
PY -= pspeed;
dir = 90;
}
draw();
}
END_OF_FUNCTION()
int main()
{
allegro_init();
install_keyboard();
PX = 250;
PY = 250;
pspeed = 3;
set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,470,0,0);
dir = 270;
down = load_bitmap("C:/Allegro/AB/wa/SA/down1.bmp", NULL);
left = load_bitmap("C:/Allegro/AB/wa/SA/left1.bmp", NULL);
right = load_bitmap("C:/Allegro/AB/wa/SA/right.bmp", NULL);
up = load_bitmap("C:/Allegro/AB/wa/SA/right.bmp", NULL);