Commit Graph

80 Commits

Author SHA1 Message Date
Randy Heit d3b44a4172 - Fix errors/warnings from MinGW 4.5.0 (tdm-1).
- Disable the missing field initializers warnings that -Wextra produces from GCC.

SVN r3173 (trunk)
2011-03-29 05:20:33 +00:00
Christoph Oelckers fae8ed444c - merged 3dfloors2 branch into trunk.
SVN r3124 (trunk)
2011-01-29 11:09:38 +00:00
Christoph Oelckers e7eb43a343 - added Gez's automap patch to mark trigger lines.
SVN r3040 (trunk)
2010-12-15 00:14:42 +00:00
Christoph Oelckers f0f17e531c - move static AM color initialization into the AM_StaticInit function.
- move D_LoadWadSettings to keysections.cpp.
- made some more data reloadable.
- data structures filled by P_SetupLevel should be cleared before loading the level. They can remain non-empty in case of an error. There's probably more to fix here...
- fixed: MidiDevices and MusicAliases were not cleared before reloading local SNDINFOs.
- fixed signed/unsigned warnings in AddSwitchPair for real (GCC really allows -1u? MSVC prints a warning for that.)


SVN r3036 (trunk)
2010-12-14 00:50:02 +00:00
Christoph Oelckers 572bc4620a - changed automap initialization so that static data only gets initialized once upon startup instead of each time a level starts.
- initialize AUTOPAGE only once when the level starts, not each time the automap is switched on.


SVN r3031 (trunk)
2010-12-12 17:54:10 +00:00
Christoph Oelckers 7dd8a0fce9 - replaced all calls to sqrtf with sqrt. Also changed P_RadiusAttack to use doubles for all floating point calculations.
SVN r2989 (trunk)
2010-11-07 14:39:09 +00:00
Christoph Oelckers b0c7ac6868 - made "follow player" automap option a CVAR and added a menu item for it.
SVN r2965 (trunk)
2010-10-24 07:39:48 +00:00
Christoph Oelckers ce7921c9d9 - externalized the vector graphics for the automap arrows and the key.
SVN r2949 (trunk)
2010-10-16 22:37:30 +00:00
Christoph Oelckers 5be9729872 - FScanner::Float is a double so there's no need to cast values to float before assigning them to this variable.
SVN r2865 (trunk)
2010-09-29 07:25:14 +00:00
Christoph Oelckers ec0b07b5e2 - added Entryway's AM_Rotate optimization.
SVN r2739 (trunk)
2010-09-10 13:49:08 +00:00
Christoph Oelckers ce2c2bd825 - replaced AM_Rotate with a more precise floating point version posted by Entryway.
SVN r2713 (trunk)
2010-09-07 20:23:44 +00:00
Randy Heit 0202c0c3a9 - Added the am_zoom command to zoom the automap by a specific step and set default mouse wheel
bindings for it. I'm not sure how this should be exposed through the menu, however. Technically,
  it's different from the pan keys, but from an end user's point of view, they both zoom the
  automap, so they should both be listed under the Zoom in and out controls. But the menu code
  can't handle that.

SVN r2663 (trunk)
2010-09-01 05:03:17 +00:00
Randy Heit f9691a24ff - Fixed: The automap was too aggressive about hiding markers.
SVN r2628 (trunk)
2010-08-29 03:37:41 +00:00
Christoph Oelckers 4e1a514455 - fixed: Subsectors which are the origin of polyobjects should not be drawn on the textured automap because the vertices no longer are where they'd be expected to be.
SVN r2622 (trunk)
2010-08-28 16:51:41 +00:00
Christoph Oelckers 76816f7da8 - disable check for hidden sectors because it does more harm than good.
- don't draw a textured automap in overlay mode.


SVN r2614 (trunk)
2010-08-27 17:49:27 +00:00
Christoph Oelckers 9a4abe0915 - merged automap branch into trunk.
SVN r2609 (trunk)
2010-08-27 15:20:05 +00:00
Randy Heit 677d07f837 - Merge BSP-able polyobjects back into the trunk.
SVN r2480 (trunk)
2010-08-01 02:41:56 +00:00
Christoph Oelckers 35ba99ed31 - Added Gez's automap enhancements but made the new key icon optional.
SVN r2462 (trunk)
2010-07-25 21:46:51 +00:00
Christoph Oelckers 4ac64b6df7 - merged polyobject branch into trunk and made some adjustments for savegame compatibility.
SVN r2448 (trunk)
2010-07-23 05:56:25 +00:00
Christoph Oelckers b2cef54d72 - fixed: Classes inherited from PowerScanner didn't work anymore.
SVN r2368 (trunk)
2010-06-13 10:11:50 +00:00
Christoph Oelckers 80f5a58e34 - fix automap cheat to avoid division by 0.
SVN r2308 (trunk)
2010-05-01 20:34:28 +00:00
Christoph Oelckers 1b0756e170 - added a am_showalllines cheat CVAR as countermeasure for maps that intentionally disable the full automap.
SVN r2307 (trunk)
2010-05-01 17:29:25 +00:00
Randy Heit e78fd195d8 - Added support for the original games' player translations, including Hexen's table-based ones.
SVN r2193 (trunk)
2010-03-06 02:51:23 +00:00
Christoph Oelckers 0997c608f2 - added a secret sector color to automap overlay.
- added a score display to both alt HUD and sbarinfo.
- simplified code for AltHud status values display.


SVN r2141 (trunk)
2010-01-30 09:17:44 +00:00
Christoph Oelckers 9dfef79702 - fixed: puff checks for MF6_NOTRIGGER need to resolve actor replacements.
SVN r1909 (trunk)
2009-10-11 17:44:50 +00:00
Christoph Oelckers ba28749df7 - fixed: WIF_STAFF2_KICKBACK did not work anymore because it depended on conditions
that were changed some time ago.
- fixed: The damage inflictor for a rail attack was the shooter, not the puff.
- Fixed: Floor and ceiling huggers may not change their z-velocity when seeking.
- Fixed: UDMF set the secret sector flag before parsing the sector's properties,
  resulting in it always being false.
- Renamed sector's oldspecial variable to secretsector to better reflect its
  only use.
- Fixed: A_BrainSpit stored as the SpawnShot's target the intended BossTarget, 
  not itself contrarily to other projectile spawning functions. 
  A_SpawnFly then used the target for CopyFriendliness, thinking it'll be the 
  BossEye when in fact it wasn't.
- Added Gez's submission for a DEHACKED hack introduced by Boom.
  (using code pointers of the form 'Pointer 0 (x statenumber)'.
- fixed: Attaching 3DMidtex lines by sector tag did not work because lines
  were marked by index in the sector's line list but needed to be marked by
  line index in the global array.
- fixed: On Linux ZDoom was creating a directory called "~.zdoom" for 
  save files because of a missing slash.
- fixed: UDMF was unable to read floating point values in exponential format
  because the C Mode scanner was missing a definition for them.
- fixed: The recent changes for removing pointer aliasing got the end sequence
  info from an incorrect variable. To make this more robust the sequence index
  is now stored as a hexadecimal string to avoid storing binary data in a string.
  Also moved end sequence lookup from f_finale.cpp to the calling code so that
  the proper end sequences can be retrieved for secret exits, too.

SVN r1777 (trunk)
2009-08-30 10:43:51 +00:00
Christoph Oelckers 25c0f679cb - Fixed: using custom automap backgrounds crashed.
SVN r1735 (trunk)
2009-07-24 20:25:19 +00:00
Christoph Oelckers 3ab370b6ee - added a compatibility option to restore the original Heretic bug where
a Minotaur couldn't spawn floor flames when standing in water having its
  feet clipped.
- added vid_vsync to display options.
- fixed: Animations of type 'Range' must be disabled if the textures don't
  come from the same definition unit (i.e both containing file and use type
  are identical.)
- changed: Item pushing is now only done once per P_XYMovement call.
- Increased the push factor of Heretic's pod to 0.5 so that its behavior
  more closely matches the original which depended on several bugs in the engine.
- Removed damage thrust clamping in P_DamageMobj and changed the thrust calculation
  to use floats to prevent overflows. The prevention of the overflows was the
  only reason the clamping was done.
- Added Raven's dagger-like vector sprite for the player to the automap code.


SVN r1668 (trunk)
2009-06-14 13:47:38 +00:00
Christoph Oelckers b55ca6ffaa - Fixed: Monsters should not check the inventory for damage absorbtion when
they have the MF5_NODAMAGE flag set.
- Added patch for saving automap zoom.


SVN r1587 (trunk)
2009-05-15 22:06:44 +00:00
Christoph Oelckers 19c4e3caed - Added Gez's A_CheckCeiling submission.
- Fixed: AM_NewResolution crashed when called from outside a level.
- Added support for Quake PAK files.
- Improved warning messages for WAD files with incorrect marker usage.


SVN r1556 (trunk)
2009-04-23 23:20:21 +00:00
Randy Heit dcedad548b - Changing screen resolution now adjusts the automap scale to be constant
relative to screen resolution.


SVN r1549 (trunk)
2009-04-16 03:02:08 +00:00
Christoph Oelckers 9040710e62 - Updated UDMF spec to 1.1.
- Added -noautoload option.
- Added default Raven automap colors set. Needs to be tested because I can't
  compare against the DOS version myself.
- Extened A_PlaySound and A_StopSound to be able to set all parameters of the
  internal sound code.



SVN r1544 (trunk)
2009-04-14 09:06:03 +00:00
Christoph Oelckers bf4e17703d - Fixed: Dehacked string replacement did not check the clusters' finaleflats.
- Changed the definition of several typedef'd structs so that they are
  properly named.
- Limited DEHSUPP lump lookup to search zdoom.pk3 only. It will no longer
  be possible to load DEHSUPP lumps from user WADs.
- Brought back the text-based DEHSUPP parser and changed it to be able to 
  reference states by label. Also changed label names of 
  DoomUnusedStates and added proper labels to all states that were
  previously forced to be the first state of an actor so that the old
  (limited) method could access them. This was done to address the following
  bug:
- Fixed: The player's death states calling A_PlayerSkinCheck should not be
  part of the state set that is accessible by Dehacked. These will produce
  error messages when mapped to non-players.

SVN r1512 (trunk)
2009-03-28 11:49:44 +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 f867f40bab - Fixed scrolling of the automap background on a rotated automap.
SVN r1408 (trunk)
2009-02-07 00:07:55 +00:00
Randy Heit a704043fd2 - Removed automap scroll clamping for rotated maps. If it's going to scroll out of sight,
at least it'll do so at a fixed right.

SVN r1407 (trunk)
2009-02-07 00:01:58 +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
Christoph Oelckers 8f686a5e02 - Added Karate Chris's new DMFlags submission.
SVN r1333 (trunk)
2008-12-28 09:49:15 +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 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 760f70d3f1 - Changed compilation for g_doom, g_heretic, g_hexen and g_strife folders
so that all files are included by a central one instead of compiling 
  each one separately. This speeds up the compilation process by 25%
  when doing a complete rebuild in Visual C.
- Cleaned up more header dependencies.

SVN r1226 (trunk)
2008-09-15 14:11:05 +00:00
Christoph Oelckers b07542ddd6 More header cleanup.
SVN r1225 (trunk)
2008-09-15 00:47:31 +00:00
Christoph Oelckers db5723997c - Cleaned up some include dependencies.
SVN r1224 (trunk)
2008-09-14 23:54:38 +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 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
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 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
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 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
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