pack_mgetw(3)

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

πŸ’– pack_mgetw(3) β€” the Allegro manual, but make it make sense πŸ’–

okay bestie, welcome to the Allegro manual, page for pack_mgetw. yes it's a manual page, yes it's giving ancient scroll energy, but lowkey it's so useful. let's get into it 🫢


✨ NAME ✨

pack_mgetw β€” it's literally pack_getc(), but it pulls 16-bit words out of your file using Motorola byte ordering. and it lives in the Allegro game programming library. that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

int pack_mgetw(PACKFILE *f);

πŸ¦‹ DESCRIPTION πŸ¦‹

so, same energy as pack_getc, right? except instead of grabbing one little byte, it reads a 16-bit word from the file. and the way it does it? Motorola byte ordering. which means the most significant byte comes first β€” you might know her by her other name, big-endian. periodt. πŸ’…

that's it, that's the function. she's small but she's iconic 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

  • pack_getc(3) β€” the byte-sized sibling, go say hi πŸŽ€

ngl this page is short and that's the whole point. no extra lore, no invented behaviour, just the facts fr fr. if you need the byte-order lowdown, it's big-endian, msb first, no cap πŸ’€

and that's the tea, bestie πŸ“ this was Allegro version 4.4.3 serving it to you on this very pack_mgetw(3) page. go read the file, slay the byte order, and stay main character πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from