Commit graph

1373 commits

Author SHA1 Message Date
Christoph Oelckers
dc234ea72d - implemented RR's geometry effect.
The grossest of all gross render hack that were ever done with Build...
2021-04-02 22:52:46 +02:00
Christoph Oelckers
c8a75a8664 - give each DrawInfo its own list of tsprites.
Since these do not fully get processed sequentially the contents need to be preserved until needed.
This required getting rid of the global tsprite array. Polymost still uses a static vatiable, though, but this is only accessed in polymost-exclusive code.
2021-04-02 10:28:40 +02:00
Christoph Oelckers
80e5cd0dc5 - fixed some automap issues:
* Blood's automap was not drawn at all.
* SW's automap always showed all sectors
* SW's player sprite was not rendered.
* Non-automap: Forward gotsector to the game code because there's still a few places in Blood that need it.
2021-04-01 20:47:05 +02:00
Mitchell Richters
88695ef554 Merge branch 'master' into newrenderer2 2021-04-01 16:49:07 +11:00
Mitchell Richters
029f8807df - Make 360. / 2048. a constant expression and replace all uses throughout code. 2021-04-01 10:42:22 +11:00
Mitchell Richters
c630ad9110 Revert "- subjective fix to Duke 3D's RPG harsh recoil."
This reverts commit 839a7bcbe4.

Revert "- Duke: Restore RPG harsh recoil behind a CVAR."

This reverts commit 88a49b0d22.

# Conflicts:
#	source/core/gamecvars.cpp
#	source/core/gamecvars.h
2021-03-31 20:35:18 +11:00
Mitchell Richters
760c918e75 - Duke: Remove unnecessary int casts from gameexec.cpp.
* Incoming vars are already int and called functions only accept an int so really just no need at all.
2021-03-31 20:07:36 +11:00
Mitchell Richters
16886895b0 - Duke: DoPlayer(): Ensure SB_CENTERVIEW bit is cleared when setting a horiz target from CON.
* Repairs horizon issues raised in https://forum.zdoom.org/viewtopic.php?f=340&p=1185365.
2021-03-31 19:48:38 +11:00
Christoph Oelckers
7bea8ad6ba - fixed texture overlays for SW's sector portals. 2021-03-30 23:27:11 +02:00
Christoph Oelckers
a84060fda7 - SW: mark sector as dirty in wallmove. 2021-03-30 21:51:37 +02:00
Christoph Oelckers
f6984314b7 - SW: let sector objects properly invalidate the sector they are in. 2021-03-30 21:28:27 +02:00
Christoph Oelckers
92bb9c5319 - fixed display of player in mirrors. 2021-03-29 21:48:23 +02:00
Christoph Oelckers
18cf208b7d - fixed SW shadows in new renderer.
shade clamping and full sprite sort was missing,
2021-03-28 22:29:13 +02:00
Christoph Oelckers
e8edb32e0d - fixed camera texture setup.
They still are upside-down but aside from that work as expected.
2021-03-28 19:22:51 +02:00
Christoph Oelckers
81a690970b - SW: hide the player sprite before calling the renderer. 2021-03-28 15:28:08 +02:00
Christoph Oelckers
d3e0a9590c - renderDrawMasks may only be called for Polymost. 2021-03-28 15:14:32 +02:00
Mitchell Richters
6f65eb2270 - Duke: Amend 7e8ef99ec9 to adjust view height where it was originally adjusted.
* Doing this in `renderView()` unconditionally isn't correct as it can lead to a double adjustment if `p->spritebridge == 0 && p->newOwner == nullptr`.
2021-03-28 23:21:07 +11:00
Christoph Oelckers
7e8ef99ec9 - fixed view height in Duke. 2021-03-28 13:38:27 +02:00
Christoph Oelckers
fd0e9824b6 - call the game specific analyzesprites functions. 2021-03-26 15:06:14 +01:00
Christoph Oelckers
be7bca8e9e - expose animatesprite set of functions to new renderer as a callback. 2021-03-26 10:05:01 +01:00
Christoph Oelckers
0b1e81023f - added sprite collection loop to ProcessSector and did a bit of cleanup on the TSprite code. 2021-03-25 23:16:32 +01:00
Christoph Oelckers
f6568fee0c - rewrote SW portal setup to use static data instead of ad-hoc setup.
This was by far the messiest game, there's two reasons for this.
First, the portal links do not need to be in an actual portal sector, so they cannot be used to detect portal sectors.
Second, the game moves portals in place, so all offsets are (0,0,0) so that not even these can be used for detection.

The only working method is the super-complicated original way to look up portals at run time, just being done at map start.
Having static portal links should reduce the render glitches quite significantly because the renderer knows now which sectors belong to a portal and can use this information to ensure proper processing.
2021-03-25 21:21:48 +01:00
Christoph Oelckers
af54cf3a3c - made SW's sector portals operational.
Unlike the other games these are so poorly defined that the engine has to rely on the original fudging to pick the proper portal to link to. As a result they are just as limited as they always were.
In addition all the portal search code had to be reinstated.
2021-03-25 16:45:40 +01:00
Christoph Oelckers
168b0385cf - moved shadeToLight out of build.h. 2021-03-25 09:13:59 +01:00
Mitchell Richters
957f7e9487 - Accept binangle, fixedhoriz and lookangle classes in SetupViewpoint() vs. Q16.16 variables.
* Allows for more precision than Q16.16.
* Used as opportunity for `rollang` to be set using the `asdeg()` method, not `asbuildf()`.
2021-03-25 19:06:01 +11:00
Christoph Oelckers
13bbf0a4f9 - sector portals in RRRA are working. 2021-03-24 23:55:10 +01:00
Christoph Oelckers
dbbdfaa4ba - sector portals in Blood are working. 2021-03-24 23:11:06 +01:00
Christoph Oelckers
b7e8815133 - some further lightening of compat.h. 2021-03-24 21:13:36 +01:00
Christoph Oelckers
d8627a2b3f - removed all remains of projection math weirdness from the automap code in the games plus a bit more cleanup of the engine code. 2021-03-24 20:28:58 +01:00
Christoph Oelckers
09a9e14feb - set up engine portals for SW.
Also moving more code to _polymost.cpp which is only needed for ad-hoc lookup of portals with a client side implementation of a two-layer renderer.
2021-03-21 17:04:06 +01:00
Christoph Oelckers
a36377111c - engine-side portal setup for Blood and RRRA. 2021-03-21 14:48:35 +01:00
Christoph Oelckers
b91441f849 - same render interface rework for Shadow Warrior. 2021-03-21 12:22:50 +01:00
Christoph Oelckers
ecd6e68d69 - made render call adjustments to Exhumed.
This one was easy - no special cases at all. :)
2021-03-21 11:48:18 +01:00
Christoph Oelckers
6f7e7459ea - did some cleanup on Duke's render code to prepare for the new way of handling portals.
Like for Blood, the Polymost-only code has been moved aside.
Closer examination of the preparations the engine is doing for rendering SE40/150-portals shows that all this was merely done to avoid glitches with a two-phase rendering setup - nothing of this will be needed for doing it properly.
They can just be treated as run-of-the-mill stacked sectors. when using hardware rendering capabilities for clipping.
2021-03-21 10:58:11 +01:00
Christoph Oelckers
9f36ef69e6 - fixed variable name clash caused by viewUpdateShake's global variables.
removed the redundant call in the Ticker, because all its results are discarded.
Use arguments instead of global variables to pass data around.
2021-03-21 08:58:38 +01:00
Christoph Oelckers
d42ce0ee7e - WIP 2021-03-20 23:01:16 +01:00
Christoph Oelckers
4109a256ac - Blood: cleanup of render code.
Renaming of disassembly variables and moving of disabled Crystal Ball renderer to a separate function.
2021-03-20 19:20:42 +01:00
Christoph Oelckers
91957e40f1 - moved some original Raze code out if the Build folder. 2021-03-20 17:08:55 +01:00
Christoph Oelckers
30f4e2b29d - replaced the engine automap drawer with one leveraging the newly added sector geometry data.
This eliminates a lot of code depending on Build's projection math.
2021-03-20 16:20:48 +01:00
Christoph Oelckers
5a0c8da6bf - Duke: fixed some incorrect assignments in CON parser 2021-03-19 23:18:09 +01:00
Christoph Oelckers
3df5c440f9 - added some helpers to make it easier to determine if a sector's geometry has been altered.
Walls had no sector reference so this was added for marking the sector as altered when a vertex gets dragged around.
2021-03-19 23:18:09 +01:00
Christoph Oelckers
a5b3a1dd3e - removed some unused things from engine.cpp. 2021-03-19 15:12:54 +01:00
Christoph Oelckers
547ed4e415 - route everything through the full backend, now completely bypassing the intermediate GLInstance layer. 2021-03-18 17:18:03 +01:00
Christoph Oelckers
9ebd8fd4a5 - put all of Polymost in a namespace.
So that its static variables are properly separated from the rest.
2021-03-17 15:55:25 +01:00
Christoph Oelckers
7c68261fbf - redirect Exhumed's shareware exit to the main menu. 2021-03-15 18:58:28 +01:00
Christoph Oelckers
834da8b83b - Exhumed: refresh the status bar after loading a saved game.
It is actually not necessary to save the state - but the RefreshStatus function must be called to update all current values.
Fixes #282
2021-03-14 12:57:23 +01:00
Christoph Oelckers
25bf0854cf - allow game specific music names for all games supporting an Ogg-format CD audio soundtrack.
New names are:

REDNECKxx.ogg for Redneck Rampage
REDNECKRIDESxx.ogg for RR Rides Again.
SHADOWxx.ogg for Shadow Warrior.

The motivation here is to allow copying all this music to a single folder or .zip file and reference it from all games.
2021-03-12 23:15:34 +01:00
Christoph Oelckers
d7f720664a - Exhumed: fixed uninitialized variables in Queen boss when reloading a savegame. 2021-03-09 22:18:43 +01:00
Christoph Oelckers
df742d25db - Exhumed: Replace asserts for range checks with if's.
Asserts are mere debugging aids, the code was still trashing valid date in release builds.
2021-03-09 20:02:08 +01:00
Christoph Oelckers
e375c799ce - CommonLoon102's weapon fixes from NBlood:
Fix bug when switching to another weapon from the spray while firing with primary fire won't switch to the new weapon. And telling Caleb not to put away his lighter if the spray is being switched to TNT.
Do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray.
Do not put away lighter if TNT was selected while throwing a spray can.
Fix next/prev weapon
2021-03-09 09:31:04 +01:00