Commit Graph

1485 Commits

Author SHA1 Message Date
Christoph Oelckers 63c170150d - Fixed: AWeapon::PickupForAmmo accessed ammo type 1 when checking ammo type2.
SVN r1481 (trunk)
2009-03-15 08:08:29 +00:00
Randy Heit 8724b45e15 - Changed Linux default for fullscreen to false.
- Removed CVAR_SERVERINFO flag from compatmode. Since it writes to
  compatflags, that should be enough. Having that flag set for both of
  them leads to problems with e.g. loading a savegame, where compatflags is
  restored, then compatmode is restored and it completely undoes whatever
  compatflags was restored to.
- Fixed: Trying to start a map for some single file that isn't really a map
  caused a crash.


SVN r1478 (trunk)
2009-03-15 01:41:53 +00:00
Randy Heit 7dd75670f4 - Fixed: After loading a savegame or unmorphing, a player's weapon slots
were empty.


SVN r1477 (trunk)
2009-03-13 03:18:06 +00:00
Randy Heit 69c2c4de64 - Moved weapon slot initialization into APlayerPawn::PostBeginPlay() so that
they can be initialized when players respawn in multiplayer.


SVN r1476 (trunk)
2009-03-12 03:54:23 +00:00
Christoph Oelckers c65dc5bad4 - Added a Check for the Vavoom namespace to the UDMF parser. Functionally
it's 100% identical with ZDoom's own but needs to be checked for in
  case Vavoom compatible UDMF maps are released.


SVN r1475 (trunk)
2009-03-11 19:28:10 +00:00
Randy Heit aee99c2bd0 - Added an SDL output plugin, so FMOD can produce sound using SDL's audio
support instead of its own OSS/ALSA/ESD support. This is selectable by
  setting snd_output to "sdl".



SVN r1473 (trunk)
2009-03-11 04:56:43 +00:00
Randy Heit fcdab6a777 - Added sdl_nokeyrepeat to disable key repeating in the menus and console
on Linux.



SVN r1470 (trunk)
2009-03-11 00:17:31 +00:00
Randy Heit 75b7db858f - Added support for zip/pk3 files with LZMA and bzip2 compression to ZDoom.
- Added more output to zipdir and a -q option to turn it off.
- Added -u option to zipdir to only recompress those files in a zip that have
  changed. 
- Added -d and -f options to zipdir. -d forces deflate compression, and -f
  forces a write of the zip, even if it's newer than all the files it contains.
- Added support for bzip2 and LZMA compression to zipdir.


SVN r1468 (trunk)
2009-03-10 23:07:37 +00:00
Christoph Oelckers b072431d3b - Adjusted some gravity related thresholds for the fix from Feb 28. Also removed
some unnecessary floating point math from this code.


SVN r1465 (trunk)
2009-03-07 09:16:32 +00:00
Christoph Oelckers e57ff454f2 - Added Hirogen2's patch for unlimited ammo CVAR.
SVN r1464 (trunk)
2009-03-06 22:58:34 +00:00
Randy Heit ee1806e9b2 - Fixed: You couldn't easily play with the compatibility options menu during
the title screen, because the demo loop reset the server cvars after each
  attempt to play a demo, even though the demos never actually played. The
  proper long-term solution would be to make shadow copies of all cvars
  touched by demos and use those for the demo and the real things for
  everything else, but this should do for now and is a lot easier.


SVN r1463 (trunk)
2009-03-04 23:19:46 +00:00
Randy Heit e9121b607d - Fixed: When using BOOM-style sector flags and specials together, the
special was ignored unless it was "secret".


SVN r1462 (trunk)
2009-03-04 23:07:18 +00:00
Randy Heit 88e32146b9 - Fixed: One byte is too short for DUMB_IT_SIGRENDERER to store song tempo.
Changed it to a word.


SVN r1461 (trunk)
2009-03-04 22:18:46 +00:00
Randy Heit 5eeaa130fd - Went back to using RDTSC for timing on Win32. Ironically,
QueryPerformanceCounter() is obviously using the TSC for its timing on my
  machine, yet the overhead it has to do to keep the timer sane is apparently
  noticeable on a few maps. I suppose I should at some time check
  clock_gettime() and see if it has similar issues on Linux.


SVN r1460 (trunk)
2009-03-04 06:06:31 +00:00
Christoph Oelckers 3b36334704 - changed: If a monster with the BOSSDEATH flag is crushed A_BossDeath will
be called now.
- fixed: D'Sparil's second form was missing the BOSSDEATH flag.
- fixed: D'Sparil's first form requires the DONTGIB flag.
- fixed: Heretic doesn't crush monsters. To handle this in a more generic
  fashion this depends on the presence of a gib sprite now.


SVN r1459 (trunk)
2009-03-03 21:17:00 +00:00
Christoph Oelckers d73d5dcaac - Changed burn and Acolyte death sequences so that they leave corpses that
don't vanish.


SVN r1458 (trunk)
2009-03-01 21:12:05 +00:00
Christoph Oelckers 74642ca626 - Fixed: AActor::SetOrigin must call P_FindFloorCeiling to get the true
floor and ceiling heights. Otherwise the actor will fall right through
  3DMidtex textures (and 3D-floors.)


SVN r1456 (trunk)
2009-03-01 10:12:12 +00:00
Randy Heit d0763f4820 - Fixed: The TeleporterBeacon tried to enter its See state rather than its
Drop state. Also changed it to fade out when it's done rather than
  disappearing abruptly.


SVN r1453 (trunk)
2009-03-01 02:19:46 +00:00
Christoph Oelckers 42ac64d964 - Fixed: Strife's quest based line actions also work in Deathmatch.
- Fixed: Gravity application was not correct. For actors with no vertical 
  momentum the initial pull is supposed to be twice as strong as when 
  vertical movement already takes place.
- added invquery CCMD like in Strife. Also removed all underscores from the
  tag strings so that they can be printed properly.
- Fixed: Skill baby was missing 'autousehealth' for all games.
- Added a new CVAR: sv_disableautohealth
- Autouse of health items is no longer hardwired to the default item classes. 
  There's a new property HealthPickup.Autouse. 0 means no autouse, 1 a small 
  Raven health item, 2 a large Raven health item and 3 a Strife item.



SVN r1452 (trunk)
2009-02-28 21:38:20 +00:00
Randy Heit 37aa4c2c28 - Removed an early-out in wallscan_striped() that is invalid when drawing a
skybox.


SVN r1451 (trunk)
2009-02-27 03:45:14 +00:00
Randy Heit 4535382031 - The SFX Reverb unit is now moved so that it serves as an input to the water
effect rather than as an input to the ChannelGroup Target Unit. This means
  the water effect is now applied after any room reverb, rather than in
  parallel with it.
- Fixed: UI sounds should not have reverb applied to them.


SVN r1450 (trunk)
2009-02-26 06:23:05 +00:00
Christoph Oelckers 1f5cf23418 - fixed: nextmap and nextsecret CCMDs set skill to 0.
SVN r1449 (trunk)
2009-02-25 23:25:47 +00:00
Christoph Oelckers 2c65d5b8f5 - fixed: level.flags2 was not stored in savegames. Also bumped min. savegame
version and removed old compatibility handlings.

SVN r1448 (trunk)
2009-02-25 22:10:06 +00:00
Randy Heit a18018f607 - Removed the delay for starting all sounds from one tic at exactly the same
DSP position. Without also synchronizing the stopping of sounds, it can
  cause problems with things like the chainsaw where the sound is stopped and
  immediately restarted, causing occasional gaps between the stopping of the
  sound and the starting of the new one. (I added the start synchronization to
  combat flanging of paired moving polyobjects when moving around, but I think
  just removing velocity from the player for sound calculations takes care of
  that well enough.)


SVN r1447 (trunk)
2009-02-25 21:31:14 +00:00
Christoph Oelckers d91f0c4090 - Added GCC headers for intptr_t to tarray.h.
- Added MF5_PAINLESS flag for projectiles that don't make the target go into
  the pain state.


SVN r1446 (trunk)
2009-02-24 21:19:10 +00:00
Randy Heit c2b4522b8f - Changed DEM_ADDSLOTDEFAULT, DEM_ADDSLOT, and DEM_SETSLOT to be more space-
efficient.


SVN r1445 (trunk)
2009-02-24 05:58:59 +00:00
Randy Heit a71e87b9df - Fixed: player->oldbuttons was copied from the current button set at the end
of P_PlayerThink(), well before ACS could ever get at it with GetPlayerInput.


SVN r1444 (trunk)
2009-02-24 04:13:38 +00:00
Christoph Oelckers f188577bb5 - Fixed: The map name display on the automap was incomplete.
- Added FakeInventory.Respawns DECORATe property
- Fixed: Unsetting the MF5_INCONVERSATION flag did not work when quitting the
  conversation by pressing Escape.


SVN r1442 (trunk)
2009-02-23 21:55:36 +00:00
Christoph Oelckers 613ae5e022 - added ML_BLOCKPROJECTILE flag to lines.
SVN r1440 (trunk)
2009-02-22 15:39:42 +00:00
Christoph Oelckers eb47f4fdbf - Fixed: With opl_onechip set the second OPL chip was never set to anything valid
so it contained an invalid pointer. There were also a few other places that
  simply assumed that the second chip is set to something valid.
- Fixed: NPCs which are engaged in a conversation should not move.
- Fixed: Player movement animation was not stopped when starting a conversation.


SVN r1439 (trunk)
2009-02-22 10:25:12 +00:00
Randy Heit 10c31b82cb - Added selective compression of network packets. Interestingly, most packets
don't actually compress all that well, even the ones that aren't too short
  to possibly compress. (Maybe make the whole thing one long, never-ending
  zlib data stream with Z_SYNC_FLUSH used to chunk things at packet
  boundaries? That would probably help the compression ratio, but it would
  require changing the way the netcode determines sequence, which would be
  a much more invasive change.)


SVN r1438 (trunk)
2009-02-22 05:05:58 +00:00
Christoph Oelckers 317b8c1d7c - Fixed: Heretic's fullscreen HUD crashed when the player had armor without
a valid icon.


SVN r1436 (trunk)
2009-02-21 23:17:37 +00:00
Christoph Oelckers b94b832a9e - Fixed: Untranslated colors in fonts had an alpha value of 0 but need 255.
SVN r1433 (trunk)
2009-02-21 11:30:42 +00:00
Christoph Oelckers a09e15fa09 - Fixed: The Doom status bar's ammo display may not use the INDEXFONT for
the alternative HUD. Instead it has to create a separate one out of the
  STYSNUM characters.


SVN r1432 (trunk)
2009-02-21 11:08:14 +00:00
Christoph Oelckers 5bd3d0d37d - Fixed: skins can not be sorted for binary search because the player class
code depends on the original indices.
- Fixed: P_StartConversation set the global dialog node variable for all
  players, not just the consoleplayer.
- Fixed: AWeapon::PickupForAmmo assumed that any weapon having a secondary
  ammo type also has a primary one.


SVN r1431 (trunk)
2009-02-21 10:15:11 +00:00
Christoph Oelckers 4b723beddd - Bumped netgame, demo and min demo version for the weapon slot changes.
- changed weapon slots to be stored per player. Information is now transmitted
  across the network so that all machines know each player's current weapon
  configuration so that it can be used by cheats or HUD display routines.


SVN r1430 (trunk)
2009-02-20 22:28:48 +00:00
Christoph Oelckers 125b0cefaf - fixed: level_info_t::mapbg was not initialized
SVN r1429 (trunk)
2009-02-20 13:47:22 +00:00
Randy Heit a7e40b56f6 - Fixed: Player names and chat macros that end with incomplete \c escapes now
have those escapes stripped before printing so that they do not merge with
  subsequent text.
- Moved default weapon slot assignments into the player classes.
  Weapon.SlotNumber is now used solely for mods that want to add new weapons
  without completely redoing the player's arsenal. Restored some config-based
  weapon slot customization, though slots are no longer automatically saved
  to the config and section names have changed slightly. However, unlike
  before, config slots are now the definitive word on slot assignments and
  cannot be overridden by any other files loaded.
- Fixed: Several weapons were missing a game filter from their definitions.
- Removed storage of weapon slots in the config so that weapon slots can
  be setup in the weapons themselves. Slots are still configurable, since
  they need to be for KEYCONF to work; any changes simply won't be saved
  when you quit.
- Removed limit on weapon slot sizes.


SVN r1428 (trunk)
2009-02-20 00:53:25 +00:00
Randy Heit 491abe3a2c - Fixed: DirectInput8Create() used the wrong calling convention.
SVN r1426 (trunk)
2009-02-19 23:12:48 +00:00
Christoph Oelckers 666e40c8bb - Added MF5_CANTSEEK flag to prevent seeker missiles from homing in on
certain actors and added an option to APowerInvisibility to set this
  flag when active.
- Added map specific automap backgrounds.
- Fixed: Voodoo dolls did not play a sound when dying.
- Added colorized error messages to DECORATE and made a few more error
  conditions that do not block further parsing not immediately abort.
- Made all errors in CreateNewActor not immediately fatal so that the
  rest of the DECORATE lump can be parsed normally to look for more errors.
- Fixed: Defining classes with the same name as their immediate base class
  was legal. It should not be allowed that a class has another one with the
  same name in its ancestry.
- Fixed: Formatting of the intermission screen on Heretic, Hexen and Strife
  was broken. Changed it to use WI_Drawpercent which does it properly and
  also allows showing percentage in these games now.
- Fixed: The MAPINFO parser ignored missing terminating braces of the last
  block in the file.

SVN r1425 (trunk)
2009-02-19 14:36:37 +00:00
Randy Heit 0acc6a4ee3 - Moved the V_InitFontColors() call earlier in the startup sequence so that
colored error messages appear colored in the startup window. Also lightened
  up the "Flat" red to contrast better with the startup background.


SVN r1424 (trunk)
2009-02-11 00:16:05 +00:00
Randy Heit 085be22a30 - Changed I_InitInput() to acquire the IDirectInput8A interface by using
DirectInput8Create() instead of CoCreateInstance(). This allows the Steam
  GameOverlayRenderer.dll to properly hook it.


SVN r1422 (trunk)
2009-02-10 03:12:41 +00:00
Randy Heit d444fc54fd - Didn't have the log saved.
SVN r1421 (trunk)
2009-02-10 02:21:46 +00:00
Randy Heit 035edb32ad - Stopped sending double the number of wheel events as appropriate to the
console under Linux.
- Added middle mouse button selection pasting for X systems.



SVN r1420 (trunk)
2009-02-10 02:16:41 +00:00
Christoph Oelckers 5aecc8abf5 - Fixed parsing for MustConfirm key in skill parser.
- Converted internal MAPINFOs to new syntax.


SVN r1417 (trunk)
2009-02-08 19:04:07 +00:00
Christoph Oelckers 4b064d9b5d - Added a range parameter to SNDINFO's $limit.
- Restored Dehacked music name replacement.


SVN r1416 (trunk)
2009-02-08 11:28:30 +00:00
Randy Heit 05a8a49ea5 - Added GUICapture mouse events for Win32.
SVN r1415 (trunk)
2009-02-08 03:45:41 +00:00
Randy Heit 025e36ee41 - Changed I_GetFromClipboard() to return an FString.
SVN r1414 (trunk)
2009-02-08 03:32:27 +00:00
Randy Heit be165578ea - Added GTK+-based clipboard support for Linux.
- Fixed: Most Linux filesystems do not fill in d_type for scandir(), so we
  cannot rely on it to detect directories.
- Added NicePath() function to perform shell-style ~ substitution on path
  names.
- Changed the default screenshot directory on Unix to ~/.zdoom/screenshots/.
- Added -shotdir command line option to temporarily override the
  screenshot_dir cvar.



SVN r1413 (trunk)
2009-02-08 02:52:43 +00:00
Christoph Oelckers 125be6b54e - Fixed: G_SerializeLevel must use the TEXMAN_ReturnFirst flag for getting
the sky textures so that it still works when the first texture in a TEXTURE1
  lump is used as sky.

SVN r1412 (trunk)
2009-02-07 08:52:07 +00:00
Randy Heit 0c9f735357 - Restored the old drawseg/sprite distance check from 2.0.63. The code that
replaced it did the check at the center of the area intersected by the
  sprite and the drawseg, whereas 2.0.63 only did the check at the location
  of the sprite on the map.


SVN r1411 (trunk)
2009-02-07 03:01:38 +00:00
Randy Heit 1aed25f666 - Commented out the CALL_ACTION(A_Look, actor) for targetless friendly
monsters in A_DoChase(). They can still find new targets without this,
  and with it, they got stuck on the first frame of their see state.


SVN r1410 (trunk)
2009-02-07 01:37:06 +00:00
Randy Heit 8d9bc8cc67 - Fixed: Keys bound in a custom key section would unbind the key in the
main game section.


SVN r1409 (trunk)
2009-02-07 01:14:36 +00:00
Randy Heit f867f40bab - Fixed scrolling of the automap background on a rotated automap.
SVN r1408 (trunk)
2009-02-07 00:07:55 +00:00
Randy Heit 64b783f4bd - Changed singleplayer allowrespawn to act like a co-op game when you
change levels while dead by immediately respawning you before the switch
  so that you get to keep all your inventory.
- Fixed: G_InitLevelLocals() did not set flags2.


SVN r1406 (trunk)
2009-02-06 04:43:51 +00:00
Christoph Oelckers cccdfd6336 - fixed: The compatibility parser applied the last map's settings to all
maps in the compatibility list.
- Added compatibility settings for a few more levels in some classic WADs.
- Added spechit overflow workaround for Strain MAP07. This is highly map
  specific because the original behavior cannot be restored.
- Added a check for Doom's IWAD levels that forces COMPAT_SHORTTEX for them.
  MD5 cannot be used well here because there's many different IWADs with 
  slightly different levels. This is only done for Doom format levels to
  ensure that custom IWADs for ZDoom are not affected.
- fixed: level.flags2 was not reset at level start.
- Fixed: Morph powerups can change the actor picking up the item so 
  AInventory::CallTryPickup must be able to return the new actor.
- Fixed: ACS's GiveInventory may not assume that a PlayerPawn is still
  attached to the player data after an item has been given.
- Added a missing NULL pointer check to DBaseStatusBar::Blendview.


SVN r1405 (trunk)
2009-02-06 00:16:57 +00:00
Randy Heit 4e509728a0 - Added a compatibility lump because I think it's a shame that Void doesn't
work properly on new ZDooms after all the collaboration I had with Cyb on
  that map. (Works with other maps, too.)


SVN r1402 (trunk)
2009-02-05 02:55:28 +00:00
Christoph Oelckers 84c5c7d38e - Made improvements so that the FOptionalMapinfoData class is easier to use.
SVN r1401 (trunk)
2009-02-04 23:45:26 +00:00
Randy Heit 403b2c3c56 - Moved the MF_INCHASE recursion check from A_Look() into A_Chase(). This
lets A_Look() always put the actor into its see state. This problem could
  be heard by an Archvile's resurrectee playing its see sound but failing to
  enter its see state because it was called from A_Chase().


SVN r1399 (trunk)
2009-02-04 02:29:59 +00:00
Randy Heit b983886acd - Fixed: SBARINFO used different rounding modes for the background and
foreground of the DrawBar command.


SVN r1398 (trunk)
2009-02-04 02:01:32 +00:00
Randy Heit 72343d9f2c - Bumped MINSAVEVER to coincide with the new MAPINFO merge.
SVN r1397 (trunk)
2009-02-04 01:27:45 +00:00
Randy Heit d0e7e574e1 - Added a fflush() call after the logfile write in I_FatalError so that the
error text is visible in the file while the error dialog is displayed.


SVN r1396 (trunk)
2009-02-04 01:23:47 +00:00
Christoph Oelckers 4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Randy Heit 0b95b47f87 - Changed DECORATE replacements so that they aren't overridden by Dehacked.
SVN r1391 (trunk)
2009-02-03 05:46:55 +00:00
Christoph Oelckers c11f1a7fdc - Fixed: The damage factor for 'normal' damage is supposed to be applied to
all damage types that don't have a specific damage factor.


SVN r1388 (trunk)
2009-02-01 09:11:05 +00:00
Randy Heit 07a2da40f1 - Changed FMOD init() to allocate some virtual channels.
SVN r1387 (trunk)
2009-02-01 04:10:36 +00:00
Randy Heit b680840073 - Fixed clipping in D3DFB::DrawTextureV() for good by using a scissor test.
SVN r1386 (trunk)
2009-02-01 03:39:00 +00:00
Randy Heit c09d9f0e20 - Fixed: D3DFB::DrawTextureV() did not properly adjust the texture coordinate
for lclip and rclip.


SVN r1384 (trunk)
2009-01-31 03:46:30 +00:00
Randy Heit a21a928011 - Added weapdrop ccmd.
SVN r1383 (trunk)
2009-01-31 03:07:02 +00:00
Randy Heit f3b6f25d88 - Centered the compatibility mode option in the comptibility options menu.
SVN r1382 (trunk)
2009-01-31 02:47:45 +00:00
Randy Heit a7ffb9db6a - Added button mappings for 8 mouse buttons on SDL. It works with my system,
but Linux being Linux, there are no guarantees that it's appropriate for
  other systems.
- Fixed: SDL input code did not generate GUI events for the mousewheel, so it
  could not be used to scroll the console buffer.



SVN r1381 (trunk)
2009-01-31 02:26:24 +00:00
Christoph Oelckers 40d740506d - Added Blzut3's statusbar maintenance patch.
SVN r1380 (trunk)
2009-01-30 22:37:55 +00:00
Christoph Oelckers 176608cbf4 - fixed sound origin of the Mage Wand's missile.
SVN r1377 (trunk)
2009-01-30 08:14:28 +00:00
Christoph Oelckers fb9601b9eb - Added APROP_Dropped actor property.
- Fixed: The compatmode CVAR needs CVAR_NOINITCALL so that the compatibility flags don't get reset each start.
- Fixed: compatmode Doom(strict) was missing COMPAT_CROSSDROPOFF

SVN r1376 (trunk)
2009-01-28 08:48:52 +00:00
Randy Heit a3b11af15a - More GCC warning removal, the most egregious of which was the potential
vulnerability "format not a string literal and no format arguments".
- Changed the CMake script to search for fmod libraries by full name instead
  of assuming a symbolic link has been placed for the latest version. It can
  also find a non-installed copy of FMOD if it is placed local to the ZDoom
  source tree.



SVN r1373 (trunk)
2009-01-28 05:29:41 +00:00
Randy Heit 8f26956310 - Fixed: Some OPL state needs to be restored before calculating rhythm. Also,
since only the rhythm section uses the RNG, it doesn't need to be advanced
  for the normal voice processing.


SVN r1371 (trunk)
2009-01-27 05:25:16 +00:00
Christoph Oelckers f269af052c - fixed some issues with P_FindFloorCeiling's coordinate processing.
- added a new compatmode CVAR which allows setting some generic compatibility 
  flag combinations:
  Doom: sets the options needed to make most Doom.exe compatible map play without
  errors.
  Doom (strict): Same as above but sets a few more options. Please note that this
  does not mean full Doom.exe behavior emulation.
  Boom: Sets all options that consider differences between ZDoom and Boom.
  ZDoom 2.0.63: Sets only the COMPATF_SOUNDTARGET option which is needed for
  many older ZDoom maps.
- added new COMPAT_CROSSDROPOFF option to block monsters from being pushed over
  dropoffs by damage kickback.
- fixed: AFastProjectile::Tick must call Effect only 8 times per tic, regardless
  of the amount of steps taken.
- fixed: momentum checks in AFastProjectile did not use absolute values.


SVN r1369 (trunk)
2009-01-25 21:59:38 +00:00
Randy Heit 7f35a95942 - Restored the rhythm section to fmopl.cpp and made some slight updates from
version 0.72 of MAME's fmopl.c. Also refactored CalcVoice so that the
  original MAME structure is more visible.


SVN r1368 (trunk)
2009-01-25 04:22:19 +00:00
Randy Heit 6ebbc920fb - Removed the SoundChans bitfield from AActor, since it seems there are race
conditions I don't fully understand where it simply doesn't work.


SVN r1367 (trunk)
2009-01-25 01:52:38 +00:00
Randy Heit b6528a604e SVN r1366 (trunk) 2009-01-25 01:16:00 +00:00
Randy Heit b5a5204911 - Set packet server as the default for four or more player games, and also the
default for three player games where the other players are not in the same
  private IP range.




SVN r1364 (trunk)
2009-01-24 04:47:07 +00:00
Christoph Oelckers c5ca865a7f - Fixed: The sight checking code didn't initialize the myseethrough variable.
SVN r1363 (trunk)
2009-01-24 00:21:12 +00:00
Christoph Oelckers 036deb1ae6 - Fixed: With COMPAT_TRACE switched on linedef actions on lines having
the same sector on both sides were not triggered.


SVN r1362 (trunk)
2009-01-24 00:04:58 +00:00
Christoph Oelckers bbda4622e7 - Added a CopyInfo function to FTexture that contains all code required to
clone a texture. Used for creating warping textures.
- Fixed: P_FindFloorCeiling should not be called before setting the actor's z-
  coordinate. For testing 3D Midtex lines and 3D floors the proper position
  needs to be set first.
- Fixed the autoaim fix from Jan 10.


SVN r1358 (trunk)
2009-01-18 09:31:49 +00:00
Christoph Oelckers 51391f889c - Added option to specify the amount of ammo to be given by a WeaponGiver.
SVN r1357 (trunk)
2009-01-18 08:20:29 +00:00
Christoph Oelckers b4b76ed4e6 - fixed: Identification of Doom1 Freedoom IWAD did not work.
- fixed: UDMF did not initialize a sector's light colors.
- fixed implementation of DF2_NOAUTOAIM flag.


SVN r1356 (trunk)
2009-01-10 09:40:47 +00:00
Christoph Oelckers 35cc39f094 - copied some 3D floor fixes from GZDoom.
- fixed: Crushing polyobject did incomplete checks for blocked moves.


SVN r1355 (trunk)
2009-01-07 18:45:39 +00:00
Christoph Oelckers bf63041585 - fixed: Parsing of color strings with 6 characters and spaces did not work.
- fixed: State labels must be evaluated for the state's owner, not the calling actor.



SVN r1354 (trunk)
2009-01-06 00:03:18 +00:00
Christoph Oelckers a73b008255 - Fixed: For map spawns any change to an actor's floor z-coordinate must be
delayed until after its z-coordinate has been set. That means that for 
  map spawns AActor::StaticSpawn may not call P_FindFloorCeiling for such
  actors.


SVN r1352 (trunk)
2009-01-04 15:51:00 +00:00
Christoph Oelckers 78933df10d - added GZDoom's 3D floor physics code. This is not active yet so anything compiled from this code won't have any support for it!
SVN r1351 (trunk)
2009-01-04 15:00:29 +00:00
Christoph Oelckers f7148b6b40 - Used new functionality to avoid moving the puff around in SpawnDeepSplash.
- Fixed: P_RailAttack used the shooting actor or a default puff for some splash
  related actions. It should use the puff type passed to it as a parameter instead.
- Changed splash handling in P_LineAttack to use the actual hit position to
  spawn the splash and not the puff's spawn position which is offset a little.
- made some precision related changes to P_HitWater. The precise hit coordinate
  can now be passed as parameters.


SVN r1350 (trunk)
2009-01-04 12:25:22 +00:00
Christoph Oelckers bbdb2b10a8 - Made spawning of floor- and ceiling huggers a little more intelligent.
SVN r1348 (trunk)
2009-01-03 18:09:33 +00:00
Christoph Oelckers fdfee91b9f - Fixed: 'None' was no longer recognized as a NULL class name by the
DECORATE parser.


SVN r1347 (trunk)
2009-01-03 14:44:41 +00:00
Christoph Oelckers 35edd15386 - Added 'ininventory item, amount' option to SBARINFO to check for a minimum
amount instead of mere presence in the inventory.
- Fixed: Door lock messages were overwritten by remote messages.

SVN r1346 (trunk)
2009-01-02 17:49:48 +00:00
Christoph Oelckers 7fde758e26 - Fixed: SBARINFO used GetSpecies instead of GetClass to check weapon types.
- Added a few missing NULL pointer checks to SBARINFO code.


SVN r1344 (trunk)
2009-01-01 16:46:05 +00:00
Christoph Oelckers 6a321fd8f5 - Changed pickup sounds of local player to unpaused to resolve problems with
the time freezer and make them behave better.
- Fixed: When sounds are paused not all newly started sounds should actually
  be played.
- Fixed: SBARINFO had no means to check if a weapon uses any ammo at all and
  as a result the inventory icon was misplaced if a no-ammo weapon was selected.

SVN r1343 (trunk)
2009-01-01 15:09:49 +00:00
Christoph Oelckers 9098bc1a46 - Added a constant name for Skulltag's 128 flag for A_SpawnItemEx. For
compatibility ZDoom needs to define this name, too, even though it doesn't 
  use it.
- Fixed: The nodebuilder could hang on badly set up polyobjects. Now it aborts 
  when the loop iterates NumberOfSegs times.

SVN r1338 (trunk)
2008-12-31 12:02:08 +00:00
Christoph Oelckers 987c878a9a - Fixed: FMOD calls for setting the water reverb must check the return code
for errors.
- Fixed: Hexen's dual attack weapons must check distance to targets in 3D,
  not 2D.


SVN r1336 (trunk)
2008-12-30 23:27:27 +00:00
Christoph Oelckers f8c38e5f54 - Made several DECORATE errors which do not involve parsing non-fatal.
- Added a static error counter to FScriptPosition class.
- Changed initialization of actor class type properties: fuglyname is gone as
  is the postprocessing in FinishThingdef. Instead an empty placeholder class
  is now created when a class is first referenced and this placeholder is later
  filled in. 
- Added option to replace backslash with '^' in state frame definitions because
  the backslash is just causing too many problems because it's also an escape
  character.


SVN r1334 (trunk)
2008-12-29 23:03:38 +00:00
Christoph Oelckers 8f686a5e02 - Added Karate Chris's new DMFlags submission.
SVN r1333 (trunk)
2008-12-28 09:49:15 +00:00
Christoph Oelckers 37d056c041 - Fixed: The correct player class was not remembered when the menu had both
a player class selection menu and an episode menu.
- Fixed: AddToConsole could write outside its working buffer.
- Fixed: 0 was no longer recognized as placeholder for 'no state' in A_Chase.
- Fixed: When picking up weapons the code did not check if it should switch away
  from weak weapons.


SVN r1332 (trunk)
2008-12-27 20:18:31 +00:00
Randy Heit 120233eebd - OggMod improperly decodes the right channel of stereo samples when sending
them to OggEnc, so I have no choice but to convert them to mono by chopping
  off the right channel and only using the left channel information.


SVN r1327 (trunk)
2008-12-21 04:14:16 +00:00
Randy Heit 97de7897de - Fixed: OggMod passes the raw sample data to OggEnc for stereo samples, so
the resultant Vorbis stream is not actually stereo but mono with the right
  channel after the left. The two need to be interleaved just like
  uncompressed samples are.
- Removed the pattern length limit in the XM reader.


SVN r1326 (trunk)
2008-12-20 04:17:10 +00:00
Randy Heit 835ed26370 - Decal changes as per Xaser's suggestions: Smaller decal for PhoenixFX2,
CrossbowFX2 and MaceFX4 were missing decals, and HornRodFX2 gets a whole
  new decal.
- Fixed: bfgscrc2.png had some holes in the middle that did not look so good.
  (From previously being handled through WinTex, maybe?)


SVN r1325 (trunk)
2008-12-19 03:57:24 +00:00
Randy Heit 48be3f7022 - Fixed: Thing_ProjectileIntercept broke slightly when converted to the new
vector math routines (almost two years ago!) because the original code
  multiplied down columns of the rotation matrix, but the new code multiplies
  across rows of the matrix instead. This is remedied by flipping the matrix
  across the x=y axis by reversing the sign of the sine value passed to the
  matrix constructor.


SVN r1324 (trunk)
2008-12-18 06:22:18 +00:00
Randy Heit 45fc728f2e - Fixed: Autoloading a game (e.g. respawning after dying in single player)
during demo playback prematurely ended demo control of the player.


SVN r1321 (trunk)
2008-12-16 04:56:25 +00:00
Randy Heit 4c14c197f8 - Changed the co-op intermission screen to draw the stats with the small font.
SVN r1318 (trunk)
2008-12-16 03:15:03 +00:00
Randy Heit 49120f59d4 - Added Karate Chris's patch to optionally specify an angle offset for
summoning.
- Added Karate Chris's fix for Serpent Staff vampirism on teammates.
- Locks and teleporters now take precedence over one-sidedness for automap
  coloring.


SVN r1317 (trunk)
2008-12-16 01:23:44 +00:00
Randy Heit f435576f1d - Increased maximum number of per-pattern rows for the XM loader from
256 to 1024 to deal with a module that otherwise would not load.
- Removed the artificial restriction on not supporting Vorbis-compressed
  samples in XMs if they are stereo, since it turns out that OggMod does
  support them.


SVN r1316 (trunk)
2008-12-16 00:59:20 +00:00
Christoph Oelckers bd9e318863 - Added a SECF_NORESPAWN flag for sectors that prevents players from being respawned
in such a sector. As a workaround for current map formats a new actor
  (DoomEdNum 9041) was added that can set the extended sector flags without the
  use of ACS and sector tags. The new flag can also be set with Sector_ChangeFlags.
- Fixed: Players ignored MF2_TELESTOMP and always telefragged what was in the way.
- Fixed: Actors with MF5_NOINTERACTION were not affected by the time freezer.


SVN r1315 (trunk)
2008-12-14 19:12:41 +00:00
Christoph Oelckers 11d1c41873 - Added a strbin1 function that does the same as strbin but creates a copy
instead of overwriting the original string. ACS performing this operation
  in place caused crashes with RTC-3057.
- fixed: FScriptPosition::Message did not print the message if it was not 
  a fatal error.


SVN r1313 (trunk)
2008-12-07 17:50:03 +00:00
Christoph Oelckers 081658d3d5 - Fixed: The save percentage for Doom's green armor was slightly too low
which caused roundoff errors that made it less than 1/3 effective.
- Added support for "RRGGBB" strings to V_GetColor.
- Fixed: Desaturation maps for the TEXTURES lump were calculated incorrectly.
- Changed GetSpriteIndex to cache the last used sprite name so that the code
  using this function doesn't have to do it itself.
- Moved some more code for the state parser into p_states.cpp.
- Fixed: TDeletingArray should not try to delete NULL pointers.

SVN r1312 (trunk)
2008-12-07 12:11:59 +00:00
Randy Heit 238de9cda1 - Added binary (b) and hexadecimal (x) cast types for ACS's various print
statements.
- Added ClassifyActor(tid) ACS builtin function. This takes a TID and returns
  a set of bits describing the actor. If TID is 0, it returns information
  about the activator. If there is more than one actor with the given TID,
  only the first one is considered. Currently defined bits are:
    ACTOR_NONE         No actors with this TID exist (only when TID is not 0).
    ACTOR_WORLD        Activator is the world (only when TID is 0).
    ACTOR_PLAYER       Actor is a player (includes bots and voodoo dolls).
    ACTOR_BOT          Actor is a bot.
    ACTOR_VOODOODOLL   Actor is a voodoo doll.
    ACTOR_MONSTER      Actor is a monster.
    ACTOR_ALIVE        Actor is alive (players/monsters only).
    ACTOR_DEAD         Actor is dead (players/monsters only).
    ACTOR_MISSILE      Actor is a missile.
    ACTOR_GENERIC      Actor exists, but no further information is available.


SVN r1310 (trunk)
2008-12-07 03:55:49 +00:00
Randy Heit ef3b57fb8f - Moved ExpandEnvVars() from d_main.cpp to cmdlib.cpp.
- AutoExec paths now support the same variable expansion as the search paths.
  Additionally, on Windows, the default autoexec path is now relative to
  $PROGDIR, rather than using a fixed path to the executable's current
  directory.
- All usable Autoload and AutoExec sections are now created at the top of
  the config file along with some brief explanatory notes so they are
  readily visible to anyone who wants to edit them.


SVN r1307 (trunk)
2008-12-07 00:50:04 +00:00
Christoph Oelckers 153a2a4c2c - Fixed: G_DoPlayDemo did not free the demobuffer or the CVAR backups when it
failed to start the demo.
- Added a MF5_BRIGHT flag to always render an actor fullbright.
- Fixed: Calling Door_Animated with a non-zero tag created a new thinker
  for each two-sided line of the sector.
- Added Karate Chris's submission for making 'spray' a cheat.
- Added CO2's default parameter additions for several Doom code pointers
  submission.
- Added CO2's A_RemoveMaster/A_RemoveChildren submission.
- Added Blzut3's SBARINFO replacement for the Doom statusbar.
- Fixed: SBarInfo still displayed the wrong bar for height 0
- Added A_KillSiblings and A_DamageSiblings code pointers.
- added MaxAbsorb and MaxFullAbsorb properties for Armor.


SVN r1304 (trunk)
2008-12-06 10:22:37 +00:00
Randy Heit b692412a9e - Restored the multiplayer scoreboard's former centering so that it doesn't
look awful on widescreen intermissions. Also changed the column widths to
  be font-dependant rather than fixed proportions of the screen width.
- Fixed horizontal positioning of 'finished' on the Raven games when scaled.


SVN r1303 (trunk)
2008-12-02 02:23:05 +00:00
Christoph Oelckers 7f05277f2b - Fixed: 'finished' wasn't drawn on the intermission because the space
check compared scaled with unscaled coordinates.
- deleted some files only containing obsolete info from the docs folder.


SVN r1302 (trunk)
2008-11-30 17:57:25 +00:00
Christoph Oelckers 3f2d5db348 - Changed: Textures without a name no longer get added to the texture manager's
hash chains.
- Fixed: specifying texture patches or font characters by full lump name instead
  of texture name didn't work. To do this properly the texture manager needs
  an option to look for a texture by lump number so that such textures can
  be maintained without interfering with regular operation.
- added 'skystretch' and 'autosequences' keywords for MAPINFO so that the effects
  of 'noautosequences' and 'forcenoskystretch' can be cancelled.
- Added a 'gamedefaults' section to MAPINFO after discovering that 'defaultmap'
  gets reset for each MAPINFO. A global section is needed to define a game's
  default setting in zdoom.pk3. The gamedefaults should normally not be changed 
  by PWADs but it can be done if some mod intends to change gameplay settings 
  but wants to allow custom add-ons on its own.


SVN r1300 (trunk)
2008-11-30 12:49:27 +00:00
Randy Heit c35be830c3 - Fixed alignment of "finished" line in WI_drawLF() when the level name is a
graphic and scaled.


SVN r1299 (trunk)
2008-11-30 01:43:00 +00:00
Randy Heit 927c9532bf - It is now possible to replace the game's SmallFont with a single lump font
called SMALLFNT.
- Reduced the width of the second column in wi_percents false mode from 3 to
  2 characters.
- Added a WISLASH graphic for Doom's intermission screen when wi_percents is
  false.


SVN r1298 (trunk)
2008-11-30 01:37:11 +00:00
Christoph Oelckers 6b9129105a - Added: inventorybarnotvisible to check to see if the inventory bar is up.
- Added the following flags to drawselectedinventory center, centerbottom, and
  drawshadow.
- Fixed: The translucent flag for drawinventorybar should only have affected
  the artibox image.

- Fixed: compatf_limitpain must check for 21 Lost Souls, not 20.


SVN r1297 (trunk)
2008-11-29 16:37:54 +00:00
Randy Heit cbe0c57911 - Removed S_MarkSoundChannels(), as it caused all non-actor sounds to
have their origins zeroed during collections.
- WI_drawLF() now draws the level name at the top of the screen, always.


SVN r1296 (trunk)
2008-11-27 18:46:09 +00:00
Randy Heit ed6168ea92 - SBARINFO update:
* Fixed: disabling lowerHealthCap didn't affect interpolateHealth.

