1 // ------------------------------------------------------------------
3 // ------------------------------------------------------------------
4 // This implements a tracer for debugging the game
5 // Basically, it records events on disk, so we can trace where the hell
6 // the bastard is crashing!
7 // ------------------------------------------------------------------
8 // Developed By Kronoman - Copyright (c) 2004
9 // In loving memory of my father
10 // ------------------------------------------------------------------
18 // yeah, sue me, I'm using C functions (I have my reasons, so, be nice and STFU)
20 #include <stdarg.h> // for the variable argument list
22 // file to save the trace (filename, 8.3 chars to keep compatibility with DOS)
23 #define TRACE_SAVE_IN_FILE "tracelog.txt"
32 void add(const char *msg
, ...); // format like printf :O
34 void reset(); // reset the file where we are tracing (OVERWRITES THE FILE!)
36 // NOTE: this is configuration for all class objects (notice the 'static')
37 static bool DISABLE_TRACE
; // define this to true to DISABLE the logging