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