al_lock_bitmap_blocked(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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