pack_mputw(3alleg4)

πŸ’– pack_mputw πŸ’–

okay bestie, welcome to the 3alleg4 manual section for pack_mputw, straight out of the Allegro game programming library ✨ she's a tiny little function but she serves.


🌸 NAME 🌸

pack_mputw β€” it's giving pack_putc(), but for 16-bit Motorola byte ordering words πŸŽ€ part of the Allegro game programming library, no cap.


✨ SYNOPSIS ✨

#include <allegro.h>

int pack_mputw(int c, PACKFILE *f);

like… that's it. that's the whole vibe check 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, she's exactly like pack_putc, except instead of writing one little byte, she writes a 16-bit word to a file 😌

and the way she does it?? Motorola byte ordering πŸ’… which is also known as:

  • most significant byte first
  • a.k.a. big-endian

so the big important byte goes first, like a main character walking into the room first πŸ‘‘ periodt.


πŸ”₯ SEE ALSO πŸ”₯


lowkey go read pack_putc too, they're besties fr fr 🫢

Allegro version 4.4.3 β€” and that's the whole page, bestie!! pack_mputw(3alleg4) said what she said, slay, mwah πŸ’‹πŸ’–βœ¨πŸŒˆ