is_same_bitmap(3alleg4)
π is_same_bitmap π
okay bestie, so this one lives in the Allegro manual β section 3alleg4 β and it's a lil function from the Allegro game programming library that answers the eternal question: are these two bitmaps actually the same drawing surface?? π
β¨ SYNOPSIS β¨
#include <allegro.h>
int is_same_bitmap(BITMAP *bmp1, BITMAP *bmp2);
πΈ DESCRIPTION πΈ
so you hand it two bitmaps, bmp1 and bmp2, and it comes back with TRUE if those two describe the same drawing surface. that's it. that's the whole vibe check. π«Ά
and bestie, "same drawing surface" is doing some heavy lifting here, because there are like three ways two bitmaps can be the same:
- the pointers are equal β literally the same bitmap, same address, no cap π
- one is a sub-bitmap of the other π¦
- they're both sub-bitmaps of a common parent β sisters, same source, iconic β¨
so likeβ¦ not me expecting it to just compare addresses π it's so much smarter than that. it actually knows the family tree. main character energy fr fr π
π SEE ALSO π
create_sub_bitmap(3alleg4)β go make some sub-bitmaps, iykyk π
ngl this is the function you want whenever you're about to draw on something and you're like "wait. is this thing literally the thing i already have" β because lowkey the answer is more complicated than == π
and that's the whole page, bestie!! π this was Allegro manual page is_same_bitmap(3alleg4), from Allegro version 4.4.3 β periodt. go forth and compare your drawing surfaces responsibly ππ§π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms