Files @ r2980:c0fb57e5b1da
Branch filter:

Location: cpp/openttd-patchpack/source/debug.h

bjarni
(svn r3555) -Codechange: [Big Endian] removed defining OTTD_ALIGNMENT by default on Big Endian CPUs
this increased speed when reading unaligned data (like strings)
test showed this to increase speed by 5,6% when drawing the mini map on PPC OSX

the tradeoff is that now it will crash if a Big Endian computer don't support unaligned reading
but it should easily fixable in stdafx.h if it turns out to be a problem
/* $Id$ */

#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_driver_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_ntp_level;
	extern int _debug_npf_level;
#endif

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

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

#endif /* DEBUG_H */