diff --git a/src/zzz_old.cpp b/src/zzz_old.cpp index 82e59cbb8..5c6349b5c 100644 --- a/src/zzz_old.cpp +++ b/src/zzz_old.cpp @@ -1,4 +1,3 @@ -#ifdef COMMON_STUFF #include "a_doomglobal.h" #include "a_hexenglobal.h" @@ -706,638 +705,3 @@ void DObject::Serialize(FArchive &arc) } -void AScriptedMarine::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - - if (arc.IsStoring()) - { - arc.WriteSprite(SpriteOverride); - } - else - { - SpriteOverride = arc.ReadSprite(); - } - arc << CurrentWeapon; -} - - -class AHeresiarch : public AActor -{ - DECLARE_CLASS(AHeresiarch, AActor) -public: - PClassActor *StopBall; - DAngle BallAngle; - - DECLARE_OLD_SERIAL -}; - -void AHeresiarch::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << StopBall << BallAngle; -} - -class ASorcBall : public AActor -{ - DECLARE_CLASS(ASorcBall, AActor) -public: - DAngle AngleOffset; - DAngle OldAngle; - - DECLARE_OLD_SERIAL -}; - -void ASorcBall::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << AngleOffset << OldAngle; -} - -class AThrustFloor : public AActor -{ - DECLARE_CLASS(AThrustFloor, AActor) -public: - DECLARE_OLD_SERIAL - - TObjPtr DirtClump; -}; - -void AThrustFloor::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << DirtClump; -} - -void AMinotaurFriend::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << StartTime; -} - -class ARainTracker : public AInventory -{ - DECLARE_CLASS(ARainTracker, AInventory) -public: - DECLARE_OLD_SERIAL - TObjPtr Rain1, Rain2; -}; - -void ARainTracker::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << Rain1 << Rain2; -} - -void AInventory::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << Owner << Amount << MaxAmount << RespawnTics << ItemFlags << Icon << PickupSound << SpawnPointClass; -} - -void AHealthPickup::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << autousemode; -} - -void AAmmo::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << BackpackAmount << BackpackMaxAmount; -} - -void AWeapon::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << WeaponFlags - << AmmoType1 << AmmoType2 - << AmmoGive1 << AmmoGive2 - << MinAmmo1 << MinAmmo2 - << AmmoUse1 << AmmoUse2 - << Kickback - << YAdjust - << UpSound << ReadySound - << SisterWeaponType - << ProjectileType << AltProjectileType - << SelectionOrder - << MoveCombatDist - << Ammo1 << Ammo2 << SisterWeapon << GivenAsMorphWeapon - << bAltFire - << ReloadCounter - << BobStyle << BobSpeed << BobRangeX << BobRangeY - << FOVScale - << Crosshair - << MinSelAmmo1 << MinSelAmmo2; -} - -void ABackpackItem::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << bDepleted; -} - -void AWeaponGiver::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << DropAmmoFactor; -} - -void ABasicArmor::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << SavePercent << BonusCount << MaxAbsorb << MaxFullAbsorb << AbsorbCount << ArmorType << ActualSaveAmount; -} - -void ABasicArmorPickup::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << SavePercent << SaveAmount << MaxAbsorb << MaxFullAbsorb; - arc << DropTime;// in inventory! -} - -void ABasicArmorBonus::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << SavePercent << SaveAmount << MaxSaveAmount << BonusCount << BonusMax - << MaxAbsorb << MaxFullAbsorb; -} - -void AHexenArmor::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << Slots[0] << Slots[1] << Slots[2] << Slots[3] - << Slots[4] - << SlotsIncrement[0] << SlotsIncrement[1] << SlotsIncrement[2] - << SlotsIncrement[3]; -} - -void APuzzleItem::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << PuzzleItemNumber; -} - -class DSectorPlaneInterpolation : public DInterpolation -{ - DECLARE_CLASS(DSectorPlaneInterpolation, DInterpolation) - - sector_t *sector; - double oldheight, oldtexz; - double bakheight, baktexz; - bool ceiling; - TArray attached; - - -public: - - DSectorPlaneInterpolation() {} - DSectorPlaneInterpolation(sector_t *sector, bool plane, bool attach); - void Destroy(); - void UpdateInterpolation(); - void Restore(); - void Interpolate(double smoothratio); - DECLARE_OLD_SERIAL - virtual void Serialize(FSerializer &arc); - size_t PointerSubstitution(DObject *old, DObject *notOld); - size_t PropagateMark(); -}; - -//========================================================================== -// -// -// -//========================================================================== - -class DSectorScrollInterpolation : public DInterpolation -{ - DECLARE_CLASS(DSectorScrollInterpolation, DInterpolation) - - sector_t *sector; - double oldx, oldy; - double bakx, baky; - bool ceiling; - -public: - - DSectorScrollInterpolation() {} - DSectorScrollInterpolation(sector_t *sector, bool plane); - void Destroy(); - void UpdateInterpolation(); - void Restore(); - void Interpolate(double smoothratio); - DECLARE_OLD_SERIAL - virtual void Serialize(FSerializer &arc); -}; - - -//========================================================================== -// -// -// -//========================================================================== - -class DWallScrollInterpolation : public DInterpolation -{ - DECLARE_CLASS(DWallScrollInterpolation, DInterpolation) - - side_t *side; - int part; - double oldx, oldy; - double bakx, baky; - -public: - - DWallScrollInterpolation() {} - DWallScrollInterpolation(side_t *side, int part); - void Destroy(); - void UpdateInterpolation(); - void Restore(); - void Interpolate(double smoothratio); - DECLARE_OLD_SERIAL - virtual void Serialize(FSerializer &arc); -}; - -//========================================================================== -// -// -// -//========================================================================== - -class DPolyobjInterpolation : public DInterpolation -{ - DECLARE_CLASS(DPolyobjInterpolation, DInterpolation) - - FPolyObj *poly; - TArray oldverts, bakverts; - double oldcx, oldcy; - double bakcx, bakcy; - -public: - - DPolyobjInterpolation() {} - DPolyobjInterpolation(FPolyObj *poly); - void Destroy(); - void UpdateInterpolation(); - void Restore(); - void Interpolate(double smoothratio); - DECLARE_OLD_SERIAL - virtual void Serialize(FSerializer &arc); -}; - -void DInterpolation::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << refcount; - if (arc.IsLoading()) - { - interpolator.AddInterpolation(this); - } -} -//========================================================================== -// -// -// -//========================================================================== - -void DSectorPlaneInterpolation::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << sector << ceiling << oldheight << oldtexz << attached; -} - -void DSectorScrollInterpolation::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << sector << ceiling << oldx << oldy; -} -void DWallScrollInterpolation::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << side << part << oldx << oldy; -} - -void DPolyobjInterpolation::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - int po = int(poly - polyobjs); - arc << po << oldverts; - poly = polyobjs + po; - - arc << oldcx << oldcy; - if (arc.IsLoading()) bakverts.Resize(oldverts.Size()); -} - -void AWeaponHolder::Serialize(FArchive &arc) -{ - Super::Serialize(arc); - arc << PieceMask << PieceWeapon; -} - -void AWeaponPiece::Serialize(FArchive &arc) -{ - Super::Serialize(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 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 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 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 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 \ No newline at end of file