isle/LEGO1/omni/include/mxdebug.h

33 lines
489 B
C
Raw Normal View History

2024-07-02 13:46:40 -04:00
#ifndef MXDEBUG_H
#define MXDEBUG_H
#include "compat.h"
#ifdef _DEBUG
// In debug mode, replace the macro with the function call.
#define MxTrace _MxTrace
void _MxTrace(const char* format, ...);
int DebugHeapState();
#else
// If not debug, MxTrace is a no-op.
#ifdef COMPAT_MODE
// Use variadic args for macro (C99)
#define MxTrace(...)
#else
// MSVC 4.20 does not have variadic args for macros
#define MxTrace(args)
#endif // COMPAT_MODE
#endif // _DEBUG
#endif // MXDEBUG_H