Mitchell Richters
e24521b189
- SW: Uplift playerSetHoriz()
similar to uplift to playerSetAngle()
in b832442e31
.
2020-09-09 22:04:59 +10:00
Mitchell Richters
b832442e31
- SW: New implementation of playerSetAngle()
that works better for intended purpose. This corrects the issues with angle not being quite right when getting onto a ladder.
2020-09-09 21:29:03 +10:00
Mitchell Richters
b72a3326d0
Merge branch 'back_to_basics2' into InputStuffs
...
# Conflicts:
# source/core/d_net.cpp
2020-09-09 06:56:27 +10:00
Christoph Oelckers
ec1c42b04a
- got rid of common.h
...
All still relevant content was moved to places closer to its use.
2020-09-08 18:39:47 +02:00
Mitchell Richters
48630914b1
- SW: Remove boat code from new input code for cleanliness.
2020-09-09 00:34:51 +10:00
Mitchell Richters
1e3199413c
- SW: Rename all Tank-related function code to Vehicle.
2020-09-08 21:54:48 +10:00
Mitchell Richters
8625ac573d
- SW: Comment out all boat code, it's actually not used within the game at all and was very confusing...
2020-09-08 21:40:20 +10:00
Mitchell Richters
73d0772e87
- SW: Call DoPlayerMoveTurret()
in processMovement()
in lieu of DoPlayerTurnTurret()
and don't interpolate sector object's sprite while !cl_syncinput
.
...
* Makes operating the tank silky smooth while unsynchronised.
2020-09-08 19:42:22 +10:00
Mitchell Richters
c00217163b
- SW: Fix turret sound with unsynchronised input.
2020-09-08 19:38:32 +10:00
Mitchell Richters
cda79496ce
- SW: Fix DoPlayerDeathHoriz()
with unsynchronised input.
2020-09-08 18:12:45 +10:00
Mitchell Richters
083ed3e9b7
- SW: Handle angAdjust
and horizAdjust
directly in processMovement()
instead of via DoPlayerTurn()
/DoPlayerHorizon()
.
...
* Eliminates issues with when to call when player is dead, etc. Handles cases like climbing a ladder which doesn't trigger `DoPlayerTurn()`.
2020-09-08 06:50:38 +10:00
Mitchell Richters
5145bf907a
- SW: Hook up all vehicle turn code in processMovement()
except for DoPlayerTurnTankRect()
, which still needs considerations.
...
* Issue in `DoPlayerTurnTurret()` with `PlaySOsound()` calls occurring too frequently, still requires investigation on how to best handle this.
2020-09-08 06:22:47 +10:00
Mitchell Richters
df0331a4c3
- SW: Promote all vehicle angle code to proper Q16.16.
...
* Input still rough with `cl_syncinput 0` for vehicles.
2020-09-07 22:36:11 +10:00
Mitchell Richters
e1a5e37126
- SW: Handle DoPlayerTurn()
/DoPlayerHorizon()
better while dead.
2020-09-07 21:50:43 +10:00
Mitchell Richters
681a8ebec2
- SW: Hook up horizAdjust
and adjust all ticrate amendments of q16horiz
via playerAddHoriz()
/playerSetHoriz()
.
2020-09-07 21:47:15 +10:00
Mitchell Richters
2e2ca03812
- SW: Promote recoil_horizoff
to Q16.16 to avoid down-scaling only to upscale.
2020-09-07 21:34:13 +10:00
Mitchell Richters
e36c9fc78c
- SW: Hook up angAdjust
and adjust all ticrate amendments of q16ang
via playerAddAngle()
/playerSetAngle()
.
...
* Promoted some uses of `getangle()` upscaled to Q16.16 with `gethiq16angle()` for higher precision.
2020-09-07 21:30:06 +10:00
Mitchell Richters
1cc1c21029
- SW: Add resetinputhelpers()
and hook up within game.
2020-09-07 21:15:53 +10:00
Mitchell Richters
77816bf3d3
- SW: Promote adjustment of helpers to double since some values will be coming in with higher precision.
2020-09-07 21:03:30 +10:00
Mitchell Richters
584ec935ed
- SW: Add Duke's input helpers and adjust to suit SW.
...
* These are temporary until a backend solution is available after all games have had initial uplift.
2020-09-07 20:35:35 +10:00
Mitchell Richters
3667116274
- SW: Uplift of DoPlayerHorizon()
and PlayerAutoLook()
.
...
* Set `PF2_INPUT_CAN_AIM` explicitly where `DoPlayerHorizon()` would have been done within the original game.
* Replace original centering code and route `SB_CENTERVIEW` through the `SB_LOOK_UP`/`SB_LOOK_DOWN` code.
* With this commit, first person input is now nice again. Vehicle code still to be looked at.
2020-09-07 20:20:41 +10:00
Mitchell Richters
e84c8379d9
- SW: Uplift of DoPlayerTurn()
.
...
* Set `PF2_INPUT_CAN_TURN` explicitly where `DoPlayerTurn()` would have been done within the original game.
* Uplift the turn 180 code to full Q16.16.
* Eliminate stupid input scaling so input matches that provided by the input device.
* Ticrate angle adjustments outside of the player's control still to be uplifted.
2020-09-07 19:23:48 +10:00
Mitchell Richters
6e6373deda
- SW: Remove camq16*
variables from game and backend code that supported them.
...
* `cl_syncinput 0` is very raw at the moment.
2020-09-07 08:40:14 +10:00
Mitchell Richters
fa9fa88fce
Merge branch 'back_to_basics2' into InputStuffs
...
# Conflicts:
# source/core/gamestruct.h
# source/games/duke/src/duke3d.h
# source/sw/src/input.cpp
# source/sw/src/player.cpp
2020-09-07 07:51:37 +10:00
Mitchell Richters
e94bd9da04
- SW: Replace use of scaleAdjustmentToInterval()
in lieu of backend solution from 290e615807
.
2020-09-06 21:30:47 +10:00
Mitchell Richters
722537a1f0
- InputState: Make CONTROL_GetInput()
return an object instead of accepting a pointer and provide to games as a function parameter.
...
* Provide read-only/const results from `CONTROL_GetInput()` so games can't change received input.
* Change non-descript `info` to `hidInput` (Human Interface Device).
* Remove a few unused prototypes.
2020-09-06 20:18:26 +10:00
Christoph Oelckers
a6c92aec64
- removed all automap code from SW and the flat drawer from the backend.
...
This should have been the last parts of automap code.
Now on to rebuild this thing in a cleaner fashion...
2020-09-06 12:14:08 +02:00
Mitchell Richters
677efb20ba
- SW: Don't check SB_RUN
as player action in ChopsCheck()
.
...
Fixes #312 .
2020-09-06 19:18:14 +10:00
Christoph Oelckers
7dbae8b8f4
- enabled autosaves.
...
Fixes #55
This only creates them but does not auto-resume from them.
2020-09-05 22:39:27 +02:00
Christoph Oelckers
2e8b808683
- added a C_ClearMessages function for the console and fixed game restart after death.
...
Fixes #322
2020-09-04 22:23:38 +02:00
Christoph Oelckers
fd2ce0321e
- transitioned SW to level change event system
2020-09-04 21:15:15 +02:00
Christoph Oelckers
a222a7d7c9
- transitioned Shadow Warrior to new main loop.
...
Problem: Does not work yet with cl_syncinput = 0. Something about those angle and horizon settings is not right yet.
2020-09-02 20:58:37 +02:00
Christoph Oelckers
b3d4bab4dd
- deleted sync.cpp.
2020-09-02 20:57:03 +02:00
Mitchell Richters
253d1a3989
- SW: Re-position actortime clocking.
...
I believe this is the right place and I got it wrong when doing e32cd81cc7
. The change in this commit is more like where Duke times actortime.
2020-09-02 09:28:41 +10:00
Mitchell Richters
9605e41f9f
- SW: Fix Q16.16 operation not using m_fixed inlines. The one that got away...
2020-09-01 23:28:47 +10:00
Mitchell Richters
17da849add
- SW: Get synchronised input going in a testable way. This is not a complete re-factor, just enough to get it going.
...
* Remove bool `PedanticMode`.
* Transition appropriate lines to `cl_syncinput`.
* Remove inlines added purely only to maintain DOS demo compatibility.
* Fix a few pedantic Q16.16 >> Int >> Q16.16 conversions.
2020-09-01 23:08:23 +10:00
Mitchell Richters
1354d52c05
- Major cleanup of Q16.16 utilisation within games and engine.
...
* Remove fix16.h/cpp and utilise library from m_fixed.h.
* Extend m_fixed.h with two inline functions for int to/from float operations.
* Replace fix16_floor operations with those from xs_Float.h
* Replace multiple Q16.16 conversions from 0 to just be 0.
* Replaced all found in-game bit-shifts and multiplications/divisions with inline functions from m_fixed.h
* Replaced many casts of FRACUNIT as double in SW's panel.cpp as it is converted to double by way of type promotion.
* Fixed missed precision fixes in SW's panel.cpp where some types weren't declared correctly.
* Replaced 100+ `Cos()/Sin() >> 16` operations for Blood with inline functions `CosScale16()/SinScale16()`.
2020-09-01 23:00:47 +10:00
Christoph Oelckers
2f05a93547
Merge branch 'Packet' into back_to_basics2
...
# Conflicts:
# source/core/gamestruct.h
# source/games/duke/src/gameloop.cpp
# source/games/duke/src/player_d.cpp
2020-08-31 00:09:56 +02:00
Mitchell Richters
e32cd81cc7
- Unify stat fps
for all games.
2020-08-30 20:24:36 +02:00
Christoph Oelckers
d49aedacea
- continued work on main loop - added a few new entry points to the game interface.
2020-08-30 00:55:49 +02:00
Christoph Oelckers
694444b62a
- converted the remaining input bits.
...
Looks like it is working in all games except Blood (not that it surprises me that it's Blood again which has issues...)
2020-08-29 13:32:55 +02:00
Christoph Oelckers
dc1f56e8f9
Merge remote-tracking branch 'remotes/Github_private/back_to_basics2' into Packet
...
# Conflicts:
# source/core/inputstate.cpp
# source/exhumed/src/exhumed.h
2020-08-29 01:19:48 +02:00
Christoph Oelckers
fe7f3a2f9e
- handle the run key.
2020-08-29 00:57:07 +02:00
Christoph Oelckers
b9e0f493b2
- transitioned the 5 primary action keys: Open, Jump, Crouch and Fire/AltFire.
2020-08-28 23:25:08 +02:00
Christoph Oelckers
d62d2eaec7
- processed all remaining local input CCMDs and removed some bits only needed for multiplayer.
...
These MP bits should be reimplemented as network commands later, they only take up valuable space in the bit field.
2020-08-28 00:03:35 +02:00
Christoph Oelckers
c7e667a17a
- transition weapon selection in SW.
...
Thanks to the macro insanity for trivial operations in this code base this turned out to be a lot more troublesome than Duke...
2020-08-27 00:06:59 +02:00
Mitchell Richters
55f688b13f
- SW: Rename q16horz
to q16horiz
and q16aimvel
to q16horz
for consistency and to avoid confusion down the track.
2020-08-27 08:00:50 +10:00
Christoph Oelckers
abf715eace
- unified the packet structures of all games.
...
Currently the bit fields are still separate and they have to be merged, but for now the added memory does not matter.
Having this structure in the common parts will allow work on consolidating the input code, though.
2020-08-26 17:12:48 +02:00
Christoph Oelckers
84b6af24d3
- renamed the fields in SW's packet structure to match Duke's.
...
Preparation for moving the packet management into public code.
2020-08-25 22:06:01 +02:00
Christoph Oelckers
c09a5150a9
- added some predefined fullscreen modes
...
This is to cut down on boilerplate code because these encode the virtual screen size in the mode parameter, making it unnecessary to specify a virtual size separately.
2020-08-24 20:25:53 +02:00