src/debug.h
branchgamebalance
changeset 9895 7bd07f43b0e3
parent 9881 fbb3eab0e186
child 9912 1ac8aac92385
equal deleted inserted replaced
9894:70d78ac95d6c 9895:7bd07f43b0e3
    86 		void CDECL debug(const char *dbg, ...);
    86 		void CDECL debug(const char *dbg, ...);
    87 	#endif /* NO_VARARG_MACRO */
    87 	#endif /* NO_VARARG_MACRO */
    88 #endif /* NO_DEBUG_MESSAGES */
    88 #endif /* NO_DEBUG_MESSAGES */
    89 
    89 
    90 void SetDebugString(const char *s);
    90 void SetDebugString(const char *s);
    91 const char *GetDebugString(void);
    91 const char *GetDebugString();
    92 
    92 
    93 /* MSVCRT of course has to have a different syntax for long long *sigh* */
    93 /* MSVCRT of course has to have a different syntax for long long *sigh* */
    94 #if defined(_MSC_VER) || defined(__MINGW32__)
    94 #if defined(_MSC_VER) || defined(__MINGW32__)
    95 	#define OTTD_PRINTF64 "I64"
    95 	#define OTTD_PRINTF64 "I64"
    96 #else
    96 #else
    97 	#define OTTD_PRINTF64 "ll"
    97 	#define OTTD_PRINTF64 "ll"
    98 #endif
    98 #endif
    99 
    99 
   100 /* Used for profiling */
   100 /* Used for profiling */
   101 #define TIC() {\
   101 #define TIC() {\
   102 	extern uint64 _rdtsc(void);\
   102 	extern uint64 _rdtsc();\
   103 	uint64 _xxx_ = _rdtsc();\
   103 	uint64 _xxx_ = _rdtsc();\
   104 	static uint64 __sum__ = 0;\
   104 	static uint64 __sum__ = 0;\
   105 	static uint32 __i__ = 0;
   105 	static uint32 __i__ = 0;
   106 
   106 
   107 #define TOC(str, count)\
   107 #define TOC(str, count)\