- Converted a_doomhealth.cpp to DECORATE.

- Added a PickupMessage property to the internal actor parser, replaced
  most of the virtual PickupMessages with it and placed the code that
  reads the metadata into AInventory::PickupMessage. Now the
  PickupMessage method is truly virtual and I can do:
   Added a Health.LowMessage property to define double message items like
   Doom's medikit in DECORATE.
- Since defining Mana3 as an ammo type and then overriding the TryPickup
  method means that this item defeats all ammo checks in the game it might
  as well be defined as a CustomInventory item. At least this fixes the
  amount given in easy and very hard skills.
- Converted all ammo items to DECORATE.
- Changed internal property setting of ammo types and sister weapons
  to use fuglyname as for DECORATE definitions. This allows to export
  the ammo definitions into DECORATE definitions without doing it for
  the weapons themselves.
- Replaced obituary methods with actor properties.
- Fixed: The secret map check didn't work for maps inside Zips.



SVN r196 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-17 20:29:41 +00:00
commit 1bd6ac028b
86 changed files with 2351 additions and 3259 deletions

View file

@ -45,6 +45,7 @@
#include "r_data.h"
#include "w_wad.h"
#include "a_strifeglobal.h"
#include "thingdef.h"
void FActorInfo::BuildDefaults ()
{
@ -61,6 +62,7 @@ void FActorInfo::BuildDefaults ()
parent = Class->ParentClass;
parent->ActorInfo->BuildDefaults ();
Class->Meta = parent->Meta;
assert (Class->Size >= parent->Size);
memcpy (Class->Defaults, parent->Defaults, parent->Size);
if (Class->Size > parent->Size)
@ -129,9 +131,6 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
switch (defnum)
{
case ADEF_Weapon_AmmoType1:
case ADEF_Weapon_AmmoType2:
case ADEF_Weapon_SisterType:
case ADEF_Weapon_ProjectileType:
case ADEF_PowerupGiver_Powerup:
datatype = PClass::FindClass (datastr);
@ -167,6 +166,19 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
sgClass->Meta.SetMetaString (AMETA_StrifeName, name);
break;
}
case ADEF_Obituary:
sgClass->Meta.SetMetaString (AMETA_Obituary, datastr);
break;
case ADEF_HitObituary:
sgClass->Meta.SetMetaString (AMETA_HitObituary, datastr);
break;
case ADEF_Inventory_PickupMsg:
sgClass->Meta.SetMetaString (AIMETA_PickupMessage, datastr);
break;
case ADEF_PowerupGiver_Powerup:
giver->PowerupType = datatype;
break;
@ -280,10 +292,10 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint)
case ADEF_Weapon_FlagsSet: weapon->WeaponFlags |= dataint; break;
case ADEF_Weapon_UpSound: weapon->UpSound = datasound; break;
case ADEF_Weapon_ReadySound: weapon->ReadySound = datasound; break;
case ADEF_Weapon_SisterType: weapon->SisterWeaponType = datatype; break;
case ADEF_Weapon_SisterType: weapon->SisterWeaponType = fuglyname(datastr); break;
case ADEF_Weapon_ProjectileType:weapon->ProjectileType = datatype; break;
case ADEF_Weapon_AmmoType1: weapon->AmmoType1 = datatype; break;
case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = datatype; break;
case ADEF_Weapon_AmmoType1: weapon->AmmoType1 = fuglyname(datastr); break;
case ADEF_Weapon_AmmoType2: weapon->AmmoType2 = fuglyname(datastr); break;
case ADEF_Weapon_AmmoGive1: weapon->AmmoGive1 = dataint; break;
case ADEF_Weapon_AmmoGive2: weapon->AmmoGive2 = dataint; break;
case ADEF_Weapon_AmmoUse1: weapon->AmmoUse1 = dataint; break;