save_bmp(3alleg4)

πŸ’Ύ save_bmp β€” the "put my pixels in a file" girlie πŸ’Ύ

okay so bestie, we're deep in the Allegro game programming library manual rn, and this one's a lil function called save_bmp. she's simple, she's iconic, she does exactly one thing and she does it well. no notes. πŸ’…


✨ NAME ✨

save_bmp β€” Saves a bitmap into a BMP file. Allegro game programming library.


🌸 SYNOPSIS 🌸

#include <allegro.h>

int save_bmp(const char *filename, BITMAP *bmp, const RGB *pal);

πŸŽ€ DESCRIPTION πŸŽ€

so like, what she does is write a bitmap into a BMP file. that's it. that's the whole vibe. ✨

and not just any BMP, bestie β€” she's giving you a 256-color BMP or a 24-bit truecolor BMP. two options, both slay, pick your fighter. πŸ’–


πŸ¦‹ RETURN VALUE πŸ¦‹

returns non-zero on error. so if you get anything that isn't zero, that's the universe telling you something went wrong 😭 β€” zero means we ate, non-zero means we did not. 🫢


🌈 SEE ALSO 🌈


fr fr, that's the whole page. short and sweet, main character energy, no cap. πŸ’œ

okay pookies, that's a wrap on this one β€” brought to you by Allegro, version 4.4.3, the manual that raised us. go save some bitmaps, you got this. πŸŽ€πŸ’–βœ¨