Reputation: 253
I searched a lot but I couldn't find anything about comparison of 2 bitmaps in allegro 5. There is just is_same_bitmap() in Allegro 4. I wanted to ask you if there is any easy way except comparing the pixels of bitmaps. Thank you.
Upvotes: 2
Views: 377
Reputation: 48294
You will need to compare the pixels. (Or you could compute a hash and compare them, but it's likely faster to do pixels since you can stop as soon as you find one that does not match.)
To speed things up, you should lock the bitmaps via al_lock_bitmap_region()
and access the memory directly via the returned data structure.
Upvotes: 1