Commit graph

932 commits

Author SHA1 Message Date
Mitchell Richters
837b7c0a30 - SW: Changed some downscaled and upscaled Q16.16 variables missed when doing 46810ec490. 2020-09-27 02:07:07 +10:00
Christoph Oelckers
047c5de286 - SW: layout tweaks for inventory display. 2020-09-25 22:31:16 +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
73f52b2cee - SW: Fix turn scaling while pp->sop_control and specify !pp->sop to processMovement()s allowstrafe bool instead of an unconditional true. 2020-09-25 22:17:21 +10:00
Rachael Alexanderson
c8a74a8f3f - sw: flykey: guard against non-godmode, bind to j by default 2020-09-25 13:50:29 +02:00
Rachael Alexanderson
410d392ba8 - enable fly cheat for shadow warrior. in other games it is currently ignored, but I think Redneck Rampage and Blood both need it at some point too 2020-09-25 13:50:29 +02: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
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
Mitchell Richters
77265b3138 - SW: Fix regression from 1900cf1fcc where the conversion from GetDeltaAngle() to getincangle() got muddled up. 2020-09-22 20:02:58 +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
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
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
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
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
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
005f8feceb - properly use the correct delay for an ANM's final frame. 2020-09-18 22:49:51 +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
Mitchell Richters
71a06b7cdd - SW: Fix quake intensity. 2020-09-17 09:01:19 +10: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
Christoph Oelckers
6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers
867b8f006f Reverted key input changes from yesterday.
At least the SW version did not work right so let's take no chances here.
2020-09-15 21:54:10 +02:00
Christoph Oelckers
e7ddc4178a - fixed bad Printf formatting directives in swcustom parser. 2020-09-15 21:45:05 +02:00
Christoph Oelckers
eb4e0b1b83 - restrict keyboard input to the actual tic in SW as well.
Also fixed the blocking of the strafe key with sector objects - this must have gotten lost somewhere.
2020-09-14 21:25:53 +02:00
Mitchell Richters
c5648be2bd - SW: Properly scale controller input. 2020-09-14 19:29:12 +10:00
Mitchell Richters
3fc96e8840 - SW: Stop keyboard fvel/svel from allowing loc.fvel/loc.svel like Duke.
* Stops overshooting keymove when playing with `cl_syncinput 0`.
* Keymove is never as high as MAXFVEL/MAXSVEL, which is used as a thrash point for controller input.
* Fixes #390.
2020-09-14 18:54:03 +10:00
Christoph Oelckers
57a9419f8e - use FString for returning strings from the script parser.
This is mainly a preparation for merging the parser into sc_man, because sc_man does not keep token texts in a static variable.
This commit also fixes a handful of places that were flagged by the stricter conversion rules of FString.
2020-09-13 10:29:57 +02:00
Christoph Oelckers
89316aea33 - demoted the SWCustom parser to the primitive Hexen interface after finding out that this is all the Build parser can do.
This also meant I had to add symbol support to the old style number parsers.
2020-09-12 10:23:47 +02:00
Christoph Oelckers
af7ad28ad6 - fixed some warnings that came back through the backdoor. 2020-09-10 23:28:50 +02:00
Christoph Oelckers
d5b9a9ee43 Merge remote-tracking branch 'remotes/Github_private/InputStuffs' into back_to_basics2 2020-09-10 23:25:43 +02:00
Christoph Oelckers
ef5ac2319e - migrated SW's info script parser to sc_man. 2020-09-10 17:46:54 +02:00
Mitchell Richters
baeea5bf3c - SW: Fix angle speed while walking on sector objects like the bus in Seppuku Station.
* `playerSetAngle()` is too rigid since it continually sets angle until target reached, causing sluggish input. We only need to add a delta here.
2020-09-10 23:12:51 +10:00
Mitchell Richters
19fd0331d4 - SW: Interpolate vehicle sector objects for now, until something better can be determined. 2020-09-10 20:47:41 +10:00
Mitchell Richters
3df0d40312 - SW: Fix stupid issue with playerSetAngle() and tweak how angTarget/horizTarget is determined to have been met. 2020-09-10 20:26:19 +10:00
Mitchell Richters
be6e0d87d7 Revert "- SW: Attempt at making vehicle movement work nicely while uninterpolated."
This reverts commit 28a3ef131f.

I mostly added this to visualise an attempt at how I've attempted to make the vehicles work with unsynchronised input. I don't wish for this to be committed to the main branch as it's a net negative.
2020-09-10 19:56:13 +10:00
Christoph Oelckers
0c55c61b17 - SW load screen setup. 2020-09-09 23:10:18 +02:00
Christoph Oelckers
2ffb6a3580 - finally got rid of SWBOOL. 2020-09-09 20:32:24 +02:00
Christoph Oelckers
e044582aef - fixed all issues with SWBOOL as pointed out by a type-safe wrapper class. 2020-09-09 20:28:05 +02:00