debug.h
author truelight
Sun, 06 Feb 2005 18:28:35 +0000
changeset 1322 8697b73baa64
parent 1299 0a6510cc889b
child 1678 838dd6f46081
permissions -rw-r--r--
(svn r1826) -Feature: a brand new OldLoader so OpenTTD is TTD(Patch) compatible
again.. kind of anyway. Still needs work for the extra chunks
TTDPatch provides, and which we use too, but not in the same way..
- Also, no longer BE is a problem, reading is BE/LE safe.
- Tnx to Bjarni for the BE testing, Tron for the help on the BE,
Darkvater for helping out, and Mek for providing me with the correct
information regarding TTDPatch savegames
#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;
#endif

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

void SetDebugString(const char *s);

#endif