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 IKernel; |
7 | class IMap; |
8 | |
9 | struct CMapItemGroup; |
10 | struct CMapItemLayer; |
11 | struct CMapItemLayerTilemap; |
12 | |
13 | class CLayers |
14 | { |
15 | int m_GroupsNum; |
16 | int m_GroupsStart; |
17 | int m_LayersNum; |
18 | int m_LayersStart; |
19 | CMapItemGroup *m_pGameGroup; |
20 | CMapItemLayerTilemap *m_pGameLayer; |
21 | IMap *m_pMap; |
22 | |
23 | void InitTilemapSkip(); |
24 | |
25 | public: |
26 | CLayers(); |
27 | void Init(IKernel *pKernel); |
28 | void InitBackground(IMap *pMap); |
29 | int NumGroups() const { return m_GroupsNum; } |
30 | int NumLayers() const { return m_LayersNum; } |
31 | IMap *Map() const { return m_pMap; } |
32 | CMapItemGroup *GameGroup() const { return m_pGameGroup; } |
33 | CMapItemLayerTilemap *GameLayer() const { return m_pGameLayer; } |
34 | CMapItemGroup *GetGroup(int Index) const; |
35 | CMapItemLayer *GetLayer(int Index) const; |
36 | |
37 | // DDRace |
38 | |
39 | CMapItemLayerTilemap *TeleLayer() const { return m_pTeleLayer; } |
40 | CMapItemLayerTilemap *SpeedupLayer() const { return m_pSpeedupLayer; } |
41 | CMapItemLayerTilemap *FrontLayer() const { return m_pFrontLayer; } |
42 | CMapItemLayerTilemap *SwitchLayer() const { return m_pSwitchLayer; } |
43 | CMapItemLayerTilemap *TuneLayer() const { return m_pTuneLayer; } |
44 | |
45 | private: |
46 | CMapItemLayerTilemap *m_pTeleLayer; |
47 | CMapItemLayerTilemap *m_pSpeedupLayer; |
48 | CMapItemLayerTilemap *m_pFrontLayer; |
49 | CMapItemLayerTilemap *m_pSwitchLayer; |
50 | CMapItemLayerTilemap *m_pTuneLayer; |
51 | }; |
52 | |
53 | #endif |
54 |