TRACE(3)

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

✨ TRACE(3) ✨

the Allegro manual, but make it a group chat πŸ’–


πŸŽ€ NAME πŸŽ€

TRACE β€” bestie, it's the debugging helper macro that traces your messages. It lives in the Allegro game programming library. πŸ¦‹


✨ SYNOPSIS ✨

#include <allegro.h>

void TRACE(char *msg, ...);

πŸ’… DESCRIPTION πŸ’…

okay so listen. TRACE is a debugging helper macro. and the vibe is: normally it compiles away to nothing. like, it's not even there. ghosted. poof. πŸ«₯

BUT β€” and this is the moment, this is the main character energy β€” if you defined the preprocessor symbol DEBUGMODE before including the Allegro headers, then it takes the message you gave it (in ASCII format, obvs πŸ’) and passes it straight to al_trace(). slay.

Example, because seeing it is believing:

#define DEBUGMODE
#include
...
void my_blitter(BITMAP *source, int flags)
{
   static int count_call = 0;
   TRACE("my_blitter() called %d times.\n", count_call++);
   ...
}

no cap, that count_call++ is out here keeping receipts on every single call. iconic. πŸ‘‘


🌸 SEE ALSO 🌸


k bye bestie, go trace something πŸ’– this was the Allegro manual, version 4.4.3 β€” she's 4.4.3 coded and she ate, fr fr. πŸŽ€βœ¨

πŸ“¦ where this page comes from