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