pack_mgetw(3alleg4)

✨ pack_mgetw β€” the Allegro manual, bestie edition πŸ’–

okay so you're in the 3alleg4 section of the Allegro manual and you clicked on pack_mgetw?? taste. immaculate taste actually. this is from the Allegro game programming library btw, just so we're clear on the vibe πŸŽ€


🌸 NAME 🌸

pack_mgetw β€” it's literally like pack_getc(), except it works with 16-bit Motorola byte ordering words. that's it, that's the whole thing. Allegro game programming library ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int pack_mgetw(PACKFILE *f);

πŸ’… DESCRIPTION πŸ’…

okay so picture pack_getc, right? iconic behavior. now imagine it but it reads a 16-bit word from a file, and it does it using Motorola byte ordering. that means the most significant byte comes first, a.k.a. big-endian, a.k.a. the way Motorola likes it. no cap. 🫢

so yeah β€” same energy as pack_getc, just a chunky little 16-bit word and the bytes are flipped the other way. the way that big-endian just does that. πŸ˜­πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

  • pack_getc(3alleg4) β€” the sibling. the original. the blueprint. go read it, fr fr 🌈

lowkey important: this page came straight out of the Allegro manual, pack_mgetw(3alleg4) section, and it's version 4.4.3 energy all day. slay, bestie, go read some bytes πŸ’œβœ¨πŸŽ€