Commit graph

6929 commits

Author SHA1 Message Date
Christoph Oelckers
7e78bc1c14 - refactored the SEQ callback to receive an actor pointer instead of an xsprite index. 2020-12-04 18:03:01 +01:00
Christoph Oelckers
44805e29b3 - changed parameter of aiNewState to DBloodActor 2020-12-04 18:03:01 +01:00
Christoph Oelckers
502d911a95 - refactored Blood's AI callback interface to only use a single DBloodActor parameter. 2020-12-04 18:03:01 +01:00
Christoph Oelckers
0ac41e0b5a - drafted a DBloodActor to wrap the multitude of arrays (12 overall!) in which an actor is split up. 2020-12-04 18:03:01 +01:00
Christoph Oelckers
bc1adc9c51 - Blood: fixed cl_autorun affecting bobbing intensity even when no movement takes place.
Blood uses the state of the 'run' bit as the sole information that the player is running, which leads to very different behavior with cl_autorun on or off.
Apparently Raze's semantics here do not agree with how it was handled originally and the residual bobbing when coming to a stop was more than a little bit distracting.
2020-12-04 00:06:23 +01:00
Christoph Oelckers
396e3cd524 - actually call the model animation timer somewhere.
Now models also animate properly. :)
2020-12-02 00:19:22 +01:00
Christoph Oelckers
25ef58f897 - re-enabled all model specific code in Duke's animatesprites function and removed some remaining software renderer-only code in the engine. 2020-12-01 23:57:39 +01:00
Christoph Oelckers
9a507e5d0a - fixed model rendering.
(What a stupid mistake... :?)

