Commit graph

829 commits

Author SHA1 Message Date
Christoph Oelckers
3210dd5782 - fixed the noisiest value truncation warnings after shortly re-enabling them in the compiler, plus a few places where the warning pointed to incorrect code. 2020-09-26 11:59:24 +02:00
Christoph Oelckers
64607834f3 - Blood: fixed application of palette from the QAV data for HUD weapons. 2020-09-25 23:55:20 +02:00
Christoph Oelckers
89bc194035 - added shareware checks to the "start game" menus. 2020-09-25 19:36:50 +02:00
Mitchell Richters
9b12675f4e - processMovement(): Re-arrange parameter variables somewhat so game-specific parameters are at the end and to allow some common defaults so they don't need specifying. 2020-09-25 22:26:50 +10:00
Mitchell Richters
4ff3810711 - Blood/Duke/RR/SW: Improvements to 3rd person viewing by modifying the rendered player's posz so the camera is looking further above the camera sprite as EDuke32 does. Blood just enables the crosshair when using 3rd person view. 2020-09-25 17:52:00 +10:00
Mitchell Richters
04af1d9ce8 - All Games: Unify processMovement(). 2020-09-24 22:32:37 +10:00
Mitchell Richters
8690c633d8 - Blood: Add extra call to inputState.ClearAllInput() in StartLevel(). 2020-09-24 00:20:40 +10:00
Mitchell Richters
e078ea6ebd - Blood/Exhumed/SW: Hook up gi->clearlocalinputstate(). 2020-09-24 00:15:51 +10:00
Mitchell Richters
64113f8f9c - Blood/Duke/SW: Smooth out player's zpos adjustment while in 3rd person view. 2020-09-23 23:12:59 +10:00
Mitchell Richters
407b5346e3 - Blood: Fix issues taking damage following level transitions.
Fixes https://forum.zdoom.org/viewtopic.php?f=340&t=69919.
2020-09-23 13:28:07 +10:00
Mitchell Richters
d391e56d81 - Blood: Fix a few more issues following horizon change. Chase-cam now has proper z-pos. 2020-09-23 13:20:57 +10:00
Mitchell Richters
3d58a09aeb - Blood: Fix player's z-pos with changed horizon. 2020-09-23 08:54:19 +10:00
Christoph Oelckers
5e6317b8b9 Merge remote-tracking branch 'remotes/Github_private/Blood_InputReworking' 2020-09-22 23:32:28 +02:00
Christoph Oelckers
880b811e0d - rewrote map loader to work independently of data structure sizes.
This is needed to extend a few fields that are too narrow - e.g. the texture offset fields have no room for interpolating scrolling textures.
Blood not done yet, will also need to be changed to get rid of the limits.
2020-09-22 22:40:53 +02:00
Christoph Oelckers
43a9be0ad0 - removed Blood's loadboard replacement hook.
It never calls engineLoadBoard but always its own map loading function directly.
2020-09-22 22:38:08 +02:00
Mitchell Richters
2f9783150c - Blood: Correctly set playerHorizMin() and playerHorizMax() with respect to horizon changing from 0 to 100 like the other games (min used to be -180, max used to be 120). 2020-09-22 22:55:23 +10:00
Mitchell Richters
639ad46af1 - Blood: When dead, ensure player's horizon scales to max horizon value like before (old horizon was based on 0, not 100, so 100+120 is gi->playerHorizMax(). 2020-09-22 22:52:17 +10:00
Mitchell Richters
ac635ebd0f - Blood/RR: Replace a few playerSet*() calls with playerAdd*(). Because the setters continually set until target is reached, can cause some perceivable smoothness issues if ticker re-targets's player's angle/horizon before input code has reached target. 2020-09-22 22:50:27 +10:00
Mitchell Richters
f168373ecf - Blood: Repair some ROR regressions from 31fc39b051.
Potentially addresses #87 and #88.
2020-09-22 18:14:43 +10:00
Mitchell Richters
46810ec490 - fix a few places where Q16.16 values were downscaled, only to be scaled back up again. 2020-09-22 15:51:48 +10:00
Mitchell Richters
31bb9e4d8d - Blood: Open up MAXHORIZVEL to SW levels to compensate for removal of q16horz scaling in previous horizon code. 2020-09-22 07:46:30 +10:00
Mitchell Richters
d40a2d3e95 Merge branch 'back_to_basics2' into Blood_InputReworking
# Conflicts:
#	source/blood/src/hudsprites.cpp
#	source/exhumed/src/status.cpp
#	source/games/duke/src/game_misc.cpp
#	source/sw/src/draw.cpp
2020-09-22 07:34:39 +10:00
Mitchell Richters
9859571ded - DrawCrosshair(): Factor in Blood's adjustable horizon which defaults to 90.
* Fixes https://forum.zdoom.org/viewtopic.php?f=340&t=69920.
2020-09-22 07:29:52 +10:00
Mitchell Richters
5c097c4a74 - Blood: Fix player's slope with horizon now based on 100 and not 0. 2020-09-22 07:13:48 +10:00
Mitchell Richters
59e4fae064 - Game input: Fix miscellaneous issues.
* Duke/RR: Fix `SB_CENTERVIEW` not clearing while `cl_syncinput 1`.
* Duke/RR: Remove superfluous call to `apply_seasick()`.
* RR: Change two calls from `playerSetAngle()` to `playerAddAngle()` Updated version of `playerSetAngle()` doesn't stop setting angle until target is reached, a bit too strict for this and compromised vehicle turning.
* `applylook()`: Remove dead flag. Was only used with Duke, no other game called the function when dead anyway. Since the input helpers are processed outside of `applylook()` now this is not needed.
* `applylook()`: Extend function with a bit of commentary.
2020-09-21 17:12:53 +10:00
Mitchell Richters
f806cdcec6 - Blood/Duke/RR/SW: Unify the player's angle/horizon helper functions. 2020-09-21 17:12:51 +10:00
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
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
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
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
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
6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers
d1293da8dc - connecting the dots for Blood's special tile features. 2020-09-15 01:27:24 +02:00
Christoph Oelckers
a4754d7f34 - rewrote the map hack parser using sc_man.
This unexpectedly turned out a complete rewrite so now it is under my own license.
Also moved the remaining parts of map hack loading into the engine.

Overall I have to say that the feature is not what I expected, it's merely used to fudge the positioning of model sprites and for adding Polymer lights.
2020-09-13 13:01:44 +02:00