mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
nocashgba printf
This commit is contained in:
parent
ba1eb6d952
commit
0bf530da12
@ -7,6 +7,14 @@
|
|||||||
// to define NDEBUG before release, however this has been changed as
|
// to define NDEBUG before release, however this has been changed as
|
||||||
// Ruby's actual debug build does not use the AGBPrint features.
|
// Ruby's actual debug build does not use the AGBPrint features.
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
|
||||||
|
// To enable print debugging, comment out "#define NDEBUG". This allows
|
||||||
|
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
|
||||||
|
// Some emulators support a debug console window: uncomment NoCashGBAPrint()
|
||||||
|
// and NoCashGBAPrintf() in libisagbprn.c to use no$gba's own proprietary
|
||||||
|
// printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
|
||||||
|
// would normally use AGBPrint() and AGBPrintf().
|
||||||
|
|
||||||
// NOTE: Don't try to enable assert right now as many pointers
|
// NOTE: Don't try to enable assert right now as many pointers
|
||||||
// still exist in defines and WILL likely result in a broken ROM.
|
// still exist in defines and WILL likely result in a broken ROM.
|
||||||
|
|
||||||
|
@ -155,12 +155,22 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// no$gba print function, uncomment to use
|
// no$gba print functions, uncomment to use
|
||||||
/*
|
/*
|
||||||
void NoCashGBAPrint(const char *pBuf)
|
void NoCashGBAPrint(const char *pBuf)
|
||||||
{
|
{
|
||||||
*(volatile u32*)NOCASHGBAPRINTADDR = (u32)pBuf;
|
*(volatile u32*)NOCASHGBAPRINTADDR = (u32)pBuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NoCashGBAPrintf(const char *pBuf, ...)
|
||||||
|
{
|
||||||
|
char bufPrint[0x100];
|
||||||
|
va_list vArgv;
|
||||||
|
va_start(vArgv, pBuf);
|
||||||
|
vsprintf(bufPrint, pBuf, vArgv);
|
||||||
|
va_end(vArgv);
|
||||||
|
NoCashGBAPrint(bufPrint);
|
||||||
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user