LANDSCPE.H
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #ifndef LANDSCPE_H
- #define LANDSCPE_H
- #include <baseobj.h>
- class landscapelist;
- class LSEntryType
- {
- public:
- LSEntryType(view& v, CString& str, tccolor color);
- ~LSEntryType();
- char operator ==(LSEntryType& other);
- view Location;
- CString Image;
- tccolor Color;
- char Created;
- LSEntryType *Next;
- LSEntryType *Prev;
- };
- class landscape : public baseobject
- {
- public:
- friend class landscapelist;
- landscape(CString& filename);
- virtual ~landscape();
- CString& bmpfile() { return m_bmpfile; }
- void AssociatedLSEntry(LSEntryType *ls) { delete m_LSEntry; m_LSEntry = ls; }
- void RemoveLSEntry() { delete m_LSEntry; m_LSEntry = 0; }
- void DeleteEntryAlso() { m_DeleteEntryAlso = TRUE; }
- private:
- CString m_bmpfile;
- char m_DeleteEntryAlso;
- LSEntryType *m_LSEntry;
- landscape *NextLandScpe;
- landscape *PrevLandScpe;
- };
- class landscapelist
- {
- public:
- friend class LSEntryType;
- friend class landscape;
- landscapelist();
- ~landscapelist() { CleanUp(); }
- void CleanUp() { Purge(); PurgeLandscape(); }
- void load(CString& str);
- void CreateCloseLandscapes();
- LSEntryType *GetLSEntry(view& tmploc);
- void save();
- view& GeneralArea() { return LSEntries->Location; }
- void AddLSEntry(view& v, CString& str, tccolor color);
- void AddLSEntry(baseobject *lnd);
- void removeduplicates();
- private:
- void Purge();
- void PurgeLandscape();
- landscape *First() { m_Curr = m_First; return m_Curr; }
- landscape *Next() { if (m_Curr) m_Curr = m_Curr->NextLandScpe; return m_Curr; }
- landscape *m_First;
- landscape *m_Curr;
- char GotMap;
- LSEntryType *LSEntries;
- short PauseCounter;
- };
- #endif