debug.h
author Darkvater
Mon, 20 Feb 2006 19:42:39 +0000
changeset 3046 baa216f9911a
parent 2916 b687477adcba
child 3341 b20541ef8945
permissions -rw-r--r--
(svn r3626) - Merge the SlGlobVarList (global variables) and SaveLoad (offset in struct, variable determined runtime) structs. The only difference between these two is the last element that either holds the address or the offset in the struct. Which one to take is determined by which function is called; SlObject or SlGlobList.
2186
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2125
diff changeset
     1
/* $Id$ */
db48cf29b983 (svn r2701) Insert Id tags into all source files
tron
parents: 2125
diff changeset
     2
1299
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     3
#ifndef DEBUG_H
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     4
#define DEBUG_H
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     5
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     6
#ifdef NO_DEBUG_MESSAGES
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     7
	#define DEBUG(name, level)
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     8
#else
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     9
	#define DEBUG(name, level) if (level == 0 || _debug_ ## name ## _level >= level) debug
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    10
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    11
	extern int _debug_ai_level;
2210
b76184e0929c (svn r2728) -Fix/Feature: Change the driver probing algorithm
tron
parents: 2186
diff changeset
    12
	extern int _debug_driver_level;
1299
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    13
	extern int _debug_grf_level;
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    14
	extern int _debug_map_level;
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    15
	extern int _debug_misc_level;
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    16
	extern int _debug_ms_level;
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    17
	extern int _debug_net_level;
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    18
	extern int _debug_spritecache_level;
1322
a7fef520f54c (svn r1826) -Feature: a brand new OldLoader so OpenTTD is TTD(Patch) compatible
truelight
parents: 1299
diff changeset
    19
	extern int _debug_oldloader_level;
2125
edc17858f9f6 (svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
ludde
parents: 2033
diff changeset
    20
	extern int _debug_ntp_level;
1678
187385f01cc9 (svn r2182) - Add: [NPF] There is now a debug class for NPF. Use -d npf<level> to enable debugging printouts from npf.
matthijs
parents: 1322
diff changeset
    21
	extern int _debug_npf_level;
1299
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    22
#endif
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    23
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    24
void CDECL debug(const char *s, ...);
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    25
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    26
void SetDebugString(const char *s);
1847
d94ed71b61e7 (svn r2352) - Feature: add the possibility to print out the current debug-level
Darkvater
parents: 1678
diff changeset
    27
const char *GetDebugString(void);
1299
39c06aba09aa (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    28
2436
7d5df545bd5d (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents: 2210
diff changeset
    29
#endif /* DEBUG_H */