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_CLIENT_COMPONENTS_MAPLAYERS_H
4#define GAME_CLIENT_COMPONENTS_MAPLAYERS_H
5
6#include <game/client/component.h>
7#include <game/client/components/envelope_state.h>
8#include <game/map/map_renderer.h>
9
10class CCamera;
11class CLayers;
12class CMapImages;
13class ColorRGBA;
14
15class CMapLayers : public CComponent
16{
17 friend class CBackground;
18 friend class CMenuBackground;
19
20 CLayers *m_pLayers;
21 CMapImages *m_pImages;
22 ERenderType m_Type;
23 bool m_OnlineOnly;
24
25public:
26 CMapLayers(ERenderType Type, bool OnlineOnly = true);
27 int Sizeof() const override { return sizeof(*this); }
28 void OnInit() override;
29 void OnRender() override;
30 void OnMapLoad() override;
31
32 virtual CCamera *GetCurCamera();
33
34 CEnvelopeState &EnvEvaluator() { return m_EnvEvaluator; }
35
36private:
37 CRenderLayerParams m_Params;
38 CMapRenderer m_MapRenderer;
39 CEnvelopeState m_EnvEvaluator;
40};
41
42#endif
43