al_lock_bitmap_blocked(3alleg5)
π al_lock_bitmap_blocked β Allegro 5 API π
okay bestie, welcome to the Allegro 5 manual, group-chat edition π«Ά this one's a lil niche but it's lowkey iconic, i promise.
β¨ SYNOPSIS β¨
#include <allegro5/allegro.h>
ALLEGRO_LOCKED_REGION *al_lock_bitmap_blocked(ALLEGRO_BITMAP *bitmap,
int flags)
πΈ DESCRIPTION πΈ
so like, this is basically al_lock_bitmap but with main character energy π
β it lets you lock bitmaps that have a blocked pixel format, meaning a format where al_get_pixel_block_width or al_get_pixel_block_height do not return 1 β and it locks them in that format. Periodt.
and because of that whole situation, this function does not allow format conversion. none. zero. not a vibe it's willing to do. π«
but here's the slay part: for bitmap formats with a block size of 1, this function is literally identical to calling:
al_lock_bitmap(bmp, al_get_bitmap_format(bmp), flags)
same thing, no cap. β¨
π¨ Note: Currently there are no drawing functions that work when the bitmap is locked with a compressed format. al_get_pixel will also not work. so likeβ¦ be aware bestie π
β SINCE β
5.1.9 β yeah she's been around a minute, a true veteran π
π¦ SEE ALSO π¦
al_lock_bitmap(3alleg5)al_lock_bitmap_region_blocked(3alleg5)
k that's the whole page bestie, go lock some blocked bitmaps, you got this ππ
Allegro reference manual Β· al_lock_bitmap_blocked(3alleg5) β mwah, tysm for reading, ily, bye ππ§
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms