Files
Client/CryptoSource/ScriptEngine-MCF File/RelocTable.h
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

51 lines
1.1 KiB
C++

#ifndef _RelocTable_H_
#define _RelocTable_H_
#include "STL.h"
///////////////////////////////////////////////////////////////////////////////////
//
enum eStdFunc
{
FUNC_ITOA = 0,
FUNC_GCVT,
FUNC_MALLOC,
FUNC_FREE,
FUNC_STRCPY,
FUNC_STRCMP,
FUNC_STRLEN,
FUNC_REGISTERALLOCATEDMEMORY,
FUNC_UNREGISTERALLOCATEDMEMORY = 8
};
class CRelocTable
{
typedef vector<int> RELOCTABLE;
typedef pair<eStdFunc, int> FUNCRELOC;
typedef vector<FUNCRELOC> FUNCRELOCTABLE;
RELOCTABLE * m_pGlobalVarTable;
RELOCTABLE * m_pStringTable;
FUNCRELOCTABLE * m_pFuncRelocTable;
public:
CRelocTable();
~CRelocTable();
void Create( ifstream & );
const void * Create( const void * pDataBuf, unsigned dataSize );
void Destroy();
void Save( ofstream & );
void AddGlobalVar( int offset );
void AddConstString( int offset );
void AddFuncBind( eStdFunc, int offset );
void Relocate( void * pGlobalVarBuffer, void * pStringBuffer, void * pCodeBuffer );
void Unlocate( void * pGlobalVarBuffer, void * pStringBuffer, void * pCodeBuffer );
};
///////////////////////////////////////////////////////////////////////////////////
#endif