load_bmp(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ load_bmp ✨

okay bestie, gather round, because this one is a little legend from the Allegro game programming library πŸ’– (yes, that's the manual name, we're doing load_bmp(3) today, manifesting it)


🌸 SYNOPSIS 🌸

#include <allegro.h>

BITMAP *load_bmp(const char *filename, RGB *pal);

like, look at her. three lines. iconic. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually do?? she loads a BMP bitmap from a file. that's it, that's the whole vibe.

and not just any BMP either β€” she handles 8-bit, 16-bit, 24-bit and 32-bit BMP files, and she's chill with both Windows and OS/2 flavours. versatile queen fr fr 🌈✨


πŸ’… RETURN VALUE πŸ’…

on a good day she hands you back a pointer to the bitmap 🫢 and on a bad day she gives you NULL and you have to deal with that emotionally. that's the error case, bestie, no cap.

⚠️ okay but listen, this part is IMPORTANT: you are responsible for destroying the bitmap when you're finished with it. not her. you. because otherwise you get a memory leak and leaks are giving πŸ’€ not cute. free your bitmaps, periodt.

πŸŽ€ SEE ALSO πŸŽ€

go read those too, they're the girlies in the same friend group πŸ’œ


k byeeee, this was Allegro version 4.4.3 signing off** 🌟 stay slay, destroy your bitmaps, mwah πŸ’‹

πŸ“¦ where this page comes from