summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2Equip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2Equip.cpp')
-rw-r--r--src/T2DLL/T2Equip.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/T2DLL/T2Equip.cpp b/src/T2DLL/T2Equip.cpp
index d42cf4e..f2221d2 100644
--- a/src/T2DLL/T2Equip.cpp
+++ b/src/T2DLL/T2Equip.cpp
@@ -44,7 +44,7 @@ int T2Equip::InitEquip(T2EquipDef* def, const RECT& area, unsigned int valiation
T2TowerDoc *towerDoc = GetCurrentT2TowerDoc();
if (towerDoc)
- mBuildDay = towerDoc->towerDoc_vf120()->CalcTotalDays();
+ mBuildDay = towerDoc->GetNow()->CalcTotalDays();
else
mBuildDay = 0;
@@ -63,7 +63,7 @@ int T2Equip::InitEquip(T2EquipDef* def, const RECT& area, unsigned int valiation
}
int T2Equip::DaysSinceBuilt(const T2TowerDoc* towerDoc) const {
- return towerDoc->towerDoc_vf120()->CalcLapseDays(mBuildDay);
+ return towerDoc->GetNow()->CalcLapseDays(mBuildDay);
}
void T2Equip::SetEquipArea(const RECT& rect) {
@@ -182,9 +182,9 @@ void T2Equip::ReplaceCEID(unsigned int oldID, unsigned int newID) {
}
/*virtual*/ void T2Equip::PlaySound(T2TowerDoc* inDoc, int id, unsigned int inMask, unsigned int inFlags) const {
- if (inDoc->towerDoc_vf15C(mArea)) {
+ if (inDoc->IsRectInView(mArea)) {
T2EquipDef *equipDef = GetEquipDef();
- T2SoundPlayer *soundPlayer = inDoc->towerDoc_vf134();
+ T2SoundPlayer *soundPlayer = inDoc->GetSoundPlayer();
if (equipDef && soundPlayer) {
CRect theArea;
GetEquipArea(theArea);