mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- exported native fields of several more classes.
This commit is contained in:
parent
46757ff8bf
commit
0c95568d98
6 changed files with 89 additions and 3 deletions
|
@ -15,6 +15,15 @@ IMPLEMENT_CLASS(ABasicArmorPickup, false, false, false, false)
|
|||
IMPLEMENT_CLASS(ABasicArmorBonus, false, false, true, false)
|
||||
IMPLEMENT_CLASS(AHexenArmor, false, false, false, false)
|
||||
|
||||
|
||||
DEFINE_FIELD(ABasicArmor, AbsorbCount)
|
||||
DEFINE_FIELD(ABasicArmor, SavePercent)
|
||||
DEFINE_FIELD(ABasicArmor, MaxAbsorb)
|
||||
DEFINE_FIELD(ABasicArmor, MaxFullAbsorb)
|
||||
DEFINE_FIELD(ABasicArmor, BonusCount)
|
||||
DEFINE_FIELD(ABasicArmor, ArmorType)
|
||||
DEFINE_FIELD(ABasicArmor, ActualSaveAmount)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ABasicArmor :: Serialize
|
||||
|
@ -193,6 +202,11 @@ void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
}
|
||||
}
|
||||
|
||||
DEFINE_FIELD(ABasicArmorPickup, SavePercent)
|
||||
DEFINE_FIELD(ABasicArmorPickup, MaxAbsorb)
|
||||
DEFINE_FIELD(ABasicArmorPickup, MaxFullAbsorb)
|
||||
DEFINE_FIELD(ABasicArmorPickup, SaveAmount)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ABasicArmorPickup :: Serialize
|
||||
|
@ -396,6 +410,10 @@ bool ABasicArmorBonus::Use (bool pickup)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
DEFINE_FIELD(AHexenArmor, Slots)
|
||||
DEFINE_FIELD(AHexenArmor, SlotsIncrement)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AHexenArmor :: Serialize
|
||||
|
|
|
@ -88,6 +88,9 @@ void PClassAmmo::DeriveData(PClass *newclass)
|
|||
|
||||
IMPLEMENT_CLASS(AAmmo, false, false, false, false)
|
||||
|
||||
DEFINE_FIELD(AAmmo, BackpackAmount)
|
||||
DEFINE_FIELD(AAmmo, BackpackMaxAmount)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AAmmo :: Serialize
|
||||
|
@ -483,6 +486,20 @@ IMPLEMENT_POINTERS_START(AInventory)
|
|||
IMPLEMENT_POINTER(Owner)
|
||||
IMPLEMENT_POINTERS_END
|
||||
|
||||
DEFINE_FIELD_BIT(AInventory, ItemFlags, bPickupGood, IF_PICKUPGOOD)
|
||||
DEFINE_FIELD_BIT(AInventory, ItemFlags, bCreateCopyMoved, IF_CREATECOPYMOVED)
|
||||
DEFINE_FIELD_BIT(AInventory, ItemFlags, bInitEffectFailed, IF_INITEFFECTFAILED)
|
||||
DEFINE_FIELD(AInventory, Owner)
|
||||
DEFINE_FIELD(AInventory, Amount)
|
||||
DEFINE_FIELD(AInventory, MaxAmount)
|
||||
DEFINE_FIELD(AInventory, InterHubAmount)
|
||||
DEFINE_FIELD(AInventory, RespawnTics)
|
||||
DEFINE_FIELD(AInventory, Icon)
|
||||
DEFINE_FIELD(AInventory, DropTime)
|
||||
DEFINE_FIELD(AInventory, SpawnPointClass)
|
||||
DEFINE_FIELD(AInventory, PickupFlash)
|
||||
DEFINE_FIELD(AInventory, PickupSound)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AInventory :: Tick
|
||||
|
@ -1739,6 +1756,8 @@ void PClassHealth::DeriveData(PClass *newclass)
|
|||
|
||||
IMPLEMENT_CLASS(AHealth, false, false, false, false)
|
||||
|
||||
DEFINE_FIELD(AHealth, PrevHealth)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AHealth :: PickupMessage
|
||||
|
@ -1858,6 +1877,10 @@ void AHealthPickup::Serialize(FSerializer &arc)
|
|||
|
||||
// Backpack -----------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_CLASS(ABackpackItem, false, false, false, false)
|
||||
|
||||
DEFINE_FIELD(ABackpackItem, bDepleted)
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ABackpackItem :: Serialize
|
||||
|
@ -2033,7 +2056,6 @@ void ABackpackItem::DetachFromOwner ()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
IMPLEMENT_CLASS(ABackpackItem, false, false, false, false)
|
||||
IMPLEMENT_CLASS(AMapRevealer, false, false, false, false)
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -429,8 +429,8 @@ class AHealth : public AInventory
|
|||
{
|
||||
DECLARE_CLASS_WITH_META(AHealth, AInventory, PClassHealth)
|
||||
|
||||
int PrevHealth;
|
||||
public:
|
||||
int PrevHealth;
|
||||
virtual bool TryPickup (AActor *&other);
|
||||
virtual const char *PickupMessage ();
|
||||
};
|
||||
|
|
|
@ -98,6 +98,8 @@ public:
|
|||
|
||||
IMPLEMENT_CLASS(AFakeInventory, false, false, false, false)
|
||||
|
||||
DEFINE_FIELD(AFakeInventory, Respawnable)
|
||||
|
||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||
|
||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "zstring.h"
|
||||
#include "autosegs.h"
|
||||
#include "vectors.h"
|
||||
#include "cmdlib.h"
|
||||
|
||||
#define MAX_RETURNS 8 // Maximum number of results a function called by script code can return
|
||||
#define MAX_TRY_DEPTH 8 // Maximum number of nested TRYs in a single function
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
class Inventory : Actor native
|
||||
{
|
||||
|
||||
native Actor Owner; // Who owns this item? NULL if it's still a pickup.
|
||||
native int Amount; // Amount of item this instance has
|
||||
native int MaxAmount; // Max amount of item this instance can have
|
||||
native int InterHubAmount; // Amount of item that can be kept between hubs or levels
|
||||
native int RespawnTics; // Tics from pickup time to respawn time
|
||||
native TextureID Icon; // Icon to show on status bar or HUD
|
||||
native int DropTime; // Countdown after dropping
|
||||
native Class<Actor> SpawnPointClass; // For respawning like Heretic's mace
|
||||
native Class<Actor> PickupFlash; // actor to spawn as pickup flash
|
||||
native Sound PickupSound;
|
||||
native bool bPickupGood;
|
||||
native bool bCreateCopyMoved;
|
||||
native bool bInitEffectFailed;
|
||||
|
||||
Default
|
||||
{
|
||||
Inventory.Amount 1;
|
||||
|
@ -73,6 +88,9 @@ class ScoreItem : Inventory native
|
|||
|
||||
class Ammo : Inventory native
|
||||
{
|
||||
native int BackpackAmount;
|
||||
native int BackpackMaxAmount;
|
||||
|
||||
Default
|
||||
{
|
||||
+INVENTORY.KEEPDEPLETED
|
||||
|
@ -82,6 +100,7 @@ class Ammo : Inventory native
|
|||
|
||||
class BackpackItem : Inventory native
|
||||
{
|
||||
native bool bDepleted;
|
||||
}
|
||||
|
||||
class Armor : Inventory native
|
||||
|
@ -94,6 +113,15 @@ class Armor : Inventory native
|
|||
|
||||
class BasicArmor : Armor native
|
||||
{
|
||||
|
||||
native int AbsorbCount;
|
||||
native double SavePercent;
|
||||
native int MaxAbsorb;
|
||||
native int MaxFullAbsorb;
|
||||
native int BonusCount;
|
||||
native Name ArmorType;
|
||||
native int ActualSaveAmount;
|
||||
|
||||
Default
|
||||
{
|
||||
+Inventory.KEEPDEPLETED
|
||||
|
@ -121,6 +149,12 @@ class BasicArmorBonus : Armor native
|
|||
|
||||
class BasicArmorPickup : Armor native
|
||||
{
|
||||
|
||||
native double SavePercent;
|
||||
native int MaxAbsorb;
|
||||
native int MaxFullAbsorb;
|
||||
native int SaveAmount;
|
||||
|
||||
Default
|
||||
{
|
||||
+Inventory.AUTOACTIVATE;
|
||||
|
@ -130,6 +164,10 @@ class BasicArmorPickup : Armor native
|
|||
|
||||
class HexenArmor : Armor native
|
||||
{
|
||||
|
||||
native double Slots[5];
|
||||
native double SlotsIncrement[4];
|
||||
|
||||
Default
|
||||
{
|
||||
+Inventory.KEEPDEPLETED
|
||||
|
@ -139,7 +177,10 @@ class HexenArmor : Armor native
|
|||
|
||||
class DehackedPickup : Inventory native {}
|
||||
|
||||
class FakeInventory : Inventory native {}
|
||||
class FakeInventory : Inventory native
|
||||
{
|
||||
native bool Respawnable;
|
||||
}
|
||||
|
||||
class CustomInventory : StateProvider native
|
||||
{
|
||||
|
@ -151,6 +192,8 @@ class CustomInventory : StateProvider native
|
|||
|
||||
class Health : Inventory native
|
||||
{
|
||||
native int PrevHealth;
|
||||
|
||||
Default
|
||||
{
|
||||
Inventory.Amount 1;
|
||||
|
|
Loading…
Reference in a new issue