is_memory_bitmap(3alleg4)
is_memory_bitmap π
ok so this is a page from the Allegro manual, section 3alleg4, and it's literally just one tiny function that answers one very important question: is this bitmap a memory bitmap or not? bestie it's giving "am I the main character" but for bitmaps β¨
β¨ NAME β¨
is_memory_bitmap β tells you if a bitmap is a memory bitmap π
(also: it's part of the Allegro game programming library, iykyk π )
πΈ SYNOPSIS πΈ
#include <allegro.h>
int is_memory_bitmap(BITMAP *bmp);
like. that's the whole thing. one include, one call, one int back. no cap π«Ά
π« DESCRIPTION π«
okay so here's the tea π β is_memory_bitmap returns TRUE if bmp is a memory bitmap. and what even is a memory bitmap, you ask? it's one that was:
- created by calling
create_bitmap(), or - loaded from a grabber datafile or image file π
that's the vibe check. if it passes either of those, boom, you get TRUE. π₯
and the reason you'd even care, bestie, is that memory bitmaps can be accessed directly through the line pointers in the bitmap structure, like this:
bmp->line[y][x] = color;
so you can just reach in there and poke pixels yourself. very main character energy, no middleman, we love to see it π
π¦ SEE ALSO π¦
(they're the siblings fr fr, go say hi π)
Allegro, version 4.4.3 β and that's the whole page, is_memory_bitmap(3alleg4), wrapped up with a little bow π thanks for coming to my TED talk, go forth and poke pixels 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