debug.h
author tron
Sun, 18 Dec 2005 12:10:46 +0000
changeset 2767 3282c77ffc27
parent 2436 177cb6a8339f
child 2916 8f1aa489701f
permissions -rw-r--r--
(svn r3313) Remove GPMI related changes from trunk
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2125
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2125
diff changeset
     2
1299
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     3
#ifndef DEBUG_H
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     4
#define DEBUG_H
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     5
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     6
#ifdef NO_DEBUG_MESSAGES
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     7
	#define DEBUG(name, level)
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
     8
#else
0a6510cc889b (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
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    10
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    11
	extern int _debug_ai_level;
2210
58a293892a66 (svn r2728) -Fix/Feature: Change the driver probing algorithm
tron
parents: 2186
diff changeset
    12
	extern int _debug_driver_level;
1299
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    13
	extern int _debug_grf_level;
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    14
	extern int _debug_map_level;
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    15
	extern int _debug_misc_level;
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    16
	extern int _debug_ms_level;
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    17
	extern int _debug_net_level;
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    18
	extern int _debug_spritecache_level;
1322
8697b73baa64 (svn r1826) -Feature: a brand new OldLoader so OpenTTD is TTD(Patch) compatible
truelight
parents: 1299
diff changeset
    19
	extern int _debug_oldloader_level;
2008
c9d6585c96c8 (svn r2516) - Feature: [pbs] Implement path-based-signalling. This allows multiple trains within the same signal block, provided their paths dont intersect. For this the block must have all exit and entry signals be pbs signals. Place these by ctrl-clicking 4 times on a normal signal.
hackykid
parents: 1847
diff changeset
    20
	extern int _debug_pbs_level;
2125
3098398bf7ff (svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* instead of Dijkstra.
ludde
parents: 2033
diff changeset
    21
	extern int _debug_ntp_level;
1678
838dd6f46081 (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
    22
	extern int _debug_npf_level;
1299
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    23
#endif
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    24
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    25
void CDECL debug(const char *s, ...);
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    26
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    27
void SetDebugString(const char *s);
1847
47703af63895 (svn r2352) - Feature: add the possibility to print out the current debug-level
Darkvater
parents: 1678
diff changeset
    28
const char *GetDebugString(void);
1299
0a6510cc889b (svn r1803) Move debugging stuff into files of it's own
tron
parents:
diff changeset
    29
2436
177cb6a8339f (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents: 2210
diff changeset
    30
#endif /* DEBUG_H */