mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added TuneLayer
This commit is contained in:
parent
61e46a7858
commit
b869a67c76
|
@ -16,6 +16,7 @@ CLayers::CLayers()
|
|||
m_pSpeedupLayer = 0;
|
||||
m_pFrontLayer = 0;
|
||||
m_pSwitchLayer = 0;
|
||||
m_pTuneLayer = 0;
|
||||
}
|
||||
|
||||
void CLayers::Init(class IKernel *pKernel)
|
||||
|
@ -28,6 +29,7 @@ void CLayers::Init(class IKernel *pKernel)
|
|||
m_pSpeedupLayer = 0;
|
||||
m_pFrontLayer = 0;
|
||||
m_pSwitchLayer = 0;
|
||||
m_pTuneLayer = 0;
|
||||
|
||||
for(int g = 0; g < NumGroups(); g++)
|
||||
{
|
||||
|
@ -94,6 +96,14 @@ void CLayers::Init(class IKernel *pKernel)
|
|||
}
|
||||
m_pSwitchLayer = pTilemap;
|
||||
}
|
||||
if(pTilemap->m_Flags&TILESLAYERFLAG_TUNE)
|
||||
{
|
||||
if(pTilemap->m_Version <= 2)
|
||||
{
|
||||
pTilemap->m_Tune = *((int*)(pTilemap) + 19);
|
||||
}
|
||||
m_pTuneLayer = pTilemap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,5 +126,6 @@ void CLayers::Dest()
|
|||
/*m_pTeleLayer = 0;
|
||||
m_pSpeedupLayer = 0;
|
||||
m_pFrontLayer = 0;
|
||||
m_pSwitchLayer = 0;*/
|
||||
m_pSwitchLayer = 0;
|
||||
m_pTuneLayer = 0;*/
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
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:
|
||||
|
||||
|
@ -40,6 +41,7 @@ private:
|
|||
CMapItemLayerTilemap *m_pSpeedupLayer;
|
||||
CMapItemLayerTilemap *m_pFrontLayer;
|
||||
CMapItemLayerTilemap *m_pSwitchLayer;
|
||||
CMapItemLayerTilemap *m_pTuneLayer;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue