al_init(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’… al_init(3) β€” Allegro 5 API, bestie πŸ’…

Okay so this page is from the Library Functions Manual, and it’s the al_init(3) page for the Allegro 5 API. Short page, big main-character energy. πŸŽ€

✨ NAME ✨

al_init β€” Allegro 5 API

πŸ’– SYNOPSIS πŸ’–

#include <allegro5/allegro.h>

#define al_init()    (al_install_system(ALLEGRO_VERSION_INT, atexit))

πŸ¦‹ DESCRIPTION πŸ¦‹

So al_init is literally like al_install_system(3), except it automatically passes in the version β€” the ALLEGRO_VERSION_INT one β€” and uses the atexit function that’s visible in the current binary. Convenient macro behavior? Obsessed. πŸ’–

⚠️ Important note, bestie: it is typically wrong to call al_init anywhere except the final game binary. In particular, do not call it inside a shared library unless you know what you’re doing. In those cases, it is better to call al_install_system either with a NULL atexit_ptr, or with a pointer to atexit provided by the user of this shared library. No cap, this is the part to remember. 🫢

🌈 SEE ALSO 🌈


πŸ’– from the Allegro reference manual, al_init(3) β€” and the footer didn’t give us a date, so no invented date bestie. Mwah! πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms