| 1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
|---|---|
| 2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
| 3 | #ifndef GAME_LAYERS_H |
| 4 | #define GAME_LAYERS_H |
| 5 | |
| 6 | class IMap; |
| 7 | |
| 8 | class CMapItemGroup; |
| 9 | class CMapItemLayer; |
| 10 | class CMapItemLayerTilemap; |
| 11 | |
| 12 | class CLayers |
| 13 | { |
| 14 | public: |
| 15 | CLayers(); |
| 16 | void Init(IMap *pMap, bool GameOnly); |
| 17 | void Unload(); |
| 18 | |
| 19 | int NumGroups() const { return m_GroupsNum; } |
| 20 | int NumLayers() const { return m_LayersNum; } |
| 21 | IMap *Map() const { return m_pMap; } |
| 22 | CMapItemGroup *GameGroup() const { return m_pGameGroup; } |
| 23 | CMapItemLayerTilemap *GameLayer() const { return m_pGameLayer; } |
| 24 | CMapItemGroup *GetGroup(int Index) const; |
| 25 | CMapItemLayer *GetLayer(int Index) const; |
| 26 | |
| 27 | // DDRace |
| 28 | |
| 29 | CMapItemLayerTilemap *TeleLayer() const { return m_pTeleLayer; } |
| 30 | CMapItemLayerTilemap *SpeedupLayer() const { return m_pSpeedupLayer; } |
| 31 | CMapItemLayerTilemap *FrontLayer() const { return m_pFrontLayer; } |
| 32 | CMapItemLayerTilemap *SwitchLayer() const { return m_pSwitchLayer; } |
| 33 | CMapItemLayerTilemap *TuneLayer() const { return m_pTuneLayer; } |
| 34 | |
| 35 | private: |
| 36 | int m_GroupsNum; |
| 37 | int m_GroupsStart; |
| 38 | int m_LayersNum; |
| 39 | int m_LayersStart; |
| 40 | |
| 41 | CMapItemGroup *m_pGameGroup; |
| 42 | CMapItemLayerTilemap *m_pGameLayer; |
| 43 | IMap *m_pMap; |
| 44 | |
| 45 | CMapItemLayerTilemap *m_pTeleLayer; |
| 46 | CMapItemLayerTilemap *m_pSpeedupLayer; |
| 47 | CMapItemLayerTilemap *m_pFrontLayer; |
| 48 | CMapItemLayerTilemap *m_pSwitchLayer; |
| 49 | CMapItemLayerTilemap *m_pTuneLayer; |
| 50 | |
| 51 | void InitTilemapSkip(); |
| 52 | }; |
| 53 | |
| 54 | #endif |
| 55 |