Commit Graph

29 Commits

Author SHA1 Message Date
Randy Heit fb50df2c63 About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.

- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
  FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
  This is so that I can use a series of mysnprintf() calls and advance the
  pointer for each one. Once the pointer goes beyond the end of the buffer,
  the count will go negative, but since it's an unsigned type it will be
  seen as excessively huge instead. This should not be a problem, as there's
  no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
  buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
  FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
  name when given a Hexen map number. This was fine with the old scanner
  code, but only a happy coincidence prevents it from crashing with the new
  code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
  binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
  is probably broken until I get around to booting into Linux again. Niceties
  provided over the existing Makefiles they're replacing:
  * All command-line builds can use the same build system, rather than having
    a separate one for MinGW and another for Linux.
  * Microsoft's NMake tool is supported as a target.
  * Progress meters.
  * Parallel makes work from a fresh checkout without needing to be primed
    first with a single-threaded make.
  * Porting to other architectures should be simplified, whenever that day
    comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
  itself instead of generating an external makefile to do it, since I couldn't
  figure out how to generate a makefile with an external tool and include it
  with a CMake-generated makefile. Where makewad used a master list of files
  to generate the package file, zipdir just zips the entire contents of one or
  more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
  formatting can be entirely independant of the CRT.

SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
Christoph Oelckers ae0ad31842 - Converted Heretic's Staff, GoldWand, Crossbow and Gauntlets to DECORATE.
SVN r1079 (trunk)
2008-07-21 18:01:06 +00:00
Christoph Oelckers a8c283dacd - fixed: Morphing to a class without a face definition crashed.
- Converted all of Heretic's actors except the weapons to DECORATE.
- Added the option to define the ActorInfos for native classes in DECORATE.


SVN r1078 (trunk)
2008-07-21 17:03:30 +00:00
Christoph Oelckers 5cc1b4991c - converted the boss brain to DECORATE.
- added an abstract base class for special map spots that are maintained in 
  lists and rewrote the boss brain, the mace and DSparil to use it.
- fixed: RandomSpawners didn't destroy themselves after finishing their work.


SVN r1076 (trunk)
2008-07-20 14:42:54 +00:00
Christoph Oelckers ea4f160e35 - Added damage factors that allows to make monsters more or less resistant
to specific damage types.
- Changed Dehacked parser to use the DECORATE symbol tables for code pointers
  instead of creating its own ones.
- Removed the HandleNoSector hack and changed A_Look so that it uses the sector's
  sound target for actors with MF_NOSECTOR regardless of compatibility settings.
- Moved initialization of weapon slots after the actor initialization.
  With default weapons exported to DECORATE it can't be done earlier.
- Converted Doom weapons to DECORATE.
- Changed backpack definition so that Doom's backpack is no longer the base
  class that implements its functionality. Now there is an abstract base class
  all backpack-like items derive from. Also moved the actual definition of Doom's
  backpack to DECORATE.


SVN r519 (trunk)
2007-04-28 09:06:32 +00:00
Christoph Oelckers 3c976ac02c - Converted the StrifePlayer to DECORATE. Even though it requires exporting
3 new code pointers without general use it was necessary to handle
  GiveDefaultInventory consistently for all players without the need to 
  subclass this function.
- Added a Player.RunHealth property to expose the StrifePlayer's behavior of
  not being able to run when its health is below 10.
- Changed APlayerPawn::GiveDefaultInventory so that it always adds a HexenArmor
  and a BasicArmor item to the inventory. If these items are not the first ones
  added to the inventory anything else that might absorb damage is not guaranteed 
  to work consistently because their function depends on the order in the inventory.
- Changed handling of APowerup's DoEffect so that it is called from the owner's
  Tick function, not the item's. This is so that the order of execution is
  determined by the order in the inventory. When done in the item's Tick function
  order depends on the global thinker table which can cause problems with the
  order in which conflicting powerups apply their effect. Now it is guaranteed
  that the item that was added to the inventory first applies its effect last.
- Fixed: Added checks for Speed==0 to A_Tracer and A_Tracer2 because this could
  cause a divide by zero.
- Fixed: P_MoveThing must also set the moved actor's previous position to
  prevent interpolation of the move.
- Fixed: APowerInvisibility and its subclasses need to constantly update
  the owner's translucency information in case of interference between different
  subclasses. Also changed Hexen's Cleric's invulnerability mode to disable
  the translucency effect if an invisibility powerup is active.


SVN r448 (trunk)
2007-01-12 15:24:10 +00:00
Christoph Oelckers b599eda17d - Moved A_ThrowGrenade from Inventory to Actor because it can also be used by
monsters
- Added velocity multiplicators to A_SpawnDebris.
- Changed: A_JumpIfNoAmmo should have no effect for CustomInventory items.
- Fixed: DECORATE jump commands must set the call state's result to 0
  even when they have to return prematurely.
- Added obituaries for Strife's and Hexen's monsters.
- Converted Strife's Bishop to DECORATE.
- Added momx, momy and momz variables to the DECORATE expression evaluator.


SVN r404 (trunk)
2006-12-06 10:38:47 +00:00
Randy Heit 24b5a0b110 - Finished the framework for specifying all action functions externally,
including restricting them to particular classes.

SVN r403 (trunk)
2006-12-04 23:25:59 +00:00
Christoph Oelckers c7644ca34e - Converted the Heretic sound sequences and the particle fountains to DECORATE.
- Added DECORATE support for setting an actor's args. If this is done
  it will also disable the actor's special that can be set in a map. This
  is for actors that want to use A_CountdownArg or similar functions
  that use the args for something different than the special's parameters.
- Converted a_sharedmisc.cpp to DECORATE.
- Added a new NActorIterator that can search for classes specified by name.
- Added a new constructor to TThinkerIterator that can search
  for DECORATE defined subclasses that are not represented by a real C++ class.
- Fixed: BuildInfoDefaults must set the parent symbol table so that 
  all actors can get to the global symbols stored in AActor.
- Fixed some minor inconsistencies in the Arch-Vile's DECORATE definition.
- Fixed: A_VileAttack moved the flame without relinking it into the sector 
  lists. It also forgot to set the z-position correctly. (original Doom bug.)
- Fixed: The Doom 2 cast finale didn't work with the dynamic state name handling.


SVN r401 (trunk)
2006-12-02 15:38:50 +00:00
Christoph Oelckers 63bd2125f3 - Added global constants to DECORATE so that I can define meaningful flag
names for some DECORATE functions. Technically these will be constants 
  of the AActor class but that will make them accessible in all other actor 
  classes.


SVN r397 (trunk)
2006-11-29 16:20:22 +00:00
Christoph Oelckers 0ba809234e - Fixed: The StrifePlayer couldn't obtain his default inventory because
APlayerPawn::GiveDefaultInventory gave him some HexenArmor even though
  he doesn't need it.
- Added custom blood type properties to DECORATE.
- Converted Blood to DECORATE and made some minor changes to the code
  in preparation for custom blood types.
- Converted the bot helper things to DECORATE.
- Added damage type specific crash states.


SVN r395 (trunk)
2006-11-29 10:03:35 +00:00
Christoph Oelckers 30885e6d86 - Changed: When playing a shareware game no external WADs are loaded at all,
not even zvox.wad or the skins directory.
- Minor improvement of Hexen's Demons: They now transfer the translation
  to the chunks they spawn so that they look correct if they are color
  translated. See Resurrection of Chaos for an example.
- Converted Key gizmos to DECORATE.
- Converted Heretic's Beast (Weredragon) to DECORATE.
- Added a randomness parameter to A_SpawnItemEx. This allows
  spawning objects with a random chance without the need to write
  complicated A_Jump constructs.
- Converted Heretic's Mummy to DECORATE.
- Converted Hexen's Demons to DECORATE.



SVN r393 (trunk)
2006-11-27 21:51:36 +00:00
Christoph Oelckers a90ba9deb6 - Converted Ettin and Centaur to DECORATE.
- Made the Ettin's and Centaur's howling sound an actor property.
- Added A_CustomComboAttack function to finally have something that can
  replace the old A_ComboAttack function.
- Added A_SpawnItemEx function that removes the problems with A_SpawnItem
  and which also should make most of the A_CustomMissile abuse unnecessary.
- Added A_QueueCorpse to the list of DECORATE code pointers.
- Made the size of Hexen's corpse queue configurable by CVAR
  (sv_corpsequeuesize.) Setting this CVAR to -1 will disable corpse 
  queuing completely so that even in Hexen all corpses will stay forever.


SVN r392 (trunk)
2006-11-27 00:01:30 +00:00
Christoph Oelckers 49422188f2 - Converted Heretic's Clink (Sabreclaw) to DECORATE.
- Added MissSound parameter to A_CustomMeleeAttack.
- Converted Heretic's Snake (Ophidian) to DECORATE.
- Added an option to A_CustomMissile to jump to the see state if
  the caller's target is dead.
- Fixed: A_ThrowGrenade didn't play the missile's spawn sound.
- Added MF_SPAWNSOUNDSOURCE flag so that Raven's missile spawning code 
  pointers can be recreated with DECORATE.
- Converted a_ravenambient.cpp to DECORATE.



SVN r388 (trunk)
2006-11-25 12:25:05 +00:00
Christoph Oelckers e5bce37755 - Converted Heretic's and Hexen's players to DECORATE.
- Made Hexenarmor factors configurable by DECORATE.
- Added support for selecting the invulnerability mode per item as well.
- Made Invulnerability and Healing radius behavior selectable by player
  class instead of hard coding the special behavior to the Hexen classes.


SVN r379 (trunk)
2006-11-07 10:20:09 +00:00
Christoph Oelckers 80950553c6 - Converted the DoomPlayer to DECORATE.
- Extended all A_Jump commands to take labels as parameters in addition
  to offsets.


SVN r378 (trunk)
2006-11-05 21:46:28 +00:00
Christoph Oelckers 8c2f651bdb - Replaced the static string buffer in ProcessStates with an FString.
- After doing some tests with state label scopes I had to conclude that
  using '.' both for separating sub-state-labels and scope resolution 
  identifiers does not work reliably unless all actor class names were
  prohibited from being used as state labels.  Since that is undesirable
  the only solution is to change the scope resolution operator. Fortunately 
  no WADs so far have used it so implementing such a breaking change isn't 
  a major issue. Now it uses '::', like C++ for this purpose.
- Converted Revenant, Mancubus and Pain Elemental to DECORATE.


SVN r375 (trunk)
2006-11-04 22:26:04 +00:00
Christoph Oelckers 5e8323b426 - Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and
CommanderKeen to DECORATE.


SVN r374 (trunk)
2006-11-04 16:19:50 +00:00
Christoph Oelckers 29195a913c - Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.
- Added VSpeed DECORATE property so that an actor can be given an initial
  vertical speed.
- Removed the barrel check in P_DamageMobj. AActor::Die is doing the same
  operation unconditionally so this is redundant.
- Added A_BarrelDestroy to the list of DECORATE code pointers so that
  the same effect can be recreated for other items as well.
- Renamed A_BarrelRespawn to A_Respawn, changed it so that it works for
  monsters and added it to the list of DECORATE code pointers. Now Quake-style
  zombies should be possible. ;)
- Changed handling of MF4_RANDOMIZE so that it applies to all actors being
  spawned and not just projectiles.
- Converted Berserk and Megasphere to DECORATE.
- Fixed: HealThing should respect the stamina a player has and the Dehacked
  health compatibility flag if max is 0. To do that it calls P_GiveBody now.


SVN r373 (trunk)
2006-11-04 13:06:42 +00:00
Christoph Oelckers 063c85b157 - Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now.
- Fixed: The music strings in the default level info were never freed and
  caused memory leaks when used repeatedly.
- Fixed: The intermusic string in the level info was never freed.
- Fixed: The default fire obituary should only be printed if the damage
  came from the environment. If it comes from a monster the monster specific
  obituary should be used instead.
- Added custom damage types from the floating point test release.
- Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage 
  type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also 
  be used by other actors so a more generalized approach is needed than hard
  coding it into the Pain Elemental.