SVN r1295 (trunk)
2008-11-27 17:47:37 +00:00
Randy Heit 6e83d231fe - The co-op summary screen now has a totals row at the bottom (if it fits).
- Changed WI_drawPercent() when wi_percents is false so that the total
  display is optional, and it formats it like Heretic's intermission, with
  a slash and a fixed-width right column.
- Font is no longer a property of the screen object. Pass the font to
  DrawText and DrawChar directly instead.
- Doom's intermission characters are now collected together as a font
  so they can be colorized.


SVN r1294 (trunk)
2008-11-27 17:43:36 +00:00
Christoph Oelckers 4d991de92d - moved common code of Raven's fast projectiles into a base class
called FastProjectile. This base class doesn't have any effects attached
  so that it can be used for user defined fast projectiles.


SVN r1290 (trunk)
2008-11-15 09:57:18 +00:00
Randy Heit 3b4479df44 - Removed GC barriers from the sound channels. If we must, we can always
do it the old way and scan every channel to see if it matches an actor/
  entchannel pair.
- Fixed: S_RelinkSounds() did not move the SoundChans bitfield to the new
  actor.
- Fixed: Stolen channels could be kept around by the high-level channels
  indefinitely.


SVN r1289 (trunk)
2008-11-15 01:01:04 +00:00
Randy Heit 183b765cf2 - Fixed: AMageStaffFX2::IsOkayToAttack() / A_MStaffAttack aimed at friendlies.
- Added kill count awareness to A_ChangeFlag.
- P_NightmareRespawn() now clears the MTF_AMBUSH flag, so respawned monsters
  aren't dormant (since there would be no way to activate them, and they
  were certainly not dormant when they died).


SVN r1287 (trunk)
2008-11-14 23:12:15 +00:00
Randy Heit c1cefee2f4 - Made sdl/i_system.cpp:I_GetTimePolled() functionally equivalent to the
Win32 version.
- Updated fmod_wrap.h and fmodsound.cpp for FMOD 4.20.
- GCC warning removal.


SVN r1286 (trunk)
2008-11-09 05:50:54 +00:00
Christoph Oelckers e56fef0a8e - Fixed: The TEXTURES parser didn't report an error for invalid keywords.
- Fixed: The DECORATE expression evaluator was too strict with missing jump labels.
  For compatibility it only may print a warning, not an error.


SVN r1284 (trunk)
2008-11-08 08:29:51 +00:00
Christoph Oelckers f1ae8119ab - Fixed: FxClassTypeCast::Resolve didn't work for NULL classes because a variable
was not initialized.


SVN r1283 (trunk)
2008-10-29 16:13:05 +00:00
Christoph Oelckers edeed7673a - Fixed: The railgun attack functions still read their puff parameters as names
even though they are now passed as class pointers.


SVN r1281 (trunk)
2008-10-28 22:33:00 +00:00
Christoph Oelckers feaa5c3653 - Fixed: The state parser counted one parameter too many for a varargs function.
SVN r1280 (trunk)
2008-10-28 18:10:02 +00:00
Christoph Oelckers 0e9c3a3e2b - Fixed: FStateExpressions could copy unresolved default parameter expressions.
When these were resolved and changed later all copied pointers pointed to
  invalid data.


SVN r1279 (trunk)
2008-10-28 15:58:00 +00:00
Christoph Oelckers a8a3aca601 - Added read and write barriers to the actor pointer in the sound channel
structure.
- Fixed: Items which should stay but had an IF_ALWAYSPICKUP flag were removed.
- Fixed: The pickup flash must only play when an item is picked up so the 
  correct place to spawn it is in AInventory::Touch, not in AInventory::GoAway.


SVN r1278 (trunk)
2008-10-26 17:06:47 +00:00
Christoph Oelckers 226ca44939 - Fixed: A_Jump didn't properly determine a state's owner anymore when called
from weapons.


SVN r1277 (trunk)
2008-10-26 10:31:19 +00:00
Christoph Oelckers d753d41752 - Added NULL checks to all places where class names are passed as DECORATE
parameters.
- All DECORATE parameters are passed as expressions now. This change allows
  for compile time checks of all class names being used in DECORATE so many
  incorrect definitions may output warnings now.
- Changed DECORATE sound and color parameters to use expressions.
- Changed: S_StopChannel now resets the actor's sound flags. The previous bug
  made me think that delaying this until FMod calls the end of sound callback 
  may simply be too late.


SVN r1276 (trunk)
2008-10-25 17:38:00 +00:00
Christoph Oelckers 4c6b7f6752 - Fixed: The high level sound code must not rely on FMod immediately returning
the sound channel data when a sound is being stopped. This caused
  an endless loop when changing levels with Strife's Flamethrower active.

SVN r1275 (trunk)
2008-10-24 14:49:17 +00:00
Christoph Oelckers b455227342 - Added a proper function parser to the expression evaluator and converted
sin/cos and action specials to use it. The old evaluator is gone now.
- fixed some GCC problems with autosegs.

SVN r1274 (trunk)
2008-10-21 18:10:50 +00:00
Randy Heit 30ef6a0c2d - Game time is now frozen during screen wipes. This obsoletes the DEM_WIPEON
and DEM_WIPEOFF commands. Fixes multimap demos desyncing when played back
  or recorded with wipes enabled, and prevents multiplayer games from
  starting until all players' wipes have finished.


SVN r1272 (trunk)
2008-10-21 02:27:21 +00:00
Christoph Oelckers b9afb78523 - Added native variables to expression evaluator and replaced the previous
handling of actor variables in expressions with it.
- Added support for floating point constants to DECORATE expression evaluator.

SVN r1271 (trunk)
2008-10-19 21:43:36 +00:00
Randy Heit 633154d46f - Rewrote the SeePastShootableLines check in P_SightCheckLine() to be
more readable.


SVN r1270 (trunk)
2008-10-19 02:00:00 +00:00
Randy Heit 6aa72c84d6 - Commented out the MugShot state nulling in DSBarInfo::AttachToPlayer() so
that fiddling with player options does not reset the mug shot.
- Fixed: SetMugShotState ACS command did not pop the stack.


SVN r1269 (trunk)
2008-10-19 00:47:07 +00:00
Christoph Oelckers 7312e6a621 - Added a global symbol table and changed DECORATE parser to put its global
symbols there instead of into AActor.
- Changed the expression evaluator's floating point precision to double.
- Started rewriting the DECORATE expression evaluator to allow more flexibility.
  All the operators use the new functionality but functions, variables and
  constants are yet to be redone.
  While doing this rewrite I noticed that random2 was always evaluated as const.
  This got fixed automatically.


SVN r1264 (trunk)
2008-10-18 17:17:44 +00:00
Christoph Oelckers bca1fc5068 - Fixed: The TEXTURES parser could copy beyond the end of a string when parsing
a 'define' definition.


SVN r1263 (trunk)
2008-10-14 07:57:16 +00:00
Randy Heit 738e8ca7ad - GCC warning removal.
* This may or may not be a problem, but GCC warned that FStateDefinitions::
    AddStateDefines() does not initialize def.FStateDefine::DefineFlags, so
    I fixed that.


SVN r1262 (trunk)
2008-10-14 03:21:53 +00:00
Randy Heit 8d4912f4af - Fixed: The three-argument version of AActor::FindState() initialized a
two-entry array for passing to the main FindState() routine, but did
  not actually pass it, passing the original primary label instead.


SVN r1261 (trunk)
2008-10-14 01:56:28 +00:00
Randy Heit cb159b26c2 - Fixed: SDL builds did not shutdown the sound system at exit.
- Fixed: ThingCountSector and ThingCountNameSector did not remove enough
  entries from the stack, and did not put the result in the right slot.
- Fixed: Teleport lines were prioritized over secret lines when deciding what
  color to draw them on the automap.
- Fixed: Death-reverting morphs did not remove the morph item from the
  player's inventory when death caused the morph to revert.
- Updated fmod_wrap.h for FMOD Ex 4.18.


SVN r1259 (trunk)
2008-10-14 01:24:27 +00:00
Christoph Oelckers 402d0e5fa1 - Fixed: Cheats in demos must not access the weapon slots.
- Fixed: S_ChannelEnded didn't check for a NULL SfxInfo.
- Fixed: R_InitTables did a typecast to angle_t instead of fixed_t.
- Fixed: PowerProtection and PowerDamage applied their defaults incorrectly.
- Fixed: The damage type property didn't properly read its factor.


SVN r1257 (trunk)
2008-10-07 18:21:03 +00:00
Christoph Oelckers 2221ab5668 - Finally has the right idea how to restore Doom's original clipping of projectiles
against decorations without breaking anything newer:
  Added a new 'projectilepassheight' property that defines an alternative height
  that is only used when checking a projectile's movement against this actor.
  If the value is positive it is used regardless of other settings, if it is
  negative, its absolute will be used if a new compatibility option is enabled
  and if it is 0 the normal height will be used.


SVN r1253 (trunk)
2008-10-05 11:23:41 +00:00
Christoph Oelckers d9ab611db2 - Fixed: Powerup.Color's handler contained an unnecessary 'else' which resulted
in opaque powerup blends.

SVN r1252 (trunk)
2008-10-05 08:50:47 +00:00
Christoph Oelckers 1cf770271c - Fixed: Resurrecting a player didn't unset the RF_INVISIBLE flag which is
set when the player is crushed to gibs under a door.


SVN r1251 (trunk)
2008-10-04 07:45:54 +00:00
Christoph Oelckers 52ad2800d1 - Fixed: Dropitem gave incorrect amounts to the item if a probability was set.
SVN r1250 (trunk)
2008-09-28 07:23:15 +00:00
Christoph Oelckers 07e74419d5 - Fixed: weapon.ammogive2 always gave 2 amounts of ammo.
SVN r1249 (trunk)
2008-09-27 07:57:41 +00:00
Christoph Oelckers dd49574325 SVN r1248 (trunk) 2008-09-27 07:11:38 +00:00
Christoph Oelckers b21d837b5a - Fixed: player.colorrange didn't read the parameters correctly.
- Reverted an 'optimization' in d_dehacked.cpp that didn't work.


SVN r1247 (trunk)
2008-09-24 23:22:55 +00:00
Christoph Oelckers 954955c5a5 - Used the one unused byte in the state structure as a flag to tell what type
the NextState parameter is. The code did some rather unsafe checks with it
  to determine its type.
- moved all state related code into a new file: p_states.cpp.
- merged all FindState functions. All the different variations are now inlined
  and call the same function to do the real work.


SVN r1243 (trunk)
2008-09-22 18:55:29 +00:00
Christoph Oelckers 8a79985f46 - did some code cleanup and reorganization in thingdef.cpp.
- Replaced the translation parser for TEXTURES with FRemapTable::AddToTranslation.


SVN r1241 (trunk)
2008-09-21 22:25:23 +00:00
Christoph Oelckers 6227906072 - Fixed: SNDINFO must be loaded before the textures. However, this required
some changes to the MAPINFO parser which tried to access the texture manager
  to check if the level name patches exist. That check had to be moved to
  where the intermission screen is set up.
- Fixed: 'bloodcolor' ignored the first parameter value when given a list
  of integers.
  Please note that this creates an incompatibility between old and new 
  versions so if you want to create something that works with both 2.2.0
  and current versions better use the string format version for the color
  parameter!
- Rewrote the DECORATE property parser so that the parser is completely
  separated from the property handlers. This should allow reuse of all 
  the handler code for a new format if Doomscript requires one.
- Fixed: PClass::InitializeActorInfo copied too many bytes if a subclass's
  defaults were larger than the parent's.
- Moved A_ChangeFlag to thingdef_codeptr.cpp.
- Moved translation related code from thingdef_properties.cpp to r_translate.cpp
  and rewrote the translation parser to use FScanner instead of strtol.
- replaced DECORATE's 'alpha default' by 'defaultalpha' for consistency.
  Since this was never used outside zdoom.pk3 it's not critical.
- Removed support for game specific pickup messages because the only thing
  this was ever used for - Raven's invulnerability item - has already been
  split up into a Heretic and Hexen version.

SVN r1240 (trunk)
2008-09-21 18:02:38 +00:00
Randy Heit 2b16b99f4d - Fixed: The Timidity config parser always tried to process the note number,
even if it wasn't specified.


SVN r1239 (trunk)
2008-09-21 02:46:53 +00:00
Randy Heit dab73198fa - Fixed: When UpdateJoystickMenu() modifies the menu items for different
controllers, the joystick axis selectors need to NULL the d.graycheck
  field, since this is shared by the axis sensitivity sliders' step values.


SVN r1238 (trunk)
2008-09-20 03:08:54 +00:00
Christoph Oelckers d88e960bb9 - Fixed: The crosshair must be initialized after the texture manager because
on the fly texture creation for graphics patches is no longer supported.


SVN r1237 (trunk)
2008-09-19 22:34:32 +00:00
Christoph Oelckers 3637c878cd - Changed: Replaced weapons should not be given by generic cheats, only
when explicitly giving them.
- Changed 'give weapon' cheat so that in single player it only gives weapons
  belonging to the current game or are placed in a weapon slot to avoid
  giving the Chex Quest weapons in Doom and vice versa.
- Fixed: The texture manager must be the first thing to be initialized
  because MAPINFO and DECORATE both can reference textures and letting them
  create their own textures is not safe.


SVN r1230 (trunk)
2008-09-17 00:14:33 +00:00
Christoph Oelckers d1f8518a79 - Separated low level sound code from all high level dependencies.
SVN r1228 (trunk)
2008-09-15 18:18:04 +00:00
Christoph Oelckers 5d9483b632 - Moved some more high level sound logic out of FMODSoundRenderer:
The rolloff and channel ended callbacks now call functions in s_sound.cpp
  instead of working on the data itself and GSnd->StopSound has been replaced
  with S_StopChannel.


SVN r1227 (trunk)
2008-09-15 16:02:05 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +00:00
Christoph Oelckers c86ca5e891 - fixed: For Chex Quest some CVars were initialized to Heretic's default.
SVN r1223 (trunk)
2008-09-14 10:28:20 +00:00
Christoph Oelckers 2cad1c2c19 - Moved IF_ALWAYSPICKUP and GiveQuest into CallTryPickup so that they are
automatically used by all inventory classes.
- The previous change made it necessary to replace all TryPickup calls with
  another function that just calls TryPickup.
- Fixed: AInventory::TryPickup can change the toucher so this must be reported
  to subclasses calling the super function. Changed TryPickup to pass the
  toucher pointer by reference.


SVN r1221 (trunk)
2008-09-13 22:08:41 +00:00
Christoph Oelckers 2c74e287a9 - Prefixed all names of CQ decorations with Chex after seeing some conflicts
with PWADs.
- Removed Chex Quest actors that were just unaltered duplicates of Doom's.
- Added detection for Chex Quest 3 IWAD.
- Cleaned up M_QuitGame because the code was almost incomprehensible and I
  wanted to add CQ3's new quit messages.
- Added Chex Quest obituaries and a few other messages from CQ3.
- Fixed: drawbar improperly clipped images when not in the top left quadrant.



SVN r1219 (trunk)
2008-09-13 19:19:53 +00:00
Christoph Oelckers 90e3bef2ab - Fixed: Crouching no longer worked due to a bug introduced by the
player input code.


SVN r1218 (trunk)
2008-09-13 07:22:13 +00:00
Randy Heit 67e65c4ea5 Did not have log saved completely.
SVN r1216 (trunk)
2008-09-13 02:56:37 +00:00
Randy Heit 5cd4604f81 - Added GetPlayerInput() for examining a player's inputs from ACS. Most
buttons are now passed across the network, and there are four new user
  buttons specifically for use with this command. Also defined +zoom
  and +reload for future implementation.

  See http://zdoom.org/files/examples/playerinput.zip for an example.


SVN r1215 (trunk)
2008-09-13 02:55:45 +00:00
Randy Heit 4ffa924929 - Fixed: Hexen's fourth weapon pieces did not play the correct pickup sound,
and when they were fully assembled, they did not play the sound across the
  entire level.


SVN r1213 (trunk)
2008-09-12 01:12:40 +00:00
Randy Heit f08e2949dc - Antialiasing of lines is now controlled solely by the vid_hwaalines cvar,
ignoring what the driver reports, since ATI is apparently just as bad as
  NVidia.


SVN r1212 (trunk)
2008-09-12 00:04:15 +00:00
Randy Heit d22f3ebfa6 - Added a check for D3DLINECAPS_ANTIALIAS, but this is complicated by the
fact that NVidia's don't report it, even though they support it. If there
  are any cards that no longer have antialised lines on the automap, please
  let me know.
- Added vid_hwaalines cvar to force antialiased lines off for the
  Direct3D renderer, in case it doesn't really support them.


SVN r1210 (trunk)
2008-09-10 03:33:02 +00:00
Christoph Oelckers d02097976e - Fixed: The new rolloff values being stored in FSoundChan need to be serialized
for savegames.


SVN r1209 (trunk)
2008-09-09 21:23:09 +00:00
Christoph Oelckers e033cbf9f8 - Since loading of the sound lump is now done in S_LoadSound I added an IsNull
method to the SoundRenderer class so that this function doesn't need to 
  load the sound for the NullSoundRenderer.
- Took some more non-FMOD related code out of fmodsound.cpp, including the
  code that checks for raw and Doom sounds. This means that sfxinfo_t is no
  longer needed in the SoundRenderer class so I took out all references to it.


SVN r1208 (trunk)
2008-09-09 20:49:53 +00:00
Christoph Oelckers 3b35ad2db2 - Fixed: FMODSoundRenderer::StartSound3D must set the static variable pointing
to the rolloff information back to NULL when starting the sound fails.
- Fixed: Rolloff information was taken from the sfxinfo that contained the
  actual sound data, not the one that was used for starting the sound.



SVN r1206 (trunk)
2008-09-09 09:22:47 +00:00
Christoph Oelckers 33c7d5c8d3 - Fixed: Chex Quest's Super Bootspork was missing the pickup message.
SVN r1205 (trunk)
2008-09-07 22:43:40 +00:00
Christoph Oelckers 6766f47801 - Added missing Strife automap colors for items and non-monsters.
SVN r1204 (trunk)
2008-09-07 20:46:11 +00:00
Christoph Oelckers 2df65c70cb - Fixed: GetMSLength didn't resolve random and player sounds.
- Moved sound aliasing code out of fmodsound.cpp into S_LoadSound.


SVN r1203 (trunk)
2008-09-07 14:45:50 +00:00
Christoph Oelckers 9e7bd3f8fa - Fixed: The tagged version of TranslucentLine took the information for additive
translucency from the tagged linedef, not the control linedef.
- Added check for additive translucency to TRANMAP checking.


SVN r1202 (trunk)
2008-09-06 18:09:41 +00:00
Christoph Oelckers 87f0ba0bd2 - Changed listener structure to directly contain the sound environment instead
of getting it from the zone in the low level code.


SVN r1201 (trunk)
2008-09-06 13:00:23 +00:00
Christoph Oelckers bcbd2162b7 - Changed sound interface so that all references to game data like actors
and sectors are done in s_sound.cpp and not in fmodsound.cpp. Also removed
  several 'sector' parameters because they were never used inside the sound code.


SVN r1200 (trunk)
2008-09-06 11:07:27 +00:00
Randy Heit 535f7d92ba - Added the "extended" keyword for episode definitions to define episodes
that are only available in the extended version of Heretic.


SVN r1199 (trunk)
2008-09-06 04:03:53 +00:00
Randy Heit ee6c208917 - Added hexendemo.wad and hexdemo.wad as aliases for the demo Hexen IWAD.
- Added IWAD checks for freedoom1.wad and freedm.wad.


SVN r1198 (trunk)
2008-09-06 03:39:36 +00:00
Randy Heit b77836d4cf - The garbage collector now has an opportunity to step each time individual
thinkers tick, not just once every game tick. This more closely follows
  the original Lua behavior. This change was made because, in cases of
  extremely large and frequent memory allocations, the collector may not run
  fast enough if it only has a chance to execute once per tick.


SVN r1197 (trunk)
2008-09-06 03:03:11 +00:00
Randy Heit ab3363dc1e - Fixed: The "same level" dmflag did not work.
- Changed the nextlevel global var to an FString.


SVN r1196 (trunk)
2008-09-05 02:55:44 +00:00
Christoph Oelckers 49565ccb84 - Fixed: Red blood particles used too dark colors.
- Fixed: The smoothlighting code in side_t::GetLightLevel relied on 
  the global 'linedef' variable for automatic fake contrast although
  this issue had already been fixed for the original code here.
- Replaced static string buffers with FString in FONTDEFS parser.

SVN r1194 (trunk)
2008-09-04 14:09:32 +00:00
Christoph Oelckers 9df27c7afd - Added an 'allcheats' CVAR. This will enable all cheats from all
supported games in any game being played.
- Changed Chex Quest DoomEdNum initilization so that all empty slots 
  are filled with Doom actors if they exist.
- Added missing spawn filters to Chex Quest items.


SVN r1191 (trunk)
2008-09-01 19:45:17 +00:00
Christoph Oelckers 8832b66ce4 - Gave the PlayerPawn base class a default damage fade color instead of
hacking it into the actor when actually used.
- Fixed: The DamageFade color was not saved in savegames.


SVN r1190 (trunk)
2008-09-01 18:16:53 +00:00
Christoph Oelckers dbcc246cf3 - Added Blzut3's patch for a real Chex Quest game mode.
SVN r1188 (trunk)
2008-08-30 19:44:19 +00:00
Christoph Oelckers 3801b9431a - Fixed: SKIP_SUPER doesn't work for inventory items so it must be
disabled for them
- Fixed: Chex Quest doesn't have a HELP2 screen so it must not be used
  in the gameinfo.
- Fixed: Default blood color is no longer red so P_DrawSplash2 must
  get it from the gameinfo instead.
- Added new French language texts by DoomKn1ght_.


SVN r1186 (trunk)
2008-08-29 08:48:51 +00:00
Christoph Oelckers 6a3b4a6c4d - Blood default color is set in the gameinfo now so that Chex Quest
can default to green instead of red.
- Fixed: The version of CheckNumForFullName that checks for a specific
  WAD did not work.
- Moved MAPINFO names into gameinfo structure.
- Added Chex Quest support. Credits go to fraggle for creating a 
  Dehacked patch that does most of the work. The rest includes a new
  MAPINFO and removal of the drop items from the monsters being used.



SVN r1185 (trunk)
2008-08-26 18:32:17 +00:00
Randy Heit 4d56889483 - Added Win64 support to the crash report generator.
SVN r1184 (trunk)
2008-08-24 04:51:15 +00:00
Christoph Oelckers 3638c658d6 - Added and fixed Boss death submission for random spawner.
- Added functions to FActorInfo that can set the damage factors and
  pain chances to reduce the chance of new errors when working with
  these features.
- Fixed: The handling of the deprecated FIRERESIST flag didn't work.
  There were 3 problems:
  * Actor defaults have no class information so HandleDeprecatedFlags
    needs to be passed a pointer to the ActorInfo.
  * The DamageFactors list is only created when needed so the code needs to
    check if it already exists.
  * damage factors are stored as fixed_t but this set a float.
- Added a traditional Strife color set for the automap.


SVN r1183 (trunk)
2008-08-23 08:48:19 +00:00
Randy Heit 0e5587812e - Fixed: Timidity::Renderer::reset_voices() must completely zero the
voices. Because this wasn't done, note_on() could try to access
  the sample for a voice that had never been played yet and access
  random memory. There may be other places where it's a problem, but
  this is where I noticed it, by chance.


SVN r1182 (trunk)
2008-08-23 02:38:00 +00:00
Christoph Oelckers 39bb50376a - Fixed: The conversion of the strings in wbstartstruct_t to FStrings
caused crashes when reloading the hub data.


SVN r1181 (trunk)
2008-08-21 19:06:17 +00:00
Christoph Oelckers 76cb09d546 - Replaced WALLF_AUTOCONTRAST with WALLF_NOFAKECONTRAST so that the
default setting for the flags is 0.
- Added: doom2day's smoothlighting
- Added: dontincrement argument to A_CheckForReload.


SVN r1179 (trunk)
2008-08-21 08:04:21 +00:00
Christoph Oelckers f64862fe75 - Fixed: The UDMF parser wrote class filter bits into SkillFilter.
- Fixed: (SBARINFO patch) DrawInventoryBar has a missing argument in 
  one of its drawgraphic calls.
- Added Gez's patch for Heretic's GIMME cheat.
- Externalized some cheat strings.


SVN r1178 (trunk)
2008-08-21 07:08:55 +00:00
Christoph Oelckers 30685c3a74 - Added Gez's patch for removing MF4_FIRERESIST.
SVN r1177 (trunk)
2008-08-19 19:38:39 +00:00
Christoph Oelckers 371d4704b8 (SBARINFO patch)
- Fixed: DrawBar would not show.
- Fixed: IsSelected took string constants instead of identifiers.

SVN r1176 (trunk)
2008-08-18 19:01:14 +00:00
Christoph Oelckers bc5d0c882b - Put more floor/ceiling properties in sector_t into a substructure and
added wrapper functions.


SVN r1174 (trunk)
2008-08-16 20:19:35 +00:00
Christoph Oelckers fcdef6a0de - Fixed: A_Explode wants the distance parameter as an int, not a fixed_t.
- some minor DECORATE fixes.


SVN r1173 (trunk)
2008-08-16 08:11:39 +00:00
Christoph Oelckers e54c7f6e46 - Fixed: The count parameter of A_Jump is a constant, not an expression.
SVN r1171 (trunk)
2008-08-14 22:58:17 +00:00
Christoph Oelckers 61cbb1d2e1 - Fixed: A_Jump used a wrong index into the jump address table.
- Fixed: The recent changes in the DECORATE parser require the special parameter
  to A_CallSpecial to be an expression, not a constant.
- Removed game filters from old style decorations. No WAD in existence ever 
  used them and removing them allows to make the parser more robust.


SVN r1170 (trunk)
2008-08-14 19:08:38 +00:00
Christoph Oelckers f3922ec6a1 - Added a few more macros so that the action function code doesn't have
to reference its arguments directly, except 'self'. This may be helpful if it 
  becomes necessary to restructure this code once DoomScript becomes real.
- Removed the last remaining global variable related to action functions:
  pStateCall. Everything is passed properly as function arguments now.
- fixed: PlayerChunk was missing the NOSKIN flag.


SVN r1169 (trunk)
2008-08-14 08:52:55 +00:00
Christoph Oelckers 1c034c1150 - Macro-fied access to action function parameters.
- Deactivated debug output code in d_Dehacked.cpp.
- fixed: A_FreezeDeathChunks crashed when a player's head got spawned.


SVN r1168 (trunk)
2008-08-13 22:54:24 +00:00
Christoph Oelckers db5a6e3d24 - fixed: A_CallSpecial must be declared in DECORATE so that a symbol table
entry can be generated for it.


SVN r1167 (trunk)
2008-08-13 14:51:28 +00:00
Christoph Oelckers 4fd717046e - fixed: Dehacked replaced pickups multiple times for changing its states.
- fixed: Dehacked must copy AInventory's state to any item it hacks to be a 
  pickup.
- fixed a few more DECORATE bugs.


SVN r1166 (trunk)
2008-08-13 09:11:19 +00:00
Christoph Oelckers 3cb073a3a0 - Fixed: The chat sound for Strife was misnamed in the gameinfo structure.
- fixed a few DECORATE bugs.


SVN r1165 (trunk)
2008-08-12 23:00:48 +00:00
Christoph Oelckers 65a19e4be7 - Changed the action function declaration parser so that optional parameters
can be given a default value. The 'optional' keyword is no longer needed
  and was removed, as well as 'evalnot'.


SVN r1164 (trunk)
2008-08-12 20:19:47 +00:00
Christoph Oelckers 1957659b1b - Restructured the action function interface to remove the dependence on
the global CallingState variable.


SVN r1163 (trunk)
2008-08-12 14:30:07 +00:00
Christoph Oelckers b1d36182c4 - Changed handling of AUTOPAGE texture so that it is properly inserted into
the texture manager even if it is from Raven's IWADs.
- Removed code related to internal ActorInfo definitions from dobjtype.cpp.
- removed unneeded file dehackedactions.h


SVN r1162 (trunk)
2008-08-12 09:57:59 +00:00
Randy Heit c9187a0e09 - Ported asm_x86_64/tmap3.nas to AT&T syntax so it can be compiled with gas.
After finding out that gas does have directives to describe the .eh_frame
  metadata, I figured that would be significantly easier and quicker than
  trying to locate all the scattered docs I would need to read to figure out
  how to construct it by hand. Unfortunately, this now means I have to
  maintain two versions of exactly the same code. :( (But unless I add 32-bit
  color rendering in the future, the chances that I will have to touch it
  again are quite slim.)



SVN r1159 (trunk)
2008-08-12 02:49:00 +00:00
Christoph Oelckers c02253eef2 - Removed 'eval' modifier from DECORATE. All int, float and bool parameters are
'eval' now by default.


SVN r1155 (trunk)
2008-08-11 22:28:14 +00:00
Christoph Oelckers 8655d027da - DECORATE fixes for Strife.
SVN r1154 (trunk)
2008-08-11 21:05:43 +00:00
Christoph Oelckers 511c9366f7 - Macro-fied all access to action functions.
SVN r1149 (trunk)
2008-08-10 22:48:37 +00:00
Christoph Oelckers 1983b5c586 - Changed action function definition so that they have to be defined with a
DEFINE_ACTION_FUNCTION macro. This should make it easier to improve the
  whole system.


SVN r1148 (trunk)
2008-08-10 20:48:55 +00:00
Christoph Oelckers f4c07c45ec - Removed DECORATE's ParseClass because it was only used to add data to fully
internal actor classes which no longer exist.
- Changed the state structure so that the Tics value doesn't need to be hacked
  into misc1 with SF_BIGTIC anymore. 
- Changed sprite processing so that sprite names are converted to indices 
  during parsing so that an additional postprocessing step is no longer needed.
- Fixed: Sprite names in DECORATE were case sensitive.
- Exported AActor's defaults to DECORATE and removed all code for the 
  internal property parser which is no longer needed.


SVN r1146 (trunk)
2008-08-10 14:19:47 +00:00
Christoph Oelckers 5ea4b37373 - Added an Active and Inactive state for monsters.
- Made the speed a parameter to A_RaiseMobj and A_SinkMobj and deleted
  GetRaiseSpeed and GetSinkSpeed.
- Added some remaining DECORATE conversions for Hexen by Karate Chris.


SVN r1144 (trunk)
2008-08-10 11:29:19 +00:00
Randy Heit 9ad93639c5 - Changed Windows to use the performance counter instead of rdtsc.
SVN r1143 (trunk)
2008-08-10 03:56:53 +00:00
Randy Heit ad96225213 - Changed Linux to use clock_gettime for profiling instead of rdtsc. This
avoids potential erroneous results on multicore and variable speed
  processors. Windows will need to be updated accordingly.



SVN r1142 (trunk)
2008-08-10 03:25:08 +00:00
Christoph Oelckers 023b21a142 - Converted the last of Hexen's inventory items to DECORATE so that I could
export AInventory.
- Added some DECORATE fixes by Gez.

SVN r1138 (trunk)
2008-08-09 17:43:14 +00:00
Christoph Oelckers ae54e13428 IMPORTANT NOTE: I uncommented some code depending on the missing x86.cpp file to allow this to compile, These changes must be reverted as soon as this file is added (see v_palette.cpp and win32/i_system.cpp.)
- Removed AT_GAME_SET because it's no longer used anywhere.
- Converted the last remaining global classes to DECORATE.
- Fixed: Inventory.PickupFlash requires an class name as parameter not an
  integer. Some Hexen definitions got it wrong.
- Converted Hexen's Pig to DECORATE.
- Replaced the ActorInfo definitions of all internal inventory classes with 
  DECORATE definitions.
- Added option to specify a powerup's duration in second by using a negative
  number.


SVN r1137 (trunk)
2008-08-09 11:35:42 +00:00
Randy Heit 67c844df4d - Added Gez's Freedoom detection patch.
SVN r1136 (trunk)
2008-08-09 04:32:56 +00:00
Randy Heit 85a6ae7c34 - SBARINFO update:
* Added: The ability to have drawkeybar auto detect spacing.
  * Added: Offset parameter to drawkeybar to allow two key bars with
    different keys.
  * Added: Multi-row/column keybar parameters.  Spacing can also be auto.
    These  defualt to left to right/top to bottom but can be switched.
  * Added: Drawshadow flag to drawnumber.  This will draw a solid color and
    translucent number under the normal number.
  * Added: hexenarmor to drawimage.  This takes a parameter for a hexen
    armor type and will fade the image like the hexen status bar.
  * Added: centerbottom offset to draw(switchable)image.
  * Added: translucent flag to drawinventorybar.
  * Fixed: Accidentally removed flag from DrawTexture that allowed negative
    coordinates to work with fullscreenoffsets.  Hopefully this is the last
    major bug in the fullscreenoffsets system.


SVN r1135 (trunk)
2008-08-09 03:43:29 +00:00
Randy Heit dda5ddd3c2 - Ported vlinetallasm4 to AMD64 assembly. Even with the increased number of
registers AMD64 provides, this routine still needs to be written as self-
  modifying code for maximum performance. The additional registers do allow
  for further optimization over the x86 version by allowing all four pixels
  to be in flight at the same time. The end result is that AMD64 ASM is about
  2.18 times faster than AMD64 C and about 1.06 times faster than x86 ASM.
  (For further comparison, AMD64 C and x86 C are practically the same for
  this function.) Should I port any more assembly to AMD64, mvlineasm4 is the
  most likely candidate, but it's not used enough at this point to bother.
  Also, this may or may not work with Linux at the moment, since it doesn't
  have the eh_handler metadata. Win64 is easier, since I just need to
  structure the function prologue and epilogue properly and use some
  assembler directives/macros to automatically generate the metadata. And
  that brings up another point: You need YASM to assemble the AMD64 code,
  because NASM doesn't support the Win64 metadata directives.
- Added an SSE version of DoBlending. This is strictly C intrinsics.
  VC++ still throws around unneccessary register moves. GCC seems to be
  pretty close to optimal, requiring only about 2 cycles/color. They're
  both faster than my hand-written MMX routine, so I don't need to feel
  bad about not hand-optimizing this for x64 builds.
- Removed an extra instruction from DoBlending_MMX, transposed two
  instructions, and unrolled it once, shaving off about 80 cycles from the
  time required to blend 256 palette entries. Why? Because I tried writing
  a C version of the routine using compiler intrinsics and was appalled by
  all the extra movq's VC++ added to the code. GCC was better, but still
  generated extra instructions. I only wanted a C version because I can't
  use inline assembly with VC++'s x64 compiler, and x64 assembly is a bit
  of a pain. (It's a pain because Linux and Windows have different calling
  conventions, and you need to maintain extra metadata for functions.) So,
  the assembly version stays and the C version stays out.
- Removed all the pixel doubling r_detail modes, since the one platform they
  were intended to assist (486) actually sees very little benefit from them.
- Rewrote CheckMMX in C and renamed it to CheckCPU.
- Fixed: CPUID function 0x80000005 is specified to return detailed L1 cache
  only for AMD processors, so we must not use it on other architectures, or
  we end up overwriting the L1 cache line size with 0 or some other number
  we don't actually understand.


SVN r1134 (trunk)
2008-08-09 03:13:43 +00:00
Christoph Oelckers 14e94b86e2 - Replaced the ActorInfo definitions of several internal classes with DECORATE definitions
SVN r1133 (trunk)
2008-08-08 22:52:04 +00:00
Christoph Oelckers ef2c9243c5 - Converted teleport fog and destinations to DECORATE.
- AActor::PreExplode is gone now that the last item that was using it has been converted.
- Converted the Sigil and the remaining things in a_strifeitems.cpp to DECORATE.


SVN r1132 (trunk)
2008-08-08 19:47:18 +00:00
Christoph Oelckers bd50321357 - Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
SVN r1131 (trunk)
2008-08-08 16:16:40 +00:00
Christoph Oelckers e010561088 - Changed increased lightning damage for Centaurs into a damage factor.
- Changed PoisonCloud and Lightning special treatment in P_DamageMobj to use damage
  types instead to keep dependencies on specific actor types out of the main engine code.
- Added Korax DECORATE conversion by Gez and a few others by Karate Chris.


SVN r1130 (trunk)
2008-08-08 15:18:23 +00:00
Christoph Oelckers b695330e90 - Removed FourthWeaponClass and based Hexen's fourth weapons on the generic weapon
pieces.
- Added DECORATE conversions for Hexen's Fighter weapons by Karate Chris.
- Added aWeaponGiver class to generalize the standing AssaultGun.
- converted a_Strifeweapons.cpp to DECORATE, except for the Sigil.


SVN r1129 (trunk)
2008-08-08 10:24:08 +00:00
Christoph Oelckers 6b3325b358 - Converted the rest of a_strifestuff.cpp to DECORATE.
- Fixed: AStalker::CheckMeleeRange did not perform all checks of AActor::CheckMeleeRange.
  I replaced this virtual override with a new flag MF5_NOVERTICALMELEERANGE so that
  this feature can also be used by other actors.
- Converted Strife's Stalker to DECORATE.
- Converted ArtiTeleport to DECORATE.


SVN r1126 (trunk)
2008-08-07 20:16:07 +00:00
Christoph Oelckers 0e009ff18a - Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor.
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
  the burning hand states to StrifePlayer where they really belong.


SVN r1125 (trunk)
2008-08-07 17:45:35 +00:00
Christoph Oelckers 269a54a258 - Added more DECORATE conversions by Karate Chris.
SVN r1124 (trunk)
2008-08-07 15:46:52 +00:00
Christoph Oelckers 0ad1bfe87e - Added Gez's dropammofactor submission with some necessary changes. Also merged
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
- Restricted native action function definitions to zdoom.pk3.


SVN r1123 (trunk)
2008-08-07 08:18:48 +00:00
Christoph Oelckers 344f1072a6 - Fixed. The Firedemon was missing a game filter.
SBARINfO update:
- Added: disablegrin, disableouch, disablepain, and disablerampage flags to
  drawmugshot.
- Fixed: LowerHealthCap did not work properly.
- Fixed: Various bugs I noticed in the fullscreenoffsets code.

SVN r1122 (trunk)
2008-08-07 07:17:29 +00:00
Christoph Oelckers 535f209560 - Converted Strife's Programmer, Loremaster and Thingstoblowup to DECORATE.
- Fixed: Attacking a merchant in Strife didn't alert the enemies.


SVN r1121 (trunk)
2008-08-06 22:59:24 +00:00
Christoph Oelckers bf281a4372 - Removed AT_GAME_SET(PowerInvulnerable) due to the problems it caused. The two
occurences in the code that depended on it were changed accordingly.
  Invulnerability colormaps are now being set by the items exclusively.
- Changed many checks for the friendly Minotaur to a new flag MF5_SUMMONEDMONSTER
  so that it can hopefully be generalized to be usable elsewhere later.
- Added Gez's submission for converting the Minotaur to DECORATE.


SVN r1120 (trunk)
2008-08-06 19:25:59 +00:00
Randy Heit efb8ffc459 - The x87 precision control is now explicitly set for double precision, since
GCC defaults to extended precision instead, unlike Visual C++.
- Removed the useless src/Linux directory from the repository. This was a
  holdover from the long-gone 1.22 build system.



SVN r1118 (trunk)
2008-08-06 18:26:25 +00:00
Christoph Oelckers c8538efda9 - Fixed a few minor DECORATE bugs.
- Changed coordinate storage for EntityBoss so that it works properly even
  when the pod is not used to spawn it.
- Converted Strife's Spectres and Entity to DECORATE.


SVN r1117 (trunk)
2008-08-06 17:49:22 +00:00
Christoph Oelckers 3908c71510 (SBARINfO update)
- Added: fullscreenoffsets flag for status bars.  This changes the coordinate
  system to be relative to the top left corner of the screen.  This is useful
  for full screen status bars.
- Changed: drawinventorybar will use the width of artibox or invcurs (strife)
  to determine the spacing.  Let me know if this breaks any released mods.
- Fixed: If a status bar height of 0 was specified in SBarInfo the wrong bar
  would be shown.
- Fixed: If a static inventory bar was used the user still had to press invuse
  in order to get rid of the "overlay".
- Fixed: forcescaled would not work if the height of the bar was 0.
- Added: keyslot to drawswitchableimage.
- Fixed: The transition effects for the log and keys popups were switched.


SVN r1116 (trunk)
2008-08-06 07:38:21 +00:00
Christoph Oelckers 4f0fa50773 - Converted Strife's Crusader, Inquisitor and spectral missiles to
DECORATE.


SVN r1114 (trunk)
2008-08-05 22:51:51 +00:00
Christoph Oelckers fe2e64aa40 - Converted Strife's Acolytes, Rebels, Sentinel, Reaver and Templar to
DECORATE.


SVN r1113 (trunk)
2008-08-05 17:58:38 +00:00
Christoph Oelckers 43715c5249 - Added DECORATE conversions for Hexen's Cleric weapons by Karate Chris.
- Added a check to Zipdir that excludes files with a .orig extension. These
  can be left behind by patch.exe and create problems.
- fixed: Unmorphing from chicken caused a crash when reading non-existent
  meta-data strings.


SVN r1112 (trunk)
2008-08-05 16:04:37 +00:00
Christoph Oelckers 4a9e70f1d2 - Converted the ScriptedMarines to DECORATE.
- Fixed: DLightTransfer and DWallLightTransfer were declared as actors.

SVN r1111 (trunk)
2008-08-05 13:50:57 +00:00
Christoph Oelckers d5cc9e01d0 - Converted the PhoenixRod and associated classes to DECORATE to make
the Heretic conversion complete.


SVN r1110 (trunk)
2008-08-04 22:30:45 +00:00
Christoph Oelckers b2a6bed19f - Converted the Minotaur's projectiles to DECORATE so that I can get
rid of the AT_SPEED_SET code.
- Converted Heretic's Blaster and SkullRod to DECORATE.


SVN r1109 (trunk)
2008-08-04 19:25:13 +00:00
Christoph Oelckers affd0e5034 - Converted the mace and all related actors to DECORATE and generalized
the spawn function that only spawns one mace per level.
- Moved Mace respawning code into AInventory so that it works properly
  for replacement actors.


SVN r1107 (trunk)
2008-08-03 19:10:48 +00:00
Christoph Oelckers 11fbfc5b1f - Added more DECORATE conversions by Karate Chris.
SVN r1106 (trunk)
2008-08-03 16:13:23 +00:00
Christoph Oelckers bf0ee1342c - Cleaned up the new bridge code and exported all related actors to
DECORATE so that the exported code pointers can be used.
- Separated Heretic's and Hexen's invulnerability items for stability 
  reasons.


SVN r1105 (trunk)
2008-08-03 12:00:36 +00:00
Randy Heit 9f21b22cc5 - Fixed spurious warnings on 32-bit VC++ debug builds.
- Made the subsong (order) number a proper parameter to MusInfo::Play()
  instead of requiring a separate SetPosition() call to do it.



SVN r1104 (trunk)
2008-08-03 03:54:48 +00:00
Christoph Oelckers 8d3e67ac88 - Added Gez's submission for custom bridge things.
- Fixed: ASpecialSpot must check the array's size before dividing by it.


SVN r1103 (trunk)
2008-08-02 16:17:19 +00:00
Christoph Oelckers 76a0086744 - Fixed: The mugshot drawe ignored the accuracy parameter.
- Fixed: The Alt HUD's weapon drawer didn't check properly for invalid icons.


SVN r1102 (trunk)
2008-08-02 10:51:00 +00:00
Christoph Oelckers fddf69e950 - Added DECORATE conversions for Hexen's Cleric Mace, Firedemon and fog by
Karate Chris.
- Added several type checks to the weapon slot code.
- Changed: Players no longer respawn in instant death sectors with 
  the 'Respawn where died' flag on.


SVN r1101 (trunk)
2008-08-02 08:38:07 +00:00
Randy Heit bb0759f575 - Fixed: Attempting to load 0-length sounds caused a crash.
SVN r1100 (trunk)
2008-07-31 23:09:58 +00:00
Randy Heit fb40f5f711 - Removed filename-lowercasing from zipdir.
SVN r1099 (trunk)
2008-07-31 22:11:55 +00:00
Randy Heit 35b40534fe - Fixed: The ouch face fix was lost when SBARINFO mugshot became the only
mugshot present.


SVN r1098 (trunk)
2008-07-31 18:51:15 +00:00
Randy Heit 21a7564c98 - Fixed: Mace SpawnID was assigned to the MacePowered actor instead.
- Fixed: Sorcerer2FX1's SpawnID was not restricted to Heretic.


SVN r1097 (trunk)
2008-07-31 18:08:30 +00:00
Randy Heit e15416dc71 - Applied Blzut3's 5:4 SBARINFO patch. (At least I think that's what it's
for.)



SVN r1095 (trunk)
2008-07-25 02:36:25 +00:00
Randy Heit 2ce3e1dd6a - Corrected the revision_check target so that it always checks the revision,
not just when src/svnrevision.h is not present.



SVN r1093 (trunk)
2008-07-25 01:41:31 +00:00
Randy Heit de5d4715c2 - Added Linux support for the CMakeLists. This meant downgrading them for
CMake 2.4, since the distros don't seem to consider 2.6 stable yet.
  As a bonus, GTK+ is no longer a required dependency; now it's optional.
- Made dehsupp ignore CR characters, so it doesn't spew warnings on Linux.



SVN r1092 (trunk)
2008-07-25 01:37:44 +00:00
Randy Heit 2f7b7673f8 - Fixed zipdir for Windows.
SVN r1090 (trunk)
2008-07-24 22:20:58 +00:00
Christoph Oelckers 47d8a41540 - Fixed: Thew sounds of Strife's intro need CHAN_UI.
- Changed all instances of playing the chat sounds to use CHAN_UI.


SVN r1085 (trunk)
2008-07-23 19:39:01 +00:00
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 c5e62a577f - Added MF4_BOSSDEATH to the Minotaur.
- Fixed: The boss brain looped to the wrong state.


SVN r1080 (trunk)
2008-07-21 19:52:38 +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 b030682834 - Fixed: When copying visplanes the sky texture was forgotten.
SVN r1077 (trunk)
2008-07-20 17:52:12 +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 6d9b897681 - fixed: Textures marked as complex must not redirect to the base patch.
- fixed: Alpha for composite textures was not applied.
- fixed: The CentaurMash didn't inherit from the Centaur.
- added some NULL pointer checks to the sound code.


SVN r1075 (trunk)
2008-07-20 08:34:24 +00:00
Christoph Oelckers 5dc42121b7 - Fixed: When Heretic's Mace was replaced by a non-child class A_SpawnMace still
treated it as a mace and wrote into some undefined memory.
- Fixed: A_BishopMissileWeave didn't initialize special2 for proper movement.
- Added a speed parameter to A_SkullAttack.
- Fixed: Black as first or only blood color didn't work.
- Fixed: Sounds played in wi_stuff.cpp and f_finale.cpp need the CHAN_UI flag.
- Fixed: Spawning a player could play the *gasp sound.
- Fixed: SBARINFO's health display didn't scale to the proper maximum.
- Added Skulltag's Teleport_NoStop action special.


SVN r1074 (trunk)
2008-07-19 12:40:10 +00:00
Christoph Oelckers a5c52d8371 SVN r1072 (trunk) 2008-07-15 17:02:16 +00:00
Christoph Oelckers c4a1ca2ac8 - Fixed: Friendly spectral monsters should be able to hurt unfriendly ones
and vice versa.
- Fixed: In deathmatch specral missiles spawned by players should hurt other
  players.
- Fixed: SpectralLightningBigBall didn't set the proper owner for the lightning
  projectiles it spawned.
- Changed the EntityBoss's attack function to call the equivalent spectre
  functions instead of duplicating their code.
- Gave many of Strife's code pointers that only had a number as name more
  meaningful names. 
- Fixed: All spectral attacks must set 'health' first before P_CheckMissileSpawn
  is called.


SVN r1071 (trunk)
2008-07-12 10:59:36 +00:00
Christoph Oelckers d0031b7fe7 - Added a compatibility option to play sector sounds from the precalculated
center because some maps apparently abuse the behavior to make the sound
  play somewhere where it can't be heard by the player to fake silent movement.
- Fixed: The S_Sound variant taking an actor must check if the actor is not
  NULL.
- Fixed: ACS's ActivatorSound must check if the activator is valid.
- Changed stats drawing so that multi-line strings can be used.


SVN r1070 (trunk)
2008-07-12 08:16:19 +00:00
Randy Heit 87d7b3601a - Added a check to G_DoSaveGame() to prevent saving when you're not actually
in a level.
- Fixed: Serialized player data must always be loaded, even if it's simply to
  be discarded, so that anything serialized after the players will load from
  the correct position in the file when revisiting a hub map.


SVN r1069 (trunk)
2008-07-06 03:52:53 +00:00
Christoph Oelckers 448b8955c5 - Changed: AInventory::Tick now only calls the super method if the item is not
owned. Having owned inventory items interact with the world is not supposed
  to happen.
- Fixed: case PCD_SECTORDAMAGE in p_acs.cpp was missing a terminating 'break'.
- Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.


SVN r1068 (trunk)
2008-07-05 19:06:30 +00:00
Christoph Oelckers d2f1515aa6 - Fixed: When a weapon is destroyed, its sister weapon must also be destroyed.
- Added a check for PUFFGETSOWNER to A_BFGSpray.
- Moved the PUFFGETSOWNER check into P_SpawnPuff and removed the limitation
  to players only.
- Fixed: P_SpawnMapThing still checked FMapThing::flags for the class bits 
  instead of FMapThing::ClassFilter.
- Fixed: A_CustomMissile must not let P_SpawnMissile call P_CheckMissileSpawn.
  It must do this itself after setting the proper owner.
- Fixed: CCMD(give) increased the total item count.
- Fixed: A_Stop didn't set the player specific variables to 0.


SVN r1066 (trunk)
2008-07-05 10:17:10 +00:00
Randy Heit 78890d57bc - Fixed: Screenwipes now pause sounds, since there can be sounds playing
during it.
- UI sounds are now omitted from savegames.
- Fixed: Menu sounds had been restricted to one at a time again.
- Moved the P_SerializeSounds() call to the end of G_SerializeLevel() so that
  it will occur after the players are loaded.
- Added fixes from FreeBSD for 0-length and very large string buffers
  passed to myvsnprintf.


SVN r1063 (trunk)
2008-07-05 03:32:44 +00:00
Randy Heit 0632a35b18 - Rewrote myvsnprintf to use the StringFormat routines directly so that no
additional memory needs to be allocated from the heap.


SVN r1062 (trunk)
2008-07-02 18:08:06 +00:00
Randy Heit 7ed0311221 - Polyobject sounds now play from their lines, similar to the way sector
sounds are handled.
- Why do polyobjects have a 3D start spot? Flattened it to 2D.
- Moved the sector sound origin calculation out of fmodsound.cpp and into
  s_sound.cpp so that the near sound limiting will use the correct sound
  location for deciding on neighbors.


SVN r1061 (trunk)
2008-07-02 03:50:17 +00:00
Randy Heit a3e8a0cefd - Removed the S_Sound() variant that allows for pointing the origin at an
arbitrary point. It has been replaced with a variant that takes a polyobject
  as a source, since that was the only use that couldn't be rewritten with the
  other variants. This also fixes the bug that polyobject sounds were not
  successfully saved and caused a crash when reloading the game. Note that
  this is a significant change to how equality of sound sources is determined,
  so some things may not behave quite the same as before. (Which would be a
  bug, but hopefully everything still sounds the same.)


SVN r1059 (trunk)
2008-07-01 04:06:56 +00:00
Randy Heit 601a6ad04c - Adjusted the noise debug table so that fractional volume levels do not
run into the adjacent columns.
- Added a NullSoundRenderer so that most of the checks against a NULL GSnd
  can be removed.
- Fixed: Looping sounds must always successfully allocate a channel, even if
  it's only a pre-evicted channel.


SVN r1058 (trunk)
2008-07-01 01:28:22 +00:00
Christoph Oelckers ac32bd72bb - Added A_ClearReFire code pointer for weapons. Preferably A_WeaponReady should
reset this counter but that can't be done due to unwanted side effects with
  existing weapons.
- Changed the 'scale' variable in CVAR(turbo) to double because the calculations
  depended on the current floating point precision setting and only worked properly
  when set to 'precise' in VC++.


SVN r1057 (trunk)
2008-06-30 23:30:06 +00:00
Christoph Oelckers 2afac5c716 - Changed: I_Error and I_FatalError now use ZDoom's internal string formatting
code to process their messages. This was necessary to handle the %zu format
  option used in some memory allocation failure messages.
- Fixed: The flat texture scaling action specials were completely broken.


SVN r1056 (trunk)
2008-06-29 08:42:07 +00:00
Randy Heit d0b2c41270 - The sound code now handles restarting looping sounds itself. As far as
the rest of the game is concerned, these sounds will never stop once they
  have been started until they are explicitly stopped. If they are evicted
  from their channels, the sound code will restart them as soon as possible.
  This means that instead of this:
	if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1))
	{
		S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
	}
  The following is now just as effective:
	S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
  There are also a couple of other ramifications presented by this change:
    * The full state of the sound system (sans music) is now stored in save
      games. Any sounds that were playing when you saved will still be
      playing when you load. (Try saving while Korax is making a speech in
      Hexen to hear it.)
    * Using snd_reset will also preserve any playing sounds.
    * Movie playback is disabled, probably forever. I did not want to 
      update the MovieDisable/ResumeSound stuff for the new eviction
      tracking code. A properly updated movie player will use the VMR,
      which doesn't need these functions, since it would pipe the sound
      straight through the sound system like everything else, so I decided
      to dump them now, which leaves the movie player in a totally unworkable
      state.

June 26, 2008
- Changed S_Sound() to take the same floating point attenuation that the
  internal S_StartSound() uses. Now ambient sounds can use the public
  S_Sound() interface.
- Fixed: S_RelinkSound() compared the points of the channels against the
  from actor's point, rather than checking the channels' mover.
- Changed Strife's animated doors so that their sounds originate from the
  interior of the sector making them and not from the entire vertical height
  of the map.


SVN r1055 (trunk)
2008-06-29 04:19:38 +00:00
Christoph Oelckers 82dbebc3f1 - Removed some unused constant definitions from sc_man.cpp.
- Fixed: A_FireBlasterPL2 played the weapon sound with the missile as origin
  instead of the shooting player.


SVN r1053 (trunk)
2008-06-28 21:46:26 +00:00
Christoph Oelckers 0fc5a541b3 - Fixed: Dead players didn't get the MF_CORPSE flag set.
- Fixed: The internal definition of Floor_LowerToNearest had incorrect parameter
  settings.
- Fixed: Heretic's ActivatedTimeBomb had the same spawn ID as the inventory item.
- fixed: Heretic's mace did not have its spawn ID set.


SVN r1052 (trunk)
2008-06-28 12:24:15 +00:00
Randy Heit e391fe1aeb - For controls that are not bound, the customize controls menu now displays
a black --- instead of ???.


SVN r1050 (trunk)
2008-06-26 17:55:48 +00:00
Randy Heit 1b835d46c1 - Applied Gez's BossBrainPatch3.
SVN r1049 (trunk)
2008-06-26 17:32:48 +00:00
Randy Heit 0669fb675f - Fixed: P_BulletSlope() did not return the linetarget. This effected
the Sigil, A_JumpIfCloser, and A_JumpIfTargetInLOS.


SVN r1048 (trunk)
2008-06-26 17:25:55 +00:00
Randy Heit bb689ba3c9 - Fixed all the new warnings tossed out by GCC 4.3.
SVN r1047 (trunk)
2008-06-25 22:16:04 +00:00
Randy Heit 9c6e40e192 - Fixed: PickNext/PrevWeapon() did not check for NULL player actors.
SVN r1046 (trunk)
2008-06-24 03:32:28 +00:00
Randy Heit 1462e5efa4 - Fixed compilation issues with GCC.
- Removed special case for nobotnodes in MAPINFO.


SVN r1045 (trunk)
2008-06-24 02:56:27 +00:00
Christoph Oelckers 4ff07b68ee - Added support for ST's QUARTERGRAVITY flag.
- Added a generalized version of Skulltag's A_CheckRailReload function.
- Fixed: DrawImage didn't take 0 as a valid image index.
- Added Gez's RandomSpawner submission with significant changes.
- Added optional blocks for MAPINFO map definitions. ZDoom doesn't use
  this feature itself but it allows other ports based on ZDoom
  to implement their own sets of options without making such a MAPINFO 
  unreadable by ZDoom.


SVN r1044 (trunk)
2008-06-22 09:13:19 +00:00
Christoph Oelckers b899fbeabe - Fixed: Picking up a weapon would sometimes not activate the grin.
SVN r1043 (trunk)
2008-06-16 23:43:31 +00:00
Christoph Oelckers a86774fcdd - Changed: Line_SetIdentification will ignore extended parameters when
used in maps defined Hexen style in MAPINFO.


SVN r1042 (trunk)
2008-06-16 22:38:23 +00:00
Christoph Oelckers e3a6507381 - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound.
SVN r1041 (trunk)
2008-06-16 19:36:48 +00:00
Christoph Oelckers de53c3cd4c - Fixed: UseType was not properly set for textures defined in TEXTURES.
- Fixed: You couldn't set an offset for sprites defined in TEXTURES.
- Fixed some problems with last revision.

SVN r1040 (trunk)
2008-06-16 07:40:28 +00:00
Christoph Oelckers d4c8cdf45a - Added read barriers to all actor pointers within player_t except for
mo, ReadyWeapon and PendingWeapon.


SVN r1039 (trunk)
2008-06-16 07:10:08 +00:00
Christoph Oelckers 7a215e538a - Added a read barrier to player_t::PrewmorphWeapon.
- Fixed: After spawning a deathmatch player P_PlayerStartStomp must
  be called.
- Fixed: SpawnThings must check if the players were spawned before
  calling P_PlayerStartStomp.


SVN r1038 (trunk)
2008-06-15 23:09:01 +00:00
Christoph Oelckers 8ca7c05e9d - Changed FImageCollection to return translated texture indices so
that animated icons can be done with it.
- Changed FImageCollection to use a TArray to hold its data.
- Fixed: SetChanHeadSettings did an assignment instead of comparing
  the channel ID witg CHAN_CEILING.
- Changed sound sequence names for animated doors to FNames.
- Automatically fixed: DCeiling didn't properly serialize its texture id.
- Replaced integers as texture ID representation with a specific new type
  to track down all potentially incorrect uses and remaining WORDs used
  for texture IDs so that more than 32767 or 65535 textures can be defined.


SVN r1036 (trunk)
2008-06-15 18:36:26 +00:00
Randy Heit 7c40cf9ce0 - Increased the duration of respawn invulnerability by one second.
- DF2_YES_RESPAWN_INVUL and DF_FORCE_RESPAWN now apply to all multiplayer 
  games, not just deathmatch, without the need for turning on
  alwaysapplydmflags.
- Fixed: DF2_YES_RESPAWN_INVUL only worked in deathmatch, even with
  alwaysapplydmflags turned on.
- Fixed: DF_COOP_LOSE_ARMOR did not empty the starting armor items.


SVN r1035 (trunk)
2008-06-15 03:46:04 +00:00
Randy Heit 9e42cdaf08 - Replaced the naive area sound implementation with one that takes into
consideration the size and shape of the sector producing the sound. See
  the lifts on Doom 2 MAP30 and compare with previous versions.
- Fixed: The stop sound for sector-based sound sequences was not played with
  the CHAN_AREA flag.
- Removed the distinction between S_Sound() and S_SoundID() functions. Use
  S_Sound() for both names and IDs from now on.


SVN r1034 (trunk)
2008-06-15 02:25:09 +00:00
Christoph Oelckers 0e6e1da970 - Fixed: The UDMF parser stored plane rotation angles as fixed_t, not angle_t.
- Grouped the sector plane texture transformation options into a separate
  structure and replaced all access to them with wrapper functions.


SVN r1033 (trunk)
2008-06-14 15:26:16 +00:00
Randy Heit 4a1cb412f1 - Add environment 255, 255 as a way to get the software underwater effect in
any zone you want.
- Using a too-recent version of FMOD now gives an error, since there may be
  breaking changes to the API from one version to the next (excluding
  revisions in stable branches, which only represent bug fixes).
- Updated fmod_wrap.h for FMOD 4.16 and corrected a bug that had gone
  unnoticed before: The delayhi and delaylo parameters for Channel::setDelay()
  and getDelay() were swapped.


SVN r1032 (trunk)
2008-06-12 23:47:27 +00:00
Christoph Oelckers 3397266e0f - Fixed: P_ChangeSector could incorrectly block movement when checking for
mid textures linked to a moving floor.
- Fixed AActor's bouncefactor definitions which I accidentally changed when
  adding wallbouncefactor.
- Fixed: A_SpawnItemEx added the floorclip offset to the z coordinate instead 
  of subtracting it.


SVN r1031 (trunk)
2008-06-12 10:08:50 +00:00
Christoph Oelckers 70ff0e8d2e - Fixed: SBARINFO's popup code used 1-based indices to address a C++ array.
SVN r1030 (trunk)
2008-06-11 23:12:27 +00:00
Christoph Oelckers decba274bf - Fixed: ACS's ChangeSky command didn't clean up the stack.
SVN r1029 (trunk)
2008-06-11 21:03:32 +00:00
Christoph Oelckers 1eb91fddcd - Fixed: Wall scrolling interpolations incremented their reference count twice.
- Fixed: Before a level's thinkers are loaded all previous interpolations must
  be cleared.
- Fixed: deleted interpolations didn't NULL the pointer in the interpolated
  object. Also added all interpolation pointers to DSectorMarker to ensure
  that they are properyl processed by the garbage collector.


SVN r1028 (trunk)
2008-06-11 12:17:45 +00:00
Christoph Oelckers 4e7a6c54ef - Added scaling to double size for idmypos display.
- Changed: Players don't telefrag when they are spawned now but after all
  actors have been spawned to avoid accidental voodoo doll telefragging.
- Fixed: ACS scripts for non-existent maps were started on the current one.
- Added a 'wallbouncefactor' property to AActor.
- Reverted forceunderwater change from r1026 and fixed the problem for real:
  SECF_FORCEDUNDERWATER only has meaning when coming from the heightsec.
  So the initial check of the current sector in AActor::UpdateWaterLevel
  must only check for SECF_UNDERWATER, not SECF_UNDERWATERMASK.

SVN r1027 (trunk)
2008-06-10 09:16:01 +00:00
Randy Heit 2ca601eed1 - Dehacked fix discovered by entryway: Dehacked only changes the blue armor's
armortype. It does not touch the armor given by the megasphere.
- Changed forcewater handling so that only control sectors created by one-
  sided lines become swimmable, since there's a good chance that a two-sided
  line is creating the control sector out of a normal, accessible portion of
  the map. (See e.g. linedef 29242 of zdoomcmp1.)


SVN r1026 (trunk)
2008-06-10 01:27:24 +00:00
Randy Heit e203ccda20 - Added self-modifying code notifications for Valgrind.
Build with make VALGRIND=1 to turn them on.



SVN r1025 (trunk)
2008-06-08 02:31:30 +00:00
Randy Heit 000f3e0ef1 - Fixed: There was still an inventory bar check in FMugShot::GetFace() after
separating it from DDoomStatusBar.


SVN r1024 (trunk)
2008-06-06 23:41:05 +00:00
Randy Heit cf9ce3b054 - Fixed: When following links in S_StartSound(), the function used sfx
instead of S_Sfx as the array base for getting the NearLimit.


SVN r1023 (trunk)
2008-06-06 02:34:14 +00:00
Randy Heit 2e28b0c9ce - Repositioned the declaration of the file string in D_DoomMain() so that it
won't be left on the stack at exit.
- Fixed: PSymbol needs a virtual destructor so that PSymbolActionFunction can
  free its Arguments.
- Symbols for native classes are now freed on exit.


SVN r1022 (trunk)
2008-06-06 02:17:28 +00:00
Randy Heit a4dc93fb91 - Removed the 8-character limit on endpic names from the parser. (Though it
might still be present in the texture manager; I don't remember.)
- Fixed: EndSequence needs a proper constructor.
- Some more GCC warning removals.



SVN r1021 (trunk)
2008-06-05 04:30:18 +00:00
Christoph Oelckers a4337e5b24 - Fixed: The EndSequence structure was not fully initialized.
SVN r1019 (trunk)
2008-06-04 20:23:02 +00:00
Christoph Oelckers acab6d9b30 - While doing the interpolation rewrite I noticed that DScroller and DPolyAction
were doing some things in their destructor that needed to be done in the
  Destroy method.
- Rewrote the interpolation code. Interpolations are no longer some objects
  that are separate from the rest of the engine. Instead, they are owned by
  the thinkers starting them. Also, polyobjects only spawn a single interpolation
  for each polyobject instead of a single one for each vertex.
  Also, different types of interpolation objects are used for different types
  of interpolation so that they can do some additional work if eventually needed.


SVN r1018 (trunk)
2008-06-04 17:53:15 +00:00
Christoph Oelckers 7ab48d2de6 - Fixed: MAPINFO's 'lookup' option should only work for actual strings but
not for lump and file names.


SVN r1017 (trunk)
2008-06-03 21:35:30 +00:00
Christoph Oelckers 8a3edf9716 - Added a few 'activator == NULL' checks to some ACS functions.
- Added line and vertex lists to polyobjects so that I can do some 
  changes that won't work with only a seg list being maintained.


SVN r1016 (trunk)
2008-06-03 14:38:42 +00:00
Christoph Oelckers 165875c7df - Fixed: Drawing the amount of an inventory item in the player's inventory did
not work
- Added: PowerupTime to drawnumber and drawbar.  You must specify a
  powerupgiver.  Although drawnumber goes in seconds the powerup has left
  drawbar will use ticks for extra accuracy.
- I have increased cross-port compatibility with Skulltag.  If an unknown
  game mode is provided for sbarinfo's gamemode command it will ignore it and
  continue.


SVN r1015 (trunk)
2008-06-03 07:21:11 +00:00
Christoph Oelckers 29380f70b3 - Added an option to consider intermission screens gameplay for purposes of
capturing the mouse.
- Changed: Telefragging should not thrust the victim if it isn't in precisely the
  same position as the killer.
- fixed: A_SpawnItemEx must call P_TeleportMove before checking the spawned
  object's position.


SVN r1014 (trunk)
2008-06-02 16:56:53 +00:00
Christoph Oelckers 8d5d742287 - Fixed: Ouch state was far to easy to achieve.
SVN r1013 (trunk)
2008-06-01 22:41:46 +00:00
Christoph Oelckers 47aacc45c8 - Made all the basic texture classes local to their implementation.
They are not needed anywhere else.
- Changed the HackHack hack for corrupt 256 pixel high textures that
  FMultiPatchTexture only calls a virtual function instead of doing any
  type checks of the patch itself.
- Cleaned up the constant definitions in doomdata.h.
- Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp
  because they are used only in this one file.
- Removed some more typedefs from r_defs.h and doomdata.h
- Moved local polyobject data definitions from p_local.h to po_man.cpp.


SVN r1012 (trunk)
2008-06-01 20:43:02 +00:00
Christoph Oelckers 71b0d4d074 - Renamed player_s to player_t globally to get rid of the duplicate names for this class.
SVN r1011 (trunk)
2008-06-01 07:52:33 +00:00
Randy Heit ff43b7e913 - Added coordinate range checking to DCanvas::ParseDrawTextureTags() to avoid
potential crashes in the situation that con_scaletext is 2 and somebody
  uses a hud message as if a hud size was specified, but forgot to actually
  set the hud size.


SVN r1010 (trunk)
2008-06-01 04:09:49 +00:00
Randy Heit 4850a98c13 - Consolidated the mug shot code shared by DSBarInfo and DDoomStatusBar
into a single place.
- Fixed: Setting an invalid mug shot state crashed the game.
- Fixed my attempts to be clever with strings yesterday.


SVN r1009 (trunk)
2008-06-01 03:35:47 +00:00
Randy Heit 6a264daa04 - Fixed: DDoomStatusBar::UpdateState() needed the same fix as DSBarInfo::updateState(), since it
received a code infusion from there.

SVN r1007 (trunk)
2008-05-31 03:49:56 +00:00
Randy Heit ded428230d - If an actor's current target temporarily goes unshootable, its threshold
is now reset to 0, so it will more readily switch back to it.


SVN r1006 (trunk)
2008-05-31 03:39:57 +00:00
Randy Heit d657e31a8c - Fixed: Deactivating the game no longer allows reverb effects to continue
playing while the sound is paused.


SVN r1005 (trunk)
2008-05-31 02:18:09 +00:00
Randy Heit 0395b26d23 - Fixed: S_StartNamedSound() looked for SECF_SILENT in MoreFlags instead of Flags.
SVN r1004 (trunk)
2008-05-31 01:44:11 +00:00
Randy Heit 496e28aa7a - Fixed: DSBarInfo::updateState() sprung leaks and didn't allocate enough
space for the fullStateName string.


SVN r1003 (trunk)
2008-05-31 01:30:53 +00:00
Randy Heit 3839ef14d5 - Disabled DUMB's mono destination mixers. It's not like I'm ever going to
target an original SoundBlaster, so they're a waste of space to have around.
  This trims resample.obj down to ~60k now.


SVN r1002 (trunk)
2008-05-30 22:52:58 +00:00
Christoph Oelckers 77b9c162e2 - Changed: The texture loader now looks for a TEXTURES lump for text based
texture definitions. HIRESTEX is still supported but deprecated.
- Removed all 16 bit values from texture manager.
- Changed: The texture manager now sorts all textures for a WAD by type
  to avoid priority issues with HIRESTEX defined textures.
- Changed sidedef flag WALLF_ADDTRANS into a linedef flag because it is
  always the same for both sides of a linedef. This also makes handling
  this in the UDMF parser easier because the linedef parsing function does
  not need to access the sidedef data.
- Added new ZDoom specific UDMF linedef and sidedef properties to map parser.
- Added new ZDoom specific UDMF sector properties to map parser.
- Added class definitions for new interpolators that are better 
  equipped to interact with the interpolated objects.
- Separated interpolation code into its own file r_interpolate.cpp.
- Added some simple customization options to the end game screens.
- Fixed: Polyobject detection in the internal node builder did not work 
  anymore due to some code rearrangement for UDMF map loading. To keep
  it compatible between all map formats the THINGS lump of binary format
  maps must be loaded before building the nodes. This also means that
  the spawning itself can be done in the same function for all map types
  (except Build) now.
- Changed 'Smooth mouse movement' menu option from m_filter to smooth_mouse
  which is more what would be expected from this option.
- Fixed: Weapons and ammo items that were modified by Dehacked gave full
  ammo when being dropped by monsters. To properly handle this the
  handling of spawning Dehacked modified pickups was changed to use
  the DECORATE replacement feature instead of hacking the spawn state
  of the original item and calling a spawn function from there.



SVN r1001 (trunk)
2008-05-30 06:56:50 +00:00
Randy Heit 0d400522e4 - Fixed: PrtScn/SysRq key did not work on Linux.
SVN r999 (trunk)
2008-05-30 01:50:41 +00:00
Randy Heit 01f59fa85f - Added an alternate module replay engine that uses foo_dumb's replayer, a
heavily customized version of DUMB (Dynamic Universal Music Bibliotheque).
  It has been slightly modified by me:
  * Added support for Ogg Vorbis-compressed samples in XM files ala FMOD.
  * Removed excessive mallocs from the replay core.
  * Rerolled the loops in resample.c. Unrolling them made the object file
    ~250k large while providing little benefit. Even at ~100k, I think it's
    still larger than it ought to be, but I'll live with it for now.
  Other than that, it's essentially the same thing you'd hear in foobar2000,
  minus some subsong detection features. Release builds of the library look
  like they might even be slightly faster than FMOD, which is a plus.
- Fixed: Timidity::font_add() did not release the file reader it created.
- Fixed: The SF2 loader did not free the sample headers in its destructor.


SVN r995 (trunk)
2008-05-29 23:33:07 +00:00
Christoph Oelckers 1dc9528b43 - Fixed: The compatibility searches for teleport destinations did not work
properly when the teleporter had both a tid and a tag. Now, if a teleporter
  has a tag these are skipped because they are only present for Hexen
  compatibility.


SVN r994 (trunk)
2008-05-23 17:50:28 +00:00
Christoph Oelckers 4434e322e2 - Fixed: The first texture in a TEXTURE1 lump, although invalid when used
elsewhere, must be usable as sky (see Requiem.wad's SKY3.)


SVN r993 (trunk)
2008-05-23 14:04:16 +00:00
Christoph Oelckers 5574aaca15 - Fixed: side_t::GetLightLevel relied on the global 'linedef' variable for
automatic fake contrast.
- Changed: Fake contrast now uses the WALLF_AUTOCONTRAST globally instead
  of manipulating the sides' light values individually. This allows changing
  the fake contrast at run time and also allows adding individual relative
  lighting on top of it which is a planned UDMF feature.


SVN r991 (trunk)
2008-05-23 07:54:09 +00:00
Randy Heit 4649d011c6 - Fixed: ActorStencilColor() did not set the palette part of the actor's
fill color, so it would always produce black for STYLE_Shaded.


SVN r990 (trunk)
2008-05-23 02:13:31 +00:00
Randy Heit 317710e9c4 - Added volume reduction for stereo sounds played in 3D to obtain levels
closer to FMOD 3, which downmixed all stereo sounds to mono before
  playing them in 3D. Also added experimental 3D spread for stereo sounds
  so that you can actually hear them in stereo.


SVN r989 (trunk)
2008-05-23 01:45:47 +00:00
Christoph Oelckers ab6b5e337e - Reworked a few options that previously depended on LEVEL_HEXENFORMAT
(actors being forced to the ground by instantly moving sectors, strife
  railing handling and shooting lines with a non-zero but unassigned tag.)
  With UDMF such semantics have to be handled diffently. 
- finalized UDMF 1.0 implementation.
- Added Martin Howe's latest morph update.


SVN r987 (trunk)
2008-05-22 19:35:38 +00:00
Randy Heit 7160e09b04 - Fixed: When R_DrawTiltedPlane() calculates the p vector, it can overflow
if the view is near the bounds of the fixed point coordinate system. This
  happens because it rotates the view position around (0,0) according to
  the current viewangle, so the resultant coordinate may be outside the
  bounds of fixed point. All important math in this function is now done
  entirely in floating point.
- Fixed: Slopes didn't draw right on 64-bit platforms.


SVN r986 (trunk)
2008-05-22 05:17:21 +00:00
Randy Heit befdd0b41f - Fixed: With hardware 2D, the console and menu need not reimplement palette
flashes to ensure their visibility.
- Fixed: DFlashFader::Destroy() did not call its super method.


SVN r985 (trunk)
2008-05-21 01:47:34 +00:00
Randy Heit 34f6aa8ad3 - Fixed: If a player was morphed into a class with a taller view height,
their perceived view height would not change until they walked up a step.


SVN r984 (trunk)
2008-05-21 01:30:00 +00:00
Randy Heit 5b8055bfc7 - Since KDIZD is the only mapset I know of that used reverb, and it didn't
define any new ones of its own, I'm pre-emptively renaming the SNDEAX lump
  to REVERBS to remove any possible misunderstanding that this is something
  that requires EAX hardware support. (Ideally, it would have been REVERBDEF,
  but that's 10 characters long.) The eaxedit console command has also been
  renamed to reverbedit for the same reason.
- Fixed: The Palette part of FRemapTable was not initialized with alpha values
  other than 0. I'm not sure if it would be better to fix this in the game
  palette that it copies from or not, but right now, they get set
  unconditionally to 255.

SVN r983 (trunk)
2008-05-20 04:02:49 +00:00
Randy Heit 2878e1870a - Fixed: M_DrawSave() and M_DrawLoad() need to use GetScaledWidth(), in case
the texture is high-res.


SVN r982 (trunk)
2008-05-19 23:20:41 +00:00
Randy Heit 01e1295c50 - Replaced all instances of "flags +=" in sbarinfo_parser.cpp with "flags |="
so that using the same flag multiple times will not have unexpected results.
- sbarinfo update #21
  * Added: sigil image type to correctly draw the sigil's icon.
  * Added: Strife inventory bar style.  This is the only style that is radically
    different from the others.  First of all it changes the SELECTBO to be
    INVCURS and draws it before the icons.  Each box is changed to have a width
    of 35 pixels instead of 31 pixels.  And the INVCURS graphic is drawn at
    (x-6, y-2).
  * Added: whennnotzero flag to drawnumber which will cause it to draw nothing if
    the value is 0.
  * Fixed: New mugshot code would not leave the god state when it was supposed to
    enter the rampage state.
  * Fixed: The ouch state was mostly broken.


SVN r981 (trunk)
2008-05-19 23:07:08 +00:00
Christoph Oelckers 35ea94c014 May 18, 2008 (SBarInfo Update #20)
- Added: hasweaponpiece command to check for custom weapon pieces.
- Added: usessecondaryammo command to check if the current weapon has a second
  ammo type.
- Most of SBarInfo's mugshot scripting can be used with the default Doom status
  bar.
- Fixed: By default drawmugshot would never come out of normal god mode state.
  In addition the state change to and from god mode was not quite as responsive
  as the original code.

SVN r980 (trunk)
2008-05-18 15:48:03 +00:00
Christoph Oelckers b8c21495d5 - Fixed: When FTextureManager::CheckForTexture finds a matching NULL texture
it should always return 0, not the actual texture's index.


SVN r979 (trunk)
2008-05-17 23:41:51 +00:00
Christoph Oelckers 7949f6d35f - Fixed coordinate checks for objects on 3DMidtex lines.
SVN r978 (trunk)
2008-05-17 17:57:50 +00:00
Christoph Oelckers 9fcb85d3e9 - Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as 
  intended will not work.


SVN r977 (trunk)
2008-05-17 08:18:31 +00:00
Randy Heit 32557c4a28 - Fixed: 3D hardware texture filling did not copy pixels with 0 alpha,
preserving whatever was underneath in the texture box previously.


SVN r976 (trunk)
2008-05-16 23:36:47 +00:00
Randy Heit a4da6f1ac1 - Fixed: s_sound.cpp had its own idea of whether or not sounds were paused
and did not entirely keep it in sync with the sound system's. This meant
  that when starting a new game from the menu, all sounds were played as
  menu sounds until you did something to pause the game, because s_sound.cpp
  thought sounds were unpaused, while the FMOD system thought they were.


SVN r975 (trunk)
2008-05-16 22:31:26 +00:00
Christoph Oelckers 4de3741a05 - I finally managed to test the translucency options for composite texture
definitions in HIRESTEX. The feature should be complete now.
- Fixed: A_CheckTargetInLOS used BAM angles instead of degrees which is the
  DECORATE convention.
- Added Snowkate709's A_CheckTargetInLOS addition.
- Added listmaps CCMD.


SVN r974 (trunk)
2008-05-15 17:16:32 +00:00
Randy Heit 5a066788b5 - Revised underwater effect now uses a lowpass filter in combination with an
optional freeverb unit.
- Removed ResetEnvironment hack, since with software reverb, losing the
  existing reverb when focus is lost isn't a problem.
- Commented out the TiMidity FIXME messages.


SVN r973 (trunk)
2008-05-15 04:51:57 +00:00
Randy Heit ff4446a3a0 - Fixed: FBarShader::GetColumn() passed incorrect information to the software
renderer for horizontal bars.


SVN r972 (trunk)
2008-05-14 23:39:40 +00:00
Christoph Oelckers 6dbdcf5f60 - Changed: For actors not being spawned on the floor P_FindFloorCeiling should
be used to prevent them from dropping through 3DMIDTEX textures.
- Fixed: AMageStaffFX2::IsOkayToAttack overwrote the projectile's angle variable. 

SVN r970 (trunk)
2008-05-14 07:45:40 +00:00
Randy Heit c4cbef9e58 - Changed the types of object hash indices in FArchive from size_t to DWORD.
This seems to fix crashes on GCC 64-bit builds when saving games. Not sure
  if it was a GCC bug or my bug, since it worked fine with VC++, but since the
  code that calculates the index only returns a DWORD, storing it as a size_t
  was rather pointless.



SVN r969 (trunk)
2008-05-14 03:54:04 +00:00
Randy Heit a0d5463b49 - Added the C99 printf size specifiers 't' (ptrdiff_t) and 'z' (size_t) to
FString::Format() so that I can fix all the problem printf strings that a
  64-bit GCC compile finds.



SVN r968 (trunk)
2008-05-14 03:39:30 +00:00
Christoph Oelckers 99f55e8b8f - Added Skulltag's PUFFGETSOWNER flag.
SVN r967 (trunk)
2008-05-12 22:52:13 +00:00
Christoph Oelckers 0869b51928 - Fixed: Parsing sector special bit masks must be done backwards so that later
definitions take precedence.
- Added base translation tables for UDMF compatibility maps which only should
  handle the native line and sector types of each game.
- Turned the inactive SILENT_INSTANT_FLOORS define into a compatibility option
  so that it can be (un)set in a map definition and the menu. 

SVN r966 (trunk)
2008-05-12 17:14:38 +00:00
Christoph Oelckers b2176a4a33 - Fixed: SPAC_AnyCross didn't work.
- Fixed: Pushable doors must also check for SPAC_MPush.
- Fixed: P_LoadThings2 did not adjust the byte order for the thingid field.


SVN r965 (trunk)
2008-05-12 08:31:29 +00:00
Christoph Oelckers 6c21616c85 - Changed: HIRESTEX 'define' textures now replace existing textures
of type MiscPatch with the same name.
- Added UDMF line trigger types MonsterUse and MonsterPush.
- Separated skill and class filter bits from FMapThing::flags so that
  UDMF can define up to 16 of each. Also separated easy/baby and
  hard/nightmare and changed default MAPINFO definitions.
- Changed: Crosshair drawing uses the current player class's default health instead
  of 100 to calculate the color for the crosshair.
- Added SECF_NOFALLINGDAMAGE flag plus Sector_ChangeFlags to set it. Also separated
  all user settable flags from MoreFlags into their own Flags variable.


SVN r964 (trunk)
2008-05-11 21:16:32 +00:00
Randy Heit 8ffd79eeca - Fixed: FWadCollection::MergeLumps() did not initialize the flags for any
marker lumps it inserted.
- Fixes to placate GCC.



SVN r963 (trunk)
2008-05-11 03:02:33 +00:00
Randy Heit 6f7c6e4dac - Fixed: Need write barriers when modifying SequenceListHead.
SVN r962 (trunk)
2008-05-11 01:26:28 +00:00
Randy Heit d4563767ee - Added a new cvar: midi_timiditylike. This re-enables TiMidity handling of
GUS patch flags, envelopes, and volume levels, while trying to be closer
  to TiMidity++ than original TiMidity.
- Renamed timidity_config and timidity_voices to midi_config and midi_voices
  respectively.


SVN r959 (trunk)
2008-05-10 01:35:50 +00:00
Randy Heit e64586d86f - Reduced volume, expression, and panning controllers back to 7 bits.
- Added very basic Soundfont support to the internal TiMidity. Things missing:
  filter, LFOs, modulation envelope, chorus, reverb, and modulators. May or
  may not be compatible with TiMidity++'s soundfont extensions.
- Added support for quoted strings to the TiMidity config parser.


SVN r957 (trunk)
2008-05-09 03:54:06 +00:00
Christoph Oelckers d5563fe478 - Changed all thing coordinates that were stored as shorts into fixed_t.
- Separated mapthing2_t into mapthinghexen_t and the internal FMapThing so
  that it is easier to add new features in the UDMF map format.
- Added some initial code to read UDMF maps.


SVN r956 (trunk)
2008-05-08 08:06:26 +00:00
Christoph Oelckers 80aebe9044 - Split off the slope creation code from p_Setup.cpp into its own file.
SVN r955 (trunk)
2008-05-02 16:59:38 +00:00
Christoph Oelckers 9a410f864f - Separated the linedef activation types into a bit mask that allows combination
of all types on the same linedef. Also added a 'first side only' flag. This
  is not usable from Hexen or Doom format maps though but in preparation of
  the UDMF format discussed here:
  http://www.doomworld.com/vb/source-ports/43145-udmf-v0-99-specification-draft-aka-textmap/
- Changed linedef's alpha property from a byte to fixed point after seeing that
  255 wasn't handled to be fully opaque.
- fixed a GCC warning in fmodsound.cpp 

SVN r954 (trunk)
2008-05-02 10:55:48 +00:00
Christoph Oelckers c95a7b7db1 - Fixed: Warped textures didn't work anymore because the default speed was 0.
SVN r953 (trunk)
2008-05-01 23:52:57 +00:00
Randy Heit 684b671428 - Fixed: I had instrument vibrato setting the tremolo_sweep_increment value
in the instrument loader, effectively disabling vibrato.


SVN r952 (trunk)
2008-05-01 02:04:47 +00:00
Randy Heit c86d7e0afd - Fixed: FString::StripRight() stripped the final character of the string if
there were no designated characters to strip at the end of it.
- Added support for Shoutcast/Icecast playlists.
- Added an error message when a playlist could not be opened.
- Added support for PLS format playlists, in addition to M3U.
- Changed FPlayList to use an array of FStrings.
- Fixed: Playlists required every song to be specified by an absolute path.


SVN r951 (trunk)
2008-04-30 05:36:24 +00:00
Randy Heit 8040cdd4ff - Fixed a copy-and-paste error in win32/i_main.cpp for 64-bit mode.
- Tweaked OPL centering a little.


SVN r950 (trunk)
2008-04-30 00:44:45 +00:00
Randy Heit de85314234 - Added dynamic recentering for the OPL synth. The chip has four basic
waveforms, and three of them are non-negative. This can cause a tendency
  for the resulting output waveform to go into very high ranges depending on
  the timbres used, and Heretic's exemplify this problem.
- Reduced the OPL volume level slightly.
- Fixed: The waveform view from snd_drawoutput was upside-down.


SVN r949 (trunk)
2008-04-29 04:33:43 +00:00
Randy Heit bc5f49dd49 - Various fixes for compiling working 64-bit binaries with Visual C++. The
number of changes was pleasantly small, and a cursory check seems to show
  everything working alright.


SVN r948 (trunk)
2008-04-29 02:43:42 +00:00
Randy Heit 1f8e471eba - Separated the skin scale values into separate X and Y values so that skins
automatically generated for different player classes can use both the
  scaling values that can be set for the actor.


SVN r947 (trunk)
2008-04-27 22:33:19 +00:00
Randy Heit 0bb92662d3 - Fixed: Any MIDI ticks that contain only events that are interpreted by
the MIDI parser and not passed on to the MIDI device would mess up timing
  for future events.


SVN r945 (trunk)
2008-04-26 17:12:37 +00:00
Randy Heit ab5c981b10 - Changed EMIDI controller 110-113 handling to more accurately match the
EMIDI specs: Track designations and exclusions should be ignored past
  the initial beat, and EMIDI program change and volume events should be
  ignored unless they were used in the initial beat.


SVN r944 (trunk)
2008-04-26 17:03:53 +00:00
Randy Heit b192762bc1 - Fixed: When FMOD::System::init() returns FMOD_ERR_OUTPUT_CREATEBUFFER, it
could also be because the user selected PCM-Float output, but the driver
  doesn't support it (even if it claims to *cough*Audigy XP drivers*cough*).


SVN r943 (trunk)
2008-04-26 16:20:26 +00:00
Christoph Oelckers dbf4677da9 - Added speed factors for texture warp commands.
- Added damage type parameter to A_Die.

SVN r942 (trunk)
2008-04-26 08:46:55 +00:00
Randy Heit 8de6217f66 - Re-enabled TiMidity's loop and envelope stripping for instruments that look
like they weren't really meant to be played by the GUS MIDI library.


SVN r941 (trunk)
2008-04-26 04:01:44 +00:00
Christoph Oelckers 0d29164522 SBarinfo Update #18
- Simplified the DrawGraphic function in sbarinfo_display.cpp
- Added xOffset, yOffset, and alpha to every drawing function in
  sbarinfo_display.cpp.  So Strife popups can be handeled better and allow for
  other effects (translucent bars?).  I'm thinking about making a struct for
  these five (also x and y) arguments so that the argument lists don't become a
  mess.
- Changed DRAWIMAGE in sbarinfo_display.cpp to not use so many calls to
  DrawGraphic.
- DrawKeyBar wasn't using screen->DrawTexture.
- Added a Fade transition for popups.  It takes two args fade in rate and fade
  out rate.  Both are floats (1.0 = 1 tic to complete 0.5 = 2 tics to complete
  and so on).
- Added a translucency arg to statusbars.  1.0 = opaque and 0.0 = invisible.

SVN r939 (trunk)
2008-04-25 09:40:08 +00:00
Randy Heit 6ce25fe6c3 - Fixed: When an instrument's envelope runs out, it does not immediately ramp
to zero. Rather, it lets the remainder of the sample finish playing.


SVN r938 (trunk)
2008-04-25 01:28:06 +00:00
Randy Heit 52f6549aa0 - Fixed: When playing a MIDI file with EMIDI track designations to turn a
track off, any ticks that had only events on the disabled track would cause
  the delay for that track to be thrown away, and the following notes on
  enabled tracks would play too soon. This could be heard quite clearly in
  xplasma.mid, where track 4 (FMGlass Drone 1) would interfere with the timing
  of tracks 13 and 14 (EP1 Melody and EP1 Echo).

SVN r937 (trunk)
2008-04-24 23:00:25 +00:00
Christoph Oelckers 29c6615e50 - Fixed: DFlashFader did some operations in its destructor that had to be moved
to its Destroy method.
- Fixed: Dropped weapons from dying players should not double ammo. 

SVN r935 (trunk)
2008-04-24 17:17:46 +00:00
Randy Heit 16d18c707a - Fixed: When note_on() is called and another copy of the same note is
already playing on the channel, it should stop it with finish_note(), not
  kill_note(). This can be clearly heard in the final cymbal crashes of
  D_DM2TTL where TiMidity cuts them off because the final cymbals are played
  with a velocity of 1 before the preceding cymbals have finished. (I wonder
  if I should be setting the self_nonexclusive flag for GUS patches to
  disable even this behavior, though, since gf1note.c doesn't turn off
  duplicate notes.)
- Changed envelope handling to hopefully match the GUS player's. The most
  egregious mistake TiMidity makes is to treat bit 6 as an envelope enable
  bit. This is not what it does; every sample has an envelope. Rather, this
  is a "no sampled release" flag. Also, despite fiddling with the
  PATCH_SUSTAIN flag during instrument loading, TiMidity never actually
  used it. Nor did it do anything at all with the PATCH_FAST_REL flag.


SVN r934 (trunk)
2008-04-24 04:18:49 +00:00
Christoph Oelckers b129ed3948 - Fixed: wbstartstruct's lump name fields were only 8 characters long
and not properly zero-terminated when all 8 characters were used.
- Fixed: Local sound sequence definitions caused a crash because a proper
  NULL check was missing. 

SVN r933 (trunk)
2008-04-23 23:04:00 +00:00
Christoph Oelckers 4667bfe46f - Added translucent blending modes to FMultipatchTexture (not tested yet!)
- Also changed all true color texture creation functions to use proper alpha
  values instead of inverted ones.
- Changed FRemapTable so that all palette entries must contain proper alpha
  values. 
- Fixed: The F1 screen check in m_menu.cpp was missing a NULL pointer check.
- Changed: The boss brain's explosions play weapons/rocklx which is an 
  unlimited sound. This can become extremely loud. Replaced with a new
  sound which is just an alias to weapons/rocklx but has a limit of 4.


SVN r932 (trunk)
2008-04-22 18:48:30 +00:00
Randy Heit d8166e0e5e - Fixed: MugShotFrame::getTexture() allocated space for the sprite name that
it never freed. I'm not sure it's a good assumption that 9 characters is
  always long enough, either, since you can have longer file names than that
  inside a zip.
- Fixed: DSBarInfo::DrawGem() crashed if chain or gem was NULL.


SVN r929 (trunk)
2008-04-20 00:23:07 +00:00
Randy Heit 03b4f71edf - Reduced the range that area sounds require to interpolate between 2D and
3D panning.
- The listener's velocity is now set at 0 for the sound engine. The player
  moves so fast that you can hear the doppler shift just by running around,
  otherwise.
- Changed the sound code so that all sounds that start playing on a single
  tic actually start playing at the exact same sample position.


SVN r927 (trunk)
2008-04-19 22:47:54 +00:00
Randy Heit effe9427fd - Added the writewave command to write the internal TiMidity's output to a
wave file.
- Changed the default channel velocity for MUS files from 64 to 100 to
  better match apparent MIDI practice. (Would like to know what this is
  supposed to be.)
- Changed the mus2midi channel assignments to match the internal player's.
- Fixed: apply_envelope_to_amp() should clamp the mix levels to 0.


SVN r926 (trunk)
2008-04-19 21:36:53 +00:00
Randy Heit f6866df0e6 - Made the maximum number of TiMidity voices configurable through the
timidity_voices cvar.
- Added stats lines for the OPL and Timidity MIDI devices.
- Completely changed the way TiMidity volume calculations are done. It
  should now be extremely close to the output a real GUS would produce with
  its official MIDI player (excepting where TiMidity normalizes sample
  volumes). The new equations more closely match what is specified by the DLS
  and SF2 specs (but not quite), so I presume it's also more musically
  correct than what TiMidity (and TiMidity++) do.


SVN r925 (trunk)
2008-04-19 05:57:09 +00:00
Christoph Oelckers 48d8881065 - Fixed: FBlockThingsIterator didn't set the current block coordinates if
they were outside the blockmap. This could cause extreme delays if an
  iteration started outside the valid boundaries.
- added nextmap and nextsecret CCMDs.


SVN r924 (trunk)
2008-04-19 00:55:55 +00:00
Randy Heit eb1e17db06 - Fixed: The music stream needs to zero the FMOD_REVERB_CHANNELPROPERTIES
before sending it to Channel::getReverbProperties().
- Fixed: The earthquake effect did not play its sound as an actual looping
  sound. I'm a bit surprised this only recently started causing problems.


SVN r923 (trunk)
2008-04-18 03:26:48 +00:00
Christoph Oelckers 5d0dc65044 - Added Martin Howe's fixes for morphing and DECORATE function prototypes.
- Minor fixes in texture code.


SVN r922 (trunk)
2008-04-17 20:34:58 +00:00
Randy Heit 87a480041c - Fixed: The FMOD::System object was never released, only closed, so
snd_reset would eventually run into the hard limit on the total number
  of FMOD::System objects that can be created concurrently (currently 15).
- Added proper error checks to the FMOD initialization process.


SVN r921 (trunk)
2008-04-16 20:56:46 +00:00
Randy Heit 42c80b3ee5 - Updated fmod_wrap.h for FMOD 4.14.
- Set note velocity back to using a linear sounding volume curve, although
  it's now used to scale channel volume and expression, so recompute_amp()
  is still only doing one volume curve lookup.
- Fixed: TimidityMIDIDevice caused a crash at the end of a non-looping song.


SVN r920 (trunk)
2008-04-16 20:02:16 +00:00
Christoph Oelckers d5738e3876 - Made translation support for multipatch textures operational.
SVN r919 (trunk)
2008-04-16 18:17:20 +00:00
Randy Heit 9450db3cec parameters. These seem to be used primarily to restrict percussion
instruments to specific notes.
- Changed note velocity to not use the volume curve in recompute_amp(), since
  this sounds closer to TiMidity++, although I don't believe it's correct
  MIDI behavior. Also changed expression so that it scales the channel volume
  before going through the curve.
- Reworked load_instrument to be less opaque.
- Went through the TiMidity code and removed pretty much all of the SDL_mixer
  extensions. The only exception would be kill_others(), which I reworked
  into a kill_key_group() function, which should be useful for DLS
  instruments in the future.


SVN r918 (trunk)
2008-04-16 05:41:03 +00:00
Christoph Oelckers b2bfad0c50 - Added translation support to multipatch textures. Incomplete and not tested yet!
- Added Martin Howe's morph weapon update.


SVN r916 (trunk)
2008-04-15 22:17:30 +00:00
Christoph Oelckers ce5d4dba02 - Changed true color texture creation to use a newly defined Bitmap class
instead of having the copy functions in the frame buffer class.
- Fixed: The WolfSS didn't have its obituary defined.


SVN r915 (trunk)
2008-04-15 18:05:39 +00:00
Christoph Oelckers 99b2fab410 - Added submission for ACS CheckPlayerCamera ACS function.
- Removed FRadiusThingsIterator after discovering that VC++ misoptimized
  it in P_CheckPosition. Now FBlockThingsIterator is used with the distance
  check being done manually. 

SVN r914 (trunk)
2008-04-15 10:04:41 +00:00
Christoph Oelckers adc9f090ef - Added rotation 90° angles only) and mirroring to the Multipatch texture
composition code.
- Fixed: The game crashed when a level was ended while a player was morphed
  by a powerup. 

SVN r912 (trunk)
2008-04-14 18:51:05 +00:00
Christoph Oelckers b54b9bad7a - Fixed: A_VileAttack positioned the fire on the wrong side of the target.
- Reorganized the HackHack code so that the image creation was moved into
  MakeTexture. This was necessary because Unload deleted the pixel data
  and broke the whole thing.
- Fixed: FPatchTexture::HackHack and FDoomStatusbarTexture::DrawToBar used the
  obsolete and uninitialized variable Near255. 
- Removed the span creation code specific to FPatchTexture. It only has an
  advantage when the lump has already been loaded in memory but since that
  is no longer the case now the generic version in FTexture is actually better.
- Changed: FTexture::CopyToBlock no longer uses the spans but the pixel buffer
  directly. Since most patches in multipatch textures are non transparent
  the added overhead from creating the spans far outweighs any savings they
  might provide. It is also simpler to handle for mirrored or rotated patches now.
- Changed: Textures only create the spans when really needed. Flats and native
  textures, for example, do not and it only created needless overhead that they
  were always created along with the pixel buffer.
- Made use of player and actor variables consistent in a_hereticweaps.cpp.
- Fixed: A few calls to P_SpawnPlayerMissile passed 0 as angle



SVN r911 (trunk)
2008-04-14 12:10:45 +00:00
Christoph Oelckers a53bfa7113 - Fixed a few bufs in the parser for composite textures.
- Changed: When loading Zips all patches in the patches/ directory should
  be loaded, not only those used by a texture in TEXTUREx. 
- Disabled timidity_mastervolume for the internal Timidity again because
  with the altered volume calculation it is no longer needed and the default
  volume is on the same level as OPL and FMOD.


SVN r909 (trunk)
2008-04-13 11:40:53 +00:00
Randy Heit e7ff22457e - Changed FMOD_INIT_ENABLE_DSPNET use to its replacement from 4.14.00,
FMOD_INIT_ENABLE_PROFILE. Renamed the corresponding cvar to snd_profile.
- Removed the normalize parameter from SoundStream::Play().
- Disabled the chorus and reverb effects added to SDL_mixer's Timidity,
  because they were probably never tested well, either. Thanks to the bug
  in vc_alloc(), they were never even activated.
- Restored the exact frequency range search that was missing from SDL_mixer's
  verion of select_sample().
- Fixed: vc_alloc(), kill_others(), and note_on() treated Voice::status as a
  bit mask, when it's not. These were changes made to SDL_mixer's Timidity.
- Restored the original Timidity volume equation. The other louder one was
  put in when I didn't realize all channels were mono and many notes sounded
  too quiet because they never completed their attack phase.
- Fixed: FileReader::Gets() acted as if fgets() always read the maximum
  number of characters.
- Fixed: FileReader::Open() did not set FilePos and StartPos to 0.


SVN r908 (trunk)
2008-04-13 03:23:33 +00:00
Christoph Oelckers 96b72f2e33 - Changed the internal Timidity player so that it uses timidity_mastervolume
because it has the same sound volume issues as the external one.
- Replaced use of stdio in Timidity with FileReader and added the option to read
  from the lump directory. If the main config file is inside the lump directory
  it will assume that everything else is as well. If it is a real file it will be
  assumed that the rest is real files as well.
- Fixed: None of the error returns in Timidity::read_config_file closed the file being read.


SVN r906 (trunk)
2008-04-12 21:36:10 +00:00
Christoph Oelckers 6b2a7b8b03 - Added Martin Howe's morph system update.
- Added support for defining composite textures in HIRESTEX. It is not fully tested
  and right now can't do much more than the old TEXTUREx method.
- Added a few NULL pointer checks to the texture code.
- Made duplicate class names in DECORATE non-fatal. There is really no stability
  concern here and the worst that can happen is that the wrong actor is spawned.
  This was a constant hassle when testing with WADs that contain duplicate resources.


SVN r905 (trunk)
2008-04-12 15:31:18 +00:00
Randy Heit b340f9c762 - Removed some GCC warnings.
- Fixed: MinGW doesn't have _get_pgmptr(), so it couldn't compile i_main.cpp.
- Fixed: MOD_WAVETABLE and MOD_SWSYNTH are not defined by w32api, so MinGW
  failed compiling the new MIDI code.
- Fixed: LocalSndInfo and LocalSndSeq in S_Start() need to be const char
  pointers, since "" is a constant.
- Fixed: parsecontext.h was missing a newline at the end of the file.


SVN r904 (trunk)
2008-04-12 05:33:20 +00:00
Randy Heit 0d18580ff0 - Fixed: Timidity::Channel::mono, rpn, and nrpn were not initialized. In
particular, this meant that every channel was almost certainly in mono mode,
  which can sound pretty bad if the song isn't meant to be played that way.
- Added bank numbers to the MIDI precaching for Timidity, since I guess I do
  need to care about banks, if even the Duke MIDIs use various banks.
- Fixed: snd_midiprecache only exists in Win32 builds, so gameconfigfile.cpp
  shouldn't unconditionally link against it.
- Fixed: pre_resample() was still disabled, and it left two samples at the end
  of the new wave data uninitialized.


SVN r903 (trunk)
2008-04-12 05:04:37 +00:00
Randy Heit 1809870824 - Moved the xmap table from timidity/tables.cpp to playmidi.cpp. Now I can get
rid of timidity/tables.cpp, which conflicts in name with the main Doom
  tables.cpp. (And interestingly, VC++ automatically renamed the object file,
  so I wasn't aware of the problem with GCC.)


SVN r902 (trunk)
2008-04-12 00:32:26 +00:00
Randy Heit 10c0d67b78 - Changed the MIDIStreamer to send the all notes off controller to each
channel when restarting the song, rather than emitting a single note off
  event which only has a 1 in 127 chance of being for a note that's playing
  on that channel. Then I decided it would probably be a good idea to reset
  all the controllers as well.
- Increasing the size of the internal Timidity stream buffer from 1/14 sec
  (copied from the OPL player) improved its sound dramatically, so apparently
  Timidity has issues with short stream buffers. It's now at 1/2 sec in
  length. However, there seems to be something weird going on with
  corazonazul_ff6boss.mid near the beginning where it stops and immediately
  restarts a guitar on the exact same note.
- Added a new sound debugging cvar: snd_drawoutput, which can show various
  oscilloscopes and spectrums.
- Internal TiMidity now plays music.
- Changed the progdir global variable into an FString.

SVN r900 (trunk)
2008-04-11 04:59:23 +00:00
Christoph Oelckers 3f497fe8e5 - Eliminated some more global variables (onmobj, DoRipping, LastRipped,
MissileActor, bulletpitch and linetarget.) 

SVN r899 (trunk)
2008-04-10 14:38:43 +00:00
Christoph Oelckers a390ea6a61 - Replaced P_PathTraverse with an FPathTraverse class, rewrote all code using
P_PathTraverse and got rid of a lot of global variables in the process. 

SVN r898 (trunk)
2008-04-09 18:35:21 +00:00
Christoph Oelckers a0356a45cd SBarInfo Update #17:
- Fixed: SBarInfo tried to calculate scaled offsets on unscaled status bars.
- Added: createpopup to SBarInfo.  No we don't have custom popups yet.  It only
  defines the transition effect.  Currently none or slideinbottom.
- Made the first argument of DrawMugShot optional (think of it as an overloaded
  function).  The use of the first argument is deprecated due to the event of
  per player class faces.
- More changes from DrawImage to screen->DrawTexture().  I guess I didn't get
  them all just yet.


SVN r897 (trunk)
2008-04-09 07:32:33 +00:00
Randy Heit 6535283ff1 - Added the FCriticalSection class in critsec.h to make it easier to
use critical sections in other places besides the OPL player.


SVN r896 (trunk)
2008-04-09 04:17:13 +00:00
Randy Heit 68e4b3d946 - Reimplemented snd_midiprecache, now for MIDI as well as MUS, and
defaulting to false.


SVN r895 (trunk)
2008-04-09 03:55:04 +00:00
Christoph Oelckers 894b663877 - Eliminated all use of global variables used as output for P_CheckPosition
and P_TryMove. Moved BlockingLine and BlockingMobj into AActor because 
  the global variables can be easily overwritten with certain DECORATE 
  constructs.


SVN r894 (trunk)
2008-04-08 20:52:49 +00:00
Christoph Oelckers f7a1fb3978 - Removed some unnecessary morphing code.
- Fixed some bugs in the HIRESTEX parser.
- Added floating point support and #include and #define tokens to 
  FParseContext  Not used yet.
- replaced the value scanning code in FParseContext::GetToken with
  calls to strtol.


SVN r893 (trunk)
2008-04-08 17:25:19 +00:00
Christoph Oelckers 3a14dab2e8 - Fixed: The check arrays for BlockThingsIterators were not properly
freed and each iterator allocated a new one as a result.
- Split the Xlat parser context class into a generic part that can be 
  used for other Lemon-based parsers in the future and a smaller
  Xlat-specific part. 


SVN r892 (trunk)
2008-04-08 15:07:09 +00:00
Christoph Oelckers 17816dcadd - Changed: P_TeleportMove now always sets BlockingLine to NULL and
P_FindFloorCeiling doesn't set it at all. The way it was set in 
  PIT_FindFloorCeiling didn't look correct.
- Changed P_FindFloorCeiling so that it doesn't need global variables 
  anymore. I also moved the code to set the calling actor's information
  into this function because that's all it is used for. This also fixes
  another bug:
- AInventory::BecomePickup called P_FindFloorCeiling to get
  proper position values for the item but never set the item's information
  to the return value of this call.


SVN r891 (trunk)
2008-04-08 10:47:28 +00:00
Christoph Oelckers 4dc1b9579e - Removed the check for Heretic when playing *evillaugh when using the
Chaos Device. This sound is not defined by the other games so it won't
  play by default.
- Added MORPH_UNDOBYTOMEOFPOWER and MORPH_UNDOBYCHAOSDEVICE flags
  for the morph style so that the special behavior of these two items
  can be switched on and off. 

SVN r890 (trunk)
2008-04-08 09:52:50 +00:00
Christoph Oelckers a424a2f2a9 - Added Martin Howe's morph system enhancement.
SVN r889 (trunk)
2008-04-08 08:53:42 +00:00
Christoph Oelckers 0b26377624 - Removed PT_EARLYOUT from P_PathTraverse because it wasn't used anywhere.
- Rewrote BlockThingsIterator code not to use callbacks anymore.


SVN r888 (trunk)
2008-04-07 21:14:28 +00:00
Christoph Oelckers ebd17de30a - Fixed: PIT_FindFloorCeiling required tmx and tmy to be set but
P_FindFloorCeiling never did that.
- Merged Check_Sides and PIT_CrossLine into A_PainShootSkull.
- Replaced P_BlockLinesIterator with FBlockLinesIterator in all places it was
  used. This also allowed to remove all the global variable saving in
  P_CreateSecNodeList.
- Added a new FBlockLinesIterator class that doesn't need a callback
  function because debugging the previous bug proved to be a bit annoying
  because it involved a P_BlockLinesIterator loop.
- Fixed: The MBF code to move monsters away from dropoffs did not work as 
  intended due to some random decisions in P_DoNewChaseDir. When in the
  avoiding dropoff mode these are ignored now. This should cure the problem
  that monsters hanging over a dropoff tended to drop down. 

SVN r887 (trunk)
2008-04-06 17:33:43 +00:00
Christoph Oelckers d938121378 - Added a NOTIMEFREEZE flag that excludes actors from being affected by
the time freezer powerup.
- Changed: Empty pickup messages are no longer printed. 

SVN r886 (trunk)
2008-04-06 09:24:41 +00:00
Christoph Oelckers c5333d4abb - Changed secret sector drawing in automap so that lines with the ML_SECRET
flag are only drawn as part of a secret sector if that secret has already
  been found, even if the option is set to always show secret sectors.
- Added a NULL pointer check to WI_LoadBackground.


SVN r885 (trunk)
2008-04-05 19:10:37 +00:00
Christoph Oelckers eff5a4dad9 - Added the option to use $ as a prefix to a string table name everywhere in
MAPINFO where 'lookup' could be specified so that there is one consistent
  way to do it. 
- Added a missing NULL pointer check to S_Start.


SVN r884 (trunk)
2008-04-05 16:45:39 +00:00
Christoph Oelckers e105a29e99 - Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData functions and replaced all calls to P_OpenMapData that
  only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
  but keeps all existing information in the default and just adds to it. This
  is needed because Hexen and Strife set some information in their base
  MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
  * Finale texts loaded from a text lump
  * Demos
  * Local SNDINFOs
  * Local SNDSEQs
  * Image names in FONTDEFS
  * intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
  instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
  from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in 
  the map and the actor type they spawned.


SVN r882 (trunk)
2008-04-05 12:14:33 +00:00
Christoph Oelckers 7b23f6eb8b SBarInfo Update #16:
- Added: fillzeros flag for drawnumber.  When set the string will always have
  a length of the specified size and zeros will fill in for the missing places.
  If the number is negative the negative sign will take the place of the last
  digit.
- Added: globalarray type to drawnumber which will display the value in a
  global array with the index set to the player's number.  Untested.
- Added: isselected command to SBarInfo.
- Fixed: Bi and Tri colored numbers didn't work.
- Fixed: Crash when using nullimage as the last image in drawswitchableimage.
- Applied Graf suggestion to include the y coord when calulating heights to fix
  most of the gaps caused by round off errors.  At least for now anyways and it
  is only applied for drawimage.
- SBarInfo inventory bars have been converted to use screen->DrawTexture() 

SVN r881 (trunk)
2008-04-05 07:06:26 +00:00
Christoph Oelckers 69002580e6 - Forgot to bump min. savegame version for last revision.
- Increased limit for demon/melee to 4. 

SVN r880 (trunk)
2008-04-04 17:10:15 +00:00
Christoph Oelckers cb1bd7739e - Fixed: P_CheckSwitchRange accessed invalid memory when testing a one-sided
line.
- Fixed: P_SpawnPuff assumed that all melee attacks have the same range
  (MELEERANGE) and didn't set the puff to its melee state if the range
  was different. Even worse, it checked a global variable for this so
  the behavior was undefined when P_SpawnPuff was called from anywhere
  else but P_LineAttack. To reduce the amount of parameters I combined
  this information with the hitthing and temporary parameters into one
  flags parameter. Also changed P_LineAttack so that it gets passed
  an additional parameter that specifies whether the attack is a melee
  attack or not and set this to true in all calls that are to be considered
  melee attacks. I couldn't use the damage type because A_CustomPunch
  and A_CustomMeleeAttack allow passing any damage type they want.
- Added a sprite option as an alternative of particles for FX_ROCKET 
  and FX_GRENADE.


SVN r879 (trunk)
2008-04-04 14:31:20 +00:00
Randy Heit de485ec662 - Changed the Makefiles that are used by both Linux and MinGW so that msys
detection occurs only if $OS is Windows_NT. Otherwise, spurious nul files
  are created when compiling on Linux.


SVN r878 (trunk)
2008-04-03 23:16:07 +00:00
Christoph Oelckers d780c2e3a4 - Fixed: The minimum parameter count for ACS_Execute and ACS_ExecuteAlways for
DECORATE was wrong (2 instead of 1.)
- Changed: Hexen set every cluster to be a hub if it hadn't been defined before
  a level using this cluster. Now it will only do that if HexenHack is true, 
  i.e. when original Hexen format MAPINFOs are parsed. For ZDoom format 
  MAPINFOs it will now be the same as for the other games which means that 
  'hub' has to be declared explicitly.
- Added an Idle state that is entered in place of the spawn state if a monster
  has to return to its inactive state if it can't find any more targets.
- Added MF5_NOINTERACTION flag which completely disables all physics related
  code for any actor with this flag. Mostly useful for particle effects where
  the actors just move a certain distance and then disappear.
- Removed the last remains of the antialias precalculation code from
  am_map.cpp because it was no longer used.
- Fixed: Two-sided lines bordering a secret sector were not drawn in the
  proper color
- Fixed: The automap didn't check ACS_LockedExecuteDoor for its lock color.


SVN r876 (trunk)
2008-04-03 10:49:54 +00:00
Randy Heit 799a4ea1bb - Switched sounds local to the listener from head-relative 3D sounds to 2D
sounds so stereo sounds have full separation. I tried using set3DSpread,
  but that still caused some blending of the channels.


SVN r875 (trunk)
2008-04-03 03:43:41 +00:00
Randy Heit d2c275bbb3 - Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
  the same lump name no longer involves any degree of guesswork in
  determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
  sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
  pointer checks, in case an improper sequence was encountered during
  parsing but not early enough to avoid creating a slot for it in the array.


SVN r874 (trunk)
2008-04-03 03:19:21 +00:00
Randy Heit 3a5afd1418 - Added support for dumping from RAW/DRO/IMF files, so now anything that
can be played as OPL can also be dumped.
- Removed the opl_enable cvar, since OPL playback is now selectable as just
  another MIDI device.
- Added support for DRO playback and dual-chip RAW playback.
- Removed MUS support from OPLMUSSong, since using the OPLMIDIDevice with
  MUSSong2 works just as well. There are still lots of leftover bits in
  the class that should probably be removed at some point, too.
- Added dual-chip dumping support for the RAW format.
- Added DosBox Raw OPL (.DRO) dumping support. For whatever reason,
  in_adlib calculates the song length for this format wrong, even though
  the exact length is stored right in the header. (But in_adlib seems buggy
  in general; too bad it's the only Windows version of Adplug that seems to
  exist.)
- Rewrote the OPL dumper to work with MIDI as well as MUS.


SVN r872 (trunk)
2008-04-03 02:31:39 +00:00
Christoph Oelckers 5e6f709dbf - Changed: When the screen is being deleted the 'screen' variable should be
set to NULL before performing the delete. Otherwise, in some abnormal
  situations, it could happen that the destroyed screen object is still
  being accessed.
- Fixed: V_Shutdown didn't set OF_YesReallyDelete before deleting screen.


SVN r870 (trunk)
2008-03-30 08:58:36 +00:00
Christoph Oelckers 868782a843 - Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap
command actually existed.
- Fixed: My $Limit fix from yesterday didn't work because NearLimit was
  an unsigned byte and the comparisons with -1 didn't work. Made it a
  signed word instead.
- Made sfxinfo_t::Link an unsigned int because it limited the amount of 
  usable sounds to 65535. 

SVN r869 (trunk)
2008-03-30 08:32:44 +00:00
Randy Heit f23e9df084 - Fixed: OPLMIDIDevice sent the wrong pitch wheel value to the player code.
Missimp.mid sounds a lot better now, though still a little off.
- Fixed: MIDI files that had ticks with nothing but meta-events did not play
  properly. (fixes sonic3_finalboss.mid)


SVN r868 (trunk)
2008-03-30 02:51:34 +00:00
Randy Heit 930de248fd - Applied Const's Makefile.linux changes.
- Made the OPL MIDI synth available from Linux.



SVN r866 (trunk)
2008-03-30 00:04:09 +00:00
Christoph Oelckers d5c3693fd9 - Added SnowKate709's A_DamageMaster/A_DamageChildren patch.
- Added a SFX_TRANSFERAMBUSHFLAG for A_SpawnItemEx.
- Added "Shaded" as a valid parameter for DECORATE's RenderStyle.
- Added Karate Chris's patch for a MAPINFO option making Strife conversations
  not halt the game.
- Extended the $limit fix that $alias and $random definitions can have their
  own $limit now.
- Fixed: When resolving a linked sound the limit of the current sound was
  ignored and the one of the referenced sound being used. This was particularly
  noticable when using the chaingun in a group of Zombiemen.
- Added a namespc parameter to FWadCollection::CheckNumForFullName which is
  used when a normal lump name has to be looked up and changed all
  CheckNumForFullName/CheckNumForName combinations in the source to use
  the extended version of CheckNumForFullName only to have consistent
  behavior for lump name lookup. 

SVN r865 (trunk)
2008-03-29 22:59:41 +00:00
Randy Heit cd70087ed5 - Moved sound sample rate, buffer size, and buffer count to the
advanced sound options menu. Removed opl_enable from the menu.
- Added OPL synth as MIDI device -3. Since this is based on the MUS player
  code, it only supports those events and controllers supported by MUS.
  Some of Duke's MIDIs sound awful, but I think that may be more because
  it's using different instruments... There's a thread in the MIDI streamer
  class that could be taken out for Linux, since it doesn't need to deal
  with the Windows Multimedia API, but for now, this is still Windows-only.


SVN r864 (trunk)
2008-03-29 05:01:38 +00:00
Randy Heit 938ae1767b - Did some restructuring of the OPL code in preparation for turning it
into a general MIDI player.
- Fixed: Passing false for a stream callback did not stop the stream.
- Removed opl_frequency, since the only time the emulation sounds good is
  when it plays at the exact frequency of a real chip.
- Music no longer plays at all when snd_musicvolume is 0.
- Bumped up snd_sfxvolume and snd_musicvolume default values.

SVN r862 (trunk)
2008-03-28 03:19:18 +00:00
Randy Heit 776d89428d - Changed D3DFB to explicitly request double buffering instead of assuming
that the drivers will treat a BackBufferCount of 0 as a request for
  double buffering.
- Fixed: Unsetting a cvar did not remove it from the list of tab
  completions.
- Added "" as a synonym for "nullimage" in SBARINFO.
- Fixed: MAKESAVESIG's stringifier in version.h did not work as expected.
  It stringified the passed macro name, not the value of the macro.
- Moved DCajunMaster off the DObject hierarchy.
- Changed DCajunMaster::getspawned into a TArray of FStrings. It was
  mysteriously being left pointing to uninitialized memory during the
  final GC at exit and crashing.
- Fixed: The code that removed hexdd.wad from the list of IWADs when
  hexen.wad was not present did not work.


SVN r861 (trunk)
2008-03-28 00:38:17 +00:00
Christoph Oelckers 997533e0c8 - Fixed: DCajunMaster::End was missing a write barrier for getspawned. The
same problem in D_DoomMain.
- Made bglobal a pointer because it was causing problems with the garbage 
  collector.


SVN r859 (trunk)
2008-03-27 22:37:13 +00:00
Randy Heit 39940fe20a - Added FMOD_OPENONLY to the callback version of CreateStream() to prevent it
from doing prebuffering of the song. This was causing the Linux version to
  hang while waiting for input from the pipe, since Timidity hadn't been
  started yet. I tried using a select call in the FillStream() method, but it
  always seems to return the pipe as having nothing available. Unfortunately,
  the game still falls all over itself if Timidity isn't available. Instead
  of execvp failing nicely, X errors kill the game. I don't know why it's
  doing that. My advice for Linux music: Skip Timidity++ and get a DLS patch
  set (/WINDOWS/system32/drivers/gm.dls is probably the most common by far)
  and set the snd_midipatchset cvar to point to it. It's faster and also
  sounds a whole lot better than the crappy freepats Ubuntu wants to install
  with Timidity++.
- GCC fixes.



SVN r858 (trunk)
2008-03-27 04:25:52 +00:00