Files
Client/GameTools/Zallad3D SceneClass/Z3DStringTable.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

88 lines
1.4 KiB
C++

// Z3DStringTable.h: interface for the CZ3DStringTable class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_Z3DSTRINGTABLE_H__587C6AC4_766F_4145_8059_21BB7D1550EA__INCLUDED_)
#define AFX_Z3DSTRINGTABLE_H__587C6AC4_766F_4145_8059_21BB7D1550EA__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#pragma warning(disable:4786)
#include <map>
#include "misc.h"
#pragma pack(push)
#pragma pack(1)
struct Z3DTOK
{
union
{
struct
{
long lTblNum:14;
long lItemNum:18;
};
long lNum;
};
Z3DTOK( long l )
{
lNum = l;
}
Z3DTOK()
{
}
bool operator == ( const Z3DTOK &t ) const
{
return (lNum == t.lNum);
}
bool operator != ( const Z3DTOK &t ) const
{
return (lNum != t.lNum);
}
bool operator < ( const Z3DTOK &t ) const
{
return(lNum < t.lNum);
}
};
#pragma pack(pop)
extern const Z3DTOK NULL_TOK;
class CZ3DStringTable
{
public:
CZ3DStringTable();
virtual ~CZ3DStringTable();
Z3DTOK Add( const char* szKey );
Z3DTOK GetTOK( const char* szKey );
const char* GetString( const Z3DTOK tok );
void Flush();
protected:
// Tablenumµµ TOKCountµµ ¸ðµÎ 0ÀÌ µÉ ¼ö ¾ø´Ù
long m_lTablenum;
long m_lTOKCount;
std::map<char*, Z3DTOK, szi_less> m_mapString2TOK;
std::map<Z3DTOK, char*> m_mapTOK2String;
static long ms_lTableCount;
};
#endif // !defined(AFX_Z3DSTRINGTABLE_H__587C6AC4_766F_4145_8059_21BB7D1550EA__INCLUDED_)