- Converted a few of Doom's monsters to DECORATE because I couldn't test the
  first version of the custom state code with the corpses inheriting from them.
- Added custom states from last year's floating point test release and fixed
  some bugs I found in that code. Unfortunately it wasn't all salvageable
  and it was easier to recreate some parts from scratch.



SVN r368 (trunk)
2006-10-31 14:53:21 +00:00
Christoph Oelckers f66b7de8c8 - Took MF2_WINDTHRUST off AMorphedMonster. This is something that should not
be a default setting.
- Moved a_artiegg.cpp to g_shared and renamed it to a_morph.cpp to better reflect
  its meaning.
- Fixed: AMorphProjectile's PlayerClass and MonsterClass members must be serialized
  as FNames. Serializing them as ints is not safe because name indices are not 
  guaranteed to be the same each time the game is started. Same for APlayerPawn's
  MorphWeapon member.
- Converted EggFX, ArtiEgg, PorkFX and ArtiPork to DECORATE. 
- Added a new parameter to A_FireCustomMissile. Previously it always aimed
  straight ahead and altered the projectile's angle according to the resulting
  direction. If the 6th parameter is 1 now it will aim at the specified angle
  directly.
- Changed custom morphing to be based on a new MorphProjectile class, not
  the Heretic specific EggFX. The EggFX properties are now prefixed with
  'MorphProjectile.'. 


SVN r297 (trunk)
2006-08-17 09:54:42 +00:00
Christoph Oelckers 5ac0789e6e - Added a type check to Spawn(actorname,...) to allow it to print a
meaningful message instead of the nondescript 
  'Tried to spawn a class-less actor'.
- Converted AGlassJunk to DECORATE and made the spawn function a little
  more flexible so that replacing the shard is easier.
- Converted ABloodSplatter to DECORATE.
- Removed A_Jiggle because it never worked properly.
- Changed DECORATE parser to allow commas between arguments for multi-
  argument properties. For all newly added properties this format will
  become mandatory but for backwards compatibility it is optional for
  old ones.
- Added a check for negative indices to TAutoGrowArray::SetVal to prevent
  passing an index of -1 from crashing the game.
- Fixed: Morphing must clear the weapon's flash sprite.
- Fixed: Resurrecting a morphed player caused a crash.
- Fixed: Random sounds that recursively refer to themselves caused a stack
  overflow. Now they print a warning and get ignored.


SVN r277 (trunk)
2006-07-31 10:22:53 +00:00
Christoph Oelckers 1bd6ac028b - 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)
2006-06-17 20:29:41 +00:00
Christoph Oelckers 01441cd4f0 - Converted the stealth monsters to DECORATE.
- Added string replacement option to obituary strings.
- Changed lock and pickup message handling so that it is either a real
  string or a LANGUAGE identifier. The only reason I did the mixed format
  in the first place were Hexen's lock messages but they have been 
  replaced by unique strings in the mean time so the feature isn't needed 
  any more.
- Added a flags parameter to TranslucentLine.
- Extended the second arg of Line_SetIdentification to set not only 
  ML_ZONEBOUNDARY but all 8 bits of the third byte in the flag word.
  This allows a relatively simple means of setting all the new flags
  directly.
- Moved ML_ZONEBOUNDARY to doomdata.h so that it is in the same place as the
  other line flags.
- Fixed: Strife's teleport swirl didn't loop its animation.
- Fixed: Strife's rat is not supposed to be shootable.

SVN r110 (trunk)
2006-05-11 17:56:35 +00:00
Christoph Oelckers 605a9a7715 May 6, 2006 (Changes by Graf Zahl)
- Converted a_zombie.cpp and most of a_strifestuff.cpp to DECORATE.
- Converted a_strifekeys.cpp to DECORATE and moved the pickup messages to the
  string table.
- Removed the WIF_HITS_GHOSTS weapon flag and replaced it with MF2_THRUGHOST. 
  There is no need to keep two flags around with virtually the same meaning.
- Changed the ShadowArmor to use the VISIBILITYPULSE flag to change its translucency.
  It looks much better now than the cheap code pointer based blinking it used before.
- Converted most of a_strifeitems.cpp to DECORATE and moved the pickup messages 
  to the string table.
- Converted a_strifearmor.cpp to DECORATE and moved the pickup messages to the
  string table.
- Moved the messages for killing spectres to the string table.
- Converted the quest items to DECORATE. Also changed A_GiveQuestItem to get
  the messages it prints from the string table instead of the quest item's tag
  string.

May 5, 2006 (Changes by Graf Zahl)
- Removed the hopelessly outdated thingdef_doc.txt file from the repository.
- Converted a_peasant.cpp and a_ratbuddy.cpp to DECORATE.
- Fixed: C_DoKey didn't treat an empty string as 'no binding' when checking for
  valid double bindings.
- Converted a_merchants.cpp to DECORATE.
- Added MF5_NODAMAGE flag to generalize the behavior of Strife's merchants which
  can be shot but take no damage from getting hurt.
- Converted a_beggars.cpp to DECORATE.
- Added an Inventory.GiveQuest property. This makes it possible to define all of
  Strife's original items that also give a quest item in DECORATE but it is also 
  useful to define items like the ones in Day of the Acolyte without ugly workarounds.
- Added a Tag property and Strife teaser conversation IDs to DECORATE so now it is 
  possible to define many of Strife's items.
- Added a FastSpeed property to DECORATE so that projectiles can finally be
  assigned a higher speed for fast mode.
- Added a ACS_LockedExecuteDoor special. It is basically the same as the existing
  ACS_LockedExecute but it uses the 'door' message instead of 'remote'. This
  cannot be integrated into ACS_LockedExecute because all its arguments are already
  in use.
- Added a fully customizable A_CustomMeleeAttack function for DECORATE.


SVN r83 (trunk)
2006-05-07 00:27:22 +00:00
Randy Heit 3c9b55d1db SVN r81 (trunk) 2006-05-06 03:25:12 +00:00
Christoph Oelckers d06793ad7e - Converted A_Puzzleitems.cpp and parts of A_HexenSpecialdecs.cpp to DECORATE and fixed a few broken Hexen items.
SVN r78 (trunk)
2006-05-04 19:36:12 +00:00
Christoph Oelckers 0e69196370 May 3, 2006 (Changes by Graf Zahl)
- Removed doom.x, heretic.x and strife.x from the SVN repository. These
  are generated files.
- Fixed: A_PainDie has to check whether a valid target exists before 
  calling IsFriend.
- Fixed: FDecalLib::FindAnimator needs a signed counter to work properly.

May 1, 2006 (Changes by Graf Zahl)
- Added support for game specific pickup messages, if only to be able
  to define Raven's invulnerability item in DECORATE.
- Removed A_TreeDeath because it is no longer used.
- Fixed: When picking up a PowerupGiver for an active powerup the
  blend color and the duration were transferred to a temorary item
  and never took effect. They have to be trnasferred to the newly created
  powerup item before trying to give it to the player, not afterward.
- Made the colormap of the InvulnerabilitySphere item specific. 
  The base power class still needs to have its color adjusted
  per game though and since Raven's invulnerability item is used in both
  Hexen and Heretic it can't define its own colormap/blend.
- Separated the invulnerability colormaps from the game being played
  and made them item specific. They can also be specified as regular
  blend colors in DECORATE now.
- Converted a_hereticarmor.cpp and most of a_doomartifacts.cpp,
  a_hereticartifacts.cpp and a_heretickeys.cpp to DECORATE.
- Changed the Soulsphere to be a real health item with the Dehacked
  modifications made in d_dehacked.cpp as for most other items which
  need to be adjusted.
- Added IF_BIGPOWERUP flag to AInventory to expose the RESPAWN_SUPER
  dmflag to DECORATE. Also removed the now obsolete ShouldRespawn methods
  from AInvulnerabilitySphere and ABlurSphere.
- Converted a_splashes.cpp to DECORATE.
- Converted most of a_debris.cpp to DECORATE.


SVN r73 (trunk)
2006-05-03 14:54:48 +00:00
Christoph Oelckers 29cd024aba SVN r71 (trunk) 2006-04-30 21:49:18 +00:00