Model animations still do not work as intended, though.
2020-12-01 22:03:20 +01:00
Christoph Oelckers
b0bf51ec5c - Duke/RR: Selecting the alternative weapon must set the proper bits in 'subweapon'.
Otherwise the weapon cycling breaks.
Fixes #182
2020-12-01 21:07:38 +01:00
Christoph Oelckers
06a069750f - addressed more type casting issues in SW.
This should cover everything with coordinates.
2020-12-01 19:01:38 +01:00
Christoph Oelckers
39b67b4086 - SW: removed some very dangerous type casting. 2020-12-01 18:30:21 +01:00
Christoph Oelckers
b52668ecdf - SW: added some simple allocation wrappers around common code sequences. 2020-12-01 16:53:29 +01:00
Christoph Oelckers
6dfe869614 - shorten the struct for puser to what actually gets used from it.
This is preparation for making USER more serialization friendly as it was copied to puser.
2020-12-01 16:22:32 +01:00
Christoph Oelckers
dd75c8dbe4 - weaken the reverb in Duke.
Unfortunately the entire thing is very poorly defined, not setting it for sectors but for sprites with a distance. But some of these sprites cover non-reverb sectors as well and this can produce some ugly sound field in spots where this isn't wanted at all.
2020-12-01 16:34:47 +01:00
Christoph Oelckers
1d6d58538c - cleaned out the remains of the old savegame code. 2020-12-01 12:58:10 +01:00
Christoph Oelckers
67dff2a863 - Exhumed: Serialize global state as JSON.
This was the last item to be converted.
2020-12-01 12:58:10 +01:00
Christoph Oelckers
487d62e264 - Exhumed: Bullet and Grenade. 2020-12-01 12:58:10 +01:00
Christoph Oelckers
54eec61828 - Exhumed: Init 2020-12-01 12:58:10 +01:00
Christoph Oelckers
15579798ad - Exhumed: bubbles and gun. 2020-12-01 12:58:09 +01:00
Christoph Oelckers
08d8ba8fe4 - Exhumed: lighting 2020-12-01 12:58:09 +01:00
Christoph Oelckers
83ba046d04 - Exhumed: items and move. 2020-12-01 12:58:09 +01:00
Christoph Oelckers
bb0ef6ff70 - Exhumed: Objects. 2020-12-01 12:58:09 +01:00
Christoph Oelckers
262af72235 - Exhumed: Anims and Player. 2020-12-01 12:58:09 +01:00
Christoph Oelckers
531d7c96b4 - Exhumed: Queen 2020-12-01 12:53:10 +01:00
Christoph Oelckers
026d355096 - serialize Ra as JSON, do not serialize Ramses.
The Ramses intermissions cannot be safely resumed from a savegame - so saving was blocked there, meaning that this data does not need to be saved.
2020-12-01 12:53:10 +01:00
Christoph Oelckers
3c83775273 - add back the missing secret hint notification calls for Duke/RR. 2020-12-01 12:52:49 +01:00
Christoph Oelckers
92a72cef8b - Blood: only trigger a secret if the hint system hasn't registered it.
There's some bugs in Blood that allow a secret to be triggered multiple times. However, since the hint system already knows which secrets were triggered, use that info to avoid retriggers.
Fixes #206
2020-12-01 12:52:42 +01:00
Christoph Oelckers
6475d772ca - Exhumed: Runlist and Rand. 2020-12-01 12:19:09 +01:00
Christoph Oelckers
c1b478bf83 - Exhumed: Snake and Sequence
# Conflicts:
#	source/exhumed/src/save.cpp
2020-12-01 12:15:43 +01:00
Christoph Oelckers
e8c56b1f9f - Exhumed: serialize the status bar as JSON - added a helper class to handle static arrays with an attached free list more easily. 2020-12-01 12:15:43 +01:00
Christoph Oelckers
1b2895bee6 - Exhumed: wrap all serialized game data into another JSON object
# Conflicts:
#	source/exhumed/src/save.cpp
2020-12-01 12:15:43 +01:00
Mitchell Richters
f9866f4a21 - Blood: Call resetForcedSyncInput() after sethorizon() in ProcessInput() vs. playerProcess(). Call was too early and causing player not to be able to look while synchronised input is being forced. 2020-12-01 22:02:20 +11:00
Christoph Oelckers
5850c7b284 - let SyncInput return a combination of gamesetinput and cl_syncinput - also serialize gamesetinput. 2020-11-30 23:45:21 +01:00
Christoph Oelckers
ae36ea88c3 - wrap all checks of cl_syncinput in an inline function. 2020-11-30 23:40:16 +01:00
Mitchell Richters
f429871cc6 - Blood: Promote pPlayer->angold to binangle class. 2020-12-01 07:43:31 +11:00
Mitchell Richters
232dd5e07a - Blood: Force synchronised input while a revolving door is busy/in-use.
* Fixes #205.
2020-12-01 07:43:25 +11:00
Mitchell Richters
22f7fc93f4 - Exhumed/SW: Move code to trigger synchronised input for edge cases where its needed into gamecontrol. 2020-12-01 07:31:47 +11:00
Christoph Oelckers
0b797b0ccd - Exhumed: added JSON serialization for view and switch - also renamed the fields in the switch struct.
Some refactoring was needed to put a plain C array into a TArray to remove the limits.
2020-11-29 23:32:28 +01:00
Christoph Oelckers
a51b77b95b - do not statically initialize DukeGameInfo.
Since this structure contains several large arrays it will inflate the EXE size with 800kb of empty space.
2020-11-29 22:31:02 +01:00
Christoph Oelckers
9a345bdfa7 - Exhumed: Wasp 2020-11-29 22:29:36 +01:00
Christoph Oelckers
45ee475df7 - Exhumed: Set. 2020-11-29 20:59:42 +01:00
Christoph Oelckers
59e9cfa6ac - Exhumed: Scorpion 2020-11-29 20:52:16 +01:00
Christoph Oelckers
cf5982b3fc - Exhumed: Roach. 2020-11-29 20:47:55 +01:00
Christoph Oelckers
4f1999ab24 - Exhumed: Rex 2020-11-29 20:43:35 +01:00
Christoph Oelckers
4543982e54 - Exhumed: Rat 2020-11-29 20:39:27 +01:00
Christoph Oelckers
d92428d217 - Exhumed: The mummy has been handled, too - also renamed some fields to match the other enemies. 2020-11-29 20:34:55 +01:00
Christoph Oelckers
1fa087767e - Exhumed: ... and for the lava dude. 2020-11-29 20:30:17 +01:00
Christoph Oelckers
bd3efcb6c4 - Exhumed: same procedure for the Lion. 2020-11-29 20:26:54 +01:00
Christoph Oelckers
b669e5405d - Exhumed: did the same for the fish, changed some disassembly names and removed unused fields from enemy structs. 2020-11-29 20:16:58 +01:00
Christoph Oelckers
e81dbbdc93 - Exhumed: limit removal, cleanup and JSON serialization for the spider. 2020-11-29 19:32:58 +01:00
Christoph Oelckers
b26f6157e9 - Exhumed: Anubis cleanup, JSON serialization and limit removal. 2020-11-29 19:20:38 +01:00
Christoph Oelckers
8a7b3dc667 - Interpolate Duke's wave floor effect. 2020-11-29 17:40:41 +01:00
Christoph Oelckers
3ba0a242bf - Blood: do not recreate the bucket list when loading a savegame.
It has been read from the savegame already, and creating a new one will not produce a correct list because not all data has been loaded yet.
2020-11-29 16:22:29 +01:00
Christoph Oelckers
ed8266df0b - fixed bad args check in WarpToCoords CCMD. 2020-11-29 16:06:15 +01:00
Christoph Oelckers
1b1449605f - fixed: Blood did not serialize its mirror data (which is also used for certain portals.)
Fixes #203
2020-11-29 16:05:23 +01:00
Christoph Oelckers
cd1b79a703 - use stricter checks when trying to levelwarp.
If saving is blocked, so should changing the level.
Fixes #204.
2020-11-29 15:22:54 +01:00
Christoph Oelckers
92bf1232da - Duke: documented global variables for eventual scriptification.
Most are only needed internally or for very special uses and do not need any scripting consideration.
2020-11-29 15:09:23 +01:00
Christoph Oelckers
553bb2af19 - moved 'frags' into player_struct.
Again for reducing the work with the script interface.
2020-11-29 14:10:03 +01:00
Christoph Oelckers
346921211e - re-enabled the widescreen pinning code.
It is still off by default - the idea here is to provide a means for the user to switch it on in case a mod replaces the weapons with non-widescreen-friendly versions.
2020-11-29 14:05:53 +01:00
Christoph Oelckers
7ad0750839 - grouped all of Duke's constant per-session state in a single struct.
Mainly done so later the script export can be done more easily.
This also renames a few of the affected variables for clarity.
2020-11-29 13:54:58 +01:00
Christoph Oelckers
a34f5debe8 - route the shared control CCMDs through the game interface instead of registering local variants for each game. 2020-11-29 13:35:09 +01:00
Christoph Oelckers
48b16d5233 - cleanup on player CVAR use. 2020-11-29 13:22:04 +01:00
Christoph Oelckers
7887c4e80d - use lambdas instead of templates for chaining ExitFromMenu's actions. 2020-11-29 13:15:19 +01:00
Christoph Oelckers
f2f095c469 - Blood: Only clear global state before reading a savegame.
Doing it before writing permanently trashes it.
2020-11-28 00:20:12 +01:00
Christoph Oelckers
7143f62cb1 - Blood: restore pointers after loading all sequences. 2020-11-27 23:47:39 +01:00
Christoph Oelckers
6a29c38240 - Blood: write out the buckethead array to the savegame instead of trying to restore it afterward.
It looks like this cannot be reliably reconstructed from a running level anymore.
2020-11-27 23:34:36 +01:00
Christoph Oelckers
a587a1a888 - SW: generalize the resetting of the one-sided flag for pickup items instead of trying to handle each case explicitly.
Fixes #202
2020-11-27 20:21:13 +01:00
Christoph Oelckers
daf71fa470 - replaced a few more literal numbers. 2020-11-27 20:06:38 +01:00
Christoph Oelckers
81bdee90f7 - Exhumed: interpolate texture animations. 2020-11-26 18:32:37 +01:00
Christoph Oelckers
d22229c042 - removed the unused interpolation utilities in Exhumed.
None of this was used, but with the shared implementation it isn't needed anymore.
2020-11-26 18:32:37 +01:00
Christoph Oelckers
922dc178d6 - SW: interpolate texture panning. 2020-11-26 18:32:37 +01:00
Christoph Oelckers
3d0842d851 - SW: made sector object interpolation more serialization friendly.
This eliminates all the direct pointers to various game data and replaces it by encoded offsets.
2020-11-26 18:32:36 +01:00
Christoph Oelckers
bf4cc9c6af - migrated SW to the common interpolation system.
So far only the existing pieces - animations and sector objects still to do.
2020-11-26 18:32:36 +01:00
Christoph Oelckers
b9477f147e - migrated Duke's interpolations to the common system and added handling for texture scrollers. 2020-11-26 18:32:36 +01:00
Christoph Oelckers
87111a2fbc - we no longer need to recreate interpolations after loading a savegame. 2020-11-26 18:32:36 +01:00
Christoph Oelckers
82a0e95485 - made the new interpolation system work in Blood.
The panning interpolations need wraparuound handling due to their small value range.
2020-11-26 18:32:35 +01:00
Christoph Oelckers
2cd3927613 - use floats for wall panning offsets. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
357199ecc1 - cross-game, serialization-friendly and pointer free interpolation implementation.
Not hooked up yet.
2020-11-26 18:32:35 +01:00
Christoph Oelckers
d545eb7aa9 - make sector panning variables floats and added some convenience wrappers. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
82d80f3f07 - Blood: handle super secrets properly in the statistics display.
Fixes #198
2020-11-26 07:48:34 +01:00
Mitchell Richters
1504e19cf8 - Exhumed: Add sprite interpolation to analyzesprites(). 2020-11-26 19:15:49 +11:00
Mitchell Richters
00ce61959c - SW: Clean up some Q16.16 angle usage within DoPlayerTurnTurret(). 2020-11-26 17:30:45 +11:00
Mitchell Richters
80ff918b17 - gameinput.h: For PlayerAngle struct methods settarget(), properly set target as angle + delta between angle & target within method and not game-side. 2020-11-26 17:26:29 +11:00
Mitchell Richters
e9e4590f6a - gameinput.h: For PlayerHorizon and PlayerAngle struct methods settarget(), always set the angle directly if backup set to true. 2020-11-26 16:42:07 +11:00
Mitchell Richters
b9e1cbb5de - gamecontrol.h: Move getHalfLookAng() into PlayerAngle struct as look_anghalf().
* Uses internal struct variables at full BAM precision.
2020-11-26 16:37:37 +11:00
Christoph Oelckers
aac4fcefa2 - fixed comment 2020-11-25 00:09:13 +01:00
Christoph Oelckers
6549f05127 - SW: silence an apparently misplaced ambient sound in level 9. 2020-11-24 22:39:50 +01:00
Mitchell Richters
73df144f65 - SW: Fix ladder angle issues.
* Fixes #197.
2020-11-25 07:50:30 +11:00
Christoph Oelckers
0b115ac9c7 - Exhumed: added a countdown display for the magic spells in the fullscreen HUD. 2020-11-24 21:04:27 +01:00
Christoph Oelckers
7470286d5b - Exhumed: Switch sounds must use CHANF_LISTENERZ because they use no z-coordinate for their position. 2020-11-24 00:14:32 +01:00
Christoph Oelckers
8cbd67974e - Exhumed: fixed typo in player taunt code. 2020-11-23 19:32:12 +01:00
Christoph Oelckers
2fda1b9d52 - Exhumed: fixed positioning of the player's scream sound.
This was played on the wrong actor - the calling code passed 0 instead of the player's actual sprite index.
2020-11-23 18:38:58 +01:00
Christoph Oelckers
5a5f9b8e02 - backend update from GZDoom. 2020-11-23 15:54:06 +01:00
Mitchell Richters
4ad227c7d6 - Blood: Remove orphaned/unincluded loadsave.h header file. 2020-11-23 22:47:43 +11:00
Christoph Oelckers
88666c3e95 - Blood: always compare xsector and xwall serialization against a null base to reduce file size. 2020-11-23 12:23:19 +01:00
Christoph Oelckers
48049d5548 - Blood: fixed AIState and posture data serialization 2020-11-23 10:18:47 +01:00
Christoph Oelckers
9a4073508d - Blood: Savegame fully transitioned to JSON
not tested yet.
2020-11-23 09:53:58 +01:00
Christoph Oelckers
572d3c9944 - Blood: serialize player as JSON. 2020-11-23 09:53:58 +01:00
Christoph Oelckers
13eae3a7bd - a bit more cleanup 2020-11-23 09:53:58 +01:00
Christoph Oelckers
fde6407266 - removed the local duplication of the player name in Blood.
Using the global CVAR instead - once multiplayer support is in this will work for all players.
2020-11-23 09:53:58 +01:00