Commit graph

516 commits

Author SHA1 Message Date
Christoph Oelckers
c9aaf8460b Forgot to save rh-log.txt before committing (again...)
SVN r564 (trunk)
2007-11-08 09:22:46 +00:00
Christoph Oelckers
621fe2ed98 - Changed PowerFlight so that Hexen's infiniteness is not controlled by being
in a hub but by a level flag instead.
- Fixed: Floor and ceiling huggers must set themselves to floor and ceiling each
  time they move.
- Added a LEVEL_NOMONSTERS flag so that G_ChangeLevel doesn't have to mess with
  the dmflags CVAR to start the level without monsters.


SVN r563 (trunk)
2007-11-08 09:22:06 +00:00
Christoph Oelckers
8f5dd5d028 - Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if
an ammo type's BackpackAmount was 0.
- Fixed some minor bugs in custom skill code.

SVN r562 (trunk)
2007-11-04 08:39:05 +00:00
Christoph Oelckers
659107cacf - Added text color options to menu code so that the skill definitions can set
the color of the menu's text.
- Externalized skill settings to ZDoom.pk3


SVN r559 (trunk)
2007-11-03 11:41:42 +00:00
Christoph Oelckers
52e5f8b8e1 - Added skill definitions to MAPINFO.
SVN r558 (trunk)
2007-11-02 22:03:03 +00:00
Christoph Oelckers
170b633e91 - added two new things which can set a sector's color without the need of tags
or scripts. ColorSetter (#9038) sets the sector's color and FadeSetter (#9039)
  sets the fog color.
- added new flags MF5_ALWAYSFAST and MF5_NEVERFAST. These flags unconditionally
  enable or disable fast movement logic, regardless of skill settings.
- added an abstraction layer for skill related settings. This is a preparation
  for implementing custom skill definitions but right now all it does is
  returning the original values but keeping the related information all in one
  place


SVN r557 (trunk)
2007-10-29 22:15:46 +00:00
Christoph Oelckers
ab9a6623fd Forgot to save rh-log.txt for 555.
SVN r556 (trunk)
2007-10-29 20:29:07 +00:00
Christoph Oelckers
b15767c26f - Fixed: The pointer cleanup code must also check a sector's sky box pointers.
- Fixed: Right after teleporting P_SlideMove could cause player movement.
  Added a check for reactiontime to prevent that.
- Fixed: PainChances and Damagefactors were never freed.
- Added option to A_Chase that prevents the monster from moving.
- Fixed: The stained glass shards were missing the HEXENBOUNCE flag.
- Added some NULL pointer checks to AActor::GiveAmmo.
- Fixed: The FSwordMissile was missing the special damage handling that
  reduces damage when hitting a player.

SVN r555 (trunk)
2007-10-29 20:27:40 +00:00
Christoph Oelckers
3b477d7022 - Fixed: POwered up weapons with a different ready state than their base
weapon didn't change back when the powerup expired.
- Fixed: The powered up version of Heretic's Gauntlets missed the proper
  state assignments for Ready, Lower and Raise.
- Fixed: The Strife player was missing its pain state.
- Fixed: Revenant missiles couldn't home in on targets with a height lower than
  40.
- Fixed: The code which checked for hitscan traces hitting actors from above
  and below must test whether the calculated hit position is actually inside 
  the actor being checked. If it crosses the top/bottom plane outside the
  bounding box there can't be a hit.
- Changed: State labels in code pointer calls must now be enclosed in quotation marks.
  This was done to ensure compatibility with parsers that will parse these as
  identifier-aware script code later.


SVN r554 (trunk)
2007-10-19 08:49:02 +00:00
Christoph Oelckers
c81fe8d061 - Fixed: The code that checked hitscans entering an actor from above and below
calculated the hit position wrong.


SVN r553 (trunk)
2007-10-08 09:54:00 +00:00
Christoph Oelckers
90db40c70f - Fixed: Tne Imp's raise state sequence was wrong due to a typo.
- Fixed: The shotgun had spawn ID 21 instead of 27.
- Fixed: All 3 states in the DoomUnusedStates actor need to end with a 'stop'.
- Fixed: The DECORATE TakeInventory functions didn't check the IF_KEEPDEPLETED
  flag.
- Fixed: ClearInventory should leave ammo in the inventory because it might be
  referenced by undroppable weapons.
- Fixed: Several functions in a_artifacts.cpp were missing a check for a valid
  owner.
- Fixed: sc_man counted lines wrong when ungetting strings but getting tokens
  next.



SVN r552 (trunk)
2007-10-05 08:04:38 +00:00
Christoph Oelckers
e016a66dc0 - Fixed: When I changed the scaling of textures to full fixed point precision
I forgot to change the call that draws the automap marker numbers.
- Fixed: The chaingun-flash-checking code always checked the first player,
  not the calling one.
- Fixed: Hitscan traces didn't hit actors when entering from above or below


SVN r551 (trunk)
2007-09-27 14:08:45 +00:00
Christoph Oelckers
333ef105f7 - Fixed: The DECORATE expression evaluator was reading the operator token
from the wrong variable in a few places resulting in incorrect calculations.
- Fixed: MP3/OGG music always looped because the looping flag was always
  set when FMOD was called to play it.
- Removed upper limit of 1 for an actor's gravity factor.
- Fixed: A_VileTarget spawned the fire at coordinate (target->x, target->x)
  instead of (target->x, target->y). (Old vanilla bug.)


SVN r550 (trunk)
2007-09-27 11:30:23 +00:00
Christoph Oelckers
f94d971c06 - Fixed: F_StartFinale shouldn't get the information if the game is about
to end from level.nextmap. For example, this check is wrong for a secret
  exit.

SVN r549 (trunk)
2007-09-26 21:50:05 +00:00
Christoph Oelckers
09f5bbc2d3 - Fixed: AActor::CopyFriendliness must not copy the target if it has the
MF3_NOTARGET flag set.
- Fixed: Picking up weapons in deathmatch gives 2.5 times as much ammo as
  in other modes.


SVN r547 (trunk)
2007-09-25 23:31:27 +00:00
Christoph Oelckers
f62032ac6a - fixed: The #include command in DECORATE always tried to look up the name
as a normal WAD lump name. It only should do that if the name is not longer
  than 8 characters and doesn't contain any '/'-characters.

SVN r546 (trunk)
2007-09-23 08:02:57 +00:00
Christoph Oelckers
e8875041ca - fixed: THe Timidity player didn't close its temporary files and left them
behind because it couldn't delete them.
- added a $MidiDevice option to SNDINFO which can either set the preferred
  MIDI device for a song to Timidity or Windows' standard MIDI device.
  The reason for this: About 80% of my MIDI music collection sounds better
  with Timidity and the other 20% with Windows' standard synth and I'd like
  to be able to use each with the one that sounds better. For MUS files you
  can also force the use of OPL playback.
- added telefrag option to A_SpawnItemEx.


SVN r545 (trunk)
2007-09-12 00:20:11 +00:00
Christoph Oelckers
d0c3ebb5c2 - Fixed: Several options while changing maps only worked for the regular exit
but caused problems when used with the secret exit. Rewrote the code to
  set the next map at the beginning and removed all subsequent parts that
  tried to resolve it from the original data again.

SVN r544 (trunk)
2007-09-06 09:54:57 +00:00
Christoph Oelckers
c06bd09ee7 - Fixed: dumpmap crashed when used outside a map.
- Exported A_DeQueueCorpse to DECORATE. It seems I forgot this when exporting
  A_QueueCorpse.



SVN r542 (trunk)
2007-09-02 09:57:08 +00:00
Christoph Oelckers
6a3a47d77a - Moved setting of gameskill from M_ChooseSkill to G_DoNewGame because it
doesn't work in M_ChooseSkill when the full console is open.


SVN r541 (trunk)
2007-08-09 08:42:15 +00:00
Christoph Oelckers
5e2e389bd1 - fixed: The BFGBall's explosion sequence was missing a state.
- fixed: The brown Chaos Serpent in Hexen had an incorrect sprite for its
  ice death sequence set.
- fixed: Ammo upon game start does not get multiplied when on easy skill.
  Implementing this as an inventory flag IF_IGNORESKILL also allows to create
  ammo/weapon/backpack types that don't multiply the ammo given when on this
  skill.
- moved Doom exit sounds into SNDINFO as $random definitions.
- Fixed: Dying Lost Souls could be reset to their see state if they slammed into
  something.

SVN r540 (trunk)
2007-07-28 12:38:10 +00:00
Christoph Oelckers
2829361c5c - Added DTA_TopOffset and DTA_LeftOffset values to the automap background drawer.
- Fixed: DECORATE color translations with explicit colors didn't work because the
  code treated byte values as fixed point.
- Fixed: LEVEL_NOALLIES must clear MF_FRIENDLY off any spawned actor except players.
  Otherwise it doesn't work properly.
- Fixed: Entering a backslash in the player's name box caused a crash because 
  the code analyzing the string was missing a NULL pointer check.
- Fixed: Thing_Hate and Teleport_ZombieChanger unconditionally made state jumps,
  even for dead monsters.
- Fixed: The palette flash for item pickup was not reset upon a player's death.
- Fixed: P_DamageMobj tried to get damage multiplier information from the
  damage inflictor, not the attacker.
- Fixed: PowerTimeFreezer::DoEffect did not call its superclass method.
- fixed: When morphed monsters died they tried to set MF3_STAYMORPHED for the
  attacker, not themselves. This caused a crash when they were killed by a crusher.


SVN r539 (trunk)
2007-07-12 15:15:57 +00:00
Christoph Oelckers
8f6fdc1d21 - Split thingdef.cpp into several files so that the state and property code
no longer gets in the way of the main parser.
- Changed A_MissileAttack, A_MeleeAttack and A_ComboAttack so that they use
  metadata. Now all the hack code associated with these functions can be removed.


SVN r538 (trunk)
2007-05-28 22:18:51 +00:00
Christoph Oelckers
50f75b6e8a - Fixed: deadthings.txt contained a superfluous ';' which created parsing errors
with my changed code.
- Cleaned up DECORATE parser a little - moved the old style parsing code into its 
  own file and rearranged a few things.
- Made ProcessStates non-static so that it doesn't need to be passed as an argument
  to all functions in the DECORATE parser.
- Moved DECORATE parser files into their own subdirectory.
- Optimization: SC_GetToken no longer sets sc_name for identifiers. In most cases
  this creates needless overhead by adding a potentially unneeded name to the name
  table and looking up the name. In almost all cases where a name is needed it's as
  easy to assign sc_String to the name variable.
- Added enum definitions to DECORATE.


SVN r537 (trunk)
2007-05-28 14:46:49 +00:00
Christoph Oelckers
91241eb96e - Fixed: Hirestex replacements for sprites didn't work properly due to some
incorrect calculations in R_ProjectSprite.


SVN r536 (trunk)
2007-05-27 15:33:05 +00:00
Christoph Oelckers
2345a1a5f0 - Fixed: The speed definition of PowerSpeed used PROP_SpeedFixed instead of
PROP_SpeedLong.
- Fixed: The Chainsaw's kickback was initialized to the default - not 0.


SVN r535 (trunk)
2007-05-27 12:16:43 +00:00
Christoph Oelckers
87383a32c6 - Fixed: Resurrecting a player must set mo->special1 to 0 because it is used
as a counter by the Hexen fighter's fist weapon.
- Fixed: The Wraithwerge's spirits shouldn't attack friends.
- Fixed: The Heresiarch's balls must not adjust their z-position after the
  Heresiarch dies.
- Added damage type specific pain chances and an MF5_NOPAIN flag that can be used
  to suppress entering the pain state altogether.
- Changed font initialization so that you can define replacements for the default
  fonts in FONTDEFS.
- Removed the 'add a bot' menu option since bots are beyond repair and therefore
  mostly useless.
- Fixed: Hitscan attacks must always spawn a puff so that it and its properties
  can be used as damage inflictor.


SVN r534 (trunk)
2007-05-26 10:50:32 +00:00
Christoph Oelckers
f4dcfad331 - Copied railgun sound fix from Skulltag.
- Made infighting a level flag. The old method still exists but the level flags
  will take precedence if set.



SVN r532 (trunk)
2007-05-20 11:08:36 +00:00
Christoph Oelckers
ea2ea7dbf0 - fixed: meleethreshold only has meaning when the attacking monster actually
has a melee attack.
- copied a colormap fix from Skulltag.


SVN r531 (trunk)
2007-05-13 20:21:26 +00:00
Christoph Oelckers
a6a5821f04 - Added a compatibility option to restore the original behavior of the Invisibility
powerup.
- Changed: Weapons are no longer checked for the EXTREMEDEATH and NOEXTREMEDEATH flags.
  For all damage related actions it will always be the projectile (or puff for hitscan
  attacks) that is treated as the damage inflictor.
- Fixed: Hexen's fourth weapons made extreme death depend on the weapon the player
  is holding, not the projectile that did the kill. The WIF_EXTREME_DEATH flag
  no longer exists as a result.
- Expanded PowerSpeed so that subclasses can be derived that alter the speed factor.
- Added an MF5_USESPECIAL flag that allows using things to execute their specials.
- added MF4_FORCERADIUSDMG flag so that exploding items can be created which
  are able to hurt boss monsters.
- moved ML_BLOCK_PLAYERS to the value 0x4000 to bring it in line with Skulltag's 
  implementation.


SVN r530 (trunk)
2007-05-12 11:14:09 +00:00
Christoph Oelckers
d60a5ee1b9 - added Skulltag's custom F1 help screen MAPINFO option.
- Fixed: Resurrecting a player must restore all flags words, not just the first one.
- Fixed: APowerWeaponLevel2::EndEffect must check PendingWeapon for WP_NOCHANGE.
- added Skulltag's high jump rune as a powerup
- Added Skulltag's Drain and Regeneration runes as powerups and used specific player
  sounds for their sound effects instead of using misc/i_pkup.
  (If I ever decide to implement runes it will be in a way that can use the regular
  powerups instead of having to define specific classes for them.)
- Added Skulltag's PowerQuadDamage and PowerQuarterDamage as more customizable
  PowerDamage and PowerProtection. These new powerups allow free customization of
  the damage modification per damage type by inheriting from these classes and
  setting specific values. Such derived damage/protection powerups will be considered
  as separate powers so that for example a QuadDamage and a DoubleDamage item can be
  stacked which would result in 8x damage.
- merged player_t::cheats and player_t::Powers into one variable.


SVN r529 (trunk)
2007-05-10 22:22:38 +00:00
Christoph Oelckers
12c122a7dd - Fixed: player_t::Powers was not saved in a savegame.
- Removed all unused PW_* player power flags.
- Added Skulltag's TimeFreezer powerup.


SVN r527 (trunk)
2007-05-01 15:09:44 +00:00
Christoph Oelckers
f11525f90f - Moved most of the menu strings (except options and player setup menu) into the
string table.


SVN r525 (trunk)
2007-05-01 07:57:08 +00:00
Christoph Oelckers
6fad457592 - Fixed: GetLumpOffset must call SetLumpAddress when being called for uncompressed
Zip entries.
- Fixed: Some of Doom's weapon obituaries didn't have the $-prefix that indicates a 
  reference to the string table.
- Fixed: The check for a valid weapon's spawn state for weapon dropping was incorrect.


SVN r523 (trunk)
2007-04-30 08:09:51 +00:00
Christoph Oelckers
e08da03a3d - Increased precision of texture scaling factors to full fixed point. In the process
I got rid of the old tx and ty CVARs because they made the texture scaling
  much more complicated than it was actually needed (and besides, they were completely
  useless except for testing purposes anyway.)


SVN r522 (trunk)
2007-04-29 12:07:27 +00:00
Christoph Oelckers
6e5b1f1182 - Added a simple check for abstract weapon classes so that I can properly define
the DoomWeapon base class.
- Fixed: When the Tome of Power runs out it must also set any pending weapon
  back to their regular state.


SVN r521 (trunk)
2007-04-29 08:44:32 +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
9deec29b34 - added a CANUSEWALLS flag which allows a monster to activate 'use' specials
like doors. This flag is on by default for any monster which was the
  previous behavior.
- Optimized the DECORATE flag parser so it can more efficiently handle
  the deprecated flags. As a side effect of this optimization the deprecated
  flags became usable in A_ChangeFlag again.
- Changed LONGMELEERANGE flag into a MeleeThreshold property.
- Changed SHORTMISSILERANGE flag into a MaxTargetRange property.
- Added Thing_Stop action special.


SVN r517 (trunk)
2007-04-22 21:01:35 +00:00
Christoph Oelckers
8c7d4fb393 - Changed ACS's SetActorState so that it isn't limited to only one sublabel.
This change also enables the implicit mapping of the old special death
  state names.


SVN r515 (trunk)
2007-04-22 09:06:29 +00:00
Christoph Oelckers
a370ea70c6 - Fixed: ShowErrorPane deleted the StartScreen instead of just calling
NetDone.
- moved the DIM_MAP define into v_palette.h so that it can be accessed
  from outside the status bar code.
- Fixed: The check for non-swimmable water in UpdateWaterLevel checked for
  SECF_UNDERWATER instead of SECF_UNDERWATERMASK.


SVN r514 (trunk)
2007-04-22 07:45:18 +00:00
Randy Heit
f48ad6c4c3 - Switched ACS world and global arrays to the TMap class instead of
TAutoGrowArray. A map can handle a wide range of key values better than
  an array.
- Added a templated associative array class, TMap, that uses Lua's "chained
  scatter table with Brent's variation" algorithm. I had considered using
  hash_map until I discovered that it's not standard STL, and there are two
  major but incompatible implementations of it. So I rolled my own, and Lua
  seemed like a good place to go to for an efficient algorithm, since it
  makes heavy use of tables.


SVN r513 (trunk)
2007-04-12 23:00:52 +00:00
Randy Heit
f6dd9be993 - Fixed some const char * -> char * conversions flagged by GCC 4.2.0 in the
Win32-specific code.


SVN r508 (trunk)
2007-03-29 01:03:50 +00:00
Randy Heit
97ad5a0d6b - Adding blinky text to the ENDOOM screen.
SVN r507 (trunk)
2007-03-29 00:35:34 +00:00
Randy Heit
1f242fa79e - Changed MakeKey's hash algorithm from a CRC32 to Paul Hsieh's SuperFastHash.
SVN r506 (trunk)
2007-03-24 14:59:28 +00:00
Randy Heit
490742cf46 - Moved the implementation for the Thing_Damage special into another function
so that I can create the ACS function Thing_Damage2. It's exactly the same as
  Thing_Damage, except the damage type is specified by name. When I did this,
  I noticed that it didn't do anything useful for a TID of 0, so I made it
  affect the activator in that case.
- Added a new SetActorState ACS function:
    int SetActorState (int tid, str statename, optional bool exact);
  If tid is 0, it affects the script activator, otherwise it affects all the
  matching actors. Statename is the name of the state you want to put the
  actor in. The final parameter, exact, specifies whether or not partial
  state name matches are accepted. If you don't specify it or set it to
  false, if you try to do something like:
    SetActorState (0, "Foo.Bar");
  And the actor has a Foo state but no Foo.Bar state, it will enter the Foo
  state. If you set exact to true:
    SetActorState (0, "Foo.Bar", true);
  Then the actor must have a Foo.Bar state, or it will not change state at
  all, even if it has a Foo state.
  The return value for this function is the number of actors that successfully
  changed state. Note that you should refrain from using this function to
  enter special states such as Death, or unpredictable results could occur.


SVN r505 (trunk)
2007-03-23 22:26:14 +00:00
Randy Heit
38c821a96e - Fixed: Morphed players did not regain their innate armor when unmorphing.
(Only Hexen has players with innate armor, under normal conditions.)


SVN r504 (trunk)
2007-03-14 01:48:19 +00:00
Randy Heit
b49d4333b0 - Changed the default player.startitem amount from 0 to 1.
SVN r503 (trunk)
2007-03-13 00:59:29 +00:00
Randy Heit
453a6250a5 - Converted the TTY startup screen to a class for Linux.
SVN r502 (trunk)
2007-03-10 01:53:52 +00:00
Randy Heit
802a6f3138 - Increased the limit for the SorcererBallPop to 3 to be inline with the
other Heresiarch ball sounds.


SVN r500 (trunk)
2007-03-08 23:38:45 +00:00
Randy Heit
1a72c5f7b9 - Fixed: In Strife, using the shadow armor a second time while it is still
active should make you completely invisible and your first-person weapon
  inverse grayscale.


SVN r499 (trunk)
2007-03-08 23:34:54 +00:00
Randy Heit
72643bece6 - Changed P_SpawnPlayerMissile() to use the same height calculation as
P_(Aim)LineAttack().
- Added an AttackZOffset to PlayerPawn. This is the offset from the
  center of the player at which their attacks are fired and scales
  according to their crouched height.
- Changed the version of P_SpawnPlayerMissile() that takes coordinates
  to use that location as an offset from the standard attack location
  rather than as an explicit attack location.


SVN r498 (trunk)
2007-03-07 17:31:40 +00:00
Randy Heit
e01ff5707c - Added an IF_KEEPDEPLETED flag for inventory items to keep them in the
player's inventory even when they have been used up. If the item also
  has an inventory bar icon, it will be drawn darkened when it is
  depleted.


SVN r497 (trunk)
2007-03-07 02:24:24 +00:00
Randy Heit
560d4f8140 - Fixed: Thing_ProjectileAimed did not set the missile's speed correctly.
- The net start pane is now given focus when it is created, so it can
  receive keyboard input.
- Added playback of the "WeaponPickup" sound when a Hexen net game starts.
- Separated the different startup screens into classes for better
  modularization (which I should have done in the first place). (Sorry,
  have not done it for Linux yet, so that won't compile as-is.)


SVN r496 (trunk)
2007-03-06 01:33:18 +00:00
Randy Heit
3f1a681451 - Changed the net start pane to open underneath the existing window instead
of scrunching the startup screen up to make room for it.
- Added the red net notches for Hexen's startup screen.
- Added hprintf and status simulation for Heretic's startup screen.


SVN r495 (trunk)
2007-02-28 19:08:02 +00:00
Randy Heit
eef025dd4e - Fixed: When I converted the P_Thing_Projectile() code for target leading
to use the new vector routines, I had made dist calculate the squared
  length of the aim vector instead of the correct length.


SVN r494 (trunk)
2007-02-28 17:38:56 +00:00
Randy Heit
1ca9b88b11 - Fixed: When starting a new game from the menu while the fullscreen console
was open, the game was frozen before its initial setup tick until the
  console was closed. The most obvious result of this is that your view was
  stuck on the floor until the console closed.
- Fixed: Pressing ESC while editing your player name completely cleared the
  menus instead of simply canceling the name change.
- Fixed: The status bar still showed the rampage face if you held the fire
  button down while frozen.


SVN r493 (trunk)
2007-02-28 16:49:19 +00:00
Randy Heit
94ffa6d5ae - Added << operators for FString that function exactly like +=, except they
are left-associative, so you can use them like you would with an ostream
  and append to a string in a single expression without any overhead from
  allocating temporary strings as would happen if you used the + operator.
  In other words, instead of this:
     string += "Some string " + "that is assembled" + " in parts";
  You can do this and be more efficient while still being just as readable:
     string << "Some string " << "that is assembled" << " in parts";
- Changed PCD_PRINTBIND to include the command in its output if it isn't
  bound.
- Fixed: ACS_ExecuteWithResultValue could not be used inside a script because
  DLevelScript::RunScript() was not reentrant, thanks to having a global stack.
  The stack should be local to each instance of RunScript.
- Fixed: rt_draw4cols() could get stuck in rare situations where it thinks it
  should be drawing something but doesn't. Since long-term I plan to just
  replace all the masked drawing the variants of maskwallscan, I'm not going
  to try and find the real cause and fix it there. Instead, it just detects
  the situation and bails out when it finds it.


SVN r492 (trunk)
2007-02-24 17:56:43 +00:00
Christoph Oelckers
d26824e5d1 - Fixed: In the Doom2 cast finale it was impossible to toggle the console.
- Added APROP_Friendly actor property for ACS.
- Added a new flag, MF2_DONTREFLECT that prevents missiles from being reflected.
- Fixed: ALoreShot::DoSpecialDamage must check whether the shooter is still
  present. If it had been removed before the projectile hits its target
  a crash could occur.
- Fixed: GetPlayerInfo was missing breaks and always returned 0 as a result.
- Added Grubber's submission for printing key bindings in ACS.


SVN r491 (trunk)
2007-02-24 12:09:36 +00:00
Randy Heit
8682f37b24 - Fixed: $Ambient SNDINFO commands zeroed the AmbientSound structure, which
is a no-no when using FString.


SVN r490 (trunk)
2007-02-20 00:25:26 +00:00
Randy Heit
4de9e98fd1 - Fixed: DEM_WIPEON/OFF commands should be ignored during demo playback and
not pause the game, or the whole thing will be out of sync.


SVN r489 (trunk)
2007-02-20 00:05:42 +00:00
Randy Heit
99df21c901 - Fixed: Playing a demo in windowed mode no longer grabs the mouse.
SVN r487 (trunk)
2007-02-19 23:48:52 +00:00
Randy Heit
ecc45d5d6e - Added two new net commands: DEM_WIPEON and DEM_WIPEOFF. They keep track of
when a player is going through a screen wipe and act like a pause, so the
  game doesn't run several tics afterward to catch up with it.


SVN r485 (trunk)
2007-02-15 00:01:21 +00:00
Randy Heit
01cd91fd9e - Fixed: EV_Teleport() did not set players to their idle state, so if they
were running when the teleported, they would still be running afterward
  even though they weren't moving anywhere. Normally, P_XYMovement() does
  this when they stop due to friction.
- Fixed: AActor::TakeSpecialDamage() completely bypassed the standard rules
  for target switching on actors with MF5_NODAMAGE set.
- Changed the return values of the ACS spawn, spawnspot, and spawnspotfacing
  commands to be the total count of things spawned, rather than a pretty
  much useless reference to the actor spawned at the last map spot.
- Fixed: DLevelScript::DoSpawn() takes a byte angle, but DoSpawnSpotFacing()
  passed it a full-length angle.
- Fixed: When MF_SKULLFLY is removed because an actor slams into something,
  it was set to a see or spawn state, resetting its tic count and bypassing
  the effectiveness of the MF2_DORMANT flag. While I was at it, I decided
  dormant skulls shouldn't do slamming damage, either.
- Fixed: P_Thing_Spawn() returned success only if all thing instances were
  successfully spawned. As long as at least one thing was spawned, it should
  be considered a success.
- Fixed: Flipped single rotation sprites were only flipped every other 22.5
  degree interval.


SVN r484 (trunk)
2007-02-14 22:47:01 +00:00
Randy Heit
58d4c4f9ae - Fixed: S_ClearSoundData() did not stop any channels before freeing the
samples, a problem for the alternate sound renderer if it happened to be
  playing any sounds at the time, since it would try to keep on playing them.

SVN r483 (trunk)
2007-02-14 20:18:22 +00:00
Randy Heit
dea5cf9ba4 - Added two new cvars (win_x and win_y) that keep track of the window
position when not playing in fullscreen mode.
- Changed the upper-left window positioning that was always used in debug
  builds into a command line option (-0), so debug and release builds behave
  the same.


SVN r482 (trunk)
2007-02-13 00:10:16 +00:00
Christoph Oelckers
8ca5f3821d - Changed earthquake code to not add all the intensities but use the maximum
in DEarthQuake::StaticGetQuakeIntensity. The reason for this: Quakes were
  never supposed to be additive. Many maps, including Hexen's own have placed
  quake spots so that they cover a larger area but the areas covered by the
  single spots overlap. On such maps the view will shake like crazy and
  render the map nearly unplayable.


SVN r480 (trunk)
2007-02-10 21:22:31 +00:00
Christoph Oelckers
0320057260 - Fixed: The powered up Mace was missing its HoldAtkState.
- Added: Using "*" with ACS's music commands will play the level's default music set in MAPINFO.


SVN r478 (trunk)
2007-02-04 10:20:25 +00:00
Randy Heit
7c2fc08f35 - Added two new MAPINFO flags to control what actor activates impact lines:
* MissileShootersActivateImpactLines - the current behavior.
    * MissilesActivateImpactLines - the original Hexen behavior.


SVN r477 (trunk)
2007-02-04 02:12:54 +00:00
Randy Heit
26b886b960 - Fixed: The changecamera special should remove "past viewer" information
from the renderer in case the camera changed position or direction since
  the last time it was looked through. Otherwise, the renderer will
  interpolate from its previous view for one frame when it is switched to.
- Fixed non-POD parameter passing for GCC introduced in the previous commit.

SVN r476 (trunk)
2007-02-04 01:12:50 +00:00
Randy Heit
4a6fa7f2a3 - Removed the 63-character limit on sound names.
SVN r475 (trunk)
2007-02-04 00:33:17 +00:00
Randy Heit
b361ba05d8 - Reduced the rate at which drowning damage increases.
- Added more player water sounds:
    *dive - Played when your head goes below water.
    *surface - Played when your head goes back above water.
    *gasp - Played when you were drowning and get your air back.
  If your head surfaces and you were drowning, only *gasp plays, not both.
- Added damage-specific player death sounds, in the same fashion as the
  damage-specific player pain sounds. It looks for a sound with a name like
  "*death-damagetype" first and then "*death" if the first sound didn't exist.
- Removed the constraint that player sounds must be reserved before they can
  be assigned. Hence, the $playerreserve command has been eliminated, because
  it is no longer needed and it was never accessible from user wads, so I
  don't need to worry about breaking anything by removing it.


SVN r474 (trunk)
2007-02-04 00:22:56 +00:00
Randy Heit
ea0c7395de - Added a new fixrtext tool that sets the IMAGE_SCN_MEM_WRITE flag for
.rtext files in the assembly object files. Now I can avoid doing this at
  runtime, which means that ZDoom is now UPX-compatible if anyone wants to
  pack it.
  
  You will need to do a rebuild or manually delete the old assembly .obj files
  for the first build from this revision to succeed, since there are no
  changes to the assembly files themselves, and the build process will not be
  able to automatically detect that they need to be rebuilt.


SVN r473 (trunk)
2007-02-03 02:51:13 +00:00
Randy Heit
bac407c543 - Fixed: The SafeDivScales used a signed shift for their if test. This fails
when a == 0x80000000, because the result of abs will still be negative as
  long as we use signed math.
- Fixed: SafeDivScale31 performed DivScale32 instead.
- Fixed: R_DrawSpanP_ASM had a short jump into a different section.


SVN r472 (trunk)
2007-02-02 23:41:51 +00:00
Randy Heit
0b7b527ac2 - Fixed: When quiting from fullscreen mode, RestoreConView() did not ungrab
the mouse.
- Fixed an old Doom bug: Firing the chaingun with only one bullet still made
  it play its sound twice.


SVN r471 (trunk)
2007-01-31 00:52:33 +00:00
Randy Heit
095b11bc36 - Added an operator += for FString that takes an FName as input, since GCC
is unable to synthesize one.
- Converted xlatcc to use lemon during its build process. Now you don't need
  bison to rebuild everything anymore.


SVN r470 (trunk)
2007-01-31 00:30:42 +00:00
Randy Heit
72c93b479e - Added support for damage-specific player pain sounds.
- Removed the constraint that all $playerreserve SNDINFO commands must come
  before the other $player commands.
- Fixed: TArray::Reserve did not construct its newly allocated entries.
- Changed the damage type for drowning from 'Water' to 'Drowning'.


SVN r466 (trunk)
2007-01-28 04:59:04 +00:00
Randy Heit
ba5e77e021 - Fixed: Since FMemLump is now implemented on top of FString, it never
contains a NULL point, so the GetMem() method should fake it by
  returning NULL when the string is empty. Reverted p_xlat.cpp to its
  old revision.


SVN r465 (trunk)
2007-01-28 03:17:02 +00:00
Christoph Oelckers
37f701a462 - Fixed: The rewrite of FMemLump broke the non-standard use of it in
P_TranslateLinedefs.
- Fixed: ShowErrorPane can be called before ST_NetDone is valid so it has to
  check whether it is NULL.
- Fixed: The Megasphere had an incorrect pickup sound.
- Fixed: The new video initialization code could set the screen's Font pointer
  to NULL, causing a crash with levels that start in a secret sector.


SVN r464 (trunk)
2007-01-26 21:46:47 +00:00
Randy Heit
af13d6d686 - Fixed: If you called the FString assignment operator that accepts a
const char * with a string inside its buffer, it released the buffer
  before copying the string.
- Added a new FString constructor that creates the string from a lump.
- Fixed: G_DoReborn() calls G_InitNew() with mapname set to level.mapname.
  G_InitNew() then copies it onto level.mapname, which is undefined
  behavior (although it does work as we want it to).
- Modified FMemLump to store its data using FString. That class provides
  a convenient method of storing reference counted data, so now FMemLump
  doesn't need to muck about sneakily using const_casts and possibly
  tricking its users into thinking that an old one is still valid after
  being assigned to a new one.
- Fixed: The IMGZ, PNG, PCX, and JPEG loaders assumed the files were
  large enough for their headers without actually checking.



SVN r463 (trunk)
2007-01-25 04:02:06 +00:00
Randy Heit
36839136fb - Fixed: The simulated palette blends when the menu or console are open
were applied even when the status bar wasn't drawn. (In other words, even
  in situations where a real palette blend wouldn't have happened.)


SVN r462 (trunk)
2007-01-23 01:43:47 +00:00
Randy Heit
9b72e34223 - Added a range check for the PNG grAb chunks.
- Fixed: AddLine() could corrupt memory if the length of the text being
  added was longer than the console buffer.
- Fixed: FTexture::GetScaled(Left|Top)Offset returned the Width and Height
  instead when the scale values were 0.
- Removed the unnecessary "mov ecx,c" from mscinlines.h:Scale().


SVN r461 (trunk)
2007-01-23 01:13:17 +00:00
Randy Heit
64ad1d14af - Fixed: The simulated palette blend used when the console is down needs to
force a full screen update the next frame.


SVN r460 (trunk)
2007-01-22 23:55:46 +00:00
Randy Heit
f1c41539de - Fixed: LocalViewPitch could overflow and wrap around when a netgame stalls.
SVN r459 (trunk)
2007-01-22 23:50:09 +00:00
Randy Heit
0b5e4b1f1f - Changed the vertheight and rounding-error-checking code in
DCanvas::DrawTexture() to calculate off the actual bottom of the image
  instead of the height, improving precision. Now the scaled status bar is
  flush with the bottom of the screen at 1280x1024, for instance.


SVN r458 (trunk)
2007-01-22 23:14:00 +00:00
Randy Heit
b4390308df - Added a new WIF_NO_AUTO_SWITCH flag for weapons that should never be
switched to automatically when the player picks them up.


SVN r457 (trunk)
2007-01-22 22:15:50 +00:00
Christoph Oelckers
d0c910fca6 - added Grubber's submission for customizable gravity per actor.
- Fixed: A_Jump didn't work for weapons or CustomInventory items.



SVN r456 (trunk)
2007-01-20 14:27:44 +00:00
Randy Heit
4f845508cc - Added D3DCREATE_FPU_PRESERVE to the IDirect3D9::CreateDevice() call.
Normally Direct3D sets the FPU to single precision. We don't want that,
  since it can mean going out of sync with machines that are using the
  standard precision. Additionally, the nodebuilder requires the extra
  precision that single precision lacks.


SVN r455 (trunk)
2007-01-19 02:45:26 +00:00
Randy Heit
47c401f4ec - Replaced the vector math routines with the ones I developed for the FP code.
SVN r454 (trunk)
2007-01-19 02:00:39 +00:00
Randy Heit
f0f976c4f5 - Added a summonfoe CCMD, which is analagous to summonfriend but forces the
summoned creature to be hostile instead.


SVN r453 (trunk)
2007-01-16 03:04:00 +00:00
Randy Heit
de18276b24 - Changed the default snd_output under Linux to OSS.
- Fixed the behavior of the "Don't ask" checkbox for the GTK+ version of
  the IWAD dialog.



SVN r452 (trunk)
2007-01-16 02:19:25 +00:00
Randy Heit
c196880ee5 - Added a GTK+ version of the IWAD selection dialog box. That brings the
Linux port one step closer to feature parity with the Windows version.



SVN r451 (trunk)
2007-01-16 01:53:43 +00:00
Christoph Oelckers
554573bcb3 - Adjusted AlterWeaponSprite so that it properly handles multiple
invisibility powerups at the same time.


SVN r450 (trunk)
2007-01-14 08:58:07 +00:00
Randy Heit
14ecb21dee - Integrated the fatal error display into the text logger.
SVN r449 (trunk)
2007-01-14 02:25:19 +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
1cd8370327 - Added Skulltag's REDMAP and GREENMAP.
- Fixed: The PlayerSpeedTrail must copy the player's scaling information
  (from Skulltag)
- Added r_maxparticles CVAR from Skulltag.
- Changed PCX loader so that it always loads the last 768 bytes of 8 bit graphics as a palette

SVN r447 (trunk)
2007-01-09 16:32:44 +00:00
Randy Heit
82ba0fb189 SVN r446 (trunk) 2007-01-09 04:40:58 +00:00
Christoph Oelckers
dbb9baf909 - Fixed: Sorting of files in Zips was broken.
SVN r445 (trunk)
2007-01-07 10:18:35 +00:00
Christoph Oelckers
4510ccf849 - Ported GZDoom's deep water splash code so that splashes are handled properly
in Boom maps with non-swimmable water.
- Changed ENDOOM CVAR so that there is an option to show only modified versions.


SVN r444 (trunk)
2007-01-07 09:43:58 +00:00
Randy Heit
6b1bf235fd - Added simulation of Strife's startup screen.
- Switched from a 14-pixel tall VGA font to a 16-pixel tall one for the
  Heretic loading screen (and ENDOOM).


SVN r443 (trunk)
2007-01-07 05:00:07 +00:00
Christoph Oelckers
34c6f64d82 - Added ENDOOM screen. It will only be shown when the game is exited via the
main menu and there is an option to switch it off for those who don't want
  to wait.


SVN r441 (trunk)
2007-01-06 12:30:34 +00:00
Randy Heit
dbe2593500 - Added simulation of Heretic's startup screen.
SVN r438 (trunk)
2007-01-06 04:08:24 +00:00
Christoph Oelckers
ec2e63c6d3 - Added customizable border textures. They will be defined with the
MAPINFO keyword 'bordertexture' and are settable per map.
- Fixed: When used in DECORATE A_Explode must use A_ExplodeParms.
- Added custom label support to A_Chase. To enable resurrection from the
  customizable version I also moved all A_VileChase stuff into p_enemy.cpp.


SVN r437 (trunk)
2007-01-05 22:08:57 +00:00
Randy Heit
34719e8d58 - Added simulation of Hexen's startup screen (currently minus net notches).
SVN r436 (trunk)
2007-01-05 04:21:14 +00:00
Christoph Oelckers
6a89d3594a - Fixed: The ANIMATED parser must read the bytes for the speed as unsigned bytes.
- Fixed: The screen wipe must be disabled for Heretic's underwater ending. If
  not, the wipe will try to mix pictures with different palettes.


SVN r435 (trunk)
2007-01-02 09:51:04 +00:00
Christoph Oelckers
e15988505a - Fixed: Several actors for Doom were missing their spawn ID.
SVN r434 (trunk)
2006-12-31 11:27:39 +00:00
Randy Heit
82cf5d703f - Fixed: APlayerPawn::GiveDefaultInventory() used two different variables
both named item.
- Switched ddraw.dll to be delay loaded. With D3D9 now being the default
  display code, this avoids wasting time loading DDraw if it isn't needed.
- Fixed: The Win32 I_FatalError() did not set alreadyThrown, so it could get
  stuck in an endless fatal error loop.

SVN r433 (trunk)
2006-12-29 20:28:23 +00:00
Randy Heit
b2b28fa2f5 - Fixed: The SDL input code must convert the event.data1 to uppercase.
- Added more resolution options when playing windowed under SDL.
- Changed SDL mouse handling to be basically identical to the (non-DirectInput)
  Win32 code. The mouse is polled periodically and constantly warped to the
  center of the window. Despite what the SDL docs specify, SDL_WM_GrabInput()
  is apparently no longer a reliable means of obtaining continuous relative
  mouse motion events.
- Fixed: The non-Windows implementation of I_FindClose() did not check for -1
  handles.



SVN r432 (trunk)
2006-12-29 05:14:19 +00:00
Randy Heit
851bf89442 - Fixed all the warnings from GCC 4.2, including a handful that were
present in
  older GCCs.



SVN r430 (trunk)
2006-12-29 03:38:37 +00:00
Randy Heit
ff65f75a8c - Fixed: The VC++ project was not set up to redefine RM using del in
wadsrc/Makefile, nor did it use the makefile for cleaning.
- Added ST_NetMessage() for mixing miscellaneous messages with the network
  startup meter, since they get mixed in the same space on the Linux terminal
  and must be handled properly to avoid looking bad.


SVN r429 (trunk)
2006-12-29 02:21:47 +00:00
Randy Heit
4899fa91f1 - Fixed the new network status display for the Linux terminal.
SVN r428 (trunk)
2006-12-29 01:48:47 +00:00
Christoph Oelckers
3eeef7af77 - Converted the Communicator to DECORATE.
- Renamed the new armor properties to use the same names as Skulltag to avoid
  confusion. They still don't need a separate base class as in Skulltag though.
- Added Skulltag-type armor bonus that increases the max amount that can be given
  by other armor items.
- Separated all armor related code from a_pickups.cpp into a_armor.cpp.



SVN r427 (trunk)
2006-12-25 13:43:11 +00:00
Christoph Oelckers
2b6203f950 - Replaced several calls to S_GetSoundPlayingInfo with S_IsActorPlayingSomething
because S_GetSoundPlayingInfo cannot properly resolve player and random sounds.
- Fixed: S_IsActorPlayingSomething has to resolve aliases and player sounds.
- Took S_ParseSndSeq call out of S_Init. This doesn't work when parsing SNDINFO
  in D_DoomMain.
- Moved SNDINFO reading back to its old place after MAPINFO. This is necessary
  for Hexen's music definitions.


SVN r425 (trunk)
2006-12-24 23:08:49 +00:00
Christoph Oelckers
558a18cf5c - Added new flag MF5_NOBLOODDECALS that prevents bleeding actors from spawning
blood decals.


SVN r424 (trunk)
2006-12-24 12:51:24 +00:00
Christoph Oelckers
d718827ec1 - Fixed: The Cacodemon doesn't have a melee attack defined as I mistakenly
assumed when writing its DECORATE code.


SVN r423 (trunk)
2006-12-23 23:09:23 +00:00
Christoph Oelckers
9b0b199bb5 - Fixed: Commander Keen's death sequence had one state duplicated.
- Fixed: Due to the changes for custom states the internal weapons shouldn't
  define a holdatk state unless it differs from the attack state.
- Fixed: The bot code tried to spawn ACajunBodyNode instead of CajunBodyNode.
- Changed: MF2_BLASTED doesn't work well for players so I had to take it out
  of A_BlastRadius.
- Fixed: When MF2_BLASTED was cleared MF2_SLIDE got cleared as well, no matter
  whether it was set by default or not. Now the MF2_SLIDE check checks both
  flags and the BlastRadius code doesn't set MF2_SLIDE anymore.


SVN r422 (trunk)
2006-12-23 12:12:06 +00:00
Randy Heit
1360a1d89e - Guests can now watch as other guests connect during i_net handshaking.
- Fixed: The host would let more than the desired number of players connect.
- Decreased the frequency of packets in ST_NetLoop() to two per second.
- Fixed: During the i_net handshaking, guests never verified that the messages
  they received were from the host.
- Removed the -net command line option. I'm not sure it even worked anymore.


SVN r421 (trunk)
2006-12-23 03:40:12 +00:00
Randy Heit
e1bd63e876 - Turned on warning level 4 just to see what it would produce: a lot of
warnings. At first, I was going to try and clean them all up. Then I decided
  that was a worthless cause and went about just acting on the ones that
  might actually be helpful:
   C4189 (local variable is initialized but not referenced)
   C4702 (unreachable code)
   C4512 (assignment operator could not be generated)


SVN r420 (trunk)
2006-12-21 04:34:43 +00:00
Randy Heit
c8d07f3883 - Fixed: D3DFB::Reset() also needs to restore the texture border color,
otherwise it gets reset to black and unused. 
- Fixed: I_SetWndProc() needs to be called before any of the DirectX
  interfaces are initialized, because DirectX subclasses the window itself,
  and I_SetWndProc() undoes that subclassing.


SVN r419 (trunk)
2006-12-20 02:20:59 +00:00
Christoph Oelckers
43ddce519c - Fixed: Inventory.Icon printed error message for all the missing icons in
Strife's teaser.
- Fixed: st_start.cpp needed a 
  #define _WIN32_WINNT 0x0501.
- Fixed a few uninitialized variables warnings for GCC.


SVN r418 (trunk)
2006-12-19 16:08:48 +00:00
Randy Heit
83373fba88 Note: I have not tried compiling these recent changes under Linux. I wouldn't
be surprised if it doesn't work.

- Reorganized the network startup loops so now they are event driven. There is
  a single function that gets called to drive it, and it uses callbacks to
  perform the different stages of the synchronization. This lets me have a nice,
  responsive abort button instead of the previous unannounced hit-escape-to-
  abort behavior, and I think the rearranged code is slightly easier to
  understand too.
- Increased the number of bytes for version info during D_ArbitrateNetStart(),
  in preparation for the day when NETGAMEVERSION requires more than one byte.
- I noticed an issue with Vista RC1 and the new fatal error setup. Even after
  releasing a DirectDraw or Direct3D interface, the DWM can still use the
  last image drawn using them when it composites the window. It doesn't always
  do it but it does often enough that it is a real problem. At this point, I
  don't know if it's a problem with the release version of Vista or not.
  After messing around, I discovered the problem was caused by ~Win32Video()
  hiding the window and then having it immediately shown soon after. The DWM
  kept an image of the window to do the transition effect with, and then when
  it didn't get a chance to do the transition, it didn't properly forget about
  its saved image and kept plastering it on top of everything else
  underneath.
- Added a network synchronization panel to the window during netgame startup.
- Fixed: PClass::CreateDerivedClass() must initialize StateList to NULL.
  Otherwise, classic DECORATE definitions generate a big, fat crash.
- Resurrected the R_Init progress bar, now as a standard Windows control.
- Removed the sound failure dialog. The FMOD setup already defaulted to no
  sound if initialization failed, so this only applies when snd_output is set
  to "alternate" which now also falls back to no sound. In addition, it wasn't
  working right, and I didn't feel like fixing it for the probably 0% of users
  it affected.
- Fixed: The edit control used for logging output added text in reverse order
  on Win9x.
- Went back to the roots and made graphics initialization one of the last
  things to happen during setup. Now the startup text is visible again. More
  importantly, the main window is no longer created invisible, which seems
  to cause trouble with it not always appearing in the taskbar. The fatal
  error dialog is now also embedded in the main window instead of being a
  separate modal dialog, so you can play with the log window to see any
  problems that might be reported there.
  
  Rather than completely restoring the original startup order, I tried to
  keep things as close to the way they were with early graphics startup. In
  particular, V_Init() now creates a dummy screen so that things that need
  screen dimensions can get them. It gets replaced by the real screen later
  in I_InitGraphics(). Will need to check this under Linux to make sure it
  didn't cause any problems there.
- Removed the following stubs that just called functions in Video:
    - I_StartModeIterator()
    - I_NextMode()
    - I_DisplayType()
  I_FullscreenChanged() was also removed, and a new fullscreen parameter
  was added to IVideo::StartModeIterator(), since that's all it controlled.
- Renamed I_InitHardware() back to I_InitGraphics(), since that's all it's
  initialized post-1.22.


SVN r416 (trunk)
2006-12-19 04:09:10 +00:00
Christoph Oelckers
e9c68df94e - Fixed: The smartaim logic was incorrect. Also added another mode: Autoaim only
at monsters.


SVN r415 (trunk)
2006-12-16 16:34:39 +00:00
Christoph Oelckers
693bf96cb3 - Merged FActorInfo::FindStateExact and FActorInfo::FindState into one function
because the differences are only minimal.
- Removed all the varargs FindState functions because they aren't really needed.
  The engine itself never explicitly checks for more than 2 labels and for the 
  rest a function that gets passed a FName array is more suitable anyway.


SVN r414 (trunk)
2006-12-16 14:06:21 +00:00
Christoph Oelckers
979dfdf4cf - Changed state label storage so that each actor owns all the state labels itself
and doesn't have to traverse parent lists to find them. This is required for
  Dehacked actors that inherit states (e.g. NonsolidMeat and Spectre) but it also
  makes the data much easier to handle.


SVN r413 (trunk)
2006-12-16 12:50:36 +00:00
Christoph Oelckers
638526946b - Merged the fallingdamage setting into one menu item and added Strife damage to it.
- Moved deathmatch options into their own category in the gameplay options menu.
- Added the sv_smartaim code from GZDoom which tries to avoid autoaiming
  at friendlies or shootable decorations if there are monsters that can be shot.
- Added: SetThingSpecial treats a tid of 0 as the activator.


SVN r412 (trunk)
2006-12-16 11:49:48 +00:00
Christoph Oelckers
08a1ffce23 - Fixed: The particle fountains' names were different than before
- Fixed: FTexture::CheckForTexture should return NULL if the texture it
  finds is of type FTexture::TEX_Null. If this isn't done not all occurences
  of AASHITTY being used to silence an editor's error checker will be handled
  correctly. In particular the transparent door trick will break.


SVN r411 (trunk)
2006-12-14 11:44:49 +00:00
Christoph Oelckers
e55e4f0932 - Fixed: When a DehackedPickup replacement object is created it must copy
the state labels of the parent object.


SVN r410 (trunk)
2006-12-11 11:18:04 +00:00
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
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
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