get_mouse_mickeys(3)

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

πŸ’– get_mouse_mickeys πŸ’–

okay bestie, so this one is straight out of the Allegro manual, section 3 β€” it's called get_mouse_mickeys, and it's giving mouse-tracking realness. 🐭✨


✨ NAME ✨

get_mouse_mickeys β€” literally just: how far the mouse has moved since the last time you called this function. From the Allegro game programming library, no cap. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <allegro.h>

void get_mouse_mickeys(int *mickeyx, int *mickeyy);

πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe here is: this function measures how far the mouse has moved since the last time you called it. That's it. That's the gig. πŸ’…

Here's the tea on the outputs:

  • If the mouse went left, then mickeyx goes negative.
  • If the mouse went up, then mickeyy goes negative.

And here's the part that's genuinely iconic β€” the mouse keeps generating movement mickeys even when it hits the edge of the screen. It does not stop. It does not care. So if your game needs an infinite range of mouse movement, this form of input is literally built for you. πŸŽ€

⚠️ BUT. Bestie. Listen. That infinite movement may not work in windowed mode, because on some platforms the mouse would just leave the window β€” bye πŸ‘‹ β€” and it also may not work at all if the hardware cursor is in use. So don't come for me when it doesn't behave. πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, bestie 🫢 this lil legend ships with Allegro, version 4.4.3, and the page itself goes by get_mouse_mickeys(3). mwah, go track some mickeys. πŸ’–πŸŒΈβœ¨

πŸ“¦ where this page comes from