forked from Mirrors/openclonk
Move Game.PXS to ::PXS
parent
ab69802140
commit
ca62729fa4
|
@ -112,7 +112,6 @@ class C4Game
|
|||
C4GameScriptHost Script;
|
||||
C4LangStringTable MainSysLangStringTable, ScenarioLangStringTable, ScenarioSysLangStringTable;
|
||||
C4MassMoverSet MassMover;
|
||||
C4PXSSystem PXS;
|
||||
C4ParticleSystem Particles;
|
||||
C4PlayerList Players;
|
||||
StdStrBuf PlayerNames;
|
||||
|
|
|
@ -64,4 +64,5 @@ class C4PXSSystem
|
|||
C4PXS *New();
|
||||
};
|
||||
|
||||
extern C4PXSSystem PXS;
|
||||
#endif
|
||||
|
|
|
@ -436,7 +436,7 @@ void C4ControlSyncCheck::Set()
|
|||
Random3 = FRndPtr3;
|
||||
RandomCount = ::RandomCount;
|
||||
AllCrewPosX = GetAllCrewPosX();
|
||||
PXSCount = Game.PXS.Count;
|
||||
PXSCount = ::PXS.Count;
|
||||
MassMoverIndex = Game.MassMover.CreatePtr;
|
||||
ObjectCount = Game.Objects.ObjectCount();
|
||||
ObjectEnumerationIndex = Game.ObjectEnumerationIndex;
|
||||
|
|
|
@ -798,7 +798,7 @@ void Splash(int32_t tx, int32_t ty, int32_t amt, C4Object *pByObj)
|
|||
{
|
||||
BubbleOut(tx+Random(16)-8,ty+Random(16)-6);
|
||||
if (GBackLiquid(tx,ty) && !GBackSemiSolid(tx, sy))
|
||||
Game.PXS.Create(Game.Landscape.ExtractMaterial(tx,ty),
|
||||
::PXS.Create(Game.Landscape.ExtractMaterial(tx,ty),
|
||||
itofix(tx),itofix(sy),
|
||||
FIXED100(Random(151)-75),
|
||||
FIXED100(-Random(200)));
|
||||
|
|
|
@ -164,7 +164,7 @@ bool C4GameSave::SaveLandscape()
|
|||
if (!fSuccess) return false;
|
||||
DBGRECOFF.Clear();
|
||||
// PXS
|
||||
if (!Game.PXS.Save(*pSaveGroup)) return false;
|
||||
if (!::PXS.Save(*pSaveGroup)) return false;
|
||||
// MassMover (create copy, may not modify running data)
|
||||
C4MassMoverSet MassMoverSet;
|
||||
MassMoverSet.Copy(Game.MassMover);
|
||||
|
|
|
@ -970,7 +970,7 @@ int32_t C4Landscape::ShakeFreePix(int32_t tx, int32_t ty)
|
|||
if (Game.Material.Map[mat].DigFree)
|
||||
{
|
||||
ClearPix(tx,ty);
|
||||
Game.PXS.Create(mat,itofix(tx),itofix(ty));
|
||||
::PXS.Create(mat,itofix(tx),itofix(ty));
|
||||
}
|
||||
CheckInstabilityRange(tx,ty);
|
||||
return mat;
|
||||
|
@ -1094,7 +1094,7 @@ void C4Landscape::BlastFree(int32_t tx, int32_t ty, int32_t rad, int32_t grade,
|
|||
tx,ty,iByPlayer);
|
||||
|
||||
if (Game.Material.Map[cnt].Blast2PXSRatio != 0)
|
||||
Game.PXS.Cast(cnt,
|
||||
::PXS.Cast(cnt,
|
||||
BlastMatCount[cnt]/Game.Material.Map[cnt].Blast2PXSRatio,
|
||||
tx,ty,60);
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ BOOL C4Landscape::InsertMaterial(int32_t mat, int32_t tx, int32_t ty, int32_t vx
|
|||
// Try slide
|
||||
while (FindMatSlide(tx,ty,+1,mdens,Game.Material.Map[mat].MaxSlide))
|
||||
if (GetDensity(tx,ty+1)<mdens)
|
||||
{ Game.PXS.Create(mat,itofix(tx),itofix(ty),FIXED10(vx),FIXED10(vy)); return TRUE; }
|
||||
{ ::PXS.Create(mat,itofix(tx),itofix(ty),FIXED10(vx),FIXED10(vy)); return TRUE; }
|
||||
|
||||
// Try reaction with material below
|
||||
C4MaterialReaction *pReact; int32_t tmat;
|
||||
|
|
|
@ -699,7 +699,7 @@ bool C4MaterialMap::mrfConvert(C4MaterialReaction *pReaction, int32_t &iX, int32
|
|||
|
||||
case meeMassMove: // MassMover-movement
|
||||
// Conversion-transfer to PXS
|
||||
Game.PXS.Create(iPxsMat,itofix(iX),itofix(iY));
|
||||
::PXS.Create(iPxsMat,itofix(iX),itofix(iY));
|
||||
return true;
|
||||
}
|
||||
// not handled
|
||||
|
|
|
@ -141,7 +141,7 @@ void C4PXS::Deactivate()
|
|||
AddDbgRec(RCT_ExecPXS, &rc, sizeof(rc));
|
||||
#endif
|
||||
Mat=MNone;
|
||||
Game.PXS.Delete(this);
|
||||
::PXS.Delete(this);
|
||||
}
|
||||
|
||||
C4PXSSystem::C4PXSSystem()
|
||||
|
@ -451,3 +451,5 @@ void C4PXSSystem::Delete(C4PXS *pPXS)
|
|||
if(cnt < PXSMaxChunk)
|
||||
iChunkPXS[cnt]--;
|
||||
}
|
||||
|
||||
C4PXSSystem PXS;
|
||||
|
|
|
@ -2559,7 +2559,7 @@ static bool FnScriptGo(C4AulContext *cthr, bool go)
|
|||
static bool FnCastPXS(C4AulContext *cthr, C4String *mat_name, long amt, long level, long tx, long ty)
|
||||
{
|
||||
if (cthr->Obj) { tx+=cthr->Obj->GetX(); ty+=cthr->Obj->GetY(); }
|
||||
Game.PXS.Cast(Game.Material.Get(FnStringPar(mat_name)),amt,tx,ty,level);
|
||||
::PXS.Cast(Game.Material.Get(FnStringPar(mat_name)),amt,tx,ty,level);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1076,7 +1076,7 @@ void C4Viewport::Draw(C4TargetFacet &cgo, bool fDrawOverlay)
|
|||
|
||||
// draw PXS (unclipped!)
|
||||
C4ST_STARTNEW(PXSStat, "C4Viewport::Draw: PXS")
|
||||
Game.PXS.Draw(cgo);
|
||||
::PXS.Draw(cgo);
|
||||
C4ST_STOP(PXSStat)
|
||||
|
||||
// draw objects
|
||||
|
|
Loading…
Reference in New Issue