Mitchell Richters
95e84ba1f8
- Exhumed: Make playFrameSound()
a method of SeqFrame
.
2023-04-21 21:13:12 +10:00
Mitchell Richters
32cc320195
- Exhumed: Refactor new sequence setup to not use naked TArray of frames.
...
* Also gives access to the previously discarded sequence flags that are currently not in any kind of use.
2023-04-21 21:13:12 +10:00
Mitchell Richters
4b223ab26d
- Exhumed: Tidy up DExhumedActor
variables for clarity.
2023-04-21 21:13:11 +10:00
Mitchell Richters
5efc14411a
- Exhumed: Use actor variables for sequences, not player ones.
2023-04-21 21:11:55 +10:00
Mitchell Richters
5c0b6858b1
- Exhumed: Remove seq_GetSeqPicnum()
.
2023-04-21 21:11:55 +10:00
Mitchell Richters
b4502626fa
- Exhumed: Tidy up some picnum accesses.
2023-04-21 21:11:55 +10:00
Mitchell Richters
d7161a7368
- Exhumed: Convert the weapon code.
2023-04-21 21:11:54 +10:00
Mitchell Richters
33bfe4601f
- Exhumed: Convert seq_DrawPilotLightSeq()
.
2023-04-21 21:11:54 +10:00
Mitchell Richters
4428ea5612
- Exhumed: Fix null chunk access for spider.
2023-04-21 21:11:54 +10:00
Mitchell Richters
d8441f712e
- Exhumed: Converted out most remaining files.
2023-04-21 21:11:54 +10:00
Mitchell Richters
34e984d836
- Exhumed: Convert out bullet system to new backend hashtable.
2023-04-21 21:11:54 +10:00
Mitchell Richters
6f242b901d
- Exhumed: Convert out anim system to new backend hashtable.
2023-04-21 21:11:53 +10:00
Mitchell Richters
f404708f51
- Exhumed: Initial conversion of seq_PlotSequence()
to new backend hashtable.
2023-04-21 21:11:52 +10:00
Mitchell Richters
4d1466217b
- Exhumed: Remove unused/unneeded union from DExhumedActor
.
2023-04-21 21:10:47 +10:00
Mitchell Richters
80125e11f3
- Exhumed: Separate out seq variables within DExhumedActor
.
2023-04-21 21:10:45 +10:00
Mitchell Richters
57ffb0e251
- Exhumed: Tidy up internals of seq_PlotSequence()
.
...
* Renames disassembly variables.
* Removes abusive reuse of arg variables.
2023-04-17 08:52:54 +10:00
Mitchell Richters
27c87b247c
- Exhumed: Rename actionSeq
members for clarity.
2023-04-17 08:52:54 +10:00
Mitchell Richters
310f615c8c
- Exhumed: Initial setup of new sequence loader.
...
* Untested in-game but looks good in the debugger.
2023-04-17 08:52:54 +10:00
Mitchell Richters
8a0d09ce8b
- Exhumed: Wrap all access to FrameSound[]
array and make static.
2023-04-17 08:52:54 +10:00
Mitchell Richters
86c559ff1c
- Exhumed: Wrap all access to ChunkFlag[]
array and make static.
2023-04-17 08:52:54 +10:00
Mitchell Richters
01148a8c29
- Exhumed: Wrap all access to ChunkPict[]
array and make static.
2023-04-17 08:52:54 +10:00
Mitchell Richters
78489dbc78
- Exhumed: Wrap all access to ChunkXpos[]
and ChunkYpos[]
arrays and make static.
2023-04-17 08:52:53 +10:00
Mitchell Richters
924ac25df1
- Exhumed: Wrap all access to FrameSize[]
array and make static.
2023-04-17 08:52:53 +10:00
Mitchell Richters
93fe699b78
- Exhumed: Wrap all access to FrameFlag[]
array and make static.
2023-04-17 08:52:53 +10:00
Mitchell Richters
3e38d01e4b
- Exhumed: Wrap all access to FrameBase[]
array and make static.
2023-04-17 08:52:53 +10:00
Mitchell Richters
fbddddcccc
- Exhumed: Mark unused array SeqFlag[]
as static and annotate it.
2023-04-17 08:52:53 +10:00
Mitchell Richters
e9c9f070eb
- Exhumed: Wrap all access to SeqStatic[]
array and make static.
2023-04-17 08:52:52 +10:00
Mitchell Richters
8df52e1265
- Exhumed: Wrap all access to SeqBase[]
array and make static.
2023-04-17 08:52:52 +10:00
Mitchell Richters
53b7235adf
- Exhumed: Wrap all access to SeqOffsets[]
array and make static.
2023-04-17 08:52:52 +10:00
Mitchell Richters
4cc3664287
- Exhumed: Minor tidy-up for seq_ReadSequence()
prior to start.
2023-04-17 08:52:52 +10:00
Mitchell Richters
e82981929d
- Exhumed: Make overridesect
global local to movespritez()
.
...
* Fixes #933 .
2023-04-16 19:30:35 +10:00
Christoph Oelckers
ecd0c8c1ff
- fixed a few bad scaling values.
2023-04-15 12:20:10 +02:00
Christoph Oelckers
ec9ed9588c
- Exhumed: don't pass uninitialized data to the sound engine.
...
This was creating very noisy warnings.
2023-04-10 09:49:38 +02:00
Mitchell Richters
a68fcfc71c
- Remove GameInterface::getConsoleAngles()
, it's not needed anymore.
2023-04-04 07:02:39 +10:00
Mitchell Richters
8d11fef916
- Initial conversion of game input into class GameInput
.
2023-04-03 18:46:36 +10:00
Mitchell Richters
2c6d8b50ea
- Exhumed: Tidy up bubbles.cpp.
...
* Extend `BuildBubbles()` to use the actual player's angle for if we ever get multiplayer going.
2023-04-02 19:56:54 +10:00
Mitchell Richters
4c11fb1b2a
- Exhumed: Tidy up remainder of anubis.cpp.
2023-04-02 19:56:54 +10:00
Mitchell Richters
754d27a8f0
- Exhumed: Tidy up AIAnubis::Tick()
.
2023-04-02 19:56:54 +10:00
Mitchell Richters
8d48252f1a
- Exhumed: Backup actor location in BuildAnubis()
.
2023-04-02 19:56:54 +10:00
Mitchell Richters
b10b909440
- Exhumed: Rename last argument in seq_MoveSequence()
to nFrame
.
2023-04-02 19:56:53 +10:00
Mitchell Richters
cf63d1ab74
- Exhumed: Tidy up remainder of anims.cpp.
2023-04-02 19:56:53 +10:00
Mitchell Richters
a2bd2b17a2
- Exhumed: Tidy up BuildAnim()
.
...
* Also rename two rather unnamed args to something more appropriate.
2023-04-02 19:56:53 +10:00
Mitchell Richters
b5d4bc8573
- Exhumed: Tidy up 2d.cpp.
2023-04-02 19:56:53 +10:00
Mitchell Richters
10445635cf
- Tidy up autosaving for all the games.
...
* There's not really any reason to need the game's world to tic once, it's already fully loaded during the `gi->NewGame()`/`gi->NextLevel()` calls.
2023-04-02 19:56:52 +10:00
Mitchell Richters
272dfa762d
- Remove backend crouch toggle solution redeploy with Duke/Exhumed/Blood using new ESyncBit
bit.
...
* I tried to make this work in 2020 but its been nothing but headache. It's something for the game to control via a flag, not the backend to determine.
* For SW, this restores its original implementation.
2023-04-02 18:32:40 +10:00
Mitchell Richters
86711f666b
- Exhumed: Tidy up StartDeathSeq()
.
2023-03-29 19:41:05 +11:00
Mitchell Richters
3e4dd94fe5
- Exhumed: Tidy up a bunch of small player functions.
2023-03-29 19:40:42 +11:00
Mitchell Richters
0467b02393
- Exhumed: Mark all player static arrays as const.
2023-03-29 19:39:54 +11:00
Mitchell Richters
7caec5fa69
- Clean out where inputState.ClearAllInput()
is called.
...
* We can do this from just a few places and achieve the same result as having it sprinkled everywhere did.
2023-03-29 09:05:49 +11:00
Mitchell Richters
96055fbc03
- Clean out all games setting gameaction = ga_level
and do it centrally.
2023-03-29 03:10:16 +11:00
Mitchell Richters
9618ba1e78
- Don't serialise player angles twice.
2023-03-28 09:15:58 +11:00
Mitchell Richters
72be2623c3
- Exhumed: Remove useless sectortype
extern pointer.
2023-03-28 08:51:51 +11:00
Mitchell Richters
c6a53265eb
- Exhumed: Misc tidy-ups.
...
* The setting of `Player::bIsFiring` needs to be done before setting a new weapon.
* Tidy up some weird reverse engineering `while (1)` loop which GDX doesn't do.
2023-03-28 08:45:14 +11:00
Mitchell Richters
42d791e7c2
- Exhumed: Fix clip calculation setup.
...
* Since game maintains its own clip capacities, we need to use them instead of the generic handler for the games that do not.
* Clean up the game-side code in `CheckClip()` to use `min()`.
* Repair issue with pistol clip calculation that was using modulo when it shouldn't. A full weapon with 300 will divide into 6 with no remainder, therefore nothing in the clip.
* Fixes #906 .
2023-03-27 22:05:35 +11:00
Mitchell Richters
79745668a6
- Exhumed: Take advantage of getWrappedIndex()
in updatePlayerInventory()
as well.
2023-03-27 18:47:30 +11:00
Mitchell Richters
1ed655e0e7
- Exhumed: Further clean up updatePlayerWeapon()
.
...
* Rename a few variables for better clarity as to what's going on.
* Add new inline to the backend `getWrappedIndex()` that properly wraps around negative values based on the supplied maximum using modulo.
* Directly set the weapon when doing the next/prev tests to avoid unnecessary tests to see whether the player has the weapon or not.
2023-03-27 18:47:05 +11:00
Mitchell Richters
ebedf46434
- Exhumed: Reset view pitch back to 0 when doing Ramses, using game's formula.
...
* Ensure's a smooth return to 0 so the player's actual pitch can be targeted towards Ramses.
* In situations where the player had their view pitch changed in the ticker, this would have never reset.
2023-03-27 18:08:56 +11:00
Mitchell Richters
0594a5cb91
- Exhumed: Properly repair height test after reviewing GDX.
...
* The code in this game is so much tidier to understand what's what...
2023-03-27 18:08:55 +11:00
Mitchell Richters
bd8b033120
- Exhumed: Logic fixes to some underwater tests following review of GDX.
...
* Necessitated a little bit of rearranging in the player ticker but the grouping of all inputs into one function makes sense.
2023-03-27 18:08:55 +11:00
Mitchell Richters
94f188c926
- Exhumed: Restore original grenade pickup code.
...
* When I read this against the generic weapon pickup code, it looked similar enough but the grenade's logic is reversed. That is, after picking up the weapon, equip the player. The generic weapon handler equips the player, then gives them ammo.
* Fixes #904 .
2023-03-27 18:08:55 +11:00
Mitchell Richters
99e23a8d24
- Exhumed: Move Player::nCurrentItem
usage into the right spot.
...
* Originally, `updatePlayerInventory()` was in the main loop and not the player ticker. Now that it's been relocated, this makes sense.
2023-03-27 18:06:35 +11:00
Mitchell Richters
d66f97e5dc
- Exhumed: Clean up weapon selection code a bit.
...
* Concentrate it all in the `updatePlayerWeapon()` function.
2023-03-27 17:08:59 +11:00
Mitchell Richters
cb3fec39df
- Exhumed: Move a line out of doPlayerMovement()
and into updatePlayerViewSector()
.
...
* It needs to come after the function it's been moved into, but its confusing why its calculating a new pos delta when there's one on the stack.
* By directly nesting it in, it's a lot clearer.
2023-03-27 08:36:04 +11:00
Mitchell Richters
d858856e06
- Exhumed: Store a pos delta on the stack in `doPlayerMovement().
...
* We need this in a few places.
* Z is inverted because pitch is negated. Previously I just swapped the operation around.
2023-03-27 08:32:52 +11:00
Mitchell Richters
4fa12a9e30
- Exhumed/SW: Make sure the pitch keys are done after the slope tilting.
...
* Pitch key code does player horizon bounding.
2023-03-27 08:28:32 +11:00
Mitchell Richters
4bf2f70d7b
- Exhumed: Remove Player::nDestVertPan
entirely.
...
* We can just pass the needed value into `doPlayerPitch()`.
* For Ramses, no need to set `nDestVertPan` to the map value, just use the map value.
* Avoids an excess `atan2()` call by way of `maphoriz()`.
2023-03-27 08:14:42 +11:00
Mitchell Richters
b5123ac69f
- Exhumed: Split pitch and yaw input again.
...
* They need to be called in different places inside of `doPlayerMovement()`.
2023-03-27 08:03:35 +11:00
Mitchell Richters
6aceb7bda3
- Exhumed: Clean up some of the repeated sector gets in doPlayerMovement()
.
2023-03-27 08:03:14 +11:00
Mitchell Richters
d45be79c24
- Exhumed: Adjust yaw adjustment for Ramses to use the same formula as pitch.
...
* Rather than just snapping the angle, the player's yaw and pitch move evenly towards Ramses.
2023-03-26 22:13:57 +11:00
Mitchell Richters
b5a9085aed
- Exhumed: Restore more accurate pitch adjustment for Ramses.
...
* Use `maphoriz(-11)` instead of some voodoo degree amount so it's clear when comparing sources.
* Don't stop interpolating while doing Ramses.
* Apply Ramses pitch amount to `nVertDestPan`, just like the original.
* Don't reset all angles when initialising Ramses, just set the yaw angle.
* Don't return player's view to center when doing Ramses, use the delta between `nDestVertPan` and the player's pitch, using same formula as original.
* Comment in how normal/non-ramses `nDestVertPan` setting should be 8x the sprite Z move delta, not 2x. I know it's not correct, but its been this way for a long time and we probably should CVAR it.
* When doing the player's death pitch, it's 40.156 degrees (horizon of 108), not 38 degrees (horizon of 100). This was a misread of mine way back when.
2023-03-26 22:13:57 +11:00
Mitchell Richters
0840e547b7
- Exhumed: Reset the player actor's pitch with the rest of the actor resets.
2023-03-26 20:12:59 +11:00
Mitchell Richters
1888b7ee9f
- Exhumed: Ensure we back up the player actor's location after doing everything and not mid-way through a reset.
2023-03-26 20:09:43 +11:00
Mitchell Richters
950f4c2c38
- Exhumed: Restore nStandHeight
global and move to Player
struct.
...
* Was dropped in 572869f502
.
* Game's crouch testing necessitates that this value be pre-cached.
* Interestingly, this value is 62.5 whereas the game's view height is 55. Change in late development to make the world feel larger?
2023-03-26 20:06:25 +11:00
Mitchell Richters
fd62f1fb68
Revert "- Exhumed: Increase quake precision in SetQuake()
."
...
This reverts commit fb9ff7d105
.
* The game relies on this being low precision. It was causing a weird tremor in the training map.
2023-03-26 19:52:55 +11:00
Mitchell Richters
71aad07913
- Exhumed: Fix backwards logic from new pitch panning refactor.
...
* From 79f7ca976b
.
* Fixes #901 .
2023-03-26 18:56:01 +11:00
Mitchell Richters
7d5ca901eb
- Exhumed: Clear all input out upon restarting the player.
...
* Stale accumulation from the last round can apply on the next tic.
2023-03-26 15:17:28 +11:00
Mitchell Richters
11049123b0
- Exhumed: Bring pickup code back into player.cpp
...
* We're going to tabbify everything soon anyway, might as well bring it in now.
2023-03-26 10:30:27 +11:00
Mitchell Richters
8f8809f66c
- Exhumed: Minor formatting changes to a number of player functions.
2023-03-26 10:00:06 +11:00
Mitchell Richters
76777a6567
- Exhumed: Change doPlayerActionSequence()
to do an early return instead of nested branches.
2023-03-26 10:00:06 +11:00
Mitchell Richters
dcfab3e57c
- Exhumed: Change doPlayerDeathRestart()
to do an early return instead of nested branches.
2023-03-26 10:00:06 +11:00
Mitchell Richters
b6c3753d3a
- Exhumed: Change doPlayerMovingBlocks()
to do an early return instead of nested branches.
2023-03-26 10:00:04 +11:00
Mitchell Richters
838aebdfb7
- Exhumed: Change doPlayerFloorDamage()
to do an early return instead of nested branches.
2023-03-26 09:51:26 +11:00
Mitchell Richters
8d1531ba78
- Exhumed: Change updatePlayerTarget()
to do an early return instead of nested branches.
2023-03-26 09:50:57 +11:00
Mitchell Richters
e7a0354109
- Exhumed: Fix possible workflow issue with zvel in doPlayerMovement()
.
...
* Originates from d976a6da01
.
* During change I missed the clamping of the zvel value between capturing `zz` and `zVel`.
* No observed issues, only noticed it when comparing something else but lets 100% maintain a accurate workflow.
2023-03-25 23:27:15 +11:00
Mitchell Richters
2bc6df7678
- Exhumed: Repair signedness issue with weapon change code.
...
* Never revealed itself when I was cheating to get weapons.
* Fixes #898
2023-03-25 22:05:06 +11:00
Mitchell Richters
8f748fdb2a
- Exhumed: Fix noclipping so the player can clip through anything.
...
* The `inside()` test is now only performed when noclipping is off.
2023-03-25 21:36:17 +11:00
Mitchell Richters
7410c78ce4
- Exhumed: Merge pitch/yaw functions into one to minimise spread.
2023-03-25 21:26:56 +11:00
Mitchell Richters
7d6425fa06
- Exhumed: Amend 79f7ca976b
to use algorithm to cancel view pitch when disabling cl_slopetilting
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
0189936070
- Exhumed: Use player pointer in MoveWeapons()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
4e1b269c59
- Exhumed: Use player pointer in AIPlayer::Draw()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
d270099aa7
- Exhumed: Use player pointer in AIPlayer::Damage()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
f0b9937ec7
- Exhumed: General tidy-up of AIPlayer::Damage()
.
2023-03-25 21:26:55 +11:00
Mitchell Richters
c3f0edf802
- Exhumed: Use player pointer in AIPlayer::Damage()
.
2023-03-25 21:26:54 +11:00
Mitchell Richters
45be386f7f
- Exhumed: Move nTemperature[]
into Player
struct.
2023-03-25 21:26:54 +11:00
Mitchell Richters
572869f502
- Exhumed: Reorganise RestartPlayer()
so player/actor variables are grouped.
2023-03-25 21:26:54 +11:00
Mitchell Richters
b4028cb250
- Exhumed: Clean up stack pointer names in RestartPlayer()
.
2023-03-25 21:26:54 +11:00
Mitchell Richters
c79a979395
- Exhumed: Store a player pointer on the stack and use in updatePlayerVelocity()
.
2023-03-25 21:26:52 +11:00
Mitchell Richters
7cfb5d9286
- Exhumed: Removed unneeded resetting of nDestVertPan
in doPlayerFloorDamage()
.
...
* Original game code below it was just resetting it anyway.
2023-03-25 19:56:20 +11:00
Mitchell Richters
12b4f68f24
- Exhumed: Directly inline interpfrac test into gi->Render()
.
2023-03-25 19:56:19 +11:00
Christoph Oelckers
32237421c9
- Exhumed: fixed Ramses's programmatic texture
2023-03-25 09:52:31 +01:00