forked from Mirrors/openclonk
Move Game.MassMover to ::MassMover
parent
0cbfee4e4a
commit
fb48b275be
|
@ -109,7 +109,6 @@ class C4Game
|
||||||
C4ComponentHost GameText;
|
C4ComponentHost GameText;
|
||||||
C4GameScriptHost Script;
|
C4GameScriptHost Script;
|
||||||
C4LangStringTable MainSysLangStringTable, ScenarioLangStringTable, ScenarioSysLangStringTable;
|
C4LangStringTable MainSysLangStringTable, ScenarioLangStringTable, ScenarioSysLangStringTable;
|
||||||
C4MassMoverSet MassMover;
|
|
||||||
C4ParticleSystem Particles;
|
C4ParticleSystem Particles;
|
||||||
C4PlayerList Players;
|
C4PlayerList Players;
|
||||||
StdStrBuf PlayerNames;
|
StdStrBuf PlayerNames;
|
||||||
|
|
|
@ -62,4 +62,6 @@ class C4MassMoverSet
|
||||||
void Consolidate();
|
void Consolidate();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern C4MassMoverSet MassMover;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -437,7 +437,7 @@ void C4ControlSyncCheck::Set()
|
||||||
RandomCount = ::RandomCount;
|
RandomCount = ::RandomCount;
|
||||||
AllCrewPosX = GetAllCrewPosX();
|
AllCrewPosX = GetAllCrewPosX();
|
||||||
PXSCount = ::PXS.Count;
|
PXSCount = ::PXS.Count;
|
||||||
MassMoverIndex = Game.MassMover.CreatePtr;
|
MassMoverIndex = ::MassMover.CreatePtr;
|
||||||
ObjectCount = Game.Objects.ObjectCount();
|
ObjectCount = Game.Objects.ObjectCount();
|
||||||
ObjectEnumerationIndex = Game.ObjectEnumerationIndex;
|
ObjectEnumerationIndex = Game.ObjectEnumerationIndex;
|
||||||
SectShapeSum = Game.Objects.Sectors.getShapeSum();
|
SectShapeSum = Game.Objects.Sectors.getShapeSum();
|
||||||
|
|
|
@ -167,7 +167,7 @@ bool C4GameSave::SaveLandscape()
|
||||||
if (!::PXS.Save(*pSaveGroup)) return false;
|
if (!::PXS.Save(*pSaveGroup)) return false;
|
||||||
// MassMover (create copy, may not modify running data)
|
// MassMover (create copy, may not modify running data)
|
||||||
C4MassMoverSet MassMoverSet;
|
C4MassMoverSet MassMoverSet;
|
||||||
MassMoverSet.Copy(Game.MassMover);
|
MassMoverSet.Copy(::MassMover);
|
||||||
if (!MassMoverSet.Save(*pSaveGroup)) return false;
|
if (!MassMoverSet.Save(*pSaveGroup)) return false;
|
||||||
// Material enumeration
|
// Material enumeration
|
||||||
if (!Game.Material.SaveEnumeration(*pSaveGroup)) return false;
|
if (!Game.Material.SaveEnumeration(*pSaveGroup)) return false;
|
||||||
|
|
|
@ -881,7 +881,7 @@ BOOL C4Landscape::CheckInstability(int32_t tx, int32_t ty)
|
||||||
int32_t mat=GetMat(tx,ty);
|
int32_t mat=GetMat(tx,ty);
|
||||||
if (MatValid(mat))
|
if (MatValid(mat))
|
||||||
if (Game.Material.Map[mat].Instable)
|
if (Game.Material.Map[mat].Instable)
|
||||||
return Game.MassMover.Create(tx,ty);
|
return ::MassMover.Create(tx,ty);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ BOOL C4MassMover::Init(int32_t tx, int32_t ty)
|
||||||
// Check mat
|
// Check mat
|
||||||
Mat=GBackMat(tx,ty);
|
Mat=GBackMat(tx,ty);
|
||||||
x=tx; y=ty;
|
x=tx; y=ty;
|
||||||
Game.MassMover.Count++;
|
::MassMover.Count++;
|
||||||
return (Mat!=MNone);
|
return (Mat!=MNone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ void C4MassMover::Cease()
|
||||||
rc.x=x; rc.y=y;
|
rc.x=x; rc.y=y;
|
||||||
AddDbgRec(RCT_MMD, &rc, sizeof(rc));
|
AddDbgRec(RCT_MMD, &rc, sizeof(rc));
|
||||||
#endif
|
#endif
|
||||||
Game.MassMover.Count--;
|
::MassMover.Count--;
|
||||||
Mat=MNone;
|
Mat=MNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ BOOL C4MassMover::Execute()
|
||||||
::Landscape.InsertMaterial(omat, tx, ty + 1);
|
::Landscape.InsertMaterial(omat, tx, ty + 1);
|
||||||
|
|
||||||
// Create new mover at target
|
// Create new mover at target
|
||||||
Game.MassMover.Create(tx,ty,!Rnd3());
|
::MassMover.Create(tx,ty,!Rnd3());
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -280,3 +280,5 @@ void C4MassMoverSet::Copy(C4MassMoverSet &rSet)
|
||||||
CreatePtr=rSet.CreatePtr;
|
CreatePtr=rSet.CreatePtr;
|
||||||
for (int32_t cnt=0; cnt<C4MassMoverChunk; cnt++) Set[cnt]=rSet.Set[cnt];
|
for (int32_t cnt=0; cnt<C4MassMoverChunk; cnt++) Set[cnt]=rSet.Set[cnt];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
C4MassMoverSet MassMover;
|
||||||
|
|
Loading…
Reference in New Issue