Files
source/Utils/Debug Control.cpp
T
Wanne 1c69e1a019 *** Merged Code from Multiplayer Branch Revision 2993 ***
- Updated VFS
- Fixed Map Editor not properly initialized with VFS
- New Map Editor Release (Build: 2993(


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2994 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2009-06-09 11:40:08 +00:00

91 lines
1.5 KiB
C++

#ifdef PRECOMPILEDHEADERS
#include "Utils All.h"
#else
#include "types.h"
#include "Debug Control.h"
#include "stdio.h"
#endif
#include "VFS/vfs.h"
#include "VFS/Tools/Log.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
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
static CLog& liveMsg = *CLog::Create(L"LiveLog.txt",true);
liveMsg << strMessage << CLog::endl;
#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 CLog& mpMsg = *CLog::Create(L"MPDebug.txt", true);
mpMsg << strMessage << CLog::endl;
#endif
}