ddnet/src/game/layers.h
Patiga a9fc2207ac Remove Parallax Zoom from map file
Parallax Zoom improves the appearance of maps visually when zooming.
Contrary to initial tests, it does not interfere with certain map
locations such as the shop on the map Timeshop.
The default value appears to be correct for all existing maps.

The value in the map file is non-trivial to manage, and provides little
benefit. See https://github.com/ddnet/ddnet/issues/6196 for further
discussion.
2023-10-29 23:43:19 +01:00

54 lines
1.5 KiB
C++

/* (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. */
#ifndef GAME_LAYERS_H
#define GAME_LAYERS_H
class IKernel;
class IMap;
struct CMapItemGroup;
struct CMapItemLayer;
struct CMapItemLayerTilemap;
class CLayers
{
int m_GroupsNum;
int m_GroupsStart;
int m_LayersNum;
int m_LayersStart;
CMapItemGroup *m_pGameGroup;
CMapItemLayerTilemap *m_pGameLayer;
IMap *m_pMap;
void InitTilemapSkip();
public:
CLayers();
void Init(IKernel *pKernel);
void InitBackground(IMap *pMap);
int NumGroups() const { return m_GroupsNum; }
int NumLayers() const { return m_LayersNum; }
IMap *Map() const { return m_pMap; }
CMapItemGroup *GameGroup() const { return m_pGameGroup; }
CMapItemLayerTilemap *GameLayer() const { return m_pGameLayer; }
CMapItemGroup *GetGroup(int Index) const;
CMapItemLayer *GetLayer(int Index) const;
// DDRace
CMapItemLayerTilemap *TeleLayer() const { return m_pTeleLayer; }
CMapItemLayerTilemap *SpeedupLayer() const { return m_pSpeedupLayer; }
CMapItemLayerTilemap *FrontLayer() const { return m_pFrontLayer; }
CMapItemLayerTilemap *SwitchLayer() const { return m_pSwitchLayer; }
CMapItemLayerTilemap *TuneLayer() const { return m_pTuneLayer; }
private:
CMapItemLayerTilemap *m_pTeleLayer;
CMapItemLayerTilemap *m_pSpeedupLayer;
CMapItemLayerTilemap *m_pFrontLayer;
CMapItemLayerTilemap *m_pSwitchLayer;
CMapItemLayerTilemap *m_pTuneLayer;
};
#endif