Commit graph

7141 commits

Author SHA1 Message Date
Mitchell Richters
4397646cc4 - Duke: Move cancellation of spin from FinalizeInput() into applylook() in gameinput.cpp. 2021-01-02 10:26:22 +11:00
Mitchell Richters
5f33b0087f - Duke: Comment out unused enum values but leave behind for reference purposes.
* In line with SW, should have been done with fb91fc49a3.
2021-01-02 10:09:42 +11:00
Mitchell Richters
4aae71f0ee - InputState::ClearAllInput(): Call resetTurnHeldAmt() when clearing input. 2021-01-02 10:00:29 +11:00
Mitchell Richters
e65e112281 - Duke: Remove local calculation of turboturntime for RRRA vehicles in lieu of backend solution. 2021-01-02 09:59:51 +11:00
Mitchell Richters
36c25ee2a0 - gameinput.cpp: Break out processMovement()'s turnheldamt calculations into functions. 2021-01-02 09:53:03 +11:00
Mitchell Richters
a1dd36ffee - Exhumed: Rename ps_input.h -> input.h. 2021-01-02 09:38:23 +11:00
Mitchell Richters
37d13e3ea3 - SW: Remove unused turnheldtime missed when doing 949e456018. 2021-01-02 09:32:38 +11:00
Mitchell Richters
3a801cbf5c - calcviewpitch(): Set scaleAdjust to default to 1 in prototype like other functions in gameinput.cpp. 2021-01-02 09:32:19 +11:00
Mitchell Richters
dac08a2cb9 - calcviewpitch(): Fix issue with returning horizoff to 0 from negative slope. 2021-01-02 01:15:58 +11:00
Mitchell Richters
8003753989 - Duke/SW: Move each game's check of cl_slopetilting into calcviewpitch() backend function. 2021-01-02 00:34:44 +11:00
Mitchell Richters
6d12159006 - Duke/SW: Consolidate each game's slopetilting function into backend solution.
* Based on SW's implementation purely for its commentary, but includes a fix from Duke's.
* Allow disabling Duke's slopetilting via `cl_slopetilting` like SW.
2021-01-02 00:30:11 +11:00
Mitchell Richters
3ec41e776c - SW: Clean up old auto aim/mouse aim bits. 2021-01-01 22:37:40 +11:00
Mitchell Richters
949e456018 - All Games: Slight tidy up of gi->GetInput() functions. 2021-01-01 21:33:00 +11:00
Mitchell Richters
571583ca9c - Duke: Store velocity scale in motoApplyTurn() as a variable like boatApplyTurn(). 2021-01-01 21:21:26 +11:00
Nikolay Ambartsumov
591f593888 [Blood] Fix negative priority event processing
Some sprites (for example, "Blood Drip" sprite type 702) cause
negative priority events to be added added to the event queue
on map initialization. Despite them being the highest priority
entries in the event queue, comparision with the game timer performs an
implicit unsigned conversion, which wrongly results in their priority
being considered much higher than the current in-game time, causing the
event loop to never advance. This commit fixes this problem.
2020-12-31 20:43:18 +01:00
Nikolay Ambartsumov
edd5b92c94 [Blood] Fix wrong sector path marker stat lookup 2020-12-31 20:43:18 +01:00
Christoph Oelckers
3ecd02dcac - downgrade overflow message to a debug warning. 2020-12-30 09:55:57 +01:00
Christoph Oelckers
b73b59cf66 - fixed badly inherited exception subclass. 2020-12-30 09:55:57 +01:00
Christoph Oelckers
0f8e73ce77 - inlined calc_globalshifts to get rid of two global variables. 2020-12-30 09:55:57 +01:00
Mitchell Richters
a0a710c56a - Duke: Fix camera horizon when viewing the screen from in-game.
* Leftover horizon offset that was missed when doing 09a05f354c.
2020-12-30 18:31:51 +11:00
Mitchell Richters
f2c6a23f38 - Duke: Allow horz input to go through when returning to center and horiz is abs(5) or less. This mimics the original behaviour where Duke would stop returning to center at 95/105. This allows faster mouse input to be applied instead of waiting for player's horizon to return to 0. 2020-12-30 18:04:30 +11:00
Mitchell Richters
5c87b7b894 - Return to center using tangent of pitch, as per original games (Duke/SW).
* Preserves the original return to center feel more accurately as original algorithm can't directly translate to pitch. If we ever get rid of Build's horizon throughout the games, this can go on the chopping block then as a necessity.
2020-12-30 18:04:00 +11:00
Mitchell Richters
0afaff2663 Revert "- Duke: Don't block horz input while returning to center."
This reverts commit 5f62058020.
2020-12-30 17:07:59 +11:00
Mitchell Richters
5f62058020 - Duke: Don't block horz input while returning to center.
* Player still returns to center after a fall or by looking/aiming up/down, but input breaks the return just like the other games.
* Fixes #220.
2020-12-29 16:48:28 +11:00
Mitchell Richters
14d41e9984 - Exhumed: Tune position of compass, ammo count and underwater lungs following changes in 220283d1ec.
Confirmed torch issue in #236 that 220283d1ec fixed still remains fixed.
2020-12-29 14:12:43 +11:00
Rachael Alexanderson
38faefa663 - set some install defaults for posix systems 2020-12-27 05:28:47 -05:00
Christoph Oelckers
220283d1ec - Exhumed: Made some adjustments to the status bar for original center alignment.
The 2D drawer in this old Build version did not properly center graphics with odd size due to integer math. Some graphics offsets are not correct due to this quirk unless such broken math is used to align them.
Fixes #236
2020-12-13 19:38:04 +01:00
Christoph Oelckers
3787e103d2 - use the same camera sprite selection logic as EDuke32 and RedNukem.
This is the only one that makes some sense.
2020-12-13 14:13:51 +01:00
Rachael Alexanderson
0c71cc4b38 - allow use of external libvpx library on windows 2020-12-13 02:30:26 -05:00
Rachael Alexanderson
218b0cfb03 - syncing these files over from GZDoom
- this does not actually yet build for Windows ARM64, but it does put the framework in place to make that possible in the near future
2020-12-12 09:20:02 -05:00
Christoph Oelckers
b58b21cca0 - Exhumed: The global variable holding the Ramses sprite index was not stored in a savegame.
As a result it could result in the player facing an incorrect direction if this variable had not been set in a previous session.
Fixes #235.
2020-12-11 19:33:06 +01:00
Christoph Oelckers
72df9c26d8 - Duke: fixed: SE31's handler overwrote the interpolation coordinates, which rendered interpolation ineffective.
Also removing some redundant coordinate copying. Since we save all sprite coordinates at the start of a frame, there is no need to do the same again in the stat handlers.
Fixes #237
2020-12-11 19:17:41 +01:00
Christoph Oelckers
dd7d661f9a - explicitly disable mipmapping for indexed textures.
It looks like this code was not handled properly.
2020-12-10 20:46:44 +01:00
Christoph Oelckers
ddd0b412ae - Exhumed: only run the level init code after loading a save, not after saving.
Fixes #221
2020-12-10 20:25:20 +01:00
Christoph Oelckers
6c36852ceb - SW: fixed positioning of the inventory bar. 2020-12-10 20:20:17 +01:00
Christoph Oelckers
5b78f84bd7 - Blood: only set 'isrunning' when the player is actually running and not when just the run key is held down.
The old logic does not work because the run toggle results in this button being continuously held down.
2020-12-10 19:23:38 +01:00
Christoph Oelckers
fdd9c10a55 - fixed: the statistics display didn't take the HUD's scale factor into account.
Fixes #229
2020-12-10 19:20:24 +01:00
Christoph Oelckers
a8fd2e7ec3 - RR: fixed inventory display overlapping the weapon bar in status bar mode.
Fixes #231
2020-12-10 19:07:15 +01:00
Christoph Oelckers
f41fe7c692 - Blood: fixed double inventory display on overlay status bar.
Fixes #230
2020-12-10 19:02:09 +01:00
Christoph Oelckers
94d3d643d7 - fixed: the file system's entry count was not updated before rehashing.
This broke Blood's RFS parser.
2020-12-09 18:56:17 +01:00
Christoph Oelckers
b98e06cd20 - Blood: header dependency cleanup.
These are extremely ordering dependent so now blood.h serves as an umbrella header for most.
2020-12-09 15:56:32 +01:00
Christoph Oelckers
2c917ca7e1 - fixed cherry picked commit from upstream. 2020-12-08 22:21:03 +01:00
Christoph Oelckers
b3988165e2 - SW: fixed bad sector iterator in DriveCrush.
This was causing spurious crashes.
Fixes #218
2020-12-08 22:09:17 +01:00
Szilárd Biró
3713cb0f09 PCExhumed: Torch bouncing fix 2020-12-08 22:03:43 +01:00
Christoph Oelckers
1a2b93f402 - fixed sky panning in Duke.
This needs to take the composite texture into account because panning in Build is based on tile size, not map dimension.
It was also redone to use floating point to get rid of the horrible precision of the scrolling effect.
2020-12-06 20:49:32 +01:00
Christoph Oelckers
88bed95400 - Exhumed: Changed visibility from 2048 to 1024 because 2048 is clearly far too dark.
GDX also uses 1024 - I have no idea how PCExhumed gets away with 2048 here.
2020-12-06 20:25:23 +01:00
Christoph Oelckers
8d659bad32 - fixed V5/V6 format map loader. 2020-12-06 20:17:27 +01:00
Mitchell Richters
1e8fe482f3 - Duke: Partially address excessively fast sky in E4L1 as reported in #217.
* Before d545eb7aa9, `moveclouds()` simply set `ceilingxpanning`/`ceilingypanning`. Afterwards, it was accumulating with every passing loop.
* Despite fixing this, still seems a bit fast.
2020-12-06 23:51:20 +11:00
Christoph Oelckers
51205fbdac - split actInit into several smaller functions. 2020-12-06 12:52:08 +01:00
Christoph Oelckers
eee972d446 - removed some unused functions from actor.cpp. 2020-12-06 12:51:46 +01:00
Christoph Oelckers
19b731bc8f - removed the owner fuckery in Blood.
Par for course I'd say - instead of checking for replaced player actors at the only time it really matters - i.e. when respawning, it was encoded into the stored value, making the entire thing very messy.
For mow, multiplayer handling is not needed, but when it does, better go over all actors and manually substitute the two relevant fields, i.e. sprite.owner and xsprite.burnsource.
2020-12-06 12:51:46 +01:00
Christoph Oelckers
045e487859 - actInit cleanup, new iterators returning DBloodActor. 2020-12-06 12:51:46 +01:00
Christoph Oelckers
c92aaaee20 - This is version 0.8.0
Finally out of alpha, now that the model code is working. :)
2020-12-06 10:51:35 +01:00
Gaerzi
d644065103 - SW: Fix another bad line from 06a069750f that was missed when doing a36c122ff1. 2020-12-06 20:11:26 +11:00
Mitchell Richters
a36c122ff1 - SW: Fix bad copy-paste from 06a069750f that was causing issues with SO vehicles and turrets.
* Fixes #211.
2020-12-06 19:16:59 +11:00
Christoph Oelckers
d4198a5b1a - Exhumed: 'paused' should not be part of the 'in a game' check.
Fixes #209
2020-12-06 08:39:40 +01:00
Christoph Oelckers
5fc8859342 - Blood: instead of messing around with the damage factors when toggling god mode, let the game check the actual god mode flag itself.
This was just too volatile and prone to breakage.
Fixes #210.
2020-12-06 08:36:54 +01:00
Christoph Oelckers
99da4151d1 - fixed duplicate "snakecam" key in Exhumed savegame
This could cause the snake cam to be activated just by reloading a save.
Fixes #213
2020-12-06 08:22:56 +01:00
Christoph Oelckers
2f4abf93af - fixed loading of Blood savegames.
This was a strange case of C++ not doing what was to be expected due to hidden semantics.
Note: never assign {} to a type that has a non-default constructor!
Fixes #212
2020-12-06 08:18:03 +01:00
Christoph Oelckers
d04013066c - build a composite texture of all the segments for sky rendering to reduce the seams between the single segments. 2020-12-04 22:29:25 +01:00
Christoph Oelckers
aba3539275 - moved dudeSlope fully into DBloodActor. 2020-12-04 18:03:02 +01:00
Christoph Oelckers
99c0b77cf2 - rerouted all accesses to gDudeSlope. 2020-12-04 18:03:02 +01:00
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
Christoph Oelckers
0c6318aed9 - renamed team variables to something meaningful. 2020-11-23 09:53:58 +01:00
Christoph Oelckers
4950a5e963 - Blood: serialize mirrors as JSON and renamed the 3 atxx variables in here. 2020-11-23 09:53:57 +01:00
Christoph Oelckers
169d708547 - removed all remaining uses of tilesiz. 2020-11-23 08:55:02 +01:00
Christoph Oelckers
d60bc8be9f - replaced all remaining uses of tilesiz[].y 2020-11-23 08:39:49 +01:00
Christoph Oelckers
35f3de64f7 - partial cleanup of SW's game.h
inlined several macros, removed some unused ones, replaced a few with one or two uses and simplified some functions to remove 90's optimizations that these days have no positive effect aside from complicating the code.
2020-11-23 08:39:20 +01:00
Christoph Oelckers
6b889cbb77 - port from NBlood: Show all available powerups in HUD. 2020-11-23 07:49:36 +01:00
Mitchell Richters
3f14886830 - binaryangle.h: Return BAngToBAM() as int64_t to handle signed values without overflowing on unsigned values. 2020-11-23 10:49:47 +11:00
Mitchell Richters
ea2e4051f1 - Duke (RR): Fix incorrect inline call for angAdjustment following changes in ea4ad0548a. 2020-11-23 10:44:38 +11:00
Mitchell Richters
b65326dc22 - Duke (RR): Fix weapon swaying after copy-paste issue originating from 5172c43e71. 2020-11-23 10:24:43 +11:00
Christoph Oelckers
bbf1352db1 - replaced approx 1/3 of all accesses to the tilesiz wrapper class. 2020-11-23 00:18:30 +01:00
Mitchell Richters
fc359065ae - Duke: Tune level end summary screen text positioning.
* Number positioning was 1 px off for some items such as `TXT_YourTime`.
* Positioning of number and text was 1px off for some items such as `TXT_3DRTIME` and `TXT_EnemiesLeft`.
2020-11-23 09:36:05 +11:00
Christoph Oelckers
3ad37631a6 - SW: fixed several keycards that were accidentally flagged one-sided. 2020-11-22 23:18:45 +01:00
Mitchell Richters
89048c8e70 - binaryangle.h: Use cmath.h functions for binangle/lookangle trig methods as well. 2020-11-23 08:40:18 +11:00
Christoph Oelckers
b89cd6d14c - cleanup on binaryangle.h
* why the reference parameters? These should be passed by value.
* removed the < and > operators from binangle class because angles should not be ordered.
* instead of calling the CRT trig functions, use the ones from cmath.h which are more reliable
2020-11-22 21:54:39 +01:00
Mitchell Richters
5ba2e7863d - binaryangle.h: Add asbuildf() method to all classes and use where appropriate. 2020-11-22 21:18:12 +01:00
Mitchell Richters
e57d6f8785 - Duke: Fix crane's angle settarget() call.
* Fixes #185.
2020-11-22 21:18:12 +01:00
Mitchell Richters
c42771228d - binaryangle.h: Reverse order of binangle and lookangle classes and declare binangle class a friend of lookangle.
* In-prep for addressing #185.
2020-11-22 21:18:11 +01:00
Mitchell Richters
3b3e926fd3 - gameinput.h: For PlayerAngle struct, add int settarget() overload and change one true call with a float to bvectangf(). 2020-11-22 21:18:11 +01:00
Mitchell Richters
ea4ad0548a - All Games: Make use of new addadjustment() overloads in PlayerAngle struct created in 25207e4f1818a5ed38648ce87673329cd75e20e4. 2020-11-22 21:18:11 +01:00
Mitchell Richters
2341ed4e25 - gameinput.h: For PlayerAngle struct, add extra addadjustment() overloads to remove type conversions game-side, and when incoming. 2020-11-22 21:18:11 +01:00
Mitchell Richters
35845a63e2 - binaryangle.h: Expand all classes with bit-shift operators and binangle/lookangle classes with some lt/le/ge/gt bools to have parity with the fixedhoriz class. 2020-11-22 21:18:11 +01:00
Mitchell Richters
42689e02c4 - gameinput.cpp: Define getincanglebam() and slightly clean up other getincangle*() functions. 2020-11-22 21:18:11 +01:00
Mitchell Richters
0190a98a10 - Remove calcSinTableValue() inline function and clean up use of PI/fPI and BANG2RAD #defines. 2020-11-22 21:18:10 +01:00
Mitchell Richters
6b66a958d0 - buildutils: Replace calcSinTableValue() use within Exhumed with bsinf()/bcosf(). 2020-11-22 21:18:10 +01:00
Mitchell Richters
5172c43e71 - buildutils: Replace calcSinTableValue() use within Duke with bsinf()/bcosf(). 2020-11-22 21:18:10 +01:00
Mitchell Richters
a2ac8cccc1 - buildutils: Replace calcSinTableValue() use within SW with bsinf()/bcosf(). 2020-11-22 21:18:10 +01:00
Mitchell Richters
feb6d023fa - buildutils: Replace sintable[] use within SW's weapon.cpp with bsin()/bcos(). 2020-11-22 21:18:10 +01:00
Mitchell Richters
a7a223c13d - buildutils: Replace sintable[] use within SW's wallmove.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
a5082d24d9 - buildutils: Replace sintable[] use within SW's track.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
72f12e19f3 - buildutils: Replace sintable[] use within SW's sprite.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
09a560cb6d - buildutils: Replace sintable[] use within SW's skull.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
3d7d31a5b7 - buildutils: Replace sintable[] use within SW's sector.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
f57372237c - buildutils: Replace sintable[] use within SW's sbar.cpp with bsin()/bcos(). 2020-11-22 21:18:09 +01:00
Mitchell Richters
f1d9c3ea9b - buildutils: Replace sintable[] use within SW's rooms.cpp with bsin()/bcos(). 2020-11-22 21:18:08 +01:00
Mitchell Richters
d0a8f1fbda - buildutils: Replace sintable[] use within SW's ripper2.cpp with bsin()/bcos(). 2020-11-22 21:18:08 +01:00
Mitchell Richters
54d0b4c291 - buildutils: Replace sintable[] use within SW's ripper.cpp with bsin()/bcos(). 2020-11-22 21:18:08 +01:00
Mitchell Richters
f8cd6d2a37 - buildutils: Replace sintable[] use within SW's player.cpp with bsin()/bcos(). 2020-11-22 21:18:08 +01:00
Mitchell Richters
73355edd2b - buildutils: Replace sintable[] use within SW's ninja.cpp with bsin()/bcos(). 2020-11-22 21:18:08 +01:00
Mitchell Richters
32ea54aca3 - buildutils: Replace sintable[] use within SW's morph.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
512bb29ed9 - buildutils: Replace sintable[] use within SW's mclip.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
94bd45569c - buildutils: Replace sintable[] use within SW's input.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
2e4bced7f9 - buildutils: Replace sintable[] use within SW's hornet.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
85841f5abd - buildutils: Replace sintable[] use within SW's girlninj.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
f0be96c385 - buildutils: Replace sintable[] use within SW's game.h with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
ffd768ab71 - buildutils: Replace sintable[] use within SW's eel.cpp with bsin()/bcos(). 2020-11-22 21:18:07 +01:00
Mitchell Richters
e60747a913 - buildutils: Replace sintable[] use within SW's draw.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
c2c49bd0b9 - buildutils: Replace sintable[] use within SW's coolg.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
4192416268 - buildutils: Replace sintable[] use within SW's bunny.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
156709d6bf - buildutils: Replace sintable[] use within SW's ai.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
772635e351 - buildutils: Replace sintable[] use within SW's actor.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
ad814f66b0 - buildutils: Replace sintable[] use within Duke's spawn.cpp with bsin()/bcos(). 2020-11-22 21:18:06 +01:00
Mitchell Richters
d6a094dcdd - buildutils: Replace sintable[] use within Duke's sectors_r.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
6fba78c123 - buildutils: Replace sintable[] use within Duke's sectors_d.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
6ccf925429 - buildutils: Replace sintable[] use within Duke's sectors.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
410c2cf41f - buildutils: Replace sintable[] use within Duke's sbar_*.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
0781d627dc - buildutils: Replace sintable[] use within Duke's prediction.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
6800e192e1 - buildutils: Replace sintable[] use within Duke's player_w.cpp with bsin()/bcos(). 2020-11-22 21:18:05 +01:00
Mitchell Richters
1c5c90d00f - buildutils: Replace sintable[] use within Duke's player_r.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
5e45f988e3 - buildutils: Replace sintable[] use within Duke's player_d.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
50b4d8cc99 - buildutils: Replace sintable[] use within Duke's player.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
fd4e1b3b28 - buildutils: Replace sintable[] use within Duke's input.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
d934bfd985 - buildutils: Replace sintable[] use within Duke's gameexec.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
f1f0b42172 - buildutils: Replace sintable[] use within Duke's game_misc.cpp with bsin()/bcos(). 2020-11-22 21:18:04 +01:00
Mitchell Richters
95fa3a6f52 - buildutils: Replace sintable[] use within Duke's animatesprites_*.cpp with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
b6e8030307 - buildutils: Replace sintable[] use within Duke's actors_r.cpp with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
abc49fed62 - buildutils: Replace sintable[] use within Duke's actors_d.cpp with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
bf8b1238c6 - buildutils: Replace sintable[] use within Duke's actors.cpp with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
bae4d77427 - buildutils: Replace sintable[] use within Exhumed with bsin()/bcos(). 2020-11-22 21:18:03 +01:00
Mitchell Richters
d6d74c2712 - buildutils: Replace sintable[] use within core with bsin()/bcos(). 2020-11-22 21:18:02 +01:00
Mitchell Richters
32a1796728 - buildutils: Replace sintable[] use within Build with bsin()/bcos(), using bsinf()/bcosf() where appropriate.
* Includes a few header include shuffles to make it all come together.
2020-11-22 21:18:02 +01:00
Mitchell Richters
b2c42d5d03 - buildutils: Replace sintable[] use within Blood with bsin()/bcos().
* Further review of this should be considered as the use of sintable[] for nCos was actually sine and the use of sintable[] for nSin was actually cosine. Preserved math despite the variable names.
2020-11-22 21:18:02 +01:00
Mitchell Richters
cf6188b034 - buildutils: Replace Sin() and Cos() from Exhumed with bsin()/bcos(). 2020-11-22 21:18:02 +01:00
Mitchell Richters
8aa7051f78 - buildutils.h: Replace FSin() from Exhumed with bsinf()/bcosf(). 2020-11-22 21:18:02 +01:00
Mitchell Richters
85bb248309 - binaryangle.h: Extend file with sine/cosine inline helper functions. 2020-11-22 21:18:02 +01:00
Christoph Oelckers
a906067102 - Duke WT: attenuate sound volume when commentaties are playing 2020-11-22 21:14:36 +01:00
Christoph Oelckers
3bd48fb8c5 - Exhumed: Fixed CalcPosVel not initializing the vel parameter.
This caused spurious errors in OpenAL if the passed values were NANs or INFs.
Fixes #183
2020-11-22 20:34:57 +01:00
Christoph Oelckers
182b8023ca - Blood: ported BloodGDX's fix for the double shotgun graphics glitch.
Fixes #114
2020-11-22 20:09:09 +01:00
Christoph Oelckers
2db60ae847 - SW-TD: added a hack to flip an inverted card reader in level 10.
For now this is just inserted into the level loader - it should use more sophisticated checks.
Fixes #173.
2020-11-22 19:47:20 +01:00
Christoph Oelckers
143dd3d2cf - fixed weapon cycling in Exhumed.
The sword was checked for ammo (and failed) and wraparound was not handled.
Fixes #193
2020-11-22 18:59:59 +01:00
Christoph Oelckers
921a7a7166 - RRRA: fixed progression from E1L7 to E2L1 plus a texture related crash.
Fixes #189.
2020-11-22 18:46:20 +01:00
Christoph Oelckers
24c797b7e3 - Duke World Tour: Exiting E1L7 should go back to E1L5.
fixes #187
2020-11-22 18:27:52 +01:00
Christoph Oelckers
dfc2cd8580 - make sure that all of SW's sound function check SoundEnabled().
Fixes #192
2020-11-22 18:16:08 +01:00
Christoph Oelckers
7df20ee047 - RR: Give ammo for the secondary ripsaw mode when picking up the weapon in standard RR, too. 2020-11-22 17:50:38 +01:00
Christoph Oelckers
034ef2290b - RR: screen should not turn green when being attacked with alien poo. 2020-11-22 17:38:07 +01:00
Christoph Oelckers
63d71c120a - Blood: save level stats as JSON. 2020-11-22 13:05:17 +01:00
Christoph Oelckers
c6c9b26af2 - do not specifically look in the 'music' directory for CD tracks.
Prepending of 'music/' is done automatically for all music not found without a path so this only limits options.
2020-11-22 12:51:13 +01:00
Christoph Oelckers
751c295b62 - minor savegame optimizations.
Do not write out empty elements of arrays where these are by far the most common ones.
2020-11-22 12:48:43 +01:00
Christoph Oelckers
1a588c3cbf - merged two smaller savegame handlers into the main function. 2020-11-22 12:48:43 +01:00