mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Exhumed: items and move.
This commit is contained in:
parent
bb0ef6ff70
commit
83ba046d04
3 changed files with 45 additions and 20 deletions
|
@ -109,12 +109,16 @@ short nRegenerates;
|
||||||
short nFirstRegenerate;
|
short nFirstRegenerate;
|
||||||
short nMagicCount;
|
short nMagicCount;
|
||||||
|
|
||||||
static SavegameHelper sghitems("items",
|
void SerializeItems(FSerializer& arc)
|
||||||
SV(nRegenerates),
|
{
|
||||||
SV(nFirstRegenerate),
|
if (arc.BeginObject("items"))
|
||||||
SV(nMagicCount),
|
{
|
||||||
nullptr);
|
arc("regenerates", nRegenerates)
|
||||||
|
("first", nFirstRegenerate)
|
||||||
|
("magiccount", nMagicCount)
|
||||||
|
.EndObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BuildItemAnim(short nSprite)
|
void BuildItemAnim(short nSprite)
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,21 +53,38 @@ BlockInfo sBlockInfo[kMaxPushBlocks];
|
||||||
|
|
||||||
short nChunkSprite[kMaxMoveChunks];
|
short nChunkSprite[kMaxMoveChunks];
|
||||||
|
|
||||||
|
FSerializer& Serialize(FSerializer& arc, const char* keyname, BlockInfo& w, BlockInfo* def)
|
||||||
|
{
|
||||||
|
if (arc.BeginObject(keyname))
|
||||||
|
{
|
||||||
|
arc("at8", w.field_8)
|
||||||
|
("sprite", w.nSprite)
|
||||||
|
("x", w.x)
|
||||||
|
("y", w.y)
|
||||||
|
.EndObject();
|
||||||
|
}
|
||||||
|
return arc;
|
||||||
|
}
|
||||||
|
|
||||||
static SavegameHelper sghmove("move",
|
void SerializeMove(FSerializer& arc)
|
||||||
SV(nPushBlocks),
|
{
|
||||||
SV(overridesect),
|
if (arc.BeginObject("move"))
|
||||||
SV(NearCount),
|
{
|
||||||
SV(hihit),
|
arc("nearcount", NearCount)
|
||||||
SV(sprceiling),
|
.Array("nearsector", NearSector, NearCount)
|
||||||
SV(sprfloor),
|
("pushcount", nPushBlocks)
|
||||||
SV(lohit),
|
.Array("blocks", sBlockInfo, nPushBlocks)
|
||||||
SA(nBodySprite),
|
("chunkcount", nCurChunkNum)
|
||||||
SA(NearSector),
|
.Array("chunks", nChunkSprite, kMaxMoveChunks)
|
||||||
SA(sBlockInfo),
|
("overridesect", overridesect)
|
||||||
SA(nChunkSprite),
|
("hihit", hihit)
|
||||||
nullptr);
|
("lohit", lohit)
|
||||||
|
("sprceiling", sprceiling)
|
||||||
|
("sprfloor", sprfloor)
|
||||||
|
.Array("bodysprite", nBodySprite, 50)
|
||||||
|
.EndObject();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
signed int lsqrt(int a1)
|
signed int lsqrt(int a1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
BEGIN_PS_NS
|
BEGIN_PS_NS
|
||||||
|
|
||||||
void SerializeAnim(FSerializer& arc);
|
void SerializeAnim(FSerializer& arc);
|
||||||
|
void SerializeItems(FSerializer& arc);
|
||||||
|
void SerializeMove(FSerializer& arc);
|
||||||
void SerializeObjects(FSerializer& arc);
|
void SerializeObjects(FSerializer& arc);
|
||||||
void SerializePlayer(FSerializer& arc);
|
void SerializePlayer(FSerializer& arc);
|
||||||
void SerializeRa(FSerializer& arc);
|
void SerializeRa(FSerializer& arc);
|
||||||
|
@ -71,6 +73,8 @@ void GameInterface::SerializeGameState(FSerializer& arc)
|
||||||
if (arc.BeginObject("exhumed"))
|
if (arc.BeginObject("exhumed"))
|
||||||
{
|
{
|
||||||
SerializeAnim(arc);
|
SerializeAnim(arc);
|
||||||
|
SerializeItems(arc);
|
||||||
|
SerializeMove(arc);
|
||||||
SerializeObjects(arc);
|
SerializeObjects(arc);
|
||||||
SerializePlayer(arc);
|
SerializePlayer(arc);
|
||||||
SerializeRa(arc);
|
SerializeRa(arc);
|
||||||
|
|
Loading…
Reference in a new issue