1
0
forked from metin2/client
client/GameLib/MapBase.h

65 lines
2.3 KiB
C
Raw Normal View History

#pragma once
class CMapBase : public CScreen
{
public:
enum EMAPTYPE
{
MAPTYPE_INVALID,
MAPTYPE_INDOOR,
MAPTYPE_OUTDOOR,
};
public:
CMapBase();
virtual ~CMapBase();
virtual void Clear();
virtual bool Initialize() = 0;
virtual bool Destroy() = 0;
virtual bool Load(float x, float y, float z) = 0;
virtual bool Update(float fX, float fY, float fZ) = 0;
virtual void UpdateAroundAmbience(float fX, float fY, float fZ) = 0;
virtual float GetHeight(float fx, float fy) = 0;
virtual void OnBeginEnvironment() = 0; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⼭ Environment<6E><74> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>͵<EFBFBD><CDB5><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
virtual void ApplyLight(DWORD dwVersion, const D3DLIGHT8& c_rkLight) = 0;
protected:
virtual void OnRender() = 0;
virtual void OnSetEnvironmentDataPtr() = 0; // Environment <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD>.
virtual void OnResetEnvironmentDataPtr() = 0;
public:
void Render();
void SetEnvironmentDataPtr(const TEnvironmentData * c_pEnvironmentData);
void ResetEnvironmentDataPtr(const TEnvironmentData * c_pEnvironmentData);
bool Enter();
bool Leave();
bool IsReady() { return m_bReady; }
bool LoadProperty();
//////////////////////////////////////////////////////////////////////////
// Setting
//////////////////////////////////////////////////////////////////////////
EMAPTYPE GetType() const { return m_eType; }
void SetType(EMAPTYPE eType) { m_eType = eType; }
const std::string & GetName() const { return m_strName; }
void SetName(const std::string & cr_strName) { m_strName = cr_strName; }
bool IsCopiedMap() const { return m_strParentMapName.length() > 0; } // "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD>" <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ΰ<EFBFBD>?
const std::string& GetParentMapName() const { return m_strParentMapName; } // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>͸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʼ<EFBFBD><CABC><EFBFBD> <20><><EFBFBD>õǾ<C3B5><C7BE><EFBFBD> <20><>)
const std::string& GetMapDataDirectory() const { return IsCopiedMap() ? m_strParentMapName : m_strName; }
protected:
EMAPTYPE m_eType; // <20><> <20><><EFBFBD><EFBFBD>... <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Indoor<6F><72> Ourdoor<6F><72> <20>ִ<EFBFBD>.
std::string m_strName; // <20><> <20≯<EFBFBD>. <20><> <20≯<EFBFBD><CCB8><EFBFBD> <20><> <20>ĺ<EFBFBD><C4BA>ڰ<EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
std::string m_strParentMapName; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>õǾ<C3B5> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> ParentMap/* <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> <20>о<EFBFBD><D0BE>´<EFBFBD>. <20><><EFBFBD><EFBFBD> <20>Ϻθ<CFBA> <20>о<EFBFBD><D0BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><20>н<EFBFBD>.
bool m_bReady;
const TEnvironmentData * mc_pEnvironmentData;
};