Files
Client/GameTools/ZALLA3D BASECLASS/StateLog.cpp
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

38 lines
826 B
C++

// StateLog.cpp: implementation of the CStateLog class.
//
//////////////////////////////////////////////////////////////////////
#include "StateLog.h"
#include <Windows.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
FILE *CStateLog::m_fp;
CStateLog::CStateLog()
{
m_fp=NULL;
}
CStateLog::~CStateLog()
{
fclose(m_fp);
}
void CStateLog::Create(char *strFilename)
{
m_fp=fopen(strFilename,"wt");
if(m_fp==NULL)
MessageBox(NULL,"Create Logfile failed",0,0);
}
void CStateLog::Message(char *strMessage, char *strFilename, int strLine)
{
if(m_fp==NULL)
{
CStateLog::Create("c:\\MP_Client.log");
}
fprintf(m_fp,"%-30s _Filename_: %-20s _Line_: %6d\n",strMessage,strFilename,strLine);
}