install_int(3alleg4)
π install_int β bestie's guide to timers π
okay so you're out here in the Allegro game programming library and you want a thing to happen over and over, on a schedule, like clockwork? say less. this is the 3alleg4 page for install_int, and it's giving main character energy β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
int install_int(void (*proc)(), int speed);
π DESCRIPTION π
So basically, install_int installs a user timer handler, and speed is the number of milliseconds between ticks. That's it, that's the vibe π¦
Lowkey the important thing to know is this is the exact same thing as:
install_int_ex(proc, MSEC_TO_TIMER(speed))
fr fr, same energy, just a glowier wrapper.
Also, not me forgetting to set up the timer module first β because if you call this routine without having installed the timer module yet, install_timer() gets called automatically for you. considerate king behavior honestly π
And here's the cute part: if you call this routine again with the same timer handler as the parameter, you can adjust its speed. like, same bestie, new tempo. periodt π
β RETURN VALUE β
- Returns zero on success π«Ά
- Returns a negative number if there is no room to add a new user timer π
π SEE ALSO π
install_timer(3alleg4)remove_int(3alleg4)install_int_ex(3alleg4)install_param_int(3alleg4)exscn3d(3alleg4)exswitch(3alleg4)extimer(3alleg4)exzbuf(3alleg4)
okay that's the whole page, you ate it, no crumbs π
this little love letter was brought to you by Allegro, version 4.4.3, and it's install_int(3alleg4) β go forth and tick, bestie πππΈ
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms