Commit Graph

350 Commits

Author SHA1 Message Date
Christoph Oelckers 88812ed0f5 - Fixed: P_LookForTid should abort its search when it discovers that it has
cycled through the entire list of actors.
- Reverted AActor::FindState to its R407 version because the change in R408 
  doesn't compile properly with VC++.
- Changed FIXMAPTHINGPOS further so that it also affects objects that are 
  not directly on a wall but closer than its radius.
- Changed FIXEDMAPTHINGPOS to move objects completely out of the wall and 
  adjusted the radii of all affected objects to actually represent half 
  the sprite's width.


SVN r409 (trunk)
2006-12-09 12:50:52 +00:00
Randy Heit 41de448add - Fixed some warnings flagged by GCC 4.1.1, which brings up an interesting
observation. The following code works with VC++ 2005. It aborts with GCC:
    FString str = "This is a string.";
    Printf ("%s\n", str);

SVN r408 (trunk)
2006-12-09 00:16:10 +00:00
Christoph Oelckers 6f3a28e355 - Fixed: The Acolyte's obituary wasn't printed.
- Fixed: The fighter player's attack state used the Cleric's sprite.


SVN r407 (trunk)
2006-12-08 08:47:57 +00:00
Christoph Oelckers 767a21931d SVN r406 (trunk) 2006-12-06 22:03:58 +00:00
Christoph Oelckers b8bb3479c8 Undid bad merge of rh-log.txt
SVN r405 (trunk)
2006-12-06 14:12:26 +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
Randy Heit 511e11e8b4 SVN r402 (trunk) 2006-12-04 03:23:02 +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
Randy Heit ca8765ed79 - Removed all the "fast" and unused code from FColorMatcher. Today's
computers are fast enough that the difference isn't even noticeable
  unless you're doing hundreds of thousands of matches, and I never had
  any plans to improve the algorithm the "fast" code used.
- Fixed: BestColor() should not by default return 1 as a possible match,
  since it's normally the transparent color.


SVN r400 (trunk)
2006-12-01 02:51:56 +00:00
Randy Heit 2dcc70dd31 - The DSimpleCanvas constructor now fills MemBuffer with zeros.
- Fixed: If the FBTexture wasn't exactly the same size as the screen,
  D3DFB::PaintToWindow() would still lock it with D3DLOCK_DISCARD. Alas,
  I saw no speedup for using a dirty region. (Side note: The Radeons are
  apparently slower compared to DirectDraw because they must do
  power-of-2 textures. If they ever add non-power-of-2 support like nvidia,
  I assume they will also see a speed gain.)
- Changed fb_d3d9.cpp so that instead of trying to compensate for Geforce
  off-by-one errors in the pixel shader, it automatically detects where
  the error occurs and modifies the way the palette is uploaded to
  compensate. Palette color 255 is then represented using the texture
  border color instead of actually being part of the palette. This should
  work correctly with all cards, since I had a report of an FX where the
  off-by-one occurred in a different spot from the place where I observed
  it on a 6 and 7 series cards. Since the shader now has one fewer
  instruction, I notice a very marginal speedup. (Interestingly, removing
  the flash blending from the shader had no perceivable performance gain.)


SVN r399 (trunk)
2006-12-01 01:17:45 +00:00
Christoph Oelckers 37e8533773 - Fixed: The DECORATE expression evaluator evaluated operators of same
precedence right to left instead of left to right.


SVN r398 (trunk)
2006-11-29 22:43:05 +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 a537d1a115 SVN r396 (trunk) 2006-11-29 11:14:40 +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
Randy Heit 4467cd6563 - Started adding action function declarations to objects.
- Added integer constant declarations to objects.
- Added some new token-based functions to sc_man.cpp that know about keywords
  and record proper type information, so parsers don't need to treat
  everything as strings.
- Added a simple symbol table to PClass.


SVN r394 (trunk)
2006-11-29 04:51:16 +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 d840d9b68a - Added random2 function to DECORATE's expression evaluator. This is to
better emulate some calculation of internal code pointers.
- Added named RNG support to DECORATE's expression evaluator. Just use
  random[name](min, max).


SVN r391 (trunk)
2006-11-26 12:13:12 +00:00
Randy Heit 04b80f8de5 - Reverted updaterevision.vcproj to r385 and added a note as a build event
explaining the need to use mt.exe 6.0 or newer. Here is the note:
  VERY IMPORTANT: You must copy the mt.exe from %VSINSTALLDIR%\Common7\Tools\bin
  on top of the version in %VSINSTALLDIR%\VC\bin or your computer may restart
  while building.
- Changed the ASecretTrigger::Activate() fix: There's no reason open scripts
  shouldn't be able to activate secret triggers; players just won't get
  credit for it in coop.
- Added a NULL actor check to R_SetupFrame().
- Fixed: The player sounds in DEHSUPP were defined incorrectly.


SVN r390 (trunk)
2006-11-26 01:30:34 +00:00
Christoph Oelckers beca482a68 - Fixed: SecretTriggers that were activated in an OPEN script caused a crash.
SVN r389 (trunk)
2006-11-26 00:09:17 +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
Randy Heit 824fa1a557 - Fixed: The backpack didn't give extra ammo in baby and nightmare modes.
SVN r387 (trunk)
2006-11-25 04:47:42 +00:00
Randy Heit 4b7b95663e - Fixed: When P_SpawnPlayer() calls DObject::PointerSubstitution() to
redirect player pointers, it affects the bodyque too. That meant that in
  multiplayer games, once the bodyque filled up, anybody was in danger of
  being rudely destroyed the next time somebody respawned.


SVN r386 (trunk)
2006-11-25 04:26:04 +00:00
Randy Heit 86ed101522 - Added a manifest with a trustinfo section to updaterevision.exe so that
the build process can run uninterrupted under Vista.
- Fixed: DIRECT3DCREATE9FUNC needs WINAPI added to its prototype so that it
  works properly in release build, which defaults to __fastcall.


SVN r385 (trunk)
2006-11-23 02:16:43 +00:00
Randy Heit 48bb782b19 - Fixed: Polyobjects are serialized before players, which means that a call
to PO_MovePolyobj() from P_SerializePolyobjs() for a crushing polyobject
  that touches a player actor will not have a valid actor->player->mo chain
  for P_DamageMobj and crash if it happens to touch the player. Since the
  polyobject was presumably in a good spot when the game was saved, we can
  just skip this step entirely and let it take care of itself the next time
  it moves (by which time, the players will be valid).
- Fixed: When transitioning from fullscreen to windowed mode with D3DFB, the
  window kept the WS_EX_TOPMOST style.
- Slight correctness fix: When in fullscreen, the window should have WS_POPUP
  style.
- Added a NULL target check to P_SpawnMissileXYZ(), A_DemonAttack1(),
  A_DemonAttack2_1(), and A_DemonAttack2_2().


SVN r384 (trunk)
2006-11-21 05:43:34 +00:00
Randy Heit 93b18c3bfa SVN r383 (trunk) 2006-11-19 02:10:25 +00:00
Christoph Oelckers 99fe466b57 SVN r382 (trunk) 2006-11-18 09:01:16 +00:00
Christoph Oelckers 1502215009 - Made AActor's xscale and yscale properties full precision fixed point
so now larger scales than 4 can be done.


SVN r381 (trunk)
2006-11-14 16:54:02 +00:00
Christoph Oelckers f6f15ba764 - Added a check to P_CheckMissileSpawn to decrease the monster counter
if it was called for spawning a monster with A_CustomMissile.
- Added a ML_BLOCK_PLAYERS line flag.


SVN r380 (trunk)
2006-11-10 12:13:37 +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 9c529b8aa4 - Removed the deprecation warnings for the state assignment commands
in DECORATE. While it is still recommended not to use them anymore
  they will continue to work with custom state support and existing 
  DECORATE code doesn't have to be changed. However, they will remain
  limited to the existing functionality, nothing more.


SVN r377 (trunk)
2006-11-05 15:49:54 +00:00
Christoph Oelckers ae1eb01649 Added one missing file.
SVN r376 (trunk)
2006-11-05 07:34:41 +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 c745c635db - Fixed: The Cacodemon had a FastSpeed definition even though it shouldn't.
- Fixed: FastSpeed was used unconditionally when defined.


SVN r372 (trunk)
2006-11-02 07:23:08 +00:00
Christoph Oelckers a8ba2a99ea - Fixed: SetActorPitch with a 0-tid (i.e. affect the activator) set the angle
instead of the pitch.
- Fixed: The check for special death states in AActor::TakeSpecialDamage didn't
  work.


SVN r371 (trunk)
2006-10-31 21:49:45 +00:00
Christoph Oelckers 1b741775a4 Removed one unused variable.
SVN r370 (trunk)
2006-10-31 16:11:11 +00:00
Christoph Oelckers 0cf2ae0127 Forgot to save the last change before committing.
SVN r369 (trunk)
2006-10-31 15:24:22 +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
Randy Heit 3b2c2efcb1 - Version bump to 2.1.7.
- Fixed: Placing a /* */ comment at the very end of a file without a
  terminating newline would not parse reliably.
- Added a NULL WallSpriteTile check to R_RenderDecal().


SVN r365 (trunk)
2006-10-31 00:47:05 +00:00
Christoph Oelckers 88ca8e630c - Changed parameter storage for states to use a separate member variable
instead of forcing it into misc1/misc2. Although this increases the EXE's
  size by 30k it has several advantages:
  * State parameters are no longer limited to 65535 for all states combined.
  * State parameters can be used with long durations.
  * Some special handling in the weapon state set functions can be removed.


SVN r364 (trunk)
2006-10-29 11:01:00 +00:00
Christoph Oelckers b178bb2612 - Fixed: The MinotaurFriend's MF4_NOTARGETSWITCH was put on AMinotaurFX1.
SVN r363 (trunk)
2006-10-27 08:20:54 +00:00
Randy Heit bcca366e8f - Removed A_JumpSet and merged its functionality with A_Jump by turning
A_Jump into a varargs function.
- Fixed: P_MorphPlayer() should check that the desired type is actually a
  PlayerPawn.
- Added an optional parameter to the morphme ccmd that specifies the player
  class to morph into.
- Changed the SetActorPitch, SetActorAngle, Thing_Spawn*, Thing_Projectile*,
  and Thing_Move functions so that TID 0 affects the activator.


SVN r362 (trunk)
2006-10-27 03:03:34 +00:00
Christoph Oelckers 753f280e04 - Moved the sector type translation for Doom format maps into a simple lump
in zdoom.pk3.
- Changed Line_SetIdentification so that the fifth arg is a high-byte for the line ID.


SVN r361 (trunk)
2006-10-25 16:21:08 +00:00
Randy Heit 2efba66558 - Added the A_JumpSet function for what seems to be a fairly common scenario.
It is like A_Jump, except it accepts up to 20 jump targets. The jump
  probability is still the first parameter and controls whether any jump is
  taken at all; use 256 if you always want to jump. If a jump is taken, then
  one of the jump targets will be chosen at random, with each target having
  an equal chance of being chosen.
- Fixed: The unfreeze ccmd was not multiplayer-safe. And I renamed it to thaw,
  since it has nothing to do with the freeze ccmd.


SVN r360 (trunk)
2006-10-24 02:32:12 +00:00
Christoph Oelckers 0d5e3cf97e - Added MF5_PIERCEARMOR flag that allows damaging objects that aren't
affected by armor.
- Added an unfreeze CCMD so that frozen players can be unfrozen for testing.
- Added special death states for projectiles hitting actors.
- Added ACS SetActorPitch/GetActorPitch functions.
- Added cameraheight property for actors.


SVN r359 (trunk)
2006-10-22 10:32:41 +00:00
Christoph Oelckers fb5f4a132b - Fixed: The yellow color range contained gaps in its definition which
resulted in incorrect colors.
- Fixed: FFont::BuildTranslations didn't clamp the RGB color values. This
  can happen if some font colors overflow or underflow due to incomplete
  range specifications.


SVN r358 (trunk)
2006-10-21 09:01:45 +00:00