Commit graph

101 commits

Author SHA1 Message Date
Christoph Oelckers
e11a0986ce - encountered a strange crash that after changing a map, InSubsector was not NULL and pointing to invalid data. So let's better NULL this variable explicitly each time a render loop is started. 2016-03-08 12:27:01 +01:00
Michael Labbe
97821a3036 21:9 aspect ratio support
- vid_aspect 6 forces 21:9
2016-03-03 17:31:12 -06:00
Christoph Oelckers
14a0567343 - optimized the portal translation functions by precalculating the rotation angle, sine and cosine. 2016-03-03 11:58:04 +01:00
Randy Heit
55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers
02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Christoph Oelckers
158caf78a0 - more float to double conversion.
In particular this removes all assignments of FIXED2FLOAT to double variables because they not only lose precision but also generate unnecessary code.
2016-02-11 21:33:30 +01:00
Christoph Oelckers
00895c245e - mpved all software renderer specific code for the portals into the render sources. 2016-02-05 15:39:06 +01:00
Braden Obrzut
ba54d73e07 Merge branch 'portals2_visual' 2016-02-05 00:10:46 -05:00
Randy Heit
240ca2af4c Use consistant right-edge rules in the renderer.
- The original Doom renderer was inclusive for all right edges. This was
  fine for the wonky projection it did. This was not fine for a standard
  perspective divide, so I had to change walls to be right-edge exclusive
  when I changed the projection. I only touched what was needed. Until
  now. The right edge is always exclusive now, which should prevent any
  more bugs related to mixing the two clusivities incorrectly.
2016-01-30 21:27:35 -06:00
Braden Obrzut
f3f77a1ba0 Merge branch 'master' into portals2_visual 2016-01-18 09:45:42 -05:00
ZZYZX
605fce9008 Fixed skybox clipping: things in a skybox shouldn't be clipped against current portal. Fixed: portal inside of a skybox sets CurrentPortalInSkybox to false. 2016-01-10 05:45:26 +02:00
ZZYZX
4d518a220c Fixed skybox clipping: lines in a skybox shouldn't be clipped against current portal 2016-01-10 05:22:33 +02:00
Christoph Oelckers
7e87216878 - fixed: r_visibility values >= 205 appear to cause fixed point overflows at least on 5:4 aspect ratio so they should be blocked. 2015-11-27 10:44:37 +01:00
ZZYZX
b3764f4ee2 Fixed trivial bug with two-sided portals not clipping stuff correctly 2015-06-07 04:19:21 +03:00
ZZYZX
29880026a6 Fixed sprite clipping with drawsegs (removed unnecessary portal check) 2015-06-07 04:19:21 +03:00
ZZYZX
f07d43943a Made a CVar to limit recursions; Made a CVar to highlight portal borders; Fixed slight logical bug in unique portal identifiers 2015-06-07 04:19:20 +03:00
ZZYZX
cd39c4b8a6 Merged mirrors with portals; Render part of mirrors done, render part of portals needs further testing 2015-06-07 04:19:17 +03:00
Teemu Piippo
ca012bc9be - adapted AActor to use TFlags 2015-04-04 19:40:43 +03:00
Randy Heit
891b3da103 Remove extra magnitude from magic texture mapping values
- These used to be fixed point, but now they're floating point, so the
  excess magnitude is unneeded.
2014-08-07 22:43:23 -05:00
Randy Heit
bbc3b69a7c Remove polymost stuff
- Maybe it will be back someday, but it's been essentially dead for nearly
  10 years, so don't hold your breath.
2014-07-31 19:44:41 -05:00
Braden Obrzut
d8ff4ec281 - Fixed: All clang 5.0 warnings.
- Renamed autostart/autozend since Xcodeā€™s build process links in strictly alphabetical order.
2014-01-05 19:50:09 -05:00
Christoph Oelckers
50c5dc62aa - fixed typo in USDF spec.
- comment fixes taken from GZDoom.
- division by zero check in R_SetVisibility from GZDoom.
2013-06-23 10:28:12 +02:00
Randy Heit
2919bdf4fe - Fixed: Skyboxes never cleared planes when a 3D floor was in view.
SVN r4164 (trunk)
2013-02-23 05:15:32 +00:00
Randy Heit
b5a731f3a6 - Move player prediction calls into D_Display().
SVN r3636 (trunk)
2012-05-10 03:48:36 +00:00
Randy Heit
118e513d03 - Fixed: The player's position was only predicted during the duration of R_SetupFrame().
Consequently, if somebody used the chasecam while predicting, they would appear to lag
  behind the camera, because their actor would be at its unpredicted position by the time
  sprites were processed.

SVN r3603 (trunk)
2012-04-28 03:04:21 +00:00
Christoph Oelckers
4ef68ded5d - fixed some leftover references to the software renderer.
SVN r3264 (trunk)
2011-07-07 19:53:42 +00:00
Christoph Oelckers
5bfcaab25c - separation of software renderer from the rest of the code complete. All external access to the renderer is routed through the FRenderer interface class now, with two exceptions (2D texture drawing to a canvas and polymost testing code) that are handled by #defines.
SVN r3263 (trunk)
2011-07-07 15:37:47 +00:00
Christoph Oelckers
463c276014 - removed more r_ header dependencies from the rest of the code.
SVN r3260 (trunk)
2011-07-06 15:31:05 +00:00
Christoph Oelckers
163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers
03177090c0 - removed some unnecessary r_ header #includes.
SVN r3257 (trunk)
2011-07-06 10:55:04 +00:00
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
17ed7aaabd - moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.
SVN r3248 (trunk)
2011-07-05 10:02:38 +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
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
65977c2d0c - Restore the original Doom algorithm for calculating xtoviewangle[] for the inner 90 degrees
of the field of vision, since it reduces the chances of duplicate sky columns output next to
  each other compared to a straight tangent-to-angle calculation.

SVN r3189 (trunk)
2011-04-24 17:05:50 +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
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
6309d90be0 - moved texture counting code into FTextureManager.
- moved all code and data for Build tile management into FTextureManager.
- moved texture animation management into FTextureManager.
- changed: Animate textures only once per frame, not per view. Otherwise with animations that have sub-frame accuracy camera textures of the same area can show different animation frames if the frame changes falls between the rendering of the different views.


SVN r3026 (trunk)
2010-12-11 12:00:40 +00:00
Randy Heit
f5a1aa994b - pr_hom shouldn't have a name, since we don't care about it for save games or network sync.
SVN r2494 (trunk)
2010-08-08 00:59:40 +00:00
Randy Heit
cb6e9b90fb - Added r_clearbuffer cvar. Valid values are:
* 0. Do not clear. This is the standard behavior.
  * 1. Clear to black.
  * 2. Clear to white.
  * 3. Alternate between black and white every 128 ms.
  * 4. Step through the palette one color at a time every 32 ms.
  * 5. Epileptic seizure inducing random colors every frame.

SVN r2491 (trunk)
2010-08-07 03:57:22 +00:00
Randy Heit
9a025fbb23 - Changed xtoviewangle[] calculation so that when it mirrors the array to the left half, it
does not include xtoviewangle[centerx] in the mirroring so that the two columns at the center
  of the screen do not map to the same angle. (BTW, this array is only used for the sky drawing.)

SVN r2487 (trunk)
2010-08-01 20:21:04 +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
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
Randy Heit
178587fff2 - Merged SetState and SetStateNF into a single function.
- Added new sprite #### and frame character # to specify the behavior of sprite ---- on a
  per-sprite and per-frame basis respectively.

SVN r2291 (trunk)
2010-04-19 02:46:50 +00:00
Randy Heit
7f96531dc0 - Use I_FPSTime() instead of I_MSTime() to drive R_UpdateAnimations().
SVN r2253 (trunk)
2010-03-28 04:04:44 +00:00
Randy Heit
344dda4a1a - Replaced toint/quickertoint with the portable routines from xs_Float.h. The
former used fistp, which is not portable across platforms, so cannot be
  used in the play simulation. They were only suitable for the renderer.
  xs_Float.h also has a very fast float->fixed conversion, so FLOAT2FIXED
  uses that now.
  (And I also learned that the FPU's round to nearest is not the rounding I
  learned in grade school but actually Banker's Rounding. I had no idea.)
  (Also, also, the only thing that could have made quickertoint faster than
  toint was that it stored a 32-bit int. I never timed them, and I doubt in
  practice there was any real difference between the two.)
- Changed atan2f to atan2. Using floats is not a win, because the result is
  returned as a double on the x87 stack, which the caller then needs to cast
  down to a float using fst/fld.

SVN r1990 (trunk)
2009-11-20 05:34:20 +00:00