Commit Graph

89 Commits

Author SHA1 Message Date
Christoph Oelckers f8ba5af858 - separated sprite and skin maintenance code from r_things.cpp into a separate file.
SVN r3256 (trunk)
2011-07-06 10:24:40 +00:00
Christoph Oelckers fbff5ca932 - moved r_interpolate.cpp and r_translate.cpp to r_data.
- merged r_jpeg.h into jpegtexture.cpp because that's the only place where it's ever used.


SVN r3255 (trunk)
2011-07-06 08:50:15 +00:00
Christoph Oelckers 5c6fd66ed5 - rename src/resources to src/r_data.
SVN r3254 (trunk)
2011-07-06 07:35:36 +00:00
Christoph Oelckers 5bf6398d85 - moved render style and border drawing code out of r_draw.cpp.
SVN r3251 (trunk)
2011-07-05 20:41:53 +00:00
Christoph Oelckers 7308e05ed0 - separated all voxel related resource maintenance code from r_things.cpp and r_data.cpp into its own file.
SVN r3246 (trunk)
2011-07-04 20:22:55 +00:00
Christoph Oelckers 4626492f50 - separated all colormap related code from v_palette.cpp and r_data.cpp into its own file.
SVN r3245 (trunk)
2011-07-03 10:47:35 +00:00
Christoph Oelckers 817368abc2 - changed R_InstallSpriteLump so that it doesn't abort for every seemingly misnamed lump in the sprites namespace. A warning is fully sufficient here.
SVN r3239 (trunk)
2011-06-16 13:10:03 +00:00
Randy Heit 8ccf552d09 - Added r_shadercolormaps cvar. Set it to false to disable shaders for fixed colormap effects
(e.g. invulnerability). This should only be necessary for SM1.4 cards with buggy drivers. I
  doubt the problem is very widespread. The one piece of SM1.4 hardware I obtained specifically
  for testing purposes has no problems using shaders for these effects.

SVN r3200 (trunk)
2011-05-11 04:16:45 +00:00
Randy Heit 0d39257eaf - Apply kgsws-CZ's fixes:
* Added new cvar, r_3dfloors for testing, so for example, you can see the FPS difference.
  * ds_p->bkup is not always allocated.
  * Fixed particles visible through 3D floors.
  * Fixed FAKE3D flag names.



SVN r3178 (trunk)
2011-04-13 02:34:48 +00:00
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
Randy Heit 3344fa9f30 - Fixed: COLORMAP tricks to produce bright lights do not work with the hardware renderer, so do
not hardware accelerate weapon sprites that use them. (see Harmony)

SVN r3170 (trunk)
2011-03-19 04:45:59 +00:00
Christoph Oelckers 1993e969b7 - GCC warning fixes (GCC stupidity for the most part.)
SVN r3154 (trunk)
2011-02-19 08:59:43 +00:00
Christoph Oelckers fae8ed444c - merged 3dfloors2 branch into trunk.
SVN r3124 (trunk)
2011-01-29 11:09:38 +00:00
Christoph Oelckers 17ab63a39f - fixed: The Skin initialization code did not NULL the Voxel pointer in its sprite definitions.
SVN r3103 (trunk)
2011-01-14 09:43:03 +00:00
Randy Heit 2add3fb381 - Merge voxels back into trunk. Even if it needs further tweaking, it should at least be stable now.
SVN r3086 (trunk)
2011-01-02 18:02:27 +00:00
Christoph Oelckers 231e7a1c6d - added a new render style 'Shadow'. Essentially it's just a black translucent stencil with an alpha of 0.3. The purpose of this style is to be used as a software renderer approximation of GZDoom's spectre effect.
- allow setting 'Shadow' as default fuzz effect
- changed CVAR conversion that strings 'false' and 'true' get evaluated as integers 0 and 1 respectively so that changing boolean CVARs to int does not destroy their values.


SVN r3076 (trunk)
2010-12-25 23:27:26 +00:00
Christoph Oelckers 770a879f6a - fixed: The TouchedActors array in the Dehacked parser was not freed after parsing was done.
- Initialize the alt HUD explicitly in D_DoomMain.
- don't let S_UnloadReverbDef leave a broken list of sound environments behind.
- Added more code to explicitly delete data before initializing it.

SVN r3039 (trunk)
2010-12-15 00:09:31 +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
Randy Heit 54163bc81c - Changed sprite-on-drawseg calculations to use untransformed coordinates. Build does it like
this. I don't recall what Doom did.

SVN r3009 (trunk)
2010-11-19 04:01:15 +00:00
Christoph Oelckers 545a892faa - added Firebrand's patch to rename 'swap' due to naming conflicts in newer MSVC compilers.
SVN r2449 (trunk)
2010-07-23 21:19:59 +00:00
Randy Heit f6cd776e2d - Extended state sprite/frame repetition to psprites.
SVN r2295 (trunk)
2010-04-21 01:40:03 +00:00
Randy Heit 5da2885d88 - Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.

SVN r2183 (trunk)
2010-03-02 04:51:16 +00:00
Christoph Oelckers 51e158d7dc - added all known maps requiring inverted sprite sorting to compatibility.txt.
- added compatibility option to invert sprite sorting. Apparently Doom.exe
  originally sorted them differently than most source port and on some maps
  which depends on this it doesn't look right (e.g. Strain MAP13)


SVN r2031 (trunk)
2009-12-18 08:19:34 +00:00
Randy Heit 0e3c1dc33e - Add a swap overload to make GCC happy.
SVN r2029 (trunk)
2009-12-18 04:58:20 +00:00
Randy Heit f6428e1cbb - Replaced sprite sorting with a stable sort. Performance at the start of
nuts.wad seems the same.


SVN r2028 (trunk)
2009-12-18 03:05:38 +00:00
Randy Heit ddf1afb82b - Shift player sprites down half a pixel. Interestingly, this makes vertical
scaling much closer between software and hardware.

SVN r1956 (trunk)
2009-11-01 01:35:11 +00:00
Randy Heit 4ebfdac887 - Changed all coordinates for DrawTexture() to floating point so that the
player sprites will retain the same precision they had when they were
  rendered as part of the 3D view. (needed for propery alignment of flashes
  on top of weapon sprites) It worked just fine for D3D, but software
  rendering was another matter. I consequently did battle with imprecisions
  in the whole masked texture drawing routines that had previously been
  partially masked by only drawing on whole pixel boundaries. Particularly,
  the tops of posts are calculated by multiplying by spryscale, and the
  texture mapping coordinates are calculated by multiplying by dc_iscale
  (where dc_iscale = 1 / spryscale). Since these are both 16.16 fixed point
  values, there is a significant variance. For best results, the drawing
  routines should only use one of these values, but that would mean
  introducing division into the inner loop. If the division removed the
  necessity for the fudge code in R_DrawMaskedColumn(), would it be worth it?
  Or would the divide be slower than the fudging? Or would I be better off
  doing it like Build and using transparent pixel checks instead, not
  bothering with skipping transparent areas? For now, I chop off the
  fractional part of the top coordinate for software drawing, since it was
  the easiest thing to do (even if it wasn't the most correct thing to do).


SVN r1955 (trunk)
2009-11-01 01:27:33 +00:00
Randy Heit da3daa0721 - Fix incorrect fix from previous commit.
SVN r1953 (trunk)
2009-10-30 03:53:00 +00:00
Randy Heit 4252cd52ad - Fixed: Sprites and decals that are drawn with addition must fade to black.
SVN r1952 (trunk)
2009-10-30 03:46:51 +00:00
Christoph Oelckers 4add2809a3 - fixed: Savegames stored the global fixed light levels when saving a player.
SVN r1893 (trunk)
2009-10-02 09:21:37 +00:00
Randy Heit 1eb4241663 - Fixed: R_DrawPSprite() did not initialize the colormap for the targeter
vissprites.


SVN r1883 (trunk)
2009-09-27 02:31:03 +00:00
Randy Heit d502655866 - For hardware 2D, apply fixed colormaps when copying to video memory instead
of doing it directly during the rendering, in order to improve visual
  fidelity for colormaps that aren't grayscale.


SVN r1866 (trunk)
2009-09-22 04:21:27 +00:00
Randy Heit 84a018f05a - Added support for defining the full color range of a special colormap.
SVN r1865 (trunk)
2009-09-22 02:54:19 +00:00
Christoph Oelckers c285f38a02 - Fixed: When drawing with a special colormap the quad's flags weren't cleared
which could cause crashes.
- Added custom special colormaps to DECORATE.
- Cleaned up special colormap code and removed lots of dependencies on the
  knowledge of the tables' contents.



SVN r1860 (trunk)
2009-09-21 13:15:36 +00:00
Randy Heit b8eb530a0d - Fixed: Wall drawing handled fixed light levels improperly (but did not
completely ignore them, either).
- Separated light level fixing out of player_t's fixedcolormap parameter.
  Using a fixed light level (e.g. PowerTorch) will no longer wipe out
  colored lighting.
- Moved the blending rectangle drawing into a separate discrete stage, since
  doing it while copying the 3D view window to the display now blends
  underneath the weapon instead of on top of it.
- Consolidated the special colormaps into a single 2D table.
- Tweaked the special colormaps slightly to make the true color results more
  closely match the paletted approximations.
- fb_d3d9_shaders.h was getting unwieldy, so I moved the shaders out of the
  executable and into zdoom.pk3. Shaders are still precompiled so I don't need
  to pull in a dependancy on D3DX.
- Added a few more shaders to accomodate drawing weapons with all the in-game
  lighting models. These are accessed with the new DrawTexture tags
  DTA_SpecialColormap and DTA_ColormapStyle.
- Player weapon sprites are now drawn using Direct3D and receive all the
  benefits thereof.


SVN r1858 (trunk)
2009-09-20 03:50:05 +00:00
Randy Heit 93202a5488 - Removed -fno-strict-aliasing from the GCC flags for ZDoom and fixed the
issues that caused its inclusion. Is an optimized GCC build any faster
  for being able to use strict aliasing rules? I dunno. It's still slower
  than a VC++ build.
  
  I did run into two cases where TAutoSegIterator caused intractable problems
  with breaking strict aliasing rules, so I removed the templating from it,
  and the caller is now responsible for casting the probe value from void *.
- Removed #include "autosegs.h" from several files that did not need it
  (in particular, dobject.h when not compiling with VC++).


SVN r1743 (trunk)
2009-08-02 03:38:57 +00:00
Randy Heit f39cde0486 - Reduced potential for overflow in R_ProjectSprite().
SVN r1725 (trunk)
2009-07-17 01:49:28 +00:00
Randy Heit fe19767ac2 - Added A_SetCrosshair.
SVN r1700 (trunk)
2009-07-01 02:00:36 +00:00
Christoph Oelckers 273758344f - Fixed: When setting up a deep water sector with Transfer_Heights the floorclip
information of all actors in the sector needs to be updated.


SVN r1600 (trunk)
2009-05-23 10:21:33 +00:00
Christoph Oelckers a732687548 - Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were 
  still triggered.
  These #pragmas were responsible for >90% of the GCC warnings that were not
  listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
  parameter handling of the sound functions for attenuation was changed.
  Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values. 
  Also added the option to specify attenuation with direct values in addition 
  to the predefined names.

SVN r1583 (trunk)
2009-05-15 10:39:40 +00:00
Christoph Oelckers a908834a11 - added some default definitions for constants that may miss in some headers.
- replaced __va_copy with va_copy per Chris's suggestion.
- replaced #include <malloc.h> with #include <stdlib.h> where possible.


SVN r1524 (trunk)
2009-04-07 07:06:07 +00:00
Christoph Oelckers 5bb3f87746 - GCC compile fix and warning removal.
SVN r1434 (trunk)
2009-02-21 21:44:15 +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
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
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
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 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 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