Commit Graph

4004 Commits

Author SHA1 Message Date
Richard C. Gobeille c8f15f8e4b Demote labeltype to uint8_t 2020-04-08 00:38:49 +02:00
NY00123 3610609659 Add a workaround for possible rounding errors in calculations of
sintable and radarang. sintable[512] was different in a 32-bit build.

From-SVN: r8796
2020-04-08 00:38:48 +02:00
Evan Ramos b54a6e0565 WT Incinerator projectile velocity hotfix from Nuke.YKT
From-SVN: r8791
2020-04-08 00:38:48 +02:00
Evan Ramos fd025374d4 Implement WT episode 5 ending
From-SVN: r8790
2020-04-08 00:38:47 +02:00
Evan Ramos 52eab0545b Implement WT's widescreen tiles
From-SVN: r8789
# Conflicts:
#	source/duke3d/src/menus.cpp
#	source/duke3d/src/premap.cpp
#	source/duke3d/src/sbar.h
2020-04-08 00:38:46 +02:00
Evan Ramos e6940cd591 Implement hardcoded WT stuff
Includes the new weapon, enemy projectiles, and breakable objects.

Patch from Nuke.YKT.

I edited it some, mostly to add the proper "if (WORLDTOUR)" checks.

From-SVN: r8788
# Conflicts:
#	source/duke3d/src/namesdyn.cpp
2020-04-08 00:38:45 +02:00
Evan Ramos 0d576cf798 Fix negative viewtypes to match what World Tour expects
From-SVN: r8787
2020-04-08 00:38:45 +02:00
Evan Ramos 2dbbfd4db2 Cleanup some Duke game logic, mostly to allow easier chaining to the default case
From-SVN: r8786
2020-04-08 00:38:44 +02:00
Richard C. Gobeille ec3e8bffe1 Are you kidding me? This fixes the elevator in Duke3D E2L3. 2020-04-08 00:38:43 +02:00
Richard C. Gobeille 53baf228eb Fix stupid typo that broke the camera aiming at the enemy that killed you in Duke3D 2020-04-08 00:38:43 +02:00
Christoph Oelckers eaf27c2583 - fixed joystick CVAR use. 2020-04-08 00:38:42 +02:00
Mitchell Richters 1aa1e62c4d SW: Don't process input at frame rate if ScrollMode2D is true.
- ScrollMode2D was running at the frame rate, turning off vsync made it unacceptable.
2020-04-06 21:28:36 +02:00
Mitchell Richters b801a73db9 Exhumed: Fix look up/down in line with input amendments. 2020-04-06 08:06:38 +02:00
Mitchell Richters 2ddc442e48 Exhumed: Improve player input.
- Input velocity now consistent irrespective of frame rate.
- Angle and horizon calculated at frame rate.
- Replace usage of F16() macro with fix16_from_int() in GetInterruptKeys().

Note: Known issues with look up/down keys that is to be repaired.
2020-04-06 08:06:38 +02:00
Mitchell Richters 039022d9ac SW: Further refine turning and optimise horizon adjustment.
- Move DoPlayerTurn() into getinput(). Vehicle code remains external for now.
- Remove horizAdjust boolean and always do horizon code in getinput(). Eliminates single off frame at start of a new level until DoPlayerMove() is called at least once.
2020-04-05 21:28:25 +02:00
Mitchell Richters 377ba68344 SW: Minor tweaks. 2020-04-05 21:28:25 +02:00
NY00123 a178961a3e sw/src/game.cpp:LoadLevel: Rename q16ang -> ang 2020-04-05 21:28:25 +02:00
NY00123 d2e9595980 sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,
a bit later.
2020-04-05 21:28:25 +02:00
NY00123 537313f620 SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings 2020-04-05 21:28:25 +02:00
NY00123 3bc46078b8 Fix multiplayer desync after the change to q16 angle and horiz.
Note that this includes non-portable unaligned accesses, but this
already applies to surrounding code. Just add comments for now.
2020-04-05 21:28:25 +02:00
Christoph Oelckers 536ed3827d - removed debug messages in Blood's savegame code. 2020-04-03 23:35:52 +02:00
Mitchell Richters 5db8047b41 SW: Remove line accidentally left from 'MoveScrollMode2D()'. 2020-04-02 08:18:23 +02:00
Christoph Oelckers a7caa7b63c - fixed some reporting stuff for Blood. 2020-04-01 22:35:56 +02:00
Mitchell Richters 68bf97462a Blood: Remove constexpr on player horizon values. 2020-04-01 22:34:57 +02:00
Mitchell Richters e6420e1eb4 Blood: Rebalance q16mlook.
- Make scaling more consistent with other games.
- Fix CONSTEXPR to constexpr.
- Remove usage of macro 'F16()' by using explicit fix16_from_*() type.
2020-04-01 22:34:57 +02:00
Mitchell Richters 8e94c48eff SW: Make map follow mode work better.
- Input was too fast following input code changes.
- Speed of input can now be changed with toggling the run key.
- Remove function 'MoveScrollMode2D()' and incorporate into 'getinput()' to reduce code duplication.
- Store map follow coordinates in PLAYERp struct and remove old globals.
2020-04-01 13:05:54 +02:00
Mitchell Richters 4630c8a0b7 SW: Get PLAYER_TURN_SCALE to be just right.
- Original value was 12 and was far, far too high following the Q16.16 implementation.
- Value of 3 is too fast.
- Value of 2 is too slow.
- Value of 2.4 (12 / 5) feels just right.
2020-03-31 23:15:09 +02:00
Mitchell Richters 2852536dbf SW: Adjust look and snap up/down keys and slightly tune PLAYER_TURN_AMOUNT.
- Look and snap up/down action was too aggressive and unlike vanilla, corrected.
- PLAYER_TURN_AMOUNT was slightly high, unbalancing the axes.
2020-03-31 08:58:56 +02:00
Mitchell Richters 533d5dd42f Blood: Repair issue with strafing following cherry pick merge conflicts. 2020-03-31 08:56:36 +02:00
nukeykt 348cecb644 Blood: revert change that broke demos 2020-03-31 08:56:36 +02:00
nukeykt c50f54d064 Blood: don't update view angle when game is paused 2020-03-31 08:56:36 +02:00
nukeykt c8372c233e Blood: Tie player input to the frame rate instead of the game tickrate
Look up/down and spin180 are a bit broken right now.
Big thanks to terminx for similar commit for eduke32.
2020-03-31 08:56:36 +02:00
nukeykt 371b613ebe Blood: reduce handleevents calls 2020-03-31 08:56:36 +02:00
Mitchell Richters 5ebc65a1fb SW: Refinements to new input code.
- videoNextPage() moved to after restoring interpolations.
- Properly use Q16.16 in as many places as possible. This fixes the angle/X-axis issues.
- Remove unnecessary call to timerUpdate() in main loop, only needs calling once and is called by eventhandlers().
2020-03-30 16:20:25 +02:00
ny00123 28e69d0793 Revert the change of call to FAF_DrawRooms into a conditional one,
as done in r8766, since this breaks status bar output in tiled
overhead map with Polymost. Do add comment about this for now.

git-svn-id: https://svn.eduke32.com/eduke32@8779 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/draw.cpp
2020-03-30 09:55:30 +02:00
CommonLoon102 26344d1193 Blood: fix ILLUSION.MAP crash 2020-03-30 09:55:15 +02:00
Mitchell Richters 9e8e441d02 Further improve Duke3D and RR main game loop.
- Replace if statement containing nested do/while loop with a while loop.
2020-03-30 09:53:04 +02:00
Mitchell Richters d4dd737cd5 SW: Amend scaleAdjustmentToInterval() with correct value for SW. 2020-03-30 09:52:14 +02:00
Mitchell Richters 1cdd5b08d8 SW: Fix incorrectly declared function input type. 2020-03-30 09:52:14 +02:00
Mitchell Richters eaa51138ad SW: Amendments to accommodate changes in master. 2020-03-30 09:52:14 +02:00
Mitchell Richters c162014dab SW: Process input at frame rate. 2020-03-30 09:52:14 +02:00
Mitchell Richters d78d046bad SW: Minor repairs for Q16.16 implementation. 2020-03-30 09:52:14 +02:00
Mitchell Richters 1ecc74c2ec SW: Use Q16.16 for angle. 2020-03-30 09:52:14 +02:00
Mitchell Richters f07a0ae01e SW: Use Q16.16 for horiz. 2020-03-30 09:52:14 +02:00
Mitchell Richters e878c5bab8 SW: Improve main game loop.
- Remove MoveLoop() as it's only ever called by RunLevel().
- Continuously call getinput() and domovethings() within the game's tic rate.
2020-03-30 09:52:14 +02:00
Christoph Oelckers 5af0217db7 - got rid of the software rendering blend tables. 2020-03-29 17:23:57 +02:00
Christoph Oelckers 41545b644a - cleaned out most of the software renderer's static global variables. 2020-03-29 16:59:49 +02:00
Christoph Oelckers 7392b699e4 - cleaning out a few more parts of the software renderer. 2020-03-29 15:54:02 +02:00
Christoph Oelckers 3f69044770 - removed all references to sdlayer.cpp as all that was left in there was only needed for software rendering.
- removed now unused a-c.cpp.
2020-03-29 15:22:07 +02:00
Christoph Oelckers 0de4b134da - stripped out most of the software renderer.
Now that the camera textures can be handled through the hardware renderer this isn't needed anymore.
2020-03-29 14:55:09 +02:00
Christoph Oelckers 621a9338e5 - render camera textures with the hardware renderer.
This removes the last active use case for the software renderer and allows rendering the camera views at a higher resolution.
For Shadow Warrior this necessitated a split of JS_DrawMirrors, because it processed cameras and mirrors in the same loop which cannot be done with the hardware renderer.
2020-03-29 14:01:46 +02:00
Christoph Oelckers 8f3cc0b5af - removed screen tilting code for software renderer.
Since this doesn't work anymore the code is no longer needed - and it stands in the way of doing camera textures purely in hardware.
2020-03-29 08:36:39 +02:00
Mitchell Richters 2cbbe9ec61 Remove last vestiges of input latency from Duke3D and RR main game loops.
- Hack code to break loop early removed. If game code is running slow, that's not the fix.
- Get input and fill the input_t struct in same loop as G_DoMoveThings().
- Remove unnecessary do/while (0) loop.
2020-03-25 14:42:51 +01:00
Mitchell Richters 1a2663f7ac Change detection arrays for Redneck games.
- Redneck Deer Huntin' also comes with Redneck Rampage Rides Again.
- Changes permit all games to be detected, including RRRA if you own Deer Huntin'.
2020-03-22 12:05:01 +01:00
Mitchell Richters b1ebb897e8 Repair HUD scaling returning to 100% when relaunching Duke or RR games.
- Resolves https://forum.zdoom.org/viewtopic.php?f=340&t=67811
2020-03-22 10:37:43 +01:00
Mitchell Richters e272286df5 Repair vehicle acceleration following changes to input handling.
- Make localInput.fvel only equal to input.fvel + pPlayer->moto_speed.
- Define MOTOTURN and MAXVELMOTO in line with other defines used throughout P_GetInput*() functions.
- Clamped minimum fvel value is also now correct.
2020-03-21 11:30:36 +01:00
alexey.lysiuk b923f9612b - fixed compilation with MSVC 16.5.0 when using std::sort() with TArray<>
error C2676: binary '[': 'TIterator<T>' does not define this operator or a conversion to a type acceptable to the predefined operator
2020-03-21 11:18:04 +02:00
Mitchell Richters f1b7707f7a Repair vehicle input functions following changes to input handling.
- Calculate turnAmount in 1st 'if (turn)' statement to save on a 2nd.
- Divide all subsequent values from turAmount for cascasing effect.
- Rearrange some code to save on if statements checking the same condition.
- Remove q16horz code since player has no vertical movement on a vehicle.
- Remove horizAngleAdjust code as it's not necessary and has a jarring effect.
2020-03-20 23:21:54 +01:00
Christoph Oelckers fca147c83b - fixed compilation. 2020-03-20 21:26:28 +01:00
ny00123 da1d97ba9c sw/src/draw.cpp: Don't draw rooms if textured overhead map is drawn
later. This also turns out to fix a Polymost-specific bug revealed
in SVN r8711. Further remove a call to PicInView which does nothing.

git-svn-id: https://svn.eduke32.com/eduke32@8766 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:39:35 +01:00
terminx c110c1018d Fix IF crouch jumping and unintentional automatic crouching under sprites
git-svn-id: https://svn.eduke32.com/eduke32@8737 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:38:33 +01:00
terminx 6c9bdae0ec Reduce width of a couple fields in memberlabel_t
git-svn-id: https://svn.eduke32.com/eduke32@8735 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:38:05 +01:00
terminx 7dc1a3c904 Make gamestructures a proper object
git-svn-id: https://svn.eduke32.com/eduke32@8734 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	GNUmakefile
#	platform/Windows/eduke32.vcxproj
#	platform/Windows/eduke32.vcxproj.filters
#	source/duke3d/src/gamedef.cpp
#	source/duke3d/src/gameexec.cpp
#	source/duke3d/src/gamevars.cpp
#	source/duke3d/src/m32def.cpp
#	source/duke3d/src/m32def.h
#	source/duke3d/src/m32exec.cpp
#	source/duke3d/src/m32structures.cpp
2020-03-20 17:37:54 +01:00
terminx 21ec33ac51 Eliminate unnecessary goto
git-svn-id: https://svn.eduke32.com/eduke32@8731 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:35:25 +01:00
terminx 2e17467a8f Fix return type of A_CheckHitSprite()
Since the returned value is a distance, it should be int32_t.

git-svn-id: https://svn.eduke32.com/eduke32@8730 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:35:09 +01:00
terminx 4bdffa4f0f Patch from Nuke.YKT to fix a y-flipped voxel rendering issue in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@8727 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:34:48 +01:00
terminx a7e1d3f307 Patch from Nuke.YKT to fix a couple of NAM/WW2GI issues
git-svn-id: https://svn.eduke32.com/eduke32@8726 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:34:27 +01:00
terminx 3941fccc4c Patch from Striker to improve sprite interpolation
git-svn-id: https://svn.eduke32.com/eduke32@8724 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:34:19 +01:00
terminx 8c5e3116c9 Make SE_13_EXPLOSIVE call A_GetZLimits() for all statnum 0-2 sprites in sector when triggering
This fixes the fire sprites inside exploding walls not waking up after the wall explodes.

git-svn-id: https://svn.eduke32.com/eduke32@8723 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:33:51 +01:00
terminx 7ed8f5aec4 Fix a bug with swinging doors
This fixes a bug with swinging doors where multiple swinging doors linked together could become out of sync with each other if you block one door from moving and activate the second door again while the first is still blocked.

git-svn-id: https://svn.eduke32.com/eduke32@8721 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:33:25 +01:00
terminx 086141e205 Fix off-by-one error in various CON text truncation warnings
git-svn-id: https://svn.eduke32.com/eduke32@8720 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/gamedef.cpp
2020-03-20 17:33:15 +01:00
terminx 19630b0d4e Add missing diagnostic information for getactor/setactor
Internally, there are several different permutations of the opcodes that implement CON_GETACTOR and CON_SETACTOR. This maps the internal opcodes back to the external keywords that generated them and makes sure they all have the script line number attached to them for use in diagnostic warning and error messages.

git-svn-id: https://svn.eduke32.com/eduke32@8719 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:32:13 +01:00
terminx e88535a228 Fix tripbomb laser
git-svn-id: https://svn.eduke32.com/eduke32@8718 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:31:46 +01:00
terminx 8def930980 Replace MERGE_NODES macro with vsmerge() function
git-svn-id: https://svn.eduke32.com/eduke32@8715 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2020-03-20 17:31:21 +01:00
terminx 05b59467f5 Merge fix16.cpp and fix16_str.cpp
git-svn-id: https://svn.eduke32.com/eduke32@8709 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	GNUmakefile
#	platform/Windows/build.vcxproj
#	platform/Windows/build.vcxproj.filters
#	source/thirdparty/src/fix16_str.cpp
2020-03-20 17:29:20 +01:00
Mitchell Richters 88502f9962 Manually merge missed aliasing from EDuke32 SVN commit 8555. 2020-03-20 17:04:34 +01:00
Mitchell Richters 8bef451ed9 Manually merge EDuke32 SVN commit 8619. 2020-03-20 17:04:33 +01:00
Mitchell Richters 029b0bbb45 Manually merge EDuke32 SVN commit 8617. 2020-03-20 17:04:33 +01:00
Mitchell Richters 15a362f9ac Manually merge EDuke32 SVN commit 8605. 2020-03-20 17:04:33 +01:00
Mitchell Richters a5612b1a02 Manually merge EDuke32 SVN commit 8565. 2020-03-20 17:04:33 +01:00
Mitchell Richters 1222a3a56a Manually merge parts of EDuke32 SVN commit 8559. 2020-03-20 17:04:33 +01:00
Mitchell Richters 062850c30a Manually merge parts of EDuke32 SVN commit 8243. 2020-03-20 17:04:32 +01:00
Mitchell Richters 53c9d8425c Manually merge EDuke32 SVN commit 8555. 2020-03-20 17:04:32 +01:00
Mitchell Richters 2124862a9a Manually merge EDuke32 SVN commit 8554. 2020-03-20 17:04:32 +01:00
Mitchell Richters e964837219 Manually merge EDuke32 SVN commit 8552. 2020-03-20 17:04:32 +01:00
Mitchell Richters 84c518a067 Manually merge EDuke32 SVN commit 8551. 2020-03-20 17:04:31 +01:00
Mitchell Richters 61135e2635 Manually merge EDuke32 SVN commit 8541. 2020-03-20 17:04:31 +01:00
Mitchell Richters 71ada1d674 Manually merge EDuke32 SVN commit 8539. 2020-03-20 17:04:31 +01:00
Mitchell Richters 63edfcf7c7 Manually merge EDuke32 SVN commit 7775. 2020-03-20 17:04:31 +01:00
terminx cefb1a5551 Fix stupid typo that broke conveyor belts
git-svn-id: https://svn.eduke32.com/eduke32@8620 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:12 +01:00
terminx 9630126a6d Improve player input locking logic
This fixes the issue with mouse input and viewscreens.

git-svn-id: https://svn.eduke32.com/eduke32@8619 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:12 +01:00
terminx bcb561014d Fix hilarious bug where holding the strafe modifier and pressing turn left/right moved the player in the wrong direction
git-svn-id: https://svn.eduke32.com/eduke32@8617 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:11 +01:00
terminx ce2c378dcb Emulate previous behavior for player oang/ohoriz/angvel struct members
git-svn-id: https://svn.eduke32.com/eduke32@8605 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:11 +01:00
terminx b48de3ca3c Take CRANE sprites into account before applying mouse input
git-svn-id: https://svn.eduke32.com/eduke32@8565 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:11 +01:00
terminx d04bf2cfb9 Ion Fury compatibility improvements
git-svn-id: https://svn.eduke32.com/eduke32@8559 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:11 +01:00
terminx ae9b6915ce Get rid of the globals used when implementing the framerate based input polling
git-svn-id: https://svn.eduke32.com/eduke32@8555 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:11 +01:00
terminx e94ce88b27 Use the saturating versions of the fix16 functions for player input
git-svn-id: https://svn.eduke32.com/eduke32@8554 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:10 +01:00
terminx 659ebf82d8 Improve player view recentering
git-svn-id: https://svn.eduke32.com/eduke32@8552 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:10 +01:00
terminx 3b43bba32f Tie player input to the frame rate instead of the game tickrate
This voodoo bullshit entirely eliminates any and all player viewport input latency.

git-svn-id: https://svn.eduke32.com/eduke32@8551 1a8010ca-5511-0410-912e-c29ae57300e0
2020-03-20 17:01:10 +01:00
Christoph Oelckers de2c07aa6a - revert all consolidation efforts between Duke and RR frontends.
Too many problems with different code.
2020-03-18 08:24:31 +01:00