COMPILED_SPRITE(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ COMPILED_SPRITE ✨

okay bestie, so this is a page from the Allegro manual β€” like, the actual Allegro game programming library β€” and today's main character is COMPILED_SPRITE. it stores the contents of a compiled sprite. that's it, that's the vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

typedef struct COMPILED_SPRITE

πŸ’– DESCRIPTION πŸ’–

so here's what's inside the struct, no cap:

  • short planar; β€” set if it's a planar (mode-X) sprite πŸ‘€
  • short color_depth; β€” the color depth of the image 🌈
  • short w, h; β€” the size of the sprite πŸ“

and now the wild part: compiled sprites aren't stored as pixels, they're stored as actual machine code instructions that draw a specific image onto a bitmap, using mov instructions with immediate data values. like, the sprite is the code. it's giving main character energy fr fr. πŸ”₯

bestie pls go read the chapter "Compiled sprites" β€” it explains the restrictions and how to obtain/use this structure. iykyk, don't skip it. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page, you ate that πŸ’…βœ¨ this was Allegro, version 4.4.3 β€” mwah, go forth and compile ur sprites, bestie πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from