load.cpp
int load_main_menu(int image, int max)
{
dbLoadImage(image_main[image], image+1);
//check
dbSprite(image+1, 0, 0, image+1);
if(dbSpriteExist(image+1) == 0) // ERROR/FAILED
{
dbDeleteSprite(image+1);
dbDeleteImage(image+1);
return 2;
}
else // SUCCESS
{
dbDeleteSprite(image+1);
return 1;
}
}
main.cpp
if(load_main_menu(loaded_image, main_menu_images) == 2)
{
dbSprite(loaded_image+1, 0, 0, loaded_image+1); //Visual Checking but is not necessary at all
dbWait(3000);
break;
}
i figured it out in such a very easy way but i am doubtful, as i have tested it work fine but i dont know it you guys will say ok for this.
-Excellence deals with weak people-