exfixed(3)

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

πŸ’– exfixed πŸ’–

okay bestie, welcome to the Allegro manual, page exfixed from section 3 β€” yes it's a library function page, and yes it's literally about fixed point maths. stay with me, it's giving math but make it cute 🧚✨


✨ NAME ✨

exfixed β€” using fixed point maths, bestie. it's an Allegro game programming library thing. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

Example exfixed

like. that's it. that's the whole vibe. #include <allegro.h> and then you just... run the example exfixed. iconic behavior honestly πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this program is a demonstration of how to use fixed point numbers, and no bc same, I also had to sit down for this one. here's the tea:

a fixed point number is a signed 32-bit integer</> that stores:

  • the integer part in the upper 16 bits
  • the decimal part in the 16 lower bits

that's it. that's the whole structure. 16 and 16, split right down the middle like a friendship bracelet 🫢

this example also does something a lil unusual: it talks to the user exclusively via the allegro_message() function. no fancy windows, no buttons, no nothing β€” just allegro_message() carrying the entire conversation. main character energy fr fr 😭


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, bestie, they're all in the same friend group:


and that's the page!! this was Allegro, version 4.4.3, and we were reading exfixed(3) the whole time β€” so like, go forth and divide your 32-bit integers responsibly. no cap. slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from