EOSERV Forum > Programming > Whats the easiest way to switch background images allegro 5?
Topic is locked.
Page: << 1 2 >>
Whats the easiest way to switch background images allegro 5?
Author Message
Post #119562 Re: Whats the easiest way to switch background images allegro 5?

Thank you desmond! I will look over it more in the morning. From a quick glance it looks like you preload the gfx, store it to memory, and destroy the original as its cloned.

I think thats my problem is Im not destroying the background bmp before switching them out.

Edit: Wow who would have thought al_destroy_bitmap(background_image); would do just that lol.

So I just tested that real quick in an if statement after reviewing how you loaded your gfx and it worked, thanks I think I got the basic concept!

if(collision)

{

   al_destroy_bitmap(background_image);

   background_image = al_load_bitmap("data/gfx/new_background_image.tga");

}



14 years, 27 weeks ago
Post #119567 Re: Whats the easiest way to switch background images allegro 5?

Glad to hear it :D


offtopic: This is about the upload. Anyone asking about it will be ignored as I only uploaded it to help on this thread.

---
I am an alien and not crazy!
14 years, 27 weeks ago
Page: << 1 2 >>
Topic is locked.
EOSERV Forum > Programming > Whats the easiest way to switch background images allegro 5?