pack_iputw(3alleg4)

πŸ’– pack_iputw β€” the "write a lil 16-bit word" girly πŸ’–

okay bestie, welcome to the Allegro manual for pack_iputw, which lives in the 3alleg4 section of the manual. it's part of the Allegro game programming library, and it's literally the cutest tiny file-writing function you'll ever meet. no cap. πŸŽ€


✨ NAME ✨

pack_iputw β€” it's giving pack_putc(), but for 16-bit words with Intel byte ordering. yes, this is the Allegro game programming library, and yes, we're being fancy about it. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

int pack_iputw(int c, PACKFILE *f);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the way that this works is: it's just like pack_putc, but instead of one lil byte it writes a 16-bit word to a file. 🫢

And how does it write that word, you ask? With Intel byte ordering, bestie. That means the least significant byte comes first β€” a.k.a. little-endian. iconic behavior fr fr. 🌈

ngl if you were expecting big-endian, this is not that. this function said little-endian and it meant it. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole vibe check, bestie β€” you're all caught up. πŸŽ€βœ¨

Allegro, version 4.4.3 β€” this page is pack_iputw(3alleg4), and it ate, periodt. πŸ’…πŸ¦‹πŸŒΈ