Commit graph

1964 commits

Author SHA1 Message Date
Mitchell Richters
d25f6597b8 - Move DCorePlayer::resetCameraAngles() call from each game into GameInput::getInput(). 2024-01-05 20:59:28 +11:00
Mitchell Richters
e58d5f7637 - Move GameInput::ResetInputSync() call from each game into GameInput::getInput(). 2024-01-05 20:59:27 +11:00
Christoph Oelckers
b72fcd5185 converted files to UTF-8 2024-01-04 18:29:28 +01:00
Christoph Oelckers
3b44c50dfd Blood: fixed packSlots being cleared on loading a savegame.
Since the player refactor the order of operations had changed and this got called after reading the player, not before.
2023-12-19 18:53:43 +01:00
Christoph Oelckers
36930d44bd filesystem update from GZDoom. 2023-12-17 12:48:03 +01:00
Christoph Oelckers
1e618d2fdb rewrote FileSystem::AddFromBuffer so that it gets backed by an actual FResourceFile. 2023-12-10 15:23:21 +01:00
Christoph Oelckers
c0d166c307 backend update from GZDoom. 2023-12-10 13:30:50 +01:00
Mitchell Richters
baaf1e0557 - Blood: Clean up player vel code following InputPacket changes. 2023-12-05 22:40:57 +01:00
Mitchell Richters
91dfeb42bd - Blood: Fix GCC fallthrough warning. 2023-12-05 22:39:33 +01:00
Mitchell Richters
aea71092cc - Clean up some GCC const warnings. 2023-12-05 22:39:33 +01:00
Mitchell Richters
be41bbcd28 - Move gi->getCrouchState() into DCorePlayer. 2023-12-05 22:39:33 +01:00
Mitchell Richters
79504254a2 - Blood: Clean up some getPlayer() and DCorePlayer::GetActor() accesses in ticker. 2023-12-05 22:39:32 +01:00
Mitchell Richters
1c725377ea - Interalise slope tilting checks for DCorePlayer::doViewPitch(). 2023-12-05 22:39:31 +01:00
Mitchell Richters
59366d3ffc - Internalise player velocity setup for DCorePlayer::doRollInput().
* Would have been nice to have this constexpr, but can only do that when we switch to C++20.
2023-12-05 22:39:30 +01:00
Mitchell Richters
ce75f7d7ef - Internalise player InputPacket access. 2023-12-05 22:39:30 +01:00
Mitchell Richters
531c95c7ca - Move PlayerAngles class directly into DCorePlayer.
* No refactoring around it yet.
* The #includes could use some cleaning up...
2023-12-05 22:39:30 +01:00
Christoph Oelckers
b67f2cb727 added some awful hackery to handle the different offsetting of Blood's native voxels vs. those imported via .DEF. 2023-12-05 22:39:29 +01:00
Christoph Oelckers
375ef31304 removed voxel offsetting in Blood's animateSprites function
Since offsetting is being done in the backend now, this one is redundant.
2023-12-05 22:39:29 +01:00
Christoph Oelckers
272f44786c added some more symbolic constants. 2023-12-05 22:39:28 +01:00
Christoph Oelckers
e8dd2d5b89 did some flag naming 2023-12-05 22:39:28 +01:00
Christoph Oelckers
1573e6fb49 fix some bad English 2023-12-05 22:39:28 +01:00
Christoph Oelckers
b68e79e4bc use symbolic constants for explosion types. 2023-12-05 22:39:28 +01:00
Christoph Oelckers
54035f9396 replace sprintf with snprintf. 2023-12-05 22:39:27 +01:00
Christoph Oelckers
74f6ff0c03 we really do not need to pack the GAMEOPTIONS struct... 2023-12-05 22:39:27 +01:00
Christoph Oelckers
0c397033f1 added the remaining needed GetChars calls. 2023-12-05 22:39:27 +01:00
Mitchell Richters
52b20e1f59 - Move syncinput mechanism into GameInput object. 2023-12-05 22:39:24 +01:00
Mitchell Richters
526db7f8b0 - Fix all GCC warnings in the game-side code.
* Most of these were due to mixed spaces/tabs playing nastiness with non-braced if/else statements.
2023-12-05 22:39:23 +01:00
Mitchell Richters
bdf566b348 - Remove GameInput friendships inside PlayerAngles in lieu of a local inline function. 2023-12-05 22:39:23 +01:00
Mitchell Richters
e8451d3ddb - Take better advantage of InputPacket::ang's FRotator status.
* Change it to a DRotator as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:13 +01:00
Mitchell Richters
af8f3139ed - Change InputPacket angles to an FRotator. 2023-12-05 22:39:12 +01:00
Mitchell Richters
e2a949949c - Take better advantage of InputPacket::vel's FVector3 status.
* Change it to a DVector3 as that's what the game is expecting. Too many narrowings against DAngle objects needed.
* Utilise object methods where possible.
* Do all math against the object where possible, not its members.
2023-12-05 22:39:12 +01:00
Mitchell Richters
8c1e392afc - Remove the TVector2 (const TVector3<vec_t> &other) constructor.
* This narrowing constructor was causing a problem with a `clamp()` overload in the next commit.
* Believe this is a product of a by-gone time before we had the `XY()` method on `TVector3<T>` objects.
2023-12-05 22:39:12 +01:00
Mitchell Richters
592d416485 - Change InputPacket velocities to an FVector3. 2023-12-05 22:39:12 +01:00
Mitchell Richters
8bed6c9241 - Centralise the saving of player actions within DCorePlayer's serialiser. 2023-12-05 22:39:08 +01:00
Mitchell Richters
7a408582bc - Blood: Fix missing call to Super while saving. 2023-12-05 22:39:08 +01:00
Christoph Oelckers
c02cff1e48 fix saving. 2023-12-05 22:39:07 +01:00
Christoph Oelckers
5448f6ec2c turn players into DObjects and fix several bugs with bad memory access.
* DObjects may not be memset to 0.
* There was still code trying to retrieve the player index with pointer artithmetic. With an array of pointers this does not work.
2023-12-05 22:38:34 +01:00
Christoph Oelckers
1ce8ceac5d fixed GC handling of players.
These were missing null checks, the player pointers also weren't nulled after deleting the objects.
2023-12-05 22:03:57 +01:00
Christoph Oelckers
6dd27f2262 directory structure cleanup 2023-12-05 21:58:36 +01:00
Mitchell Richters
ac35e09d1c - Move each game's stored nPlayer/pnum value to CorePlayer. 2023-10-02 18:44:04 +11:00
Mitchell Richters
16189ff7f9 - Remove GameInterface::getConsoleActor() in place of direct access. 2023-10-02 18:11:53 +11:00
Mitchell Richters
6de8fc91d6 - Remove GameInterface::reapplyInputBits() and directly perform operation in GameTicker(). 2023-10-02 18:11:51 +11:00
Mitchell Richters
02bd017d07 - Directly set CorePlayer::ucmd rather than copying it to a temporary array. 2023-10-02 17:00:50 +11:00
Mitchell Richters
d90aca9640 - Directly store a ticcmd_t object within CorePlayer. 2023-10-02 17:00:50 +11:00
Mitchell Richters
23d4cbc3bd - Remove all game-side PlayerArray[] objects and store within common code. 2023-10-02 15:43:00 +11:00
Mitchell Richters
0aac044da6 - Blood: Initial setup to convert PlayerArray array to array of BloodPlayer pointers. 2023-10-02 15:43:00 +11:00
Mitchell Richters
1604cf009c - Move the actor pointer for each game's player structures into CorePlayer.
* Something strange was going on here with Blood where the static_cast would not work... Moved the player structure into `bloodactor.h` for now to work around it.
2023-10-02 15:42:59 +11:00
Mitchell Richters
6beec5eed2 - Set up initial implementation of CorePlayer struct and make game-side player structs inherit from it. 2023-10-02 15:42:59 +11:00
Mitchell Richters
0ed54ed719 - Blood: Rename gPlayer[] array to PlayerArray[] and wrap its access. 2023-10-02 15:31:05 +11:00
Mitchell Richters
49104f9b24 - Blood: Rename PLAYER struct to BloodPlayer. 2023-10-02 15:30:51 +11:00