Commit graph

1396 commits

Author SHA1 Message Date
Christoph Oelckers
a0be30facb Revert "- Exhumed: Tune x offset alignment in DrawStatusAnims() following changes in 220283d1ec3cba03f455bd96bcf130df777b5635."
This reverts commit c08583ebc1.

This does not work as intended.
Fixes #261

# Conflicts:
#	source/games/exhumed/src/status.cpp
2021-01-30 10:55:58 +01:00
sinisterseed
19e7419896 - Exhumed: Fixed key offsets.
An int can't store a float, effectively truncating to 0 and not holding the 0.5. Thanks MJ :) .
Partially addresses #262 - The Torch icon bouncing in the HUD still remains.
2021-01-30 11:50:33 +02:00
Mitchell Richters
f11501883d - Exhumed: Make 3rd person camera properly interpolated. 2021-01-30 11:23:38 +11:00
Mitchell Richters
e66960d9fc - Exhumed: Ensure ox/oy/oz sprite positions are set when warping to coordinates. 2021-01-30 11:22:46 +11:00
Mitchell Richters
c08583ebc1 - Exhumed: Tune x offset alignment in DrawStatusAnims() following changes in 220283d1ec. 2021-01-29 22:11:03 +11:00
Mitchell Richters
c267c214c2 - Duke: Repair jumping zvel issue originating from 5e45f988e3 for Duke and 1c5c90d00f for RR.
* Thanks for backtracing, Graf :)
* Fixes #259.
2021-01-29 20:00:15 +11:00
Christoph Oelckers
8cf3e50ade - removed bad 'pos' setup in PreDrawStackedWater
This was a) supposed to set 'opos' not 'pos' and is b) redundant because here both Users point to the same sprite.

Fixes #261
2021-01-25 18:07:49 +01:00
Christoph Oelckers
981a2c7e5c - Exhumed: restored old static switch array.
There's side effects in here that broke the door logic and made doors automatically open sometimes.
2021-01-24 14:49:51 +01:00
Christoph Oelckers
1ab11a02e2 - RR: fixed player input for diving.
Fixes #260
2021-01-24 08:59:08 +01:00
Christoph Oelckers
7f75b2274f - code updates from PCExhumed. 2021-01-19 09:44:16 +01:00
Rachael Alexanderson
47f0370512 - add some 21:9 presets 2021-01-18 06:25:04 -05:00
Christoph Oelckers
042795612e - Exhumed: Refined sector movement code so that pickups get always moved even when not touching the floor.
... because it seems to be inevitable that games have to exploit some implementation shortcomings...
2021-01-16 23:42:34 +01:00
Christoph Oelckers
c342594691 - Exhumed: fixed wall scrollers. 2021-01-14 23:55:45 +01:00
Christoph Oelckers
91f8df48c6 - Exhumed: changed MoveSectorSprites so it only moves sprites that actually stand on the sector's floor.
Since this had no check for z it even moved things floating above a lift or players hanging over a dropoff with the lift below.
2021-01-12 20:57:28 +01:00
Christoph Oelckers
fc11f537f7 - project cleanup
* moved all games into the 'games' folder.
* fixed project to include all sources and move them to the proper folders.
2021-01-10 20:31:32 +01:00
Mitchell Richters
18fbc8996b - Duke: Remove a few redundant sprite backups and change some backups to what's actually needed. 2021-01-06 06:22:31 +11:00
Mitchell Richters
97159c20c1 - Duke: Leverage new spritetype methods within Duke, removing bposx/bposy/bposz from hittype. 2021-01-06 06:22:29 +11:00
Mitchell Richters
5124c0daec - Amalgamate ksgn and sgn into Sgn in cmdlib.h, and remove pragmas.h. 2021-01-05 07:31:37 +11:00
Mitchell Richters
b36bea7c69 - Replace scale() calls with Scale() from common. 2021-01-05 07:31:34 +11:00
Mitchell Richters
d460f048fa - Remove klabs() define and replace with abs(). 2021-01-05 07:31:28 +11:00
Mitchell Richters
868aa7f07a - Replace mulscale() calls with MulScale() from common. 2021-01-05 07:31:24 +11:00
Mitchell Richters
aae175f287 - Replace divscale##() calls with MulScale() from common.
* Regex for reference: divscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:20 +11:00
Mitchell Richters
2396179dfc - Replace mulscale##() calls with MulScale() from common.
* Regex for reference: mulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:15 +11:00
Mitchell Richters
8cf2588bad - Replace fmulscale##() calls with MulScaleF() from common.
* Regex for reference: fmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:13 +11:00
Mitchell Richters
7d9f868e4c - Replace dmulscale##() calls with DMulScale() from common.
* Regex for reference: dmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:10 +11:00
Christoph Oelckers
0f3da7194a - actually compile the game code as larger units and integrate them in the main project.
This eliminates the problematic subprojects for good.
Compiling the games as larger units is necessary because otherwise compile times will break down on MSVC.
2021-01-04 11:52:10 +01:00
Christoph Oelckers
e866a9e0c0 - moved setsectinterpolate/clearsectinterpolate into the backend. 2021-01-04 10:37:14 +01:00
Mitchell Richters
e8c20f502b - Duke: Back up sprite's angle in ticker and interpolate in gi->GetInput() if !SyncInput(). Sprite angle now works properly with cl_syncinput 1. 2021-01-04 13:27:31 +11:00
Mitchell Richters
8911805e3a - Duke: Ensure an uninterpolated angle is sent to DrawOverheadMap() if playing with unsynchronised input. 2021-01-04 09:06:57 +11:00
Mitchell Richters
22f28477e4 - Duke: Revert backing up of sprite's ang to tempang from be12da6bfb and subsequent interpolation of sprite's ang in 21da658617 and directly update the sprite's angle in gi->GetInput() like the other games.
* Fixes #251.
2021-01-04 08:49:57 +11:00
Mitchell Richters
de1b4765dc - Duke: Partially revert edba971b7f. I need to stop breaking this. 2021-01-03 20:14:40 +11:00
Mitchell Richters
f036e94cca - Duke (RR): Also fix location of p->apply_seasick() in the ticker as well. 2021-01-03 20:06:28 +11:00
Mitchell Richters
6058669e29 - Duke: Within gi->GetInput() , call p->apply_seasick() after applylook() as per the original code, and call unconditionally since its guarded as to whether it runs or not internally. Original spot only had it called if on a vehicle which wasn't right. 2021-01-03 20:00:43 +11:00
Mitchell Richters
f6b9c3cba7 - Duke (RR): Fix braking on vehicles which never got picked up. 2021-01-03 19:25:49 +11:00
Mitchell Richters
edba971b7f - Duke: Remove newOwner check from cef1f8275b & cb93560a4a that were just cancelling out each other, and clean up 2x if (p->newOwner != nullptr) checks into one. 2021-01-03 18:51:43 +11:00
Mitchell Richters
d3b95d4d70 - Build/Duke: Remove the only use case for drawrooms() inline wrapper and change getcamspriteang() to return binangle instead of a build angle. 2021-01-03 17:35:19 +11:00
Mitchell Richters
0cab84f17a - Duke: Backport EDuke32 commits b1e3f3bcf9c5214ae835d09e12cc41bac4f057ce & 4c4fdd1f4ab9381b60db06f37ec270850599e1ae in relation to swinging doors. 2021-01-03 15:45:38 +11:00
Mitchell Richters
9b7d07df90 - Duke: Fix flashing vehicle HUD when cl_syncinput 1 is set. 2021-01-03 09:55:25 +11:00
Mitchell Richters
86bb6b1cdc - Duke: Backport EDuke32 commit ac64e11553344084753cdd75abd898ec2c725a16 to fix buggy swinging doors, most apparent on E4L1. 2021-01-02 23:41:03 +11:00
Mitchell Richters
21da658617 - Duke: Interpolate automap player. 2021-01-02 18:23:12 +11:00
Mitchell Richters
be12da6bfb - Automap: Put in framework to interpolate automap player. 2021-01-02 18:23:01 +11:00
Mitchell Richters
9833c94114 - Duke: Pass the player_struct through to FinalizeInput() in line with other functions. 2021-01-02 11:04:03 +11:00
Mitchell Richters
bcb838f3fb - Duke: Fix some broken checks in FinalizeInput() stemming from 5f33b0087f. 2021-01-02 10:43:03 +11:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
3c83775273 - add back the missing secret hint notification calls for Duke/RR. 2020-12-01 12:52:49 +01:00
Christoph Oelckers
ae36ea88c3 - wrap all checks of cl_syncinput in an inline function. 2020-11-30 23:40:16 +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
8a7b3dc667 - Interpolate Duke's wave floor effect. 2020-11-29 17:40:41 +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
daf71fa470 - replaced a few more literal numbers. 2020-11-27 20:06:38 +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
2cd3927613 - use floats for wall panning offsets. 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
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
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
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
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
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
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
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
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
5172c43e71 - buildutils: Replace calcSinTableValue() use within Duke with bsinf()/bcosf(). 2020-11-22 21:18:10 +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
Christoph Oelckers
a906067102 - Duke WT: attenuate sound volume when commentaties are playing 2020-11-22 21:14:36 +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
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
18352a760c - more renames. 2020-11-22 12:48:42 +01:00
Christoph Oelckers
dced173cda - JSON serializer for actor.
Also cleaned up use of gAffectedSectors and gAffectedXWalls. These are merely needed as local worker variables, not as global persistent status.
2020-11-22 12:48:42 +01:00
Christoph Oelckers
b97f12a2eb - did some global search & replace to reduce the number of accesses to the tilesiz wrapper. 2020-11-20 08:18:26 +01:00
Christoph Oelckers
9a43886be6 - Duke: fixed parsing of overlong CON identifiers. 2020-11-15 07:35:39 +01:00
Mitchell Richters
7673766d19 - Duke: Apply same zvel fix from 13839fc3e9 to shootgrowspark() that was accidentally changed in f276a5f443. I don't believe this to be an issue in any other spot for Duke. 2020-11-13 10:02:12 +11:00
Christoph Oelckers
f9a776e71c - iterate linearly over sector effectors.
Apparently they aren't all properly linked into the required statnums.
Fixes #179
2020-11-12 19:12:58 +01:00
Mitchell Richters
70b75f72b5 - Duke: Fix issues with crane angle adjustment in movecrane() following changes in fca846272e.
* Fixes #170.
2020-11-12 23:21:03 +11:00
Mitchell Richters
13839fc3e9 - Duke: Fix shootstuff() zvel calculation error following changes in badf536fef.
* Fixes #177.
2020-11-12 22:07:16 +11:00
Mitchell Richters
4dc1797345 - Duke: Reset p->dead_flag when enabling the god cheat as per original behaviour.
* Fixes #172.
2020-11-12 18:21:42 +11:00
Christoph Oelckers
a92b4943f9 - Duke: use original colors for inventory status display.
I took one liberty and still use green/yellow/red for the percentage, but this now uses palette translations so that it works better with hires replacements.
2020-11-11 11:49:05 +01:00
Christoph Oelckers
96fbfdcf86 - made hires replacements work for untranslated fonts. 2020-11-10 21:34:49 +01:00
Christoph Oelckers
ed599d0f05 - moved the hires texture replacement logic into a backend callback.
This way it can be handled transparently to the calling code.
Fonts do not work yet, though.
2020-11-10 16:22:02 +01:00
Christoph Oelckers
59c72c923e - added null pointer checks to locked door sound checks in RR.
This originally accessed undefined memory when no sprite was involved.
Fixes #157
2020-11-07 10:25:41 +01:00
Christoph Oelckers
976675c816 - added some helper code to deal with the fact that the sound system still needs to operate on sprites. 2020-11-07 10:25:40 +01:00
Mitchell Richters
ade1a80515 - gameinput.cpp: Remove crouch bool from applylook() since we can now just rely in the actions bitfield that's already incoming as required and default scaleAdjust in the prototype to 1. 2020-11-07 18:25:06 +11:00
Mitchell Richters
6e3d414b3c - inputstate.cpp: Move checkCrouchToggle() from gameinput.ccp into ApplyGlobalInput() and use static bool for crouch toggling vs. game-side bool. 2020-11-07 18:16:16 +11:00
Mitchell Richters
4ef0d20e0e - gameinput.cpp: Consolidate checkCrouchToggle() from Duke with discrete implementations from Blood in 7c8efde38c and Exhumed in 032db82f82 to unify the functionality. 2020-11-07 13:44:25 +11:00
Mitchell Richters
a52ee89969 - Duke/RR: Add scaling to mouse input within motoApplyTurn() and boatApplyTurn(). 2020-11-07 09:56:57 +11:00
Mitchell Richters
f0b9029726 - Duke/RR: Fix incorrect boolean used in boatApplyTurn() when implementing fcc2521347bb528d7a5bcd3996c509db85e993f0. 2020-11-07 09:56:57 +11:00
Mitchell Richters
74dfbfe6f8 - Duke/RR: Ensure p->vehForwardScale/p->vehReverseScale can only be a maximum of 1. Controller input with high sensitivity could effectively turbo-charge the bike ;) 2020-11-07 09:56:57 +11:00
Mitchell Richters
466bc84697 - Duke/RR: Completely revamped vehicle mouse/controller input.
* Original algorithm now used purely for keyboard input only.
* Mouse and controller input is no longer a scaled double version of the keyboard input.
* Mouse input is the square root of the base angle adjustment (20) multiplied by (mouse input divided by the input scale factor). As such, mouse input is completely consistent between synchronised and unsynchronised input.
* Controller input is base angle adjustment (20) multiplied by itself.
* Renamed `turnl`/`turnr` variables to `kbdLeft`/`kbdRight` respectively.
* Fixed issue where `p->TiltStatus` wasn't being backed up in `boatApplyTurn()`.
2020-11-07 09:56:57 +11:00
Mitchell Richters
6f5f66ad35 - Duke/RR: Partially revert c9d875327850e839e3ad1f367ede15497d44fda3 by truncating p->MotoSpeed to integer when calculating xvel/yvel to preserve original vehicle feel. 2020-11-07 09:56:57 +11:00
Mitchell Richters
567738f3ad - Duke/RR: Tidy formatting of onMotorcycle(), onBoat(), onMotorcycleMove() and onBoatMove(). 2020-11-07 09:56:57 +11:00
Mitchell Richters
1545610501 - Duke/RR: Convert remaining vehicle function local ints to bools where appropriate. 2020-11-07 09:56:57 +11:00
Mitchell Richters
c223a50b29 - Duke/RR: Clean up vehicle turn left/right bools used in ticker functions. 2020-11-07 09:56:57 +11:00
Mitchell Richters
ad10ea4cb5 - Duke/RR: Initial implementation of scaled p->MotoSpeed controller input. 2020-11-07 09:56:57 +11:00
Mitchell Richters
578ded1db3 - Duke/RR: Promote p->MotoSpeed from short to double in prep for applying scaled controller input. 2020-11-07 09:56:57 +11:00
Mitchell Richters
c46ad10bb1 - Duke/RR: Clean up some disassembly variable names in vehicle so it's easier to understand what's going on. 2020-11-07 09:56:57 +11:00
Christoph Oelckers
94341e8582 - fixed missing null check in SetOwner and SetHitOwner. 2020-11-06 20:13:06 +01:00
Mitchell Richters
71be467065 - Duke: Fix missing ammo counter on modern HUD for WT's flamethrower.
* Fixes #156.
2020-11-06 22:07:11 +11:00
Mitchell Richters
c823e33bb3 - Duke/RR: Fix remaining issues with drug mode.
* Primary issue was call to `renderSetAspect()` within `setdrugmode()` wasn't mulscaling with `viewingrange`.
* Changed `setdrugmode()` to `getdrugmode()` to return `p->drug_aspect`. This is so `renderSetAspect()` needs to only be called from one place only.
2020-11-06 20:52:43 +11:00
Christoph Oelckers
d5ff87fa4f - RRRA: fixed vehicle collision with psychedelic cactuses.
This did not fully match the original source which had a critical difference here between RR and RRRA.
2020-11-05 14:31:55 +01:00
Christoph Oelckers
977223287e - cap the frame rate of RRRA's cactus drug mode.
This was running at full render speed.
2020-11-05 07:31:48 +01:00
Christoph Oelckers
d8e331ef0f - changed Duke/RR palette handling to only retrieve the currently active palette right before rendering.
Storing this in the player_struct is pointless and a relic from having to use real hardware palette switches.
With this now just being a translation index being passed to the backend it can be cheaply retrieved right when used and nowhere else.
Also making some changes to how RRRA's psychedelic cactus handles the projection. This fixes issues with occasionally passing a bad matrix.
2020-11-05 07:31:48 +01:00
Mitchell Richters
e8ccd9bc8c - Fix compilation. 2020-11-05 11:14:04 +11:00
Christoph Oelckers
60263ccad9 - fixed destroyit.
This caused parts of the exploding house in RRRA E1L5 not to disappear.
2020-11-04 21:53:56 +01:00
Christoph Oelckers
6729859e39 - fixed the crane.
Cannot take the special value out of the owner field. :(
2020-11-04 21:25:59 +01:00