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_MAPIMAGES_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_MAPIMAGES_H
|
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CMapImages : public CComponent
|
2011-04-13 18:37:12 +00:00
|
|
|
{
|
2015-08-25 00:11:04 +00:00
|
|
|
friend class CBackground;
|
2017-02-21 16:10:08 +00:00
|
|
|
|
2012-08-12 10:41:50 +00:00
|
|
|
IGraphics::CTextureHandle m_aTextures[64];
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_Count;
|
2016-04-29 16:17:06 +00:00
|
|
|
|
2019-06-03 19:52:14 +00:00
|
|
|
const char *m_pEntitiesGameType;
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
|
|
|
CMapImages();
|
2019-05-06 12:19:10 +00:00
|
|
|
CMapImages(int ImageSize);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2012-08-12 10:41:50 +00:00
|
|
|
IGraphics::CTextureHandle Get(int Index) const { return m_aTextures[Index]; }
|
2010-05-29 07:25:38 +00:00
|
|
|
int Num() const { return m_Count; }
|
|
|
|
|
|
|
|
virtual void OnMapLoad();
|
2017-09-12 18:15:37 +00:00
|
|
|
virtual void OnInit();
|
2015-08-25 00:11:04 +00:00
|
|
|
void LoadBackground(class IMap *pMap);
|
2011-03-16 12:48:16 +00:00
|
|
|
|
2011-04-09 06:41:31 +00:00
|
|
|
// DDRace
|
2012-08-12 10:41:50 +00:00
|
|
|
IGraphics::CTextureHandle GetEntities();
|
2017-09-12 18:15:37 +00:00
|
|
|
|
2012-08-12 10:41:50 +00:00
|
|
|
IGraphics::CTextureHandle GetOverlayBottom();
|
|
|
|
IGraphics::CTextureHandle GetOverlayTop();
|
|
|
|
IGraphics::CTextureHandle GetOverlayCenter();
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2019-05-06 12:19:10 +00:00
|
|
|
void SetTextureScale(int Size);
|
|
|
|
int GetTextureScale();
|
|
|
|
|
2011-03-16 12:48:16 +00:00
|
|
|
private:
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2012-08-12 10:41:50 +00:00
|
|
|
bool m_EntitiesIsLoaded;
|
|
|
|
IGraphics::CTextureHandle m_EntitiesTextures;
|
|
|
|
IGraphics::CTextureHandle m_OverlayBottomTexture;
|
|
|
|
IGraphics::CTextureHandle m_OverlayTopTexture;
|
|
|
|
IGraphics::CTextureHandle m_OverlayCenterTexture;
|
2019-05-06 12:19:10 +00:00
|
|
|
int m_TextureScale;
|
|
|
|
|
|
|
|
void InitOverlayTextures();
|
2012-08-12 10:41:50 +00:00
|
|
|
IGraphics::CTextureHandle UploadEntityLayerText(int TextureSize, int YOffset);
|
|
|
|
void UpdateEntityLayerText(IGraphics::CTextureHandle Texture, int TextureSize, int YOffset, int NumbersPower, int MaxNumber = -1);
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|