Commit graph

1976 commits

Author SHA1 Message Date
Christoph Oelckers
c7e993d949 got rid of missileInfo 2023-10-08 09:41:15 +02:00
Christoph Oelckers
6250906879 implemented proper handling of VM functions as identifiers. 2023-10-08 09:41:15 +02:00
Christoph Oelckers
2c08ee0c5d refactored SEQ callbacks as well. 2023-10-08 09:41:15 +02:00
Christoph Oelckers
11f094c7fb reference event callbacks by name, not by internal index.
This is needed to allow writing new callbacks.
2023-10-08 09:41:15 +02:00
Christoph Oelckers
47f09c61fc WIP for event callback refactor 2023-10-08 09:41:14 +02:00
Christoph Oelckers
d86e99a2e1 added class registration code for Blood 2023-10-08 09:41:14 +02:00
Christoph Oelckers
cb443d443c Blood projectile scriptification. 2023-10-08 09:41:14 +02:00
Christoph Oelckers
93dde24ae1 added native script exports for all functions referenced b AISTATEs. 2023-10-08 09:41:13 +02:00
Christoph Oelckers
d3867cba5f removed the unused int parameter from state callbacks.
This makes handling a lot easier because all state related functions have the same signature
2023-10-08 09:41:13 +02:00
Christoph Oelckers
40ca77c6b5 use a feature flag for the enemy attacks in 3 callback functions.
This is simple enough to handle without gModernMap
2023-10-08 09:41:13 +02:00
Christoph Oelckers
11caee7477 exported actGetRespawnTime as a first simple test case. 2023-10-08 09:41:13 +02:00
Christoph Oelckers
79ae66d5ec exported gGameOptions. 2023-10-08 09:41:12 +02:00
Christoph Oelckers
8e5f2cceda we really do not need to pack the GAMEOPTIONS struct... 2023-10-08 09:41:12 +02:00
Christoph Oelckers
986d13ea7f moved 3 functions from actor.cpp to aiunicult.cpp 2023-10-08 09:41:12 +02:00
Christoph Oelckers
91660b71d6 same procedure for PickupWeapon to delete gWeaponItemData. 2023-10-08 09:41:12 +02:00
Christoph Oelckers
9340f39053 use the actor's metadata in PickupAmmo
This allows removing the AmmoItemData array.
Also make some tweaks to handle the nnext extension for customizable ammo amount given. Instead of tying it to gModernMap this now also uses a feature flag that will later be exposed to RMAPINFO.
2023-10-08 09:41:11 +02:00
Christoph Oelckers
e8eb558025 hardcode gAmmoItemData[0].count in 4 places.
This will have to be done differently later so simplify matters for now by removing the dependency.
2023-10-08 09:41:11 +02:00
Christoph Oelckers
6eda7d930e read packslot from the actor metadata so that gItemData can be removed. 2023-10-08 09:41:11 +02:00
Christoph Oelckers
64d8fd6072 Blood: scriptified item spawning
This was merely a testbed with a limited amount of code, the biggest gain here is that the spawning no longer depends on item IDs but classes so new ones can be added later.
2023-10-08 09:41:11 +02:00
Christoph Oelckers
d83c9f51c3 added texture and class definitions for the 18 items that have no coded function 2023-10-08 09:39:46 +02:00
Christoph Oelckers
4c34f414dc added the remaining needed GetChars calls. 2023-10-08 09:15:32 +02:00
Mitchell Richters
03a69c24b3 - Move syncinput mechanism into GameInput object. 2023-10-05 13:10:47 +11:00
Mitchell Richters
623e453d4d - 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-10-04 19:28:25 +11:00
Mitchell Richters
80dd01aef0 - Remove GameInput friendships inside PlayerAngles in lieu of a local inline function. 2023-10-04 19:28:25 +11:00
Mitchell Richters
d6de57095d - 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-10-03 23:07:45 +11:00
Mitchell Richters
1732cd2e83 - Change InputPacket angles to an FRotator. 2023-10-03 23:07:45 +11:00
Mitchell Richters
f88d435335 - 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-10-03 23:07:44 +11:00
Mitchell Richters
828e46a8da - 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-10-03 23:07:44 +11:00
Mitchell Richters
f570cb5d21 - Change InputPacket velocities to an FVector3. 2023-10-03 23:07:44 +11:00
Mitchell Richters
03d957ffdf - Centralise the saving of player actions within DCorePlayer's serialiser. 2023-10-03 09:28:01 +11:00
Mitchell Richters
27ae6a4c20 - Blood: Fix missing call to Super while saving. 2023-10-03 09:20:17 +11:00
Christoph Oelckers
d815eff5d1 fix saving. 2023-10-02 21:38:58 +02:00
Christoph Oelckers
dd2ea96d6c 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-10-02 21:03:59 +02:00
Christoph Oelckers
d60834be3d fixed GC handling of players.
These were missing null checks, the player pointers also weren't nulled after deleting the objects.
2023-10-02 19:03:27 +02:00
Christoph Oelckers
02c6b68581 Merge remote-tracking branch 'remotes/origin/playerArray' into blood-script-export 2023-10-02 18:51:51 +02: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
Mitchell Richters
2755b17fd5 - Blood: Wrap access to player's actor pointer. 2023-10-02 15:30:34 +11:00
Christoph Oelckers
762263671a exported the main structures in Blood that make up a BloodActor.
nnext stuff was omitted for now.
This also eliminates the DUDEEXTRA_STATS substructure and integrates its content directly into DUDEEXTRA.
2023-10-01 22:25:08 +02:00
Christoph Oelckers
3aafcb94f1 exported XSECTOR and XWALL.
this required an extension to the ZScript front end to allow defining the bitfield flag variables which cannot have their address taken.
2023-10-01 20:39:40 +02:00
Christoph Oelckers
5a26989d06 exported the game specific sector/wall properties. 2023-10-01 18:54:10 +02:00