Commit graph

12400 commits

Author SHA1 Message Date
Mitchell Richters
7bf1cacc7f - Blood/Duke/RR/SW: Unify the player's angle function.
* For Blood/SW, exposes `SB_LOOK_LEFT`/`SB_LOOK_RIGHT` to games, hooking up `q16look_ang` and `q16rotscrnang` within.
* For SW, use Duke & Blood's return to center function and remove `PF_TURN_180` bit.
* For RR, replace a few misused bits with some bools inside of `player_struct`.
* Since bulk of functionality is sourced from Duke (30Hz), apply proper scaling so SW speed matches (40Hz).
2020-09-21 17:12:26 +10:00
Christoph Oelckers
3810c4cb51 - Blood: instead of running the indexer after saving a state, just save the pointer before indexing to directly restore it. 2020-09-20 22:00:39 +02:00
Christoph Oelckers
1139702815 - disable softpoly for POSIX as well. 2020-09-20 21:52:10 +02:00
Christoph Oelckers
c1a8d55d24 - removed Softpoly from the startup screen and its enabling define in the project.
Since this not only crashes but also has totally unfitting lighting, which is unlikely to be fixed it really makes no sense offering this to the users.
Vulkan may also have to be disabled for release builds because it's not working yet but that needs to be fixed later and should eventually be supported.
2020-09-20 21:15:16 +02:00
Christoph Oelckers
78be8f866b - always use the containing sector's fog when rendering sprites.
This is for consistency, otherwise sprites with a palette translation would stand out. Also use shade dependent fog density instead of a single global value.
Currently this only has an effect in true color rendering mode.
2020-09-20 20:39:11 +02:00
Christoph Oelckers
dc7be6d526 - Duke: edited the first intermission pic a bit to reduce the visibility of a seam where it was extended 2020-09-20 19:29:21 +02:00
Mitchell Richters
0ab3b33a6c - Blood/Duke/RR/SW: Unify the player's horizon function.
* For Duke/SW, we continually apply `SB_CENTERVIEW` only if it was previously a toggled action, similar to Blood.
* For SW, we remove two SW-specific bits (`PF_LOCK_HORIZ` and `PF_LOOKING`) that are no longer needed.
* For Duke, we remove `return_to_center` and just use the `SB_CENTERVIEW` action bit as required.
* For `sethorizon()`, feature set and adjustment speeds are an averaged out accumulation across Duke/SW:
** GameTicRate is factored in for adjustment decisions to provide consistency for SW being the faster game.
** Adjustment amounts are half way between Duke/SW.
2020-09-20 20:01:36 +10:00
Mitchell Richters
f0b32b6078 - SW: Implement cl_viewbob. 2020-09-20 18:25:16 +10:00
Mitchell Richters
0c4fe5f91b - Blood: Fix remaining issues such as starting horizon, remove q16look and clean up some remaining bits in nnexts.cpp. 2020-09-20 16:21:40 +10:00
Mitchell Richters
f7957fc237 - Blood: Factor in game's tic-rate when aiming/looking up/down.
* Doesn't matter for Blood, but will matter for SW in a unified approach. Might as well get it right here.
* Appreciate the literal doubles in lieu of the enums isn't great, but this function will go into the backend in due course.
2020-09-20 16:21:38 +10:00
Mitchell Richters
d2501007f2 - Blood: Adapt uplifted DoPlayerHorizon() from SW to Blood.
* Horizon now standardised on 100 like the other games.
* Need to determine where/why/how the player's horizon is starting out at 0 and get it to init at 100 like the other games.
2020-09-20 16:21:36 +10:00
Mitchell Richters
f2b48fe79c - SW: Uplift DoPlayerHorizon() with changes to serve as basis for standardised backend player horizon function.
* Pre-requisite to make it possible to stop using Q16.16 for horizon input.
* Perform look up/down and aim up/down using true pitch without the need for a helper.
* Adapt SW's return to center function to work based on true pitch (Duke's is a bit too fast for my liking).
* Duke's aim up/down and look up/down is 6 & 12 respectively, SW's is 8 & 16 respectively. Let's go half-way at 7 & 14.
2020-09-20 16:21:35 +10:00
Mitchell Richters
6a091deb67 - Blood: Re-apply input scaling removed in 495c522096e0c9b31bdf6952e612bc3d03030da2 until the entire return to centre function is standardised across games. 2020-09-20 16:21:31 +10:00
Mitchell Richters
40bbb61239 - Blood: Get death chase-cam going while unsynchronised using input helpers. 2020-09-20 16:21:28 +10:00
Mitchell Richters
6e4ee9e975 - Blood: Forbid unsynchronised input if dead. 2020-09-20 16:21:26 +10:00
Mitchell Richters
85e81c94c7 - Blood: Bring in SW's input helpers and hook up within input code. 2020-09-20 16:21:23 +10:00
Mitchell Richters
1900cf1fcc - Move Duke's getincangle() function to the backend, create Q16.16 variant (getincangleq16()) and replace Shadow Warrior's discrete implementations shared versions.
* Need SW's input helpers available for Blood but therefore also need an angle delta function that does not seem to exist in Blood.
* Realise that gamecontrol.h/cpp might not be the most appropriate place, but it's a shared location and these will go into binaryangle.h when its utilisation can be more realised.
* Because SW's logic was reversed, in that param #1 was the new angle and param #2 was the current, all calls have been reversed.
* By happenstance, also fixes an issue with multiple 180° turns in quick succession.
2020-09-20 16:21:13 +10:00
Mitchell Richters
db7793bf54 - Blood: Clean up remainder of control.cpp in-line with Duke/SW.
* Split input bits and movement into separate functions.
* Reordered movement to be more like Duke/SW for ease of comparison.
* Removed a global.
* Removed a few includes.
2020-09-20 16:20:20 +10:00
Mitchell Richters
9c56dfffe0 - Blood: Apply horizon input outside of pPlayer->q16look and fix some incorrectly declared types.
* Looking up/down is a bit rough at first as q16look is disproportionate to where the player is currently looking.
* Won't be an issue with a unified horizon algorithm in the backend.
2020-09-20 16:20:18 +10:00
Mitchell Richters
eb0bd9638b - Blood: Re-implement unsynchronised q16horiz. 2020-09-20 16:20:16 +10:00
Mitchell Richters
ae5b6b6a91 - Blood: Re-implement unsynchronised q16ang. 2020-09-20 16:20:14 +10:00
Mitchell Richters
547bf110b2 - Blood: Create high-precision Sinf() and Cosf() inlines and use for player's horizon, using calcSinTableValue() from the backend, bypassing game's costable[]. 2020-09-20 16:20:12 +10:00
Mitchell Richters
c38c1cb1f1 - Blood: Re-do interpolating code in viewDrawScreen() in preparation for returning unsynchronised input.
* Changed config so `cl_interpolate` bool doesn't apply to player's overall movement. While it might be handy for debugging moving sector objects, I see no valid reason why there'd be a need to ever un-interpolate the player's position.
2020-09-20 16:20:10 +10:00
Mitchell Richters
20c73e1249 - Blood: Remove r_horizcenter and standardise horizon in game to that of the default in the backend (currently 100).
* The use of this will go when the input is re-factored to operate on the standard horizon of 100, not 0.
2020-09-20 16:20:08 +10:00
Mitchell Richters
4d47fe7e85 - Blood: Remove bVanilla. 2020-09-20 16:20:06 +10:00
Mitchell Richters
c835d9cadc - Blood: Revert upstream unsynchronised input implementation. 2020-09-20 16:20:04 +10:00
Mitchell Richters
20f94c5895 - Blood: Use backend input scaling. 2020-09-20 16:20:00 +10:00
Mitchell Richters
5e484bddad - Blood: Make gInput static within controls.cpp. 2020-09-20 16:19:58 +10:00
Christoph Oelckers
555ebf86a0 - Duke: fixed path for widescreen intermission pics. 2020-09-19 22:16:48 +02:00
Christoph Oelckers
bac357a6be - disable the weapon in SW's savepics.
The way the weapon drawer is implemented does not work well with save pictures.
2020-09-19 21:31:35 +02:00
Christoph Oelckers
d963f317d9 - added the widescreen summary backgrounds for Duke.
They were made by fgsfds whose permission we have.
2020-09-19 10:54:45 +02:00
Christoph Oelckers
12c0761add - added all Exhumed assets whose usage rights could be cleared.
The mummy staff is missing due to unknown permissions. Sorry for the inconvenience.
2020-09-19 10:39:42 +02:00
Christoph Oelckers
a27211dc34 - added support for SSI containers to the file system. 2020-09-19 10:07:53 +02:00
Christoph Oelckers
2bf5933923 - fixed weapon sprite translation index when in paletted mode. 2020-09-19 00:06:07 +02:00
Christoph Oelckers
d8639a9a64 - fixed bad checks for uncapped frame rate. 2020-09-18 23:18:42 +02:00
Christoph Oelckers
005f8feceb - properly use the correct delay for an ANM's final frame. 2020-09-18 22:49:51 +02:00
Christoph Oelckers
29a10cabcb - fixed most issues with palette emulation.
Brightness is now correct - I have no idea why this factor of 1/0.85 is needed - something must reduce the brightness of the entire scene but I have no idea what.
2020-09-18 22:29:13 +02:00
Christoph Oelckers
7b879f6fe7 - removed now unused SavegameLoaded variable. 2020-09-18 01:11:38 +02:00
Christoph Oelckers
77a2bcb958 - SW: make ambients start properly.
This fell victim to some fudging code that was needed to avoid crashes with the original game loop.
All that fudging could easily be removed now because nothing of it is needed anymore.
2020-09-18 00:33:18 +02:00
Christoph Oelckers
af298411df - added widescreen titlepic for Duke Nukem 3D:
Also made some tweaks to the intro sequence drawer so that it recognizes image formats not depending on the game palette.
2020-09-17 23:20:50 +02:00
Christoph Oelckers
f5d14f826a - added the SHOOT event and fixed some issues with poor code generation for the game data accessors.
They created different code depending on the passed index, this was changed to always emit the optional parameter, even when not needed, so that the interpreter does not need to second-guess.
2020-09-17 23:06:54 +02:00
Christoph Oelckers
8fa5d3d9d2 - added the remaining CON features from EDuke 2.x
Not everything will do something, though. This was some incredibly careless code operating without a safety net allowing uncontrolled write access to the map structure.
Most of the critical fields have been made read-only, which has been the only mode of access in the mods I checked.

Note that this does not enable scripting of the weapon sprite drawer, only the gameplay related features were done.
2020-09-17 23:06:54 +02:00
Mitchell Richters
e1ee9bc83c - Duke: Fix camera advancing angle by 16 instead of 8 under circumstances. 2020-09-17 18:31:09 +10:00
Christoph Oelckers
399b27fcbb - added widescreen version of SW's summary screen background, submitted by Phredreeke. 2020-09-17 07:52:13 +02:00
Mitchell Richters
71a06b7cdd - SW: Fix quake intensity. 2020-09-17 09:01:19 +10:00
Nash Muhandes
bf12c28322 Write my full name in AUTHORS.md 2020-09-16 20:54:43 +02:00
Christoph Oelckers
08f33c2093 - removed MSVC 32 bit target and added libvpx to Linux GCC target in CI setup. 2020-09-16 20:27:12 +02:00
Christoph Oelckers
4dc7f8b142 - undid some formatting screwups from the merge. 2020-09-16 19:28:51 +02:00
Christoph Oelckers
942beea1ff Merge branch 'back_to_basics2' 2020-09-16 19:26:23 +02:00
Mitchell Richters
4370686c81 - SW: Allow disabling melee weapon blurring. 2020-09-16 19:18:08 +02:00