- Exhumed: Init

This commit is contained in:
Christoph Oelckers 2020-11-30 01:08:19 +01:00
parent 15579798ad
commit 54eec61828
2 changed files with 25 additions and 20 deletions

View file

@ -909,25 +909,28 @@ void LoadObjects()
nCameraz = initz;
}
static SavegameHelper sghinit("init",
SV(initx),
SV(inity),
SV(initz),
SV(inita),
SV(initsect),
SV(nCurChunkNum),
SA(nBodyGunSprite),
SV(nCurBodyGunNum),
SA(SectSoundSect),
SA(SectSound),
SA(SectFlag),
SA(SectDepth),
SA(SectAbove),
SA(SectDamage),
SA(SectSpeed),
SA(SectBelow),
nullptr);
void SerializeInit(FSerializer& arc)
{
if (arc.BeginObject("init"))
{
arc("initx", initx)
("inity", inity)
("initz", initz)
("inita", inita)
("initsect", initsect)
("curchunk", nCurChunkNum)
.Array("bodygunsprite", nBodyGunSprite, countof(nBodyGunSprite))
("curbodygun", nCurBodyGunNum)
.Array("soundsect", SectSoundSect, numsectors)
.Array("sectsound", SectSound, numsectors)
.Array("sectflag", SectFlag, numsectors)
.Array("sectdepth", SectDepth, numsectors)
.Array("sectabove", SectAbove, numsectors)
.Array("sectdamage", SectDamage, numsectors)
.Array("sectspeed", SectSpeed, numsectors)
.Array("sectbelow", SectBelow, numsectors)
.EndObject();
}
}
END_PS_NS

View file

@ -32,6 +32,7 @@ BEGIN_PS_NS
void SerializeAnim(FSerializer& arc);
void SerializeBubbles(FSerializer& arc);
void SerializeGun(FSerializer& arc);
void SerializeInit(FSerializer& arc);
void SerializeItems(FSerializer& arc);
void SerializeMove(FSerializer& arc);
void SerializeLighting(FSerializer& arc);
@ -78,6 +79,7 @@ void GameInterface::SerializeGameState(FSerializer& arc)
SerializeAnim(arc);
SerializeBubbles(arc);
SerializeGun(arc);
SerializeInit(arc);
SerializeItems(arc);
SerializeMove(arc);
SerializeLighting(arc);