MMap.h
00001 #ifndef MMAP_H 00002 #define MMAP_H 00003 00004 #include "MGridMap.h" 00005 #include <vector> 00006 using namespace std; 00007 00008 00009 class MObject; 00010 namespace RealSpace2{ 00011 class RBspObject; 00012 } 00013 class MZFileSystem; 00014 00015 #define MMAP_NAME_LENGTH 64 00016 00017 typedef MGridMap<MObject*> MObjectGridMap; 00018 00020 class MMap : public MObjectGridMap{ 00021 protected: 00022 char m_szName[MMAP_NAME_LENGTH]; 00023 int m_nID; 00024 /* 00025 MGridMap<MObjectCharacter*> m_CharacterGridMap; ///< Grid Map for Referencing 00026 MGridMap<MObjectItem*> m_ItemGridMap; ///< Grid Map for Referencing 00027 */ 00028 RealSpace2::RBspObject* m_pBspObj; 00029 00030 public: 00031 MMap(int nID, const char* szName); 00032 virtual ~MMap(void); 00033 00034 int GetID(void){ return m_nID; } 00035 const char* GetName(void){ return m_szName; } 00036 00037 int Create(const char* szFileName, MZFileSystem* pZFS=NULL); 00038 void Destroy(void); 00039 00040 /* 00041 void AddRef(MObject* pObj); 00042 void DelRef(MObject* pObj); 00043 */ 00044 00045 void RandomLocate(void); 00046 00047 RealSpace2::RBspObject* GetBspObject(void){ return m_pBspObj; } 00048 }; 00049 00051 class MMapManager : public vector<MMap*>{ 00052 public: 00053 MMapManager(void); 00054 virtual ~MMapManager(void); 00055 00056 MMap* Get(const char* szName); 00057 int GetID(const char* szName); 00058 }; 00059 00060 00061 #endif
MAIET entertainment