mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
[debug, printf] add DebugPrintfLevel macro
This commit is contained in:
parent
fab26b99f1
commit
0d5adac1e1
@ -11,6 +11,7 @@
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DebugPrintf(pBuf, ...)
|
||||
#define DebugPrintfLevel(level, pBuf, ...)
|
||||
#define MgbaOpen()
|
||||
#define MgbaClose()
|
||||
#define AGBPrintInit()
|
||||
@ -31,16 +32,19 @@ void AGBPrintInit(void);
|
||||
|
||||
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__)
|
||||
|
||||
#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
|
||||
|
||||
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#else // Default to AGBPrint
|
||||
|
||||
#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user