mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-27 22:42:57 +00:00
- And another batch of serializers.
This commit is contained in:
parent
a542e99143
commit
88eab9d1f9
22 changed files with 456 additions and 98 deletions
|
@ -69,7 +69,7 @@
|
|||
#include "i_system.h"
|
||||
#include "doomerrors.h"
|
||||
#include "p_effect.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "vmbuilder.h"
|
||||
|
||||
// [SO] Just the way Randy said to do it :)
|
||||
|
@ -3198,8 +3198,8 @@ PClassActor *ADehackedPickup::DetermineType ()
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void ADehackedPickup::Serialize(FArchive &arc)
|
||||
void ADehackedPickup::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << droppedbymonster;
|
||||
arc("droppedbymonster", droppedbymonster);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,8 @@ public:
|
|||
bool TryPickup (AActor *&toucher);
|
||||
void PlayPickupSound (AActor *toucher);
|
||||
void DoPickupSpecial (AActor *toucher);
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
private:
|
||||
PClassActor *DetermineType ();
|
||||
AInventory *RealPickup;
|
||||
|
|
|
@ -102,7 +102,8 @@ class APlayerPawn : public AActor
|
|||
DECLARE_CLASS_WITH_META(APlayerPawn, AActor, PClassPlayerPawn)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
virtual void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
|
||||
virtual void PostBeginPlay();
|
||||
virtual void Tick();
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "p_3dmidtex.h"
|
||||
#include "r_data/r_interpolate.h"
|
||||
#include "statnums.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
IMPLEMENT_CLASS (DSectorEffect)
|
||||
|
@ -64,10 +64,10 @@ DSectorEffect::DSectorEffect (sector_t *sector)
|
|||
m_Sector = sector;
|
||||
}
|
||||
|
||||
void DSectorEffect::Serialize(FArchive &arc)
|
||||
void DSectorEffect::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << m_Sector;
|
||||
arc("sector", m_Sector);
|
||||
}
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (DMover)
|
||||
|
@ -90,10 +90,10 @@ void DMover::Destroy()
|
|||
Super::Destroy();
|
||||
}
|
||||
|
||||
void DMover::Serialize(FArchive &arc)
|
||||
void DMover::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << interpolation;
|
||||
arc("interpolation", interpolation);
|
||||
}
|
||||
|
||||
void DMover::StopInterpolation(bool force)
|
||||
|
|
|
@ -10,7 +10,8 @@ class DSectorEffect : public DThinker
|
|||
public:
|
||||
DSectorEffect (sector_t *sector);
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
void Destroy();
|
||||
|
||||
sector_t *GetSector() const { return m_Sector; }
|
||||
|
@ -32,7 +33,8 @@ protected:
|
|||
private:
|
||||
protected:
|
||||
DMover ();
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
void Destroy();
|
||||
};
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "templates.h"
|
||||
#include "r_data/r_translate.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
#include "d_player.h"
|
||||
#include "a_morph.h"
|
||||
#include "p_spec.h"
|
||||
|
|
|
@ -1142,10 +1142,11 @@ class APhoenixRod : public AWeapon
|
|||
{
|
||||
DECLARE_CLASS (APhoenixRod, AWeapon)
|
||||
public:
|
||||
void Serialize(FArchive &arc)
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << FlameCount;
|
||||
arc("flamecount", FlameCount);
|
||||
}
|
||||
int FlameCount; // for flamethrower duration
|
||||
};
|
||||
|
|
|
@ -31,10 +31,11 @@ class ACWeapWraithverge : public AClericWeapon
|
|||
{
|
||||
DECLARE_CLASS (ACWeapWraithverge, AClericWeapon)
|
||||
public:
|
||||
void Serialize(FArchive &arc)
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << CHolyCount;
|
||||
arc("cholycount", CHolyCount);
|
||||
}
|
||||
PalEntry GetBlend ()
|
||||
{
|
||||
|
|
|
@ -29,10 +29,11 @@ class AMWeapBloodscourge : public AMageWeapon
|
|||
{
|
||||
DECLARE_CLASS (AMWeapBloodscourge, AMageWeapon)
|
||||
public:
|
||||
void Serialize(FArchive &arc)
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << MStaffCount;
|
||||
arc("mstaffcount", MStaffCount);
|
||||
}
|
||||
PalEntry GetBlend ()
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "g_level.h"
|
||||
#include "doomstat.h"
|
||||
#include "v_palette.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "r_utility.h"
|
||||
|
||||
#include "r_data/colormaps.h"
|
||||
|
@ -101,12 +101,15 @@ bool APowerupGiver::Use (bool pickup)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerupGiver::Serialize(FArchive &arc)
|
||||
void APowerupGiver::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << PowerupType;
|
||||
arc << EffectTics << BlendColor << Mode;
|
||||
arc << Strength;
|
||||
auto def = (APowerupGiver*)GetDefault();
|
||||
arc("poweruptype", PowerupType, def->PowerupType)
|
||||
("effecttics", EffectTics, def->EffectTics)
|
||||
("blendcolor", BlendColor, def->BlendColor)
|
||||
("mode", Mode, def->Mode)
|
||||
("strength", Strength, def->Strength);
|
||||
}
|
||||
|
||||
// Powerup -------------------------------------------------------------------
|
||||
|
@ -136,11 +139,14 @@ void APowerup::Tick ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerup::Serialize(FArchive &arc)
|
||||
void APowerup::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << EffectTics << BlendColor << Mode;
|
||||
arc << Strength;
|
||||
auto def = (APowerup*)GetDefault();
|
||||
arc("effecttics", EffectTics, def->EffectTics)
|
||||
("blendcolor", BlendColor, def->BlendColor)
|
||||
("mode", Mode, def->Mode)
|
||||
("strength", Strength, def->Strength);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -901,10 +907,11 @@ IMPLEMENT_CLASS (APowerTorch)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerTorch::Serialize(FArchive &arc)
|
||||
void APowerTorch::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << NewTorch << NewTorchDelta;
|
||||
arc("newtorch", NewTorch)
|
||||
("newtorchdelta", NewTorchDelta);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -963,10 +970,10 @@ IMPLEMENT_CLASS (APowerFlight)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerFlight::Serialize(FArchive &arc)
|
||||
void APowerFlight::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << HitCenterFrame;
|
||||
arc("hitcenterframe", HitCenterFrame);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1217,10 +1224,10 @@ IMPLEMENT_CLASS (APowerSpeed)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerSpeed::Serialize(FArchive &arc)
|
||||
void APowerSpeed::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << SpeedFlags;
|
||||
arc("speedflags", SpeedFlags);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1899,11 +1906,14 @@ IMPLEMENT_CLASS(APowerMorph)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void APowerMorph::Serialize(FArchive &arc)
|
||||
void APowerMorph::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << PlayerClass << MorphStyle << MorphFlash << UnMorphFlash;
|
||||
arc << Player;
|
||||
arc("playerclass", PlayerClass)
|
||||
("morphstyle", MorphStyle)
|
||||
("morphflash", MorphFlash)
|
||||
("unmorphflash", UnMorphFlash)
|
||||
("player", Player);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -16,7 +16,8 @@ public:
|
|||
virtual bool HandlePickup (AInventory *item);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
virtual AInventory *CreateTossable ();
|
||||
virtual void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
virtual void OwnerDied ();
|
||||
virtual bool GetNoTeleportFreeze();
|
||||
virtual PalEntry GetBlend ();
|
||||
|
@ -51,7 +52,8 @@ class APowerupGiver : public AInventory
|
|||
DECLARE_CLASS_WITH_META (APowerupGiver, AInventory, PClassPowerupGiver)
|
||||
public:
|
||||
virtual bool Use (bool pickup);
|
||||
virtual void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
|
||||
|
||||
PClassActor *PowerupType;
|
||||
|
@ -121,7 +123,8 @@ class APowerTorch : public APowerLightAmp
|
|||
{
|
||||
DECLARE_CLASS (APowerTorch, APowerLightAmp)
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
protected:
|
||||
void DoEffect ();
|
||||
int NewTorch, NewTorchDelta;
|
||||
|
@ -132,7 +135,8 @@ class APowerFlight : public APowerup
|
|||
DECLARE_CLASS (APowerFlight, APowerup)
|
||||
public:
|
||||
bool DrawPowerup (int x, int y);
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
|
||||
protected:
|
||||
void InitEffect ();
|
||||
|
@ -155,7 +159,8 @@ class APowerSpeed : public APowerup
|
|||
DECLARE_CLASS (APowerSpeed, APowerup)
|
||||
protected:
|
||||
void DoEffect ();
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
double GetSpeedFactor();
|
||||
public:
|
||||
int SpeedFlags;
|
||||
|
@ -272,7 +277,8 @@ class APowerMorph : public APowerup
|
|||
{
|
||||
DECLARE_CLASS( APowerMorph, APowerup )
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
virtual void Serialize(FSerializer &arc);
|
||||
void SetNoCallUndoMorph() { bNoCallUndoMorph = true; }
|
||||
|
||||
FNameNoInit PlayerClass, MorphFlash, UnMorphFlash;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "info.h"
|
||||
#include "a_sharedglobal.h"
|
||||
#include "p_local.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "math/cmath.h"
|
||||
|
||||
/*
|
||||
|
@ -55,7 +55,8 @@ public:
|
|||
void PostBeginPlay ();
|
||||
void Tick ();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
protected:
|
||||
DAngle Center;
|
||||
DAngle Acc;
|
||||
|
@ -65,10 +66,13 @@ protected:
|
|||
|
||||
IMPLEMENT_CLASS (ASecurityCamera)
|
||||
|
||||
void ASecurityCamera::Serialize(FArchive &arc)
|
||||
void ASecurityCamera::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << Center << Acc << Delta << Range;
|
||||
arc("center", Center)
|
||||
("acc", Acc)
|
||||
("delta", Delta)
|
||||
("range", Range);
|
||||
}
|
||||
|
||||
void ASecurityCamera::PostBeginPlay ()
|
||||
|
@ -114,17 +118,18 @@ public:
|
|||
void PostBeginPlay ();
|
||||
void Tick ();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
protected:
|
||||
DAngle MaxPitchChange;
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AAimingCamera)
|
||||
|
||||
void AAimingCamera::Serialize(FArchive &arc)
|
||||
void AAimingCamera::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << MaxPitchChange;
|
||||
arc("maxpitchchange", MaxPitchChange);
|
||||
}
|
||||
|
||||
void AAimingCamera::PostBeginPlay ()
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
#include "a_morph.h"
|
||||
#include "doomstat.h"
|
||||
#include "g_level.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "p_enemy.h"
|
||||
#include "d_player.h"
|
||||
#include "r_data/sprites.h"
|
||||
|
||||
static FRandom pr_morphmonst ("MorphMonster");
|
||||
|
||||
|
@ -634,10 +635,16 @@ int AMorphProjectile::DoSpecialDamage (AActor *target, int damage, FName damaget
|
|||
return -1;
|
||||
}
|
||||
|
||||
void AMorphProjectile::Serialize(FArchive &arc)
|
||||
void AMorphProjectile::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << PlayerClass << MonsterClass << Duration << MorphStyle << MorphFlash << UnMorphFlash;
|
||||
auto def = (AMorphProjectile*)GetDefault();
|
||||
arc("playerclass", PlayerClass, def->PlayerClass)
|
||||
("monsterclass", MonsterClass, def->MonsterClass)
|
||||
("duration", Duration, def->Duration)
|
||||
("morphstyle", MorphStyle, def->MorphStyle)
|
||||
("morphflash", MorphFlash, def->MorphFlash)
|
||||
("unmorphflash", UnMorphFlash, def->UnMorphFlash);
|
||||
}
|
||||
|
||||
|
||||
|
@ -647,10 +654,14 @@ IMPLEMENT_POINTY_CLASS (AMorphedMonster)
|
|||
DECLARE_POINTER (UnmorphedMe)
|
||||
END_POINTERS
|
||||
|
||||
void AMorphedMonster::Serialize(FArchive &arc)
|
||||
void AMorphedMonster::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << UnmorphedMe << UnmorphTime << MorphStyle << MorphExitFlash << FlagsSave;
|
||||
arc("unmorphedme", UnmorphedMe)
|
||||
("unmorphtime", UnmorphTime)
|
||||
("morphstyle", MorphStyle)
|
||||
("morphexitflash", MorphExitFlash)
|
||||
("flagsave", FlagsSave);
|
||||
}
|
||||
|
||||
void AMorphedMonster::Destroy ()
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "p_local.h"
|
||||
#include "p_lnspec.h"
|
||||
#include "doomstat.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/*
|
||||
== InterpolationPoint: node along a camera's path
|
||||
|
@ -60,7 +60,8 @@ public:
|
|||
AInterpolationPoint *ScanForLoop ();
|
||||
void FormChain ();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
TObjPtr<AInterpolationPoint> Next;
|
||||
};
|
||||
|
@ -69,10 +70,10 @@ IMPLEMENT_POINTY_CLASS (AInterpolationPoint)
|
|||
DECLARE_POINTER (Next)
|
||||
END_POINTERS
|
||||
|
||||
void AInterpolationPoint::Serialize(FArchive &arc)
|
||||
void AInterpolationPoint::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << Next;
|
||||
arc("next", Next);
|
||||
}
|
||||
|
||||
void AInterpolationPoint::BeginPlay ()
|
||||
|
@ -166,7 +167,8 @@ protected:
|
|||
virtual bool Interpolate ();
|
||||
virtual void NewNode ();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
bool bActive, bJustStepped;
|
||||
TObjPtr<AInterpolationPoint> PrevNode, CurrNode;
|
||||
|
@ -179,10 +181,15 @@ IMPLEMENT_POINTY_CLASS (APathFollower)
|
|||
DECLARE_POINTER (CurrNode)
|
||||
END_POINTERS
|
||||
|
||||
void APathFollower::Serialize(FArchive &arc)
|
||||
void APathFollower::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << bActive << bJustStepped << PrevNode << CurrNode << Time << HoldTime;
|
||||
arc("active", bActive)
|
||||
("juststepped", bJustStepped)
|
||||
("prevnode", PrevNode)
|
||||
("currnode", CurrNode)
|
||||
("time", Time)
|
||||
("holdtime", HoldTime);
|
||||
}
|
||||
|
||||
// Interpolate between p2 and p3 along a Catmull-Rom spline
|
||||
|
@ -577,7 +584,8 @@ class AMovingCamera : public APathFollower
|
|||
public:
|
||||
void PostBeginPlay ();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
protected:
|
||||
bool Interpolate ();
|
||||
|
||||
|
@ -588,10 +596,10 @@ IMPLEMENT_POINTY_CLASS (AMovingCamera)
|
|||
DECLARE_POINTER (Activator)
|
||||
END_POINTERS
|
||||
|
||||
void AMovingCamera::Serialize(FArchive &arc)
|
||||
void AMovingCamera::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << Activator;
|
||||
arc("activator", Activator);
|
||||
}
|
||||
|
||||
void AMovingCamera::PostBeginPlay ()
|
||||
|
|
|
@ -194,7 +194,8 @@ class AMorphProjectile : public AActor
|
|||
DECLARE_CLASS (AMorphProjectile, AActor)
|
||||
public:
|
||||
int DoSpecialDamage (AActor *target, int damage, FName damagetype);
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
FNameNoInit PlayerClass, MonsterClass, MorphFlash, UnMorphFlash;
|
||||
int Duration, MorphStyle;
|
||||
|
@ -206,7 +207,8 @@ class AMorphedMonster : public AActor
|
|||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Tick ();
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
void Die (AActor *source, AActor *inflictor, int dmgflags);
|
||||
void Destroy ();
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
#include "s_sound.h"
|
||||
#include "m_random.h"
|
||||
#include "s_sndseq.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
|
||||
// SoundSequenceSlot --------------------------------------------------------
|
||||
|
||||
|
@ -74,7 +74,8 @@ class ASoundSequenceSlot : public AActor
|
|||
DECLARE_CLASS (ASoundSequenceSlot, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
TObjPtr<DSeqNode> Sequence;
|
||||
};
|
||||
|
@ -89,10 +90,10 @@ END_POINTERS
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ASoundSequenceSlot::Serialize(FArchive &arc)
|
||||
void ASoundSequenceSlot::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << Sequence;
|
||||
arc("sequence", Sequence);
|
||||
}
|
||||
|
||||
// SoundSequence ------------------------------------------------------------
|
||||
|
|
|
@ -55,7 +55,8 @@ class ASigil : public AWeapon
|
|||
public:
|
||||
bool HandlePickup (AInventory *item);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
bool SpecialDropAction (AActor *dropper);
|
||||
static int GiveSigilPiece (AActor *daPlayer);
|
||||
void BeginPlay();
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "templates.h"
|
||||
#include "d_event.h"
|
||||
#include "v_font.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "p_spec.h"
|
||||
#include "portal.h"
|
||||
|
||||
|
|
|
@ -753,10 +753,11 @@ void ASigil::BeginPlay()
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
void ASigil::Serialize(FArchive &arc)
|
||||
void ASigil::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << NumPieces << DownPieces;
|
||||
arc("numpieces", NumPieces)
|
||||
("downpieces", DownPieces);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#include "d_net.h"
|
||||
#include "gstrings.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
#include "r_renderer.h"
|
||||
#include "d_player.h"
|
||||
#include "r_utility.h"
|
||||
|
@ -631,29 +632,32 @@ END_POINTERS
|
|||
|
||||
IMPLEMENT_CLASS (APlayerChunk)
|
||||
|
||||
void APlayerPawn::Serialize(FArchive &arc)
|
||||
void APlayerPawn::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
auto def = (APlayerPawn*)GetDefault();
|
||||
|
||||
arc << JumpZ
|
||||
<< MaxHealth
|
||||
<< RunHealth
|
||||
<< SpawnMask
|
||||
<< ForwardMove1
|
||||
<< ForwardMove2
|
||||
<< SideMove1
|
||||
<< SideMove2
|
||||
<< ScoreIcon
|
||||
<< InvFirst
|
||||
<< InvSel
|
||||
<< MorphWeapon
|
||||
<< DamageFade
|
||||
<< PlayerFlags
|
||||
<< FlechetteType;
|
||||
arc << GruntSpeed << FallingScreamMinSpeed << FallingScreamMaxSpeed;
|
||||
arc << UseRange;
|
||||
arc << AirCapacity;
|
||||
arc << ViewHeight;
|
||||
arc("jumpz", JumpZ, def->JumpZ)
|
||||
("maxhealth", MaxHealth, def->MaxHealth)
|
||||
("runhealth", RunHealth, def->RunHealth)
|
||||
("spawnmask", SpawnMask, def->SpawnMask)
|
||||
("forwardmove1", ForwardMove1, def->ForwardMove1)
|
||||
("forwardmove2", ForwardMove2, def->ForwardMove2)
|
||||
("sidemove1", SideMove1, def->SideMove1)
|
||||
("sidemove2", SideMove2, def->SideMove2)
|
||||
("scoreicon", ScoreIcon, def->ScoreIcon)
|
||||
("invfirst", InvFirst)
|
||||
("invsel", InvSel)
|
||||
("morphweapon", MorphWeapon, def->MorphWeapon)
|
||||
("damagefade", DamageFade, def->DamageFade)
|
||||
("playerflags", PlayerFlags, def->PlayerFlags)
|
||||
("flechettetype", FlechetteType, def->FlechetteType)
|
||||
("gruntspeed", GruntSpeed, def->GruntSpeed)
|
||||
("fallingscreammin", FallingScreamMinSpeed, def->FallingScreamMinSpeed)
|
||||
("fallingscreammaxn", FallingScreamMaxSpeed, def->FallingScreamMaxSpeed)
|
||||
("userange", UseRange, def->UseRange)
|
||||
("aircapacity", AirCapacity, def->AirCapacity)
|
||||
("viewheight", ViewHeight, def->ViewHeight);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "d_netinf.h"
|
||||
#include "i_system.h"
|
||||
#include "d_player.h"
|
||||
#include "farchive.h"
|
||||
#include "serializer.h"
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
|
@ -2102,7 +2102,8 @@ class AAmbientSound : public AActor
|
|||
{
|
||||
DECLARE_CLASS (AAmbientSound, AActor)
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
void MarkPrecacheSounds () const;
|
||||
void BeginPlay ();
|
||||
|
@ -2125,10 +2126,11 @@ IMPLEMENT_CLASS (AAmbientSound)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void AAmbientSound::Serialize(FArchive &arc)
|
||||
void AAmbientSound::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
arc << bActive << NextCheck;
|
||||
arc("active", bActive)
|
||||
("nextcheck", NextCheck);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
301
src/zzz_old.cpp
301
src/zzz_old.cpp
|
@ -1,8 +1,11 @@
|
|||
#ifdef COMMON_STUFF
|
||||
|
||||
#include "a_doomglobal.h"
|
||||
#include "a_hexenglobal.h"
|
||||
#include "a_strifeglobal.h"
|
||||
#include "ravenshared.h"
|
||||
#include "a_weaponpiece.h"
|
||||
#include "d_dehacked.h"
|
||||
|
||||
// For NULL states, which aren't owned by any actor, the owner
|
||||
// is recorded as AActor with the following state. AActor should
|
||||
|
@ -1037,6 +1040,304 @@ void AWeaponPiece::Serialize(FArchive &arc)
|
|||
arc << WeaponClass << FullWeapon << PieceValue;
|
||||
}
|
||||
|
||||
void DSectorEffect::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << m_Sector;
|
||||
}
|
||||
|
||||
void DMover::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << interpolation;
|
||||
}
|
||||
|
||||
class AAmbientSound : public AActor
|
||||
{
|
||||
DECLARE_CLASS(AAmbientSound, AActor)
|
||||
public:
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
void MarkPrecacheSounds() const;
|
||||
void BeginPlay();
|
||||
void Tick();
|
||||
void Activate(AActor *activator);
|
||||
void Deactivate(AActor *activator);
|
||||
|
||||
protected:
|
||||
bool bActive;
|
||||
private:
|
||||
void SetTicker(struct FAmbientSound *ambient);
|
||||
int NextCheck;
|
||||
};
|
||||
|
||||
void AAmbientSound::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << bActive << NextCheck;
|
||||
}
|
||||
|
||||
class AInterpolationPoint : public AActor
|
||||
{
|
||||
DECLARE_CLASS(AInterpolationPoint, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void BeginPlay();
|
||||
void HandleSpawnFlags();
|
||||
void Tick() {} // Nodes do no thinking
|
||||
AInterpolationPoint *ScanForLoop();
|
||||
void FormChain();
|
||||
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
TObjPtr<AInterpolationPoint> Next;
|
||||
};
|
||||
|
||||
class APathFollower : public AActor
|
||||
{
|
||||
DECLARE_CLASS(APathFollower, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void BeginPlay();
|
||||
void PostBeginPlay();
|
||||
void Tick();
|
||||
void Activate(AActor *activator);
|
||||
void Deactivate(AActor *activator);
|
||||
protected:
|
||||
double Splerp(double p1, double p2, double p3, double p4);
|
||||
double Lerp(double p1, double p2);
|
||||
virtual bool Interpolate();
|
||||
virtual void NewNode();
|
||||
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
|
||||
bool bActive, bJustStepped;
|
||||
TObjPtr<AInterpolationPoint> PrevNode, CurrNode;
|
||||
float Time; // Runs from 0.0 to 1.0 between CurrNode and CurrNode->Next
|
||||
int HoldTime;
|
||||
};
|
||||
|
||||
void AInterpolationPoint::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << Next;
|
||||
}
|
||||
|
||||
void APathFollower::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << bActive << bJustStepped << PrevNode << CurrNode << Time << HoldTime;
|
||||
}
|
||||
|
||||
class AMovingCamera : public APathFollower
|
||||
{
|
||||
DECLARE_CLASS(AMovingCamera, APathFollower)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void PostBeginPlay();
|
||||
|
||||
DECLARE_OLD_SERIAL
|
||||
void Serialize(FSerializer &arc);
|
||||
protected:
|
||||
bool Interpolate();
|
||||
|
||||
TObjPtr<AActor> Activator;
|
||||
};
|
||||
|
||||
void AMovingCamera::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << Activator;
|
||||
}
|
||||
|
||||
void AMorphProjectile::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << PlayerClass << MonsterClass << Duration << MorphStyle << MorphFlash << UnMorphFlash;
|
||||
}
|
||||
|
||||
void AMorphedMonster::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << UnmorphedMe << UnmorphTime << MorphStyle << MorphExitFlash << FlagsSave;
|
||||
}
|
||||
|
||||
void ADehackedPickup::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << droppedbymonster;
|
||||
}
|
||||
|
||||
class ASoundSequenceSlot : public AActor
|
||||
{
|
||||
DECLARE_CLASS(ASoundSequenceSlot, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
DECLARE_OLD_SERIAL
|
||||
|
||||
TObjPtr<DSeqNode> Sequence;
|
||||
};
|
||||
|
||||
void ASoundSequenceSlot::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << Sequence;
|
||||
}
|
||||
|
||||
void APlayerPawn::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
|
||||
arc << JumpZ
|
||||
<< MaxHealth
|
||||
<< RunHealth
|
||||
<< SpawnMask
|
||||
<< ForwardMove1
|
||||
<< ForwardMove2
|
||||
<< SideMove1
|
||||
<< SideMove2
|
||||
<< ScoreIcon
|
||||
<< InvFirst
|
||||
<< InvSel
|
||||
<< MorphWeapon
|
||||
<< DamageFade
|
||||
<< PlayerFlags
|
||||
<< FlechetteType;
|
||||
arc << GruntSpeed << FallingScreamMinSpeed << FallingScreamMaxSpeed;
|
||||
arc << UseRange;
|
||||
arc << AirCapacity;
|
||||
arc << ViewHeight;
|
||||
}
|
||||
|
||||
class APhoenixRod : public AWeapon
|
||||
{
|
||||
DECLARE_CLASS(APhoenixRod, AWeapon)
|
||||
public:
|
||||
DECLARE_OLD_SERIAL
|
||||
int FlameCount; // for flamethrower duration
|
||||
};
|
||||
|
||||
void APhoenixRod::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << FlameCount;
|
||||
}
|
||||
|
||||
class ACWeapWraithverge : public AClericWeapon
|
||||
{
|
||||
DECLARE_CLASS(ACWeapWraithverge, AClericWeapon)
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
BYTE CHolyCount;
|
||||
};
|
||||
|
||||
void ACWeapWraithverge::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << CHolyCount;
|
||||
}
|
||||
|
||||
class AMWeapBloodscourge : public AMageWeapon
|
||||
{
|
||||
DECLARE_CLASS(AMWeapBloodscourge, AMageWeapon)
|
||||
public:
|
||||
void Serialize(FArchive &arc);
|
||||
BYTE MStaffCount;
|
||||
};
|
||||
|
||||
void AMWeapBloodscourge::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << MStaffCount;
|
||||
}
|
||||
|
||||
void ASigil::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << NumPieces << DownPieces;
|
||||
}
|
||||
|
||||
class ASecurityCamera : public AActor
|
||||
{
|
||||
DECLARE_CLASS(ASecurityCamera, AActor)
|
||||
public:
|
||||
void PostBeginPlay();
|
||||
void Tick();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
protected:
|
||||
DAngle Center;
|
||||
DAngle Acc;
|
||||
DAngle Delta;
|
||||
DAngle Range;
|
||||
};
|
||||
|
||||
void ASecurityCamera::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << Center << Acc << Delta << Range;
|
||||
}
|
||||
|
||||
|
||||
class AAimingCamera : public ASecurityCamera
|
||||
{
|
||||
DECLARE_CLASS(AAimingCamera, ASecurityCamera)
|
||||
public:
|
||||
void PostBeginPlay();
|
||||
void Tick();
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
protected:
|
||||
DAngle MaxPitchChange;
|
||||
};
|
||||
|
||||
void AAimingCamera::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << MaxPitchChange;
|
||||
}
|
||||
|
||||
void APowerupGiver::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << PowerupType;
|
||||
arc << EffectTics << BlendColor << Mode;
|
||||
arc << Strength;
|
||||
}
|
||||
void APowerup::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << EffectTics << BlendColor << Mode;
|
||||
arc << Strength;
|
||||
}
|
||||
|
||||
void APowerTorch::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << NewTorch << NewTorchDelta;
|
||||
}
|
||||
|
||||
void APowerFlight::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << HitCenterFrame;
|
||||
}
|
||||
|
||||
void APowerSpeed::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << SpeedFlags;
|
||||
}
|
||||
|
||||
void APowerMorph::Serialize(FArchive &arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc << PlayerClass << MorphStyle << MorphFlash << UnMorphFlash;
|
||||
arc << Player;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue