IMPORTANT NOTE: I uncommented some code depending on the missing x86.cpp file to allow this to compile, These changes must be reverted as soon as this file is added (see v_palette.cpp and win32/i_system.cpp.)
- Removed AT_GAME_SET because it's no longer used anywhere. - Converted the last remaining global classes to DECORATE. - Fixed: Inventory.PickupFlash requires an class name as parameter not an integer. Some Hexen definitions got it wrong. - Converted Hexen's Pig to DECORATE. - Replaced the ActorInfo definitions of all internal inventory classes with DECORATE definitions. - Added option to specify a powerup's duration in second by using a negative number. SVN r1137 (trunk)
This commit is contained in:
parent
67c844df4d
commit
ae54e13428
50 changed files with 866 additions and 638 deletions
|
|
@ -7,29 +7,11 @@
|
|||
#include "templates.h"
|
||||
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AArmor, Any, -1, 0)
|
||||
PROP_Inventory_PickupSound ("misc/armor_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmor, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_KEEPDEPLETED)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmorPickup, Any, -1, 0)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ABasicArmorBonus, Any, -1, 0)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_FlagsSet (IF_AUTOACTIVATE|IF_ALWAYSPICKUP)
|
||||
PROP_BasicArmorBonus_SavePercent (FRACUNIT/3)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHexenArmor, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_UNDROPPABLE | IF_KEEPDEPLETED)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AArmor)
|
||||
IMPLEMENT_CLASS (ABasicArmor)
|
||||
IMPLEMENT_CLASS (ABasicArmorPickup)
|
||||
IMPLEMENT_CLASS (ABasicArmorBonus)
|
||||
IMPLEMENT_CLASS (AHexenArmor)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static FRandom pr_torch ("Torch");
|
|||
|
||||
EXTERN_CVAR (Bool, r_drawfuzz);
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (APowerup)
|
||||
IMPLEMENT_CLASS (APowerup)
|
||||
|
||||
// Powerup-Giver -------------------------------------------------------------
|
||||
|
||||
|
|
@ -340,10 +340,7 @@ void APowerup::OwnerDied ()
|
|||
|
||||
// Invulnerability Powerup ---------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerInvulnerable, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVULNTICS)
|
||||
PROP_Inventory_Icon ("SPSHLD0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerInvulnerable)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -475,11 +472,7 @@ int APowerInvulnerable::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Strength (aka Berserk) Powerup --------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerStrength, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (1)
|
||||
PROP_Powerup_Color (128, 255, 0, 0)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerStrength)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -543,9 +536,7 @@ PalEntry APowerStrength::GetBlend ()
|
|||
|
||||
// Invisibility Powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerInvisibility, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVISTICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerInvisibility)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -625,9 +616,7 @@ int APowerInvisibility::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Ghost Powerup (Heretic's version of invisibility) -------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerGhost, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INVISTICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerGhost)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -670,10 +659,7 @@ int APowerGhost::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Shadow Powerup (Strife's version of invisibility) -------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerShadow, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (55*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerShadow)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -754,10 +740,7 @@ int APowerShadow::AlterWeaponSprite (vissprite_t *vis)
|
|||
|
||||
// Ironfeet Powerup ----------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerIronFeet, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (IRONTICS)
|
||||
PROP_Powerup_Color (32, 0, 255, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerIronFeet)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -783,12 +766,7 @@ void APowerIronFeet::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
|
||||
// Strife Environment Suit Powerup -------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerMask, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (80*TICRATE)
|
||||
PROP_Powerup_Color (0, 0, 0, 0)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
PROP_Inventory_Icon ("I_MASK")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerMask)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -825,9 +803,7 @@ void APowerMask::DoEffect ()
|
|||
|
||||
// Light-Amp Powerup ---------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerLightAmp, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INFRATICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerLightAmp)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -868,9 +844,7 @@ void APowerLightAmp::EndEffect ()
|
|||
|
||||
// Torch Powerup -------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerTorch, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (INFRATICS)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerTorch)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -932,10 +906,7 @@ void APowerTorch::DoEffect ()
|
|||
|
||||
// Flight (aka Wings of Wrath) powerup ---------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerFlight, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (FLIGHTTICS)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerFlight)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1066,10 +1037,7 @@ bool APowerFlight::DrawPowerup (int x, int y)
|
|||
|
||||
// Weapon Level 2 (aka Tome of Power) Powerup --------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerWeaponLevel2, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (WPNLEV2TICS)
|
||||
PROP_Inventory_Icon ("SPINBK0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerWeaponLevel2)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1138,16 +1106,12 @@ void APowerWeaponLevel2::EndEffect ()
|
|||
|
||||
class APlayerSpeedTrail : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APlayerSpeedTrail, AActor)
|
||||
DECLARE_CLASS (APlayerSpeedTrail, AActor)
|
||||
public:
|
||||
void Tick ();
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APlayerSpeedTrail, Any, -1, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
|
||||
PROP_Alpha (FRACUNIT*6/10)
|
||||
PROP_RenderStyle (STYLE_Translucent)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APlayerSpeedTrail)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1170,11 +1134,7 @@ void APlayerSpeedTrail::Tick ()
|
|||
|
||||
// Speed Powerup -------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerSpeed, Any, -1, 0)
|
||||
PROP_SpeedLong(3*FRACUNIT/2)
|
||||
PROP_Powerup_EffectTics (SPEEDTICS)
|
||||
PROP_Inventory_Icon ("SPBOOT0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerSpeed)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1238,24 +1198,11 @@ void APowerSpeed::DoEffect ()
|
|||
|
||||
// Minotaur (aka Dark Servant) powerup ---------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerMinotaur, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (MAULATORTICS)
|
||||
PROP_Inventory_Icon ("SPMINO0")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerMinotaur)
|
||||
|
||||
// Targeter powerup ---------------------------------------------------------
|
||||
|
||||
FState APowerTargeter::States[] =
|
||||
{
|
||||
S_NORMAL (TRGT, 'A', -1, NULL, NULL),
|
||||
S_NORMAL (TRGT, 'B', -1, NULL, NULL),
|
||||
S_NORMAL (TRGT, 'C', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APowerTargeter, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (160*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerTargeter)
|
||||
|
||||
void APowerTargeter::Travelled ()
|
||||
{
|
||||
|
|
@ -1269,9 +1216,14 @@ void APowerTargeter::InitEffect ()
|
|||
if ((player = Owner->player) == NULL)
|
||||
return;
|
||||
|
||||
P_SetPsprite (player, ps_targetcenter, &States[0]);
|
||||
P_SetPsprite (player, ps_targetleft, &States[1]);
|
||||
P_SetPsprite (player, ps_targetright, &States[2]);
|
||||
FState *state = FindState("Targeter");
|
||||
|
||||
if (state != NULL)
|
||||
{
|
||||
P_SetPsprite (player, ps_targetcenter, state + 0);
|
||||
P_SetPsprite (player, ps_targetleft, state + 1);
|
||||
P_SetPsprite (player, ps_targetright, state + 2);
|
||||
}
|
||||
|
||||
player->psprites[ps_targetcenter].sx = (160-3)*FRACUNIT;
|
||||
player->psprites[ps_targetcenter].sy =
|
||||
|
|
@ -1328,9 +1280,7 @@ void APowerTargeter::PositionAccuracy ()
|
|||
|
||||
// Frightener Powerup --------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerFrightener, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (60*TICRATE)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerFrightener)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1362,17 +1312,11 @@ void APowerFrightener::EndEffect ()
|
|||
|
||||
// Scanner powerup ----------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerScanner, Any, -1, 0)
|
||||
PROP_Powerup_EffectTics (80*TICRATE)
|
||||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (APowerScanner)
|
||||
|
||||
// Time freezer powerup -----------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerTimeFreezer, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( TIMEFREEZE_TICS )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerTimeFreezer)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1487,9 +1431,7 @@ void APowerTimeFreezer::EndEffect( )
|
|||
|
||||
// Damage powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerDamage, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 25*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerDamage)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1543,9 +1485,7 @@ void APowerDamage::ModifyDamage(int damage, FName damageType, int &newdamage, bo
|
|||
|
||||
// Quarter damage powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerProtection, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 25*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerProtection)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1598,9 +1538,7 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage
|
|||
|
||||
// Drain rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerDrain, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 60*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerDrain)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1636,9 +1574,7 @@ void APowerDrain::EndEffect( )
|
|||
|
||||
// Regeneration rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerRegeneration, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( 120*TICRATE )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerRegeneration)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1673,8 +1609,7 @@ void APowerRegeneration::EndEffect( )
|
|||
|
||||
// High jump rune -------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerHighJump, Any, -1, 0 )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerHighJump)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1709,9 +1644,7 @@ void APowerHighJump::EndEffect( )
|
|||
|
||||
// Morph powerup ------------------------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR( APowerMorph, Any, -1, 0 )
|
||||
PROP_Powerup_EffectTics( MORPHTICS )
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS( APowerMorph)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class player_t;
|
|||
// owner while it is present.
|
||||
class APowerup : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerup, AInventory)
|
||||
DECLARE_CLASS (APowerup, AInventory)
|
||||
public:
|
||||
virtual void Tick ();
|
||||
virtual void Destroy ();
|
||||
|
|
@ -51,7 +51,7 @@ protected:
|
|||
// An artifact is an item that gives the player a powerup when activated.
|
||||
class APowerupGiver : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerupGiver, AInventory)
|
||||
DECLARE_CLASS (APowerupGiver, AInventory)
|
||||
public:
|
||||
virtual bool Use (bool pickup);
|
||||
virtual void Serialize (FArchive &arc);
|
||||
|
|
@ -64,7 +64,7 @@ public:
|
|||
|
||||
class APowerInvulnerable : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerInvulnerable, APowerup)
|
||||
DECLARE_CLASS (APowerInvulnerable, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
|
@ -74,7 +74,7 @@ protected:
|
|||
|
||||
class APowerStrength : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerStrength, APowerup)
|
||||
DECLARE_CLASS (APowerStrength, APowerup)
|
||||
public:
|
||||
PalEntry GetBlend ();
|
||||
protected:
|
||||
|
|
@ -85,7 +85,7 @@ protected:
|
|||
|
||||
class APowerInvisibility : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerInvisibility, APowerup)
|
||||
DECLARE_CLASS (APowerInvisibility, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
|
@ -95,7 +95,7 @@ protected:
|
|||
|
||||
class APowerGhost : public APowerInvisibility
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerGhost, APowerInvisibility)
|
||||
DECLARE_CLASS (APowerGhost, APowerInvisibility)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
int AlterWeaponSprite (vissprite_t *vis);
|
||||
|
|
@ -103,7 +103,7 @@ protected:
|
|||
|
||||
class APowerShadow : public APowerInvisibility
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerShadow, APowerInvisibility)
|
||||
DECLARE_CLASS (APowerShadow, APowerInvisibility)
|
||||
protected:
|
||||
bool HandlePickup (AInventory *item);
|
||||
void InitEffect ();
|
||||
|
|
@ -112,14 +112,14 @@ protected:
|
|||
|
||||
class APowerIronFeet : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerIronFeet, APowerup)
|
||||
DECLARE_CLASS (APowerIronFeet, APowerup)
|
||||
public:
|
||||
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
};
|
||||
|
||||
class APowerMask : public APowerIronFeet
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerMask, APowerIronFeet)
|
||||
DECLARE_CLASS (APowerMask, APowerIronFeet)
|
||||
public:
|
||||
void AbsorbDamage (int damage, FName damageType, int &newdamage);
|
||||
void DoEffect ();
|
||||
|
|
@ -127,7 +127,7 @@ public:
|
|||
|
||||
class APowerLightAmp : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerLightAmp, APowerup)
|
||||
DECLARE_CLASS (APowerLightAmp, APowerup)
|
||||
protected:
|
||||
void DoEffect ();
|
||||
void EndEffect ();
|
||||
|
|
@ -135,7 +135,7 @@ protected:
|
|||
|
||||
class APowerTorch : public APowerLightAmp
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerTorch, APowerLightAmp)
|
||||
DECLARE_CLASS (APowerTorch, APowerLightAmp)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
protected:
|
||||
|
|
@ -145,7 +145,7 @@ protected:
|
|||
|
||||
class APowerFlight : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerFlight, APowerup)
|
||||
DECLARE_CLASS (APowerFlight, APowerup)
|
||||
public:
|
||||
bool DrawPowerup (int x, int y);
|
||||
void Serialize (FArchive &arc);
|
||||
|
|
@ -160,7 +160,7 @@ protected:
|
|||
|
||||
class APowerWeaponLevel2 : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerWeaponLevel2, APowerup)
|
||||
DECLARE_CLASS (APowerWeaponLevel2, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
|
@ -168,7 +168,7 @@ protected:
|
|||
|
||||
class APowerSpeed : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerSpeed, APowerup)
|
||||
DECLARE_CLASS (APowerSpeed, APowerup)
|
||||
protected:
|
||||
void DoEffect ();
|
||||
fixed_t GetSpeedFactor();
|
||||
|
|
@ -176,17 +176,17 @@ protected:
|
|||
|
||||
class APowerMinotaur : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerMinotaur, APowerup)
|
||||
DECLARE_CLASS (APowerMinotaur, APowerup)
|
||||
};
|
||||
|
||||
class APowerScanner : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerScanner, APowerup)
|
||||
DECLARE_CLASS (APowerScanner, APowerup)
|
||||
};
|
||||
|
||||
class APowerTargeter : public APowerup
|
||||
{
|
||||
DECLARE_ACTOR (APowerTargeter, APowerup)
|
||||
DECLARE_CLASS (APowerTargeter, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void DoEffect ();
|
||||
|
|
@ -197,7 +197,7 @@ protected:
|
|||
|
||||
class APowerFrightener : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerFrightener, APowerup)
|
||||
DECLARE_CLASS (APowerFrightener, APowerup)
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
|
@ -205,7 +205,7 @@ protected:
|
|||
|
||||
class APowerTimeFreezer : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerTimeFreezer, APowerup )
|
||||
DECLARE_CLASS( APowerTimeFreezer, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void DoEffect( );
|
||||
|
|
@ -214,7 +214,7 @@ protected:
|
|||
|
||||
class APowerDamage : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerDamage, APowerup )
|
||||
DECLARE_CLASS( APowerDamage, APowerup )
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
|
@ -223,7 +223,7 @@ protected:
|
|||
|
||||
class APowerProtection : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerProtection, APowerup )
|
||||
DECLARE_CLASS( APowerProtection, APowerup )
|
||||
protected:
|
||||
void InitEffect ();
|
||||
void EndEffect ();
|
||||
|
|
@ -232,7 +232,7 @@ protected:
|
|||
|
||||
class APowerDrain : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerDrain, APowerup )
|
||||
DECLARE_CLASS( APowerDrain, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
|
@ -240,7 +240,7 @@ protected:
|
|||
|
||||
class APowerRegeneration : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerRegeneration, APowerup )
|
||||
DECLARE_CLASS( APowerRegeneration, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
|
@ -248,7 +248,7 @@ protected:
|
|||
|
||||
class APowerHighJump : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerHighJump, APowerup )
|
||||
DECLARE_CLASS( APowerHighJump, APowerup )
|
||||
protected:
|
||||
void InitEffect( );
|
||||
void EndEffect( );
|
||||
|
|
@ -256,7 +256,7 @@ protected:
|
|||
|
||||
class APowerMorph : public APowerup
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR( APowerMorph, APowerup )
|
||||
DECLARE_CLASS( APowerMorph, APowerup )
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
|
||||
|
|
|
|||
|
|
@ -429,10 +429,7 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AKey, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_INTERHUBSTRIP)
|
||||
PROP_Inventory_PickupSound ("misc/k_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AKey)
|
||||
|
||||
bool AKey::HandlePickup (AInventory *item)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
class AKey : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AKey, AInventory)
|
||||
DECLARE_CLASS (AKey, AInventory)
|
||||
public:
|
||||
virtual bool HandlePickup (AInventory *item);
|
||||
|
||||
|
|
|
|||
|
|
@ -530,11 +530,7 @@ bool P_MorphedDeath(AActor *actor, AActor **morphed, int *morphedstyle, int *mor
|
|||
|
||||
// Base class for morphing projectiles --------------------------------------
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR(AMorphProjectile, Any, -1, 0)
|
||||
PROP_Damage (1)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
|
||||
PROP_Flags2 (MF2_NOTELEPORT)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS(AMorphProjectile)
|
||||
|
||||
int AMorphProjectile::DoSpecialDamage (AActor *target, int damage)
|
||||
{
|
||||
|
|
@ -566,12 +562,6 @@ IMPLEMENT_POINTY_CLASS (AMorphedMonster)
|
|||
DECLARE_POINTER (UnmorphedMe)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_STATELESS_DEFAULTS (AMorphedMonster, Any, -1, 0)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE)
|
||||
PROP_Flags2 (MF2_MCROSS|MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL)
|
||||
PROP_Flags3 (MF3_DONTMORPH|MF3_ISMONSTER)
|
||||
END_DEFAULTS
|
||||
|
||||
void AMorphedMonster::Serialize (FArchive &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ public:
|
|||
void Tick () {} // Does absolutely nothing itself
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AInterpolationSpecial, Any, 9075, 0)
|
||||
IMPLEMENT_CLASS (AInterpolationSpecial)
|
||||
|
||||
/*
|
||||
== PathFollower: something that follows a camera path
|
||||
|
|
|
|||
|
|
@ -17,10 +17,7 @@
|
|||
|
||||
static FRandom pr_restore ("RestorePos");
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AAmmo, Any, -1, 0)
|
||||
PROP_Inventory_FlagsSet (IF_KEEPDEPLETED)
|
||||
PROP_Inventory_PickupSound ("misc/ammo_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AAmmo)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -366,32 +363,6 @@ void A_RestoreSpecialPosition (AActor *self)
|
|||
}
|
||||
}
|
||||
|
||||
// Pickup flash -------------------------------------------------------------
|
||||
|
||||
class APickupFlash : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (APickupFlash, AActor)
|
||||
};
|
||||
|
||||
FState APickupFlash::States[] =
|
||||
{
|
||||
S_NORMAL (ACLO, 'D', 3, NULL , &States[1]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[2]),
|
||||
S_NORMAL (ACLO, 'D', 3, NULL , &States[3]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[4]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[5]),
|
||||
S_NORMAL (ACLO, 'C', 3, NULL , &States[6]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[7]),
|
||||
S_NORMAL (ACLO, 'A', 3, NULL , &States[8]),
|
||||
S_NORMAL (ACLO, 'B', 3, NULL , &States[9]),
|
||||
S_NORMAL (ACLO, 'A', 3, NULL , NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (APickupFlash, Raven, -1, 0)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Flags (MF_NOGRAVITY)
|
||||
END_DEFAULTS
|
||||
|
||||
/***************************************************************************/
|
||||
/* AInventory implementation */
|
||||
/***************************************************************************/
|
||||
|
|
@ -1154,11 +1125,7 @@ bool AInventory::DrawPowerup (int x, int y)
|
|||
/* AArtifact implementation */
|
||||
/***************************************************************************/
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APowerupGiver, Any, -1, 0)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND)
|
||||
PROP_Inventory_PickupSound ("misc/p_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APowerupGiver)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1349,8 +1316,7 @@ void AInventory::DetachFromOwner ()
|
|||
{
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ACustomInventory, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ACustomInventory)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1396,12 +1362,7 @@ bool ACustomInventory::TryPickup (AActor *toucher)
|
|||
return useok;
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHealth, Any, -1, 0)
|
||||
PROP_Inventory_Amount (1)
|
||||
PROP_Inventory_MaxAmount (0)
|
||||
PROP_Inventory_PickupSound ("misc/health_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AHealth)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1493,10 +1454,7 @@ bool AHealth::TryPickup (AActor *other)
|
|||
return true;
|
||||
}
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AHealthPickup, Any, -1, 0)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (AHealthPickup)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
@ -1724,9 +1682,9 @@ void ABackpackItem::DetachFromOwner ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR(ABackpackItem)
|
||||
IMPLEMENT_CLASS(ABackpackItem)
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR (AMapRevealer)
|
||||
IMPLEMENT_CLASS (AMapRevealer)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ private:
|
|||
// CustomInventory: Supports the Use, Pickup, and Drop states from 96x
|
||||
class ACustomInventory : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ACustomInventory, AInventory)
|
||||
DECLARE_CLASS (ACustomInventory, AInventory)
|
||||
public:
|
||||
|
||||
// This is used when an inventory item's use state sequence is executed.
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
// Ammo: Something a weapon needs to operate
|
||||
class AAmmo : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AAmmo, AInventory)
|
||||
DECLARE_CLASS (AAmmo, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
AInventory *CreateCopy (AActor *other);
|
||||
|
|
@ -203,7 +203,7 @@ public:
|
|||
// A weapon is just that.
|
||||
class AWeapon : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (AWeapon, AInventory)
|
||||
DECLARE_CLASS (AWeapon, AInventory)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
DWORD WeaponFlags;
|
||||
|
|
@ -295,7 +295,7 @@ enum
|
|||
// Health is some item that gives the player health when picked up.
|
||||
class AHealth : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHealth, AInventory)
|
||||
DECLARE_CLASS (AHealth, AInventory)
|
||||
|
||||
int PrevHealth;
|
||||
public:
|
||||
|
|
@ -306,7 +306,7 @@ public:
|
|||
// HealthPickup is some item that gives the player health when used.
|
||||
class AHealthPickup : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHealthPickup, AInventory)
|
||||
DECLARE_CLASS (AHealthPickup, AInventory)
|
||||
public:
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
virtual AInventory *CreateTossable ();
|
||||
|
|
@ -317,7 +317,7 @@ public:
|
|||
// Armor absorbs some damage for the player.
|
||||
class AArmor : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AArmor, AInventory)
|
||||
DECLARE_CLASS (AArmor, AInventory)
|
||||
};
|
||||
|
||||
// Basic armor absorbs a specific percent of the damage. You should
|
||||
|
|
@ -325,7 +325,7 @@ class AArmor : public AInventory
|
|||
// or BasicArmorBonus and those gives you BasicArmor when it activates.
|
||||
class ABasicArmor : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmor, AArmor)
|
||||
DECLARE_CLASS (ABasicArmor, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual void Tick ();
|
||||
|
|
@ -340,7 +340,7 @@ public:
|
|||
// BasicArmorPickup replaces the armor you have.
|
||||
class ABasicArmorPickup : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmorPickup, AArmor)
|
||||
DECLARE_CLASS (ABasicArmorPickup, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
|
@ -353,7 +353,7 @@ public:
|
|||
// BasicArmorBonus adds to the armor you have.
|
||||
class ABasicArmorBonus : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ABasicArmorBonus, AArmor)
|
||||
DECLARE_CLASS (ABasicArmorBonus, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
|
@ -370,7 +370,7 @@ public:
|
|||
// type (the player himself) that work together as a single armor.
|
||||
class AHexenArmor : public AArmor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AHexenArmor, AArmor)
|
||||
DECLARE_CLASS (AHexenArmor, AArmor)
|
||||
public:
|
||||
virtual void Serialize (FArchive &arc);
|
||||
virtual AInventory *CreateCopy (AActor *other);
|
||||
|
|
@ -388,7 +388,7 @@ protected:
|
|||
// PuzzleItems work in conjunction with the UsePuzzleItem special
|
||||
class APuzzleItem : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (APuzzleItem, AInventory)
|
||||
DECLARE_CLASS (APuzzleItem, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
bool ShouldStay ();
|
||||
|
|
@ -401,7 +401,7 @@ public:
|
|||
// A MapRevealer reveals the whole map for the player who picks it up.
|
||||
class AMapRevealer : public AInventory
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMapRevealer, AInventory)
|
||||
DECLARE_CLASS (AMapRevealer, AInventory)
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
|
@ -410,7 +410,7 @@ public:
|
|||
// normal maximum ammo amounts.
|
||||
class ABackpackItem : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (ABackpackItem, AInventory)
|
||||
DECLARE_CLASS (ABackpackItem, AInventory)
|
||||
public:
|
||||
void Serialize (FArchive &arc);
|
||||
bool HandlePickup (AInventory *item);
|
||||
|
|
|
|||
|
|
@ -7,13 +7,7 @@
|
|||
#include "s_sound.h"
|
||||
#include "c_console.h"
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (APuzzleItem, Any, -1, 0)
|
||||
PROP_Flags (MF_SPECIAL|MF_NOGRAVITY)
|
||||
PROP_Inventory_FlagsSet (IF_INVBAR)
|
||||
PROP_Inventory_DefMaxAmount
|
||||
PROP_UseSound ("PuzzleSuccess")
|
||||
PROP_Inventory_PickupSound ("misc/i_pkup")
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (APuzzleItem)
|
||||
|
||||
void APuzzleItem::Serialize (FArchive &arc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ static FRandom pr_randomspawn("RandomSpawn");
|
|||
|
||||
class ARandomSpawner : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (ARandomSpawner, AActor)
|
||||
DECLARE_CLASS (ARandomSpawner, AActor)
|
||||
|
||||
void PostBeginPlay()
|
||||
{
|
||||
|
|
@ -84,6 +84,5 @@ class ARandomSpawner : public AActor
|
|||
}
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (ARandomSpawner, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
IMPLEMENT_CLASS (ARandomSpawner)
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ private:
|
|||
|
||||
class AMorphProjectile : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AMorphProjectile, AActor)
|
||||
DECLARE_CLASS (AMorphProjectile, AActor)
|
||||
public:
|
||||
int DoSpecialDamage (AActor *target, int damage);
|
||||
void Serialize (FArchive &arc);
|
||||
|
|
@ -157,7 +157,7 @@ public:
|
|||
|
||||
class AMorphedMonster : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AMorphedMonster, AActor)
|
||||
DECLARE_CLASS (AMorphedMonster, AActor)
|
||||
HAS_OBJECT_POINTERS
|
||||
public:
|
||||
void Tick ();
|
||||
|
|
|
|||
|
|
@ -2,17 +2,11 @@
|
|||
#include "a_weaponpiece.h"
|
||||
#include "doomstat.h"
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AWeaponHolder, Any, -1, 0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOSECTOR)
|
||||
PROP_Inventory_FlagsSet (IF_UNDROPPABLE)
|
||||
END_DEFAULTS
|
||||
|
||||
IMPLEMENT_CLASS (AWeaponHolder)
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (AWeaponPiece)
|
||||
DECLARE_POINTER (FullWeapon)
|
||||
END_POINTERS
|
||||
BEGIN_STATELESS_DEFAULTS (AWeaponPiece, Any, -1, 0)
|
||||
END_DEFAULTS
|
||||
|
||||
|
||||
void AWeaponPiece::Serialize (FArchive &arc)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public:
|
|||
// [BL] Needs to be available for SBarInfo to check weaponpieces
|
||||
class AWeaponHolder : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR(AWeaponHolder, AInventory)
|
||||
DECLARE_CLASS(AWeaponHolder, AInventory)
|
||||
|
||||
public:
|
||||
int PieceMask;
|
||||
|
|
|
|||
|
|
@ -17,21 +17,12 @@
|
|||
|
||||
#define BONUSADD 6
|
||||
|
||||
FState AWeapon::States[] =
|
||||
{
|
||||
S_NORMAL (SHTG, 'E', 0, A_Light0 , NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_POINTY_CLASS (AWeapon)
|
||||
DECLARE_POINTER (Ammo1)
|
||||
DECLARE_POINTER (Ammo2)
|
||||
DECLARE_POINTER (SisterWeapon)
|
||||
END_POINTERS
|
||||
|
||||
BEGIN_DEFAULTS (AWeapon, Any, -1, 0)
|
||||
PROP_Inventory_PickupSound ("misc/w_pkup")
|
||||
END_DEFAULTS
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: Serialize
|
||||
|
|
@ -584,13 +575,13 @@ FState *AWeapon::GetAltAtkState (bool hold)
|
|||
|
||||
class AWeaponGiver : public AWeapon
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR(AWeaponGiver, AWeapon)
|
||||
DECLARE_CLASS(AWeaponGiver, AWeapon)
|
||||
|
||||
public:
|
||||
bool TryPickup(AActor *toucher);
|
||||
};
|
||||
|
||||
IMPLEMENT_ABSTRACT_ACTOR(AWeaponGiver)
|
||||
IMPLEMENT_CLASS(AWeaponGiver)
|
||||
|
||||
bool AWeaponGiver::TryPickup(AActor *toucher)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue