Commit graph

15758 commits

Author SHA1 Message Date
Christoph Oelckers
e21f899989 - added all #includes needed to compile on Windows without using precompiled headers. 2021-12-14 12:24:09 +01:00
Christoph Oelckers
7e2431ebd8 - replaced the remaining content from compat.h 2021-12-14 10:15:58 +01:00
Christoph Oelckers
016a907c20 - replaced vec2_t with FVector2. 2021-12-14 10:07:06 +01:00
Christoph Oelckers
7546cf3a4b - replaced vec3f_t with FVector3. 2021-12-14 09:58:01 +01:00
Christoph Oelckers
6e43f1a15a - Blood: refine picnum 0 filter to apply to face sprites only. 2021-12-13 17:58:11 +01:00
Mitchell Richters
6aecc18c35 - SW: Use floating point radians instead of converting integer Build angle into radians for when updating a sound's angle. 2021-12-13 23:37:11 +11:00
Christoph Oelckers
8abd67a3b1 - fixed sound listener angle for the remote control case.
It was taking the angle of the rotating sector object instead of the angle from the listener's position to it.
2021-12-13 13:24:33 +01:00
Christoph Oelckers
498abf25f3 - Blood: make sure that invalid sprites don't get rendered at all.
Seems the game may have depended on them being clipped by the floor or ceiling.
2021-12-13 11:45:28 +01:00
Christoph Oelckers
a899055f50 - fixed: in palette emulation mode, assume all textures to be non-translucent.
These need to force an alpha test, which is disabled for textures with translucent texels.
2021-12-13 10:35:03 +01:00
Christoph Oelckers
e104316e75 - fixed bad parameter to getzrange.
This originated from 1d39bb371e where the getzrange_old function was removed
2021-12-13 09:39:57 +01:00
Mitchell Richters
2253a418c7 - Tidy up some of the indentations that were badly resolved in the previous commits merge conflict. 2021-12-13 07:39:01 +11:00
Christoph Oelckers
054d81fc8e - fixed logic for discarding walls in new renderer.
The case being checked here may decide not to add the wall to the clipper but it must still be rendered.
Information for determining visibility is not sufficient in case of sector overlaps which can happen with rotating doors or poorly set up sector objects.

# Conflicts:
#	source/core/rendering/scene/hw_bunchdrawer.cpp
2021-12-12 19:40:17 +01:00
Christoph Oelckers
c2f29b8849 - fixed OOB write in section splitting code. 2021-12-12 09:42:45 +01:00
Mitchell Richters
a9d7eb06c7 - Add OpenGL ES to the backend options in the menu. 2021-12-12 11:22:43 +11:00
Christoph Oelckers
387a03c7ee - fixed triangulation via node builder for sectors with invalid walls.
The array indices were not properly adjusted for the missing elements an
2021-12-12 00:23:35 +01:00
Emile Belanger
9e9bb66e9a GLES: Fix bias state 2021-12-11 13:44:23 +01:00
Emile Belanger
5300abb76d GLES: Fix line-endings for func_paletted.fp 2021-12-11 13:23:39 +01:00
Emile Belanger
9e1e824f5e GLES: Fixed palette mode and interpolation 2021-12-11 13:23:39 +01:00
Emile Belanger
5a8c57040f GLES: Palette mode now GLES2 compliant. Interpolation not yet working. 2021-12-11 13:23:39 +01:00
Emile Belanger
9501215ef2 Revert "- disabled palette emulation for the GLES backend."
This reverts commit 8d9d3d5f8f.
2021-12-11 13:23:39 +01:00
Christoph Oelckers
10c6fde8d6 - reordered the init calls in engineLoadBoard.
sprite lists must be done after preparing the arrays, otherwise important bits get overwritten.
2021-12-11 12:51:07 +01:00
Christoph Oelckers
507dc10e4f - Duke/RR: Fixed sprite validation checks in animatesprites. 2021-12-11 09:57:02 +01:00
Mitchell Richters
853aab5513 - Update version.h. 2021-12-10 17:40:18 +11:00
Mitchell Richters
3269d6a398 - Duke: Ensure all weapon variables used for interpolation have the o values set when CON updates them.
* Hasn't been an issue to date but could become one should a mod set these.
* Can't simply back the variable up and set the main one because unless the mod knows we're interpolating, it could have undesirable effects.
2021-12-10 17:31:51 +11:00
Mitchell Richters
ee1ffd2347 - Duke: Fix lotag signedness issue affecting SE10 (door auto-close).
* Originated in 01abe7b2ac while removing a casting to short.
* Fixes #594.
2021-12-10 17:26:56 +11:00
Christoph Oelckers
a8c4d61fab - default-enable GL_DEPTH_CLAMP for the GLES renderer.
This brings it in line with the other backends.
2021-12-08 00:19:49 +01:00
Mitch Richters
5aa4243327 - Duke: Test tsprite's sector in animatesprites_d() following crash while noclipping in Duke WT's E5L1. Apply same fix to animatesprites_r() as well. 2021-12-07 22:55:08 +11:00
Mitch Richters
6aba76cfe5 - Duke/RR: Fix RR crash while operating weapon outside of a sector (noclipping, etc). 2021-12-07 21:42:21 +11:00
Mitchell Richters
af96180123 - Duke/RR; Don't lose the precision of p->MotoSpeed when calculating p->VBumpTarget. 2021-12-07 20:02:30 +11:00
Mitch Richters
7f1b8402d1 - Slight optimisation to I_GetInputFrac() by multiplying by inverse instead of dividing on a constant. 2021-12-07 20:02:11 +11:00
Mitch Richters
cb91e23c75 - Clamp the return value in PitchToHoriz() between the range of an INT32 value, and fix some math in the PitchToBAM() and BAMToPitch() inlines. 2021-12-07 19:59:30 +11:00
Mitch Richters
acf38f7a21 - Make a number of CVARs in gamecvars.cpp saved as part of the global config.
Full list:
* `cl_weaponsway`
* `cl_viewbob`
* `cl_interpolate`
* `cl_slopetilting`
* `cl_showweapon`
* `cl_syncinput`
* `cl_hudinterpolation`
* `cl_loadingscreens`
2021-12-07 19:59:26 +11:00
Mitch Richters
b6b0887611 - Fix missed flags pass-through in bool StartCutscene(const char* s, int flags, const CompletionFunc& completion) overload. 2021-12-07 19:59:19 +11:00
Mitch Richters
63a19bbb15 - Port spritetype::insector() over from develop and use with sector nullptr checks in 6539d72663. 2021-12-07 19:56:50 +11:00
Mitch Richters
6539d72663 - Duke/RR: Add three sector nullptr checks after receiving crash in Redneck Rampage Route 66 while noclipping. 2021-12-07 19:44:35 +11:00
Mitch Richters
85a2e3bd06 - Duke/RR: Do nullptr test in floorspace_d()/floorspace_r() functions to match ceilingspace_*() functions. 2021-12-07 19:41:25 +11:00
Mitch Richters
a7e99a3bd1 - Duke/RR: Do nullptr test in ceilingspace_r() after receiving crash in Redneck Rampage Route 66 (do Duke for parity). 2021-12-07 19:41:22 +11:00
Mitch Richters
96867e15d5 - Duke: Apply same nullptr fix in 2e7496888a to prelevel_r(), and rename sect to sectp for 1:1 match between _d.cpp and _r.cpp files. 2021-12-07 19:41:18 +11:00
Mitch Richters
2e7496888a - Duke: Re-add lost nullptr check in prelevel_d() that was causing a crash while loading Duke Nukem's Penthouse Paradise. 2021-12-03 10:14:41 +01:00
Christoph Oelckers
81268cb9b6 partial Revert of "- optimized vector math."
This reverts commit 826fd7ddb2.

Looks like there's dependencies on the intermediate variables. The optimized code gave the same result but did not work anymore.
2021-12-02 23:32:20 +01:00
Christoph Oelckers
c2baa68160 - fixed camera textures breaking in SW when restarting a level.
This was caused by attempting to delete the camera textures when cleaning up the mirror array.
The Build tile manager was not prepared for such a use case and left a broken texture behind.

To allow this to function it now resets the texture replacement type when deleting a tile and to avoid creating new camera textures these will now be stored in a cache and recycled later.
2021-12-02 21:40:43 +01:00
Christoph Oelckers
60630f5b84 - do not init pointers to 0xffffffffffffffff.
These will most certainly crash when used in any way.
2021-12-02 18:42:02 +01:00
Christoph Oelckers
cb099b1b66 - added two missing semicolons.
Unbelievable that this was legal C++ and didn't even get a warning!
2021-12-01 23:30:02 +01:00
Christoph Oelckers
57aca0ed07 - SW: fixed sector object setup with vator effect.
This used some weird initialization logic that was missed when first modifying this code.
2021-12-01 21:00:00 +01:00
Christoph Oelckers
324e35e776 - SW: fixed use of uninitialized variable in WallSetup 2021-12-01 19:55:18 +01:00
Christoph Oelckers
5bb114ba6e - fixed two bad actor references in Exhumed's radial damage code.
The radial source is passed through pRadialActor, not pObjActor.
2021-11-30 22:44:54 +01:00
Christoph Oelckers
00d54fa11a - fixed return value of updatesector pointer variant. 2021-11-30 16:44:52 +01:00
Christoph Oelckers
690994ea1e - Duke: fix missing sectp update in processinput_d.
RR version had this correct
2021-11-30 00:20:16 +01:00
Christoph Oelckers
64cad55d73 - fixed updatesector and changed updatesectorz to use the same search algorithm.
The initial distance check in updatesectorneighbor had a far too low threshold which would skip the breadth-first search for relatively small distances already.
Exhumed's LEV1 and Duke's Lunatic Fringe were the most obvious candidates where this could cause problems.
Changed to use a mixture of the original updatesector with the revised algorithm so that all immediate neighbors of the start sector will get visited unconditionally.

updatesectorz was still the original function from Shadow Warrior, this also was changed to use the same algorithm as uodatesector.
2021-11-30 00:15:25 +01:00
Christoph Oelckers
f765783437 - various small bits of cleanup. 2021-11-29 00:57:11 +01:00