2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_MAPLAYERS_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_MAPLAYERS_H
|
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CMapLayers : public CComponent
|
2011-04-13 18:37:12 +00:00
|
|
|
{
|
2010-05-29 07:25:38 +00:00
|
|
|
CLayers *m_pLayers; // todo refactor: maybe remove it and access it through client*
|
|
|
|
int m_Type;
|
2011-12-04 13:04:12 +00:00
|
|
|
int m_CurrentLocalTick;
|
|
|
|
int m_LastLocalTick;
|
|
|
|
bool m_EnvelopeUpdate;
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
void MapScreenToGroup(float CenterX, float CenterY, CMapItemGroup *pGroup);
|
|
|
|
static void EnvelopeEval(float TimeOffset, int Env, float *pChannels, void *pUser);
|
|
|
|
public:
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
TYPE_BACKGROUND=0,
|
|
|
|
TYPE_FOREGROUND,
|
|
|
|
};
|
|
|
|
|
|
|
|
CMapLayers(int Type);
|
|
|
|
virtual void OnInit();
|
|
|
|
virtual void OnRender();
|
2011-12-04 13:04:12 +00:00
|
|
|
|
|
|
|
void EnvelopeUpdate();
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|