mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
96 lines
1.6 KiB
C++
96 lines
1.6 KiB
C++
#ifdef PRECOMPILEDHEADERS
|
|
#include "Utils All.h"
|
|
#else
|
|
#include "types.h"
|
|
#include "Debug Control.h"
|
|
#include "stdio.h"
|
|
#endif
|
|
|
|
#include "sgp_logger.h"
|
|
|
|
#ifdef _ANIMSUBSYSTEM_DEBUG
|
|
|
|
void AnimDbgMessage( CHAR8 *strMessage)
|
|
{
|
|
FILE *OutFile;
|
|
|
|
if ((OutFile = fopen("AnimDebug.txt", "a+t")) != NULL)
|
|
{
|
|
fprintf(OutFile, "%s\n", strMessage);
|
|
fclose(OutFile);
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
#ifdef _PHYSICSSUBSYSTEM_DEBUG
|
|
|
|
void PhysicsDbgMessage( CHAR8 *strMessage)
|
|
{
|
|
FILE *OutFile;
|
|
|
|
if ((OutFile = fopen("PhysicsDebug.txt", "a+t")) != NULL)
|
|
{
|
|
fprintf(OutFile, "%s\n", strMessage);
|
|
fclose(OutFile);
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _AISUBSYSTEM_DEBUG
|
|
|
|
void AiDbgMessage( CHAR8 *strMessage)
|
|
{
|
|
FILE *OutFile;
|
|
|
|
if ((OutFile = fopen("AiDebug.txt", "a+t")) != NULL)
|
|
{
|
|
fprintf(OutFile, "%s\n", strMessage);
|
|
fclose(OutFile);
|
|
}
|
|
}
|
|
|
|
#endif
|
|
|
|
static struct LiveLog {
|
|
sgp::Logger_ID id;
|
|
LiveLog() {
|
|
id = sgp::Logger::instance().createLogger();
|
|
sgp::Logger::instance().connectFile(id, L"LiveLog.txt", false, sgp::Logger::FLUSH_ON_ENDL);
|
|
};
|
|
} s_LiveLog;
|
|
|
|
void LiveMessage( CHAR8 *strMessage)
|
|
{
|
|
#ifndef USE_VFS
|
|
FILE *OutFile;
|
|
|
|
if ((OutFile = fopen("Log.txt", "a+t")) != NULL)
|
|
{
|
|
fprintf(OutFile, "%s\n", strMessage);
|
|
fclose(OutFile);
|
|
}
|
|
#else
|
|
SGP_LOG(s_LiveLog.id, strMessage);
|
|
#endif
|
|
}
|
|
void MPDebugMsg( CHAR8 *strMessage)
|
|
{
|
|
#ifndef USE_VFS
|
|
FILE *OutFile;
|
|
|
|
if ((OutFile = fopen("MPDebug.txt", "a+t")) != NULL)
|
|
{
|
|
fprintf(OutFile, "%s\n", strMessage);
|
|
fclose(OutFile);
|
|
}
|
|
#else
|
|
static vfs::Log& mpMsg = *vfs::Log::create(L"MPDebug.txt", true);
|
|
mpMsg << strMessage << vfs::Log::endl;
|
|
#endif
|
|
}
|