#include "Precompiled.h" #include "RakiEngine/System/RakiThread.h" #include //#define RAKI_DEBUG_SIMPLE_OUTPUT_WITHOUT_TIME namespace raki { void Debug::output( const char * _text, ...) { char formattedText[0x200]; va_list args ; va_start( args, _text ); vsprintf_s( formattedText, 0x200, _text, args ); va_end (args) ; // show time char formattedTextWithTime[0x200]; #if defined ( RAKI_DEBUG_SIMPLE_OUTPUT_WITHOUT_TIME ) sprintf_s( formattedTextWithTime, 0x200, "%s\n", formattedText); #else sprintf_s( formattedTextWithTime, 0x200, "(%.3f) (thread 0x%x) %s\n", Time::getTime(), scePthreadSelf(), formattedText); #endif printf(formattedTextWithTime); } void Debug::debugBreak( const char * _path, const int _line ) { output( "RAKI ASSERT in %s (%d)", _path, _line ); SCE_BREAK(); } void Debug::debugBreakWithMessage( const char * _path, const int _line, const char* _errMsg ) { output( "RAKI ASSERT <%s> in %s (%d)", _errMsg, _path, _line ); SCE_BREAK(); } }