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>
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
#ifndef __MINERAL_VEIN_MANAGER_H__
|
||||
#define __MINERAL_VEIN_MANAGER_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#define g_MinveralVeinMgr CMineralVeinMgr::GetInstance()
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü
|
||||
struct MineralInfo
|
||||
{
|
||||
unsigned short m_dwMineralID; // <20><><EFBFBD><EFBFBD> Item ID
|
||||
unsigned char m_cMin; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Min
|
||||
unsigned char m_cMax; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Max
|
||||
};
|
||||
typedef std::list<MineralInfo> MineralInfoList;
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ü
|
||||
struct MineralVeinInfo
|
||||
{
|
||||
enum Length
|
||||
{
|
||||
MAX_VEIN_NAME_LEN = 32
|
||||
};
|
||||
|
||||
char m_szVeinName[ MAX_VEIN_NAME_LEN ]; // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD>
|
||||
unsigned long m_dwVeinColor; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ID
|
||||
unsigned long m_dwMaxFertility; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
unsigned long m_dwNowFertility; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (DB <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>)
|
||||
MineralInfoList m_lstMineralInfo; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
||||
};
|
||||
typedef std::map<unsigned long, MineralVeinInfo*> MineralVeinMap;
|
||||
|
||||
|
||||
// TGA <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#pragma pack (1)
|
||||
struct sTargaHeader {
|
||||
unsigned char IDLength, ColorMapType, ImageType ;
|
||||
unsigned short ColorMapOrigin, ColorMapSize ;
|
||||
unsigned char ColorMapEntrySize ;
|
||||
unsigned short XOrigin, YOrigin, Width, Height ;
|
||||
unsigned char PixelSize ;
|
||||
unsigned char ImageDescriptor ;
|
||||
};
|
||||
#pragma pack (8)
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>
|
||||
class CMineralVeinMgr
|
||||
{
|
||||
public:
|
||||
enum Const
|
||||
{
|
||||
MAX_TYPE_STRING_LEN = 32,
|
||||
MAX_HEXA_COLOR_LEN = 10,
|
||||
|
||||
COLOR_IMAGE_SIZE = 512
|
||||
};
|
||||
|
||||
static CMineralVeinMgr& GetInstance();
|
||||
|
||||
bool Initialize();
|
||||
void Destroy();
|
||||
|
||||
bool LoadMineralVeinsFromFiles(const char* szTextFile, const char* szImageFile = 0);
|
||||
bool SaveMineralVeinsToText(const char* szScriptFile);
|
||||
bool SaveMineralVeinsToBinary(const char* szBinaryFile, const char* szTrashFile = 0);
|
||||
bool LoadMineralVeinsFromBinary(const char* szBinaryFile);
|
||||
|
||||
MineralVeinInfo* GetMineralVein(unsigned long dwVeinColor) const;
|
||||
MineralVeinInfo* GetMineralVein(float fX, float fZ) const;
|
||||
unsigned long GetVeinColor(float fX, float fZ) const;
|
||||
const char* GetVeinName(float fX, float fZ) const;
|
||||
int GetVeinNum() const;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD> <20>Լ<EFBFBD>
|
||||
void InitializeMiningCampNum(); // <20><><EFBFBD>´<EFBFBD> ä<><C3A4><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
void CalculateMiningCampNum(float fX, float fZ); // ä<><C3A4><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>ش<EFBFBD><D8B4>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20>Լ<EFBFBD>
|
||||
int GetMiningCampNum(unsigned long dwVeinColor); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
void CalculateFertility(unsigned long dwProcessType); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
void SerializeOutFertility(unsigned long* lpData_Out, unsigned short& wSize);
|
||||
|
||||
|
||||
// DB <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>°<EFBFBD><C2B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>Լ<EFBFBD>
|
||||
bool SetNowFertility(unsigned short wNum, unsigned long* szDataFromDB);
|
||||
bool SetNowFertility(unsigned long dwVeinColor, unsigned long dwFertility);
|
||||
|
||||
private:
|
||||
|
||||
typedef std::map<unsigned long, int> VeinToCampNumMap; // < VeinColor, MiningCampNum >
|
||||
|
||||
CMineralVeinMgr();
|
||||
~CMineralVeinMgr();
|
||||
|
||||
MineralVeinMap m_mapMineralVein;
|
||||
VeinToCampNumMap m_mapCampNum;
|
||||
unsigned long m_dwColorTable[ COLOR_IMAGE_SIZE ][ COLOR_IMAGE_SIZE ];
|
||||
};
|
||||
|
||||
#endif // __MINERAL_VEIN_MANAGER_H__
|
||||
Reference in New Issue
Block a user