summaryrefslogtreecommitdiff
path: root/debug.h
blob: d67b54aa0d92d9e26f8e3bf551b4615c66177750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef DEBUG_H
#define DEBUG_H

#ifdef NO_DEBUG_MESSAGES
	#define DEBUG(name, level)
#else
	#define DEBUG(name, level) if (level == 0 || _debug_ ## name ## _level >= level) debug

	extern int _debug_ai_level;
	extern int _debug_grf_level;
	extern int _debug_map_level;
	extern int _debug_misc_level;
	extern int _debug_ms_level;
	extern int _debug_net_level;
	extern int _debug_spritecache_level;
	extern int _debug_oldloader_level;
	extern int _debug_pbs_level;
	extern int _debug_ntp_level;
#ifdef GPMI
	extern int _debug_gpmi_level;
#endif /* GPMI */
	extern int _debug_npf_level;
#endif

void CDECL debug(const char *s, ...);

void SetDebugString(const char *s);
const char *GetDebugString(void);

#ifdef GPMI
void gpmi_debug_openttd(int level, char *s);
#endif /* GPMI */

#endif