RLE_SPRITE(3alleg4)

πŸ’– RLE_SPRITE πŸ’–

okay bestie, so this one lives in the Allegro manual (that's 3alleg4, the Allegro game programming library, iykyk) and it's literally just the struct that holds an RLE sprite. that's it. that's the whole vibe. ✨


🌸 NAME 🌸

RLE_SPRITE β€” stores the contents of an RLE sprite. Allegro game programming library. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

typedef struct RLE_SPRITE

✨ DESCRIPTION ✨

okay so here's what's inside this little icon:

  • int w, h; β€” width and height in pixels πŸŽ€
  • int color_depth; β€” the color depth of the image πŸ’œ

RLE sprites keep the image in a simple run-length encoded format. how does it work? the way that repeated zero pixels get replaced by a single length count, and then strings of non-zero pixels get preceded by a counter that gives the length of the solid run. that's the whole trick, no cap. 🧚

bestie pls go read the chapter "RLE sprites" for a description of the restrictions and how to obtain/use this structure. do not skip it. i'm not playing. 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, you ate that fr fr πŸ’– this was brought to you by Allegro version 4.4.3, and the original page is dated that same lovely 4.4.3 era β€” so if you're out here reading this, congrats, you're officially a struct-understanding main character. mwah. 🫢🌸