- exported all member fields that make sense. Entirely private ones or classes that are not supposed to be extended were left out.

This commit is contained in:
Christoph Oelckers 2016-11-23 17:34:36 +01:00
parent d1f5d916c2
commit 7325e3f0f8
9 changed files with 75 additions and 43 deletions

View file

@ -56,6 +56,13 @@ void PClassPowerupGiver::ReplaceClassRef(PClass *oldclass, PClass *newclass)
} }
} }
DEFINE_FIELD(APowerupGiver, PowerupType)
DEFINE_FIELD(APowerupGiver, EffectTics)
DEFINE_FIELD(APowerupGiver, BlendColor)
DEFINE_FIELD(APowerupGiver, Mode)
DEFINE_FIELD(APowerupGiver, Strength)
//=========================================================================== //===========================================================================
// //
// APowerupGiver :: Use // APowerupGiver :: Use
@ -114,6 +121,11 @@ void APowerupGiver::Serialize(FSerializer &arc)
// Powerup ------------------------------------------------------------------- // Powerup -------------------------------------------------------------------
DEFINE_FIELD(APowerup, EffectTics)
DEFINE_FIELD(APowerup, BlendColor)
DEFINE_FIELD(APowerup, Mode)
DEFINE_FIELD(APowerup, Strength)
//=========================================================================== //===========================================================================
// //
// APowerup :: Tick // APowerup :: Tick
@ -1184,40 +1196,12 @@ void APowerWeaponLevel2::EndEffect ()
} }
} }
// Player Speed Trail (used by the Speed Powerup) ----------------------------
class APlayerSpeedTrail : public AActor
{
DECLARE_CLASS (APlayerSpeedTrail, AActor)
public:
void Tick ();
};
IMPLEMENT_CLASS(APlayerSpeedTrail, false, false, false, false)
//===========================================================================
//
// APlayerSpeedTrail :: Tick
//
//===========================================================================
void APlayerSpeedTrail::Tick ()
{
const double fade = .6 / 8;
if (Alpha <= fade)
{
Destroy ();
}
else
{
Alpha -= fade;
}
}
// Speed Powerup ------------------------------------------------------------- // Speed Powerup -------------------------------------------------------------
IMPLEMENT_CLASS(APowerSpeed, false, false, false, false) IMPLEMENT_CLASS(APowerSpeed, false, false, false, false)
DEFINE_FIELD(APowerSpeed, SpeedFlags)
//=========================================================================== //===========================================================================
// //
// APowerSpeed :: Serialize // APowerSpeed :: Serialize
@ -1280,7 +1264,7 @@ void APowerSpeed::DoEffect ()
if (Owner->Vel.LengthSquared() <= 12*12) if (Owner->Vel.LengthSquared() <= 12*12)
return; return;
AActor *speedMo = Spawn<APlayerSpeedTrail> (Owner->Pos(), NO_REPLACE); AActor *speedMo = Spawn("PlayerSpeedTrail", Owner->Pos(), NO_REPLACE);
if (speedMo) if (speedMo)
{ {
speedMo->Angles.Yaw = Owner->Angles.Yaw; speedMo->Angles.Yaw = Owner->Angles.Yaw;

View file

@ -143,6 +143,7 @@ protected:
void Tick (); void Tick ();
void EndEffect (); void EndEffect ();
private:
bool HitCenterFrame; bool HitCenterFrame;
}; };
@ -281,15 +282,15 @@ public:
virtual void Serialize(FSerializer &arc); virtual void Serialize(FSerializer &arc);
void SetNoCallUndoMorph() { bNoCallUndoMorph = true; } void SetNoCallUndoMorph() { bNoCallUndoMorph = true; }
// Variables
FNameNoInit PlayerClass, MorphFlash, UnMorphFlash; FNameNoInit PlayerClass, MorphFlash, UnMorphFlash;
int MorphStyle; int MorphStyle;
player_t *Player;
bool bNoCallUndoMorph; // Because P_UndoPlayerMorph() can call EndEffect recursively
protected: protected:
void InitEffect (); void InitEffect ();
void EndEffect (); void EndEffect ();
// Variables
player_t *Player;
bool bNoCallUndoMorph; // Because P_UndoPlayerMorph() can call EndEffect recursively
}; };
#endif //__A_ARTIFACTS_H__ #endif //__A_ARTIFACTS_H__

View file

@ -472,6 +472,8 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote)
IMPLEMENT_CLASS(AKey, false, false, false, false) IMPLEMENT_CLASS(AKey, false, false, false, false)
DEFINE_FIELD(AKey, KeyNumber)
bool AKey::HandlePickup (AInventory *item) bool AKey::HandlePickup (AInventory *item)
{ {
// In single player, you can pick up an infinite number of keys // In single player, you can pick up an infinite number of keys

View file

@ -1801,6 +1801,8 @@ bool AHealth::TryPickup (AActor *&other)
IMPLEMENT_CLASS(AHealthPickup, false, false, false, false) IMPLEMENT_CLASS(AHealthPickup, false, false, false, false)
DEFINE_FIELD(AHealthPickup, autousemode)
//=========================================================================== //===========================================================================
// //
// AHealthPickup :: CreateCopy // AHealthPickup :: CreateCopy

View file

@ -19,6 +19,8 @@ void PClassPuzzleItem::DeriveData(PClass *newclass)
IMPLEMENT_CLASS(APuzzleItem, false, false, false, false) IMPLEMENT_CLASS(APuzzleItem, false, false, false, false)
DEFINE_FIELD(APuzzleItem, PuzzleItemNumber)
bool APuzzleItem::HandlePickup (AInventory *item) bool APuzzleItem::HandlePickup (AInventory *item)
{ {
// Can't carry more than 1 of each puzzle item in coop netplay // Can't carry more than 1 of each puzzle item in coop netplay

View file

@ -6,6 +6,9 @@
IMPLEMENT_CLASS(PClassWeaponPiece, false, false, false, false) IMPLEMENT_CLASS(PClassWeaponPiece, false, false, false, false)
IMPLEMENT_CLASS(AWeaponHolder, false, false, false, false) IMPLEMENT_CLASS(AWeaponHolder, false, false, false, false)
DEFINE_FIELD(AWeaponHolder, PieceMask);
DEFINE_FIELD(AWeaponHolder, PieceWeapon);
void PClassWeaponPiece::ReplaceClassRef(PClass *oldclass, PClass *newclass) void PClassWeaponPiece::ReplaceClassRef(PClass *oldclass, PClass *newclass)
{ {
Super::ReplaceClassRef(oldclass, newclass); Super::ReplaceClassRef(oldclass, newclass);

View file

@ -868,6 +868,8 @@ FState *AWeapon::GetStateForButtonName (FName button)
IMPLEMENT_CLASS(AWeaponGiver, false, false, false, false) IMPLEMENT_CLASS(AWeaponGiver, false, false, false, false)
DEFINE_FIELD(AWeaponGiver, DropAmmoFactor);
void AWeaponGiver::Serialize(FSerializer &arc) void AWeaponGiver::Serialize(FSerializer &arc)
{ {
Super::Serialize(arc); Super::Serialize(arc);

View file

@ -1071,10 +1071,10 @@ DEFINE_FIELD(FState, Frame)
DEFINE_FIELD(FState, UseFlags) DEFINE_FIELD(FState, UseFlags)
DEFINE_FIELD(FState, Misc1) DEFINE_FIELD(FState, Misc1)
DEFINE_FIELD(FState, Misc2) DEFINE_FIELD(FState, Misc2)
DEFINE_FIELD_BIT(FState, StateFlags, bSlow) DEFINE_FIELD_BIT(FState, StateFlags, bSlow, STF_SLOW)
DEFINE_FIELD_BIT(FState, StateFlags, bFast) DEFINE_FIELD_BIT(FState, StateFlags, bFast, STF_FAST)
DEFINE_FIELD_BIT(FState, StateFlags, bFullbright) DEFINE_FIELD_BIT(FState, StateFlags, bFullbright, STF_FULLBRIGHT)
DEFINE_FIELD_BIT(FState, StateFlags, bNoDelay) DEFINE_FIELD_BIT(FState, StateFlags, bNoDelay, STF_NODELAY)
DEFINE_FIELD_BIT(FState, StateFlags, bSameFrame) DEFINE_FIELD_BIT(FState, StateFlags, bSameFrame, STF_SAMEFRAME)
DEFINE_FIELD_BIT(FState, StateFlags, bCanRaise) DEFINE_FIELD_BIT(FState, StateFlags, bCanRaise, STF_CANRAISE)
DEFINE_FIELD_BIT(FState, StateFlags, bDehacked) DEFINE_FIELD_BIT(FState, StateFlags, bDehacked, STF_DEHACKED)

View file

@ -204,6 +204,8 @@ class Health : Inventory native
class HealthPickup : Inventory native class HealthPickup : Inventory native
{ {
native int autousemode;
Default Default
{ {
Inventory.DefMaxAmount; Inventory.DefMaxAmount;
@ -213,6 +215,8 @@ class HealthPickup : Inventory native
class Key : Inventory native class Key : Inventory native
{ {
native uint8 KeyNumber;
Default Default
{ {
+DONTGIB; // Don't disappear due to a crusher +DONTGIB; // Don't disappear due to a crusher
@ -223,6 +227,13 @@ class Key : Inventory native
class PowerupGiver : Inventory native class PowerupGiver : Inventory native
{ {
native Class<Actor> PowerupType;
native int EffectTics; // Non-0 to override the powerup's default tics
native color BlendColor; // Non-0 to override the powerup's default blend
native Name Mode; // Meaning depends on powerup - used for Invulnerability and Invisibility
native double Strength; // Meaning depends on powerup - currently used only by Invisibility
Default Default
{ {
Inventory.DefMaxAmount; Inventory.DefMaxAmount;
@ -232,7 +243,13 @@ class PowerupGiver : Inventory native
} }
} }
class Powerup : Inventory native {} class Powerup : Inventory native
{
native int EffectTics;
native color BlendColor;
native Name Mode; // Meaning depends on powerup - used for Invulnerability and Invisibility
native double Strength; // Meaning depends on powerup - currently used only by Invisibility
}
class PowerInvulnerable : Powerup native class PowerInvulnerable : Powerup native
{ {
@ -337,6 +354,8 @@ class PowerWeaponLevel2 : Powerup native
class PowerSpeed : Powerup native class PowerSpeed : Powerup native
{ {
native int SpeedFlags;
Default Default
{ {
Powerup.Duration -45; Powerup.Duration -45;
@ -348,7 +367,7 @@ class PowerSpeed : Powerup native
// Player Speed Trail (used by the Speed Powerup) ---------------------------- // Player Speed Trail (used by the Speed Powerup) ----------------------------
class PlayerSpeedTrail native class PlayerSpeedTrail : Actor
{ {
Default Default
{ {
@ -357,6 +376,15 @@ class PlayerSpeedTrail native
Alpha 0.6; Alpha 0.6;
RenderStyle "Translucent"; RenderStyle "Translucent";
} }
override void Tick()
{
Alpha -= .6 / 8;
if (Alpha <= 0)
{
Destroy ();
}
}
} }
class PowerMinotaur : Powerup native class PowerMinotaur : Powerup native
@ -477,6 +505,8 @@ class MapRevealer : Inventory native {}
class PuzzleItem : Inventory native class PuzzleItem : Inventory native
{ {
native int PuzzleItemNumber;
Default Default
{ {
+NOGRAVITY +NOGRAVITY
@ -549,6 +579,9 @@ class Weapon : StateProvider native
class WeaponGiver : Weapon native class WeaponGiver : Weapon native
{ {
native double DropAmmoFactor;
Default Default
{ {
Weapon.AmmoGive1 -1; Weapon.AmmoGive1 -1;
@ -558,6 +591,9 @@ class WeaponGiver : Weapon native
class WeaponHolder : Inventory native class WeaponHolder : Inventory native
{ {
native int PieceMask;
native Class<Actor> PieceWeapon;
Default Default
{ {
+NOBLOCKMAP +NOBLOCKMAP