al_lock_bitmap_region_blocked(3alleg5)

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

πŸ’– NAME πŸ’–

al_lock_bitmap_region_blocked β€” bestie, this is the Allegro 5 API function that lets you lock just part of a bitmap, and it measures that part in blocks not pixels. iykyk πŸŽ€


✨ SYNOPSIS ✨

okay so first you gotta pull in the header, no cap:

#include <allegro5/allegro.h>

and here's the signature, copy it exactly bestie, character for character πŸ‘‘

ALLEGRO_LOCKED_REGION *al_lock_bitmap_region_blocked(ALLEGRO_BITMAP *bitmap,
   int x_block, int y_block, int width_block, int height_block, int flags)

🌸 DESCRIPTION 🌸

So the vibe here is: it's literally al_lock_bitmap_blocked(3alleg5), same energy, same everything β€” except this one lets you lock a sub-region instead of the whole thing. and the reason you'd wanna do that? performance, obviously. slay. πŸ’…

🫢 but here's the plot twist that you NEED to clock: unlike al_lock_bitmap_region(3alleg5), the region you specify here is in terms of blocks, NOT pixels. do not mix those up bestie, that's the whole entire point of this function and mixing them is giving chaos 😭

⭐ SINCE ⭐

5.1.9 β€” she's been here a minute, iconic behavior πŸ¦‹


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page bestie, mwah πŸ’‹ this was the Allegro reference manual's take on al_lock_bitmap_region_blocked(3alleg5) β€” go lock that region, block by block, and don't forget: blocks, not pixels. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from