al_lock_bitmap_blocked(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… al_lock_bitmap_blocked

okay so real talk: this one is from the Allegro 5 API, and it lives in the Library Functions Manual section β€” so yes bestie, you found the right page πŸŽ€


✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

ALLEGRO_LOCKED_REGION *al_lock_bitmap_blocked(ALLEGRO_BITMAP *bitmap,
   int flags)

🌸 DESCRIPTION 🌸

So you know al_lock_bitmap(3)? This is literally that, but with a glow-up for blocked pixel formats β€” meaning formats where al_get_pixel_block_width(3) or al_get_pixel_block_height(3) don't return 1. This function lets you lock those bitmaps in that format, no cap πŸ’…

And because it's all about keeping the block vibe intact, it also does not allow format conversion. None. Zero. Not happening πŸ™…β€β™€οΈ

For bitmap formats with a block size of 1 though? It's identical to calling:

al_lock_bitmap(bmp, al_get_bitmap_format(bmp), flags)

like, same thing, literally 🫢

⚠️ Note: Currently there are no drawing functions that work when the bitmap is locked with a compressed format. al_get_pixel(3) will also not work. So yeah um 😭 keep that in mind before you go drawing on a compressed locked bitmap, because it's giving nothing works energy πŸ’€

πŸ‘‘ SINCE πŸ‘‘

5.1.9 β€” vintage, but make it iconic ✨

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page bestie, go lock some bitmaps πŸ§šβ€β™€οΈπŸ’– this has been the Allegro reference manual's take on al_lock_bitmap_blocked(3) β€” mwah, slay, periodt 🌈⭐

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms