Commit graph

1408 commits

Author SHA1 Message Date
Mitchell Richters
e959226914 - Fix RRRA bike/boat angle adjustments following changes in f343bd8d5e.
* Because we're wrapping a negative number around to be unsigned, we need to do that after we've done our bit-shift operations.
2021-04-11 18:34:07 +10:00
Mitchell Richters
f343bd8d5e - Fix death camera issues stemming from f254eeb465.
* Adjustment in `__addadjustment()` needs to be signed.
* Output of `bvectangbam()` needs to be signed before Duke/SW left-shift the value.
2021-04-11 17:52:29 +10:00
Mitchell Richters
e76f63e2c0 - Consolidate all game interpolation code into inline functions. 2021-04-11 16:45:35 +10:00
Mitchell Richters
f254eeb465 - binaryangle.h: Remove lookangle class and replace use with binangle.
* Added in fca846272e to deal with signed adjustments but its just not needed.
* Made better use of `binangle`/`fixedhoriz` class getters and setters than before as well.
2021-04-11 15:45:53 +10:00
Christoph Oelckers
057b8a7354 - cleanup of bvectan family of functions.
This can be greatly simplified to a single bvectangbam function using atan2 directly.
2021-04-10 12:54:29 +02:00
Christoph Oelckers
b4d89cbac3 - got rid of the remaining occurences of gethiq16angle and all related tables. 2021-04-10 12:10:28 +02:00
Christoph Oelckers
19a4c12e6a - Blood: undid restriction for original QAV for Guns Akimbo shotgun fix. 2021-04-09 22:11:16 +02:00
Christoph Oelckers
333581a084 Merge branch 'master' into newrenderer2
# Conflicts:
#	source/build/src/defs.cpp
2021-04-09 19:57:56 +02:00
Christoph Oelckers
2820c50f3e - Blood: let the RFS parser handle forward slashes when cutting out the base directory of a given file name. 2021-04-09 18:25:32 +02:00
Christoph Oelckers
a530dfbe35 Merge branch 'master' into newrenderer2 2021-04-08 18:52:54 +02:00
Christoph Oelckers
a53ed46bae - fixed item placement on SW minihud.
Fixes #295
2021-04-08 17:43:56 +02:00
Christoph Oelckers
fc1fbfe8b3 - fixed .def 'music' parsing.
This was incomplete and just ignored Duke's special music, and the levelnum generation used an outdated formula so that it never managed to assign any music to the maps.
2021-04-08 16:35:26 +02:00
Christoph Oelckers
4cdc39c9b9 Merge branch 'master' into newrenderer2 2021-04-08 08:55:41 +02:00
Christoph Oelckers
a80c5db02b - forgot to save the Exhumed part of the last commit 2021-04-07 21:37:01 +02:00
Christoph Oelckers
68b7628f56 - RRRA: Sector effector type 156 is not supposed to scroll the floor texture. 2021-04-07 18:12:25 +02:00
Christoph Oelckers
3a34043267 Merge branch 'master' into newrenderer2 2021-04-07 15:12:27 +02:00
Christoph Oelckers
4a6a999f89 - SW: fixed interpolation for sector object sprites.
When checking for an existing interpolation it needs to check the actual sprite, not just the interpolation type.
2021-04-07 15:08:26 +02:00
Christoph Oelckers
0b79649dc2 Merge branch 'master' into newrenderer2 2021-04-06 16:14:21 +02:00
Christoph Oelckers
bfcedc2177 - autodetect .inis when loading Blood mods.
This works as long as the loaded mods have one single .ini file in them - in that case it is assumed that it is supposed to replace blood.ini, which will allow dragging & dropping such archives without further user intervention.
2021-04-06 00:57:31 +02:00
Christoph Oelckers
e30dc82676 - Cleanup of the voxel code.
* moving polymost_voxdraw into polymost.cpp.
* consolidated all remaining voxel code in hw_voxels.cpp. All original Build voxel code is completely gone now, except for polymost_voxdraw, so this got moved out of the build/ folder.
* integrate Blood's voxel init code into the main function.
* some further cleanup was allowed as a result of this, so engineInit is gone now because these parts can now be done outside the games' app_init functions.
2021-04-05 18:05:43 +02:00
Christoph Oelckers
090b52f783 - fixed animatesprites call in Duke.
This passed z instead of angle.
2021-04-05 12:25:09 +02:00
Christoph Oelckers
ba2defeb14 Merge branch 'master' into newrenderer2 2021-04-05 10:34:34 +02:00
Christoph Oelckers
eb2e77fb75 - Apply fix from EDuke32 commit 7225643e.
Fix undefined behavior/potential OOB access in ST_21_FLOOR_DOOR. g_AnimateGoal does not take a sector number, it takes an animation index, and caps at 1024, not 4096.
2021-04-05 00:14:15 +02:00
Christoph Oelckers
c303884274 - better handling for Duke's scrolling cloudy skies.
* Using the Doom-style dome here because it looks better.
* this necessitated changes to the backend to allow both types of sky domes at the same time
* do not clamp panning fields for cloudy sky with the new renderer because this makes the texture jump.
2021-04-04 20:35:38 +02:00
Christoph Oelckers
ea91b5ba5d - added a map patch for SW:WT's 'skyline' map.
This contains a badly tagged sky sector that makes the new renderer glitch out.
2021-04-04 18:57:03 +02:00
Christoph Oelckers
55ad51ee1f Merge branch 'master' into newrenderer2 2021-04-04 13:23:51 +02:00
Christoph Oelckers
9828cd7129 - this better have a null check... 2021-04-04 13:02:26 +02:00
Christoph Oelckers
6ebbf1288d - Duke/RR: Don't delete master switch sprites.
The sound system may play sounds on them after their deletion - this resulted in undefined behavior. To ensure properly defined behavior the sprite needs to be retained at least as long as the sound controller may still need it - which cannot be reliably determined so it has to be kept around forever. This would be easier if the sound controller code had proper start and stop events instead of inferring what to do from secondary information.
Fixes #288.
2021-04-04 13:01:32 +02:00
Christoph Oelckers
97a0cb2a10 - handle voxel rotation in the backend to enable it for all games.
This was previously only present in the Blood module and missed in Exhumed from upstream so the entire option was rather pointless.
Fixes #290
2021-04-04 10:33:29 +02:00
Christoph Oelckers
a298a3d3df - disabled 'isRunning' in Blood entirely.
After discovering yet another misbehaving place in the game I think it can be safely concluded that this is better left off unconditionally.
The only remaining place where this still gets checked is in nnexts, but I wouldn't expect this to work either.
Fixes #292
2021-04-04 09:35:05 +02:00
Christoph Oelckers
ebac57fb4f - fixed music in Blood's menu
This is only supposed to play for the fade-in of the background but needs to stop when the menu appears.
Fixes #291
2021-04-04 09:25:41 +02:00
Christoph Oelckers
952bccbf5f - added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back. 2021-04-03 21:49:28 +02:00
Christoph Oelckers
9c95c902c7 - added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back. 2021-04-03 21:40:16 +02:00
Christoph Oelckers
ab36b86a59 - sky tweaking
* Build skies need a different mesh for the dome - the one from GZDoom distorts them too much.
* made adjustment to the positioning math after redoing the mesh
* Exhumed abuses some strange effect of the original sky placement math which means the y-offsetting must be disabled for this game.
* RRRA sky initialization fixed. It must be done after setting up the tiles.
2021-04-03 21:06:02 +02:00
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
Mitchell Richters
9c01bde44e - gameinput.cpp: Block player input within sethorizon() and applylook() if target for each has been set by the ticker.
* Stops players having the ability to provide input and fight the system trying to set an input.
2021-04-02 22:47:19 +11: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