added TuneLayer

This commit is contained in:
HMH 2014-03-12 23:07:19 +01:00 committed by def
parent 61e46a7858
commit b869a67c76
2 changed files with 14 additions and 1 deletions

View file

@ -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;*/
}

View file

@ -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