Commit graph

604 commits

Author SHA1 Message Date
Christoph Oelckers
d4cdb31464 - backend update to make the ZScript compiler work. 2020-06-14 18:58:30 +02:00
Mitchell Richters
d79a5d256d - fix joystick scaling for all games.
* Repairs https://forum.zdoom.org/viewtopic.php?f=340&t=67239 and https://forum.zdoom.org/viewtopic.php?f=340&t=67933
* Values that come from GZDoom backend are too low to be suitable for the Build games which were dividing by 'analogExtent'.
* Remove definition of analogExtent from all games and define in inputstate.h, then define joyaxesScale as 75% of analogExtent to provide a bit of headroom and not have a scale of 1.0 be full speed.
* Invert the returned results of GetAxes() as the returned floats are reversed for build games.
* Leverage scaleAdjustmentToInverval() on game-side code to consistently scale the input irrespective of frame rate, vsync etc.
2020-06-12 16:44:08 +02:00
Christoph Oelckers
22aad4999c - use the engine backend to render the scene 2020-06-11 22:26:46 +02:00
Christoph Oelckers
f0d208bf56 - fixed compile error. 2020-06-07 10:46:35 +02:00
NY00123
1a1039a2d3 Fix a possible jitter upon changing the player's action
(e.g., beginning to jump, or landing on ground);
Reproduced with the input being tied to framerate
while SO interpolation is toggled on.

This involves the following modifications:
- PF2_INPUT_CAN_TURN and PF2_INPUT_CAN_AIM are now additionally set
from various DoPlayerBegin* functions, allowing the player to continue
turning/aiming as usual (right before the next call to domovethings),
even in specific instances of player action changes.
- If PF2_INPUT_CAN_TURN/PF2_INPUT_CAN_AIM was set before and
after calling pp->DoPlayerAction from domovethings altogether,
ensure that the player's oq16ang/oq16horiz is updated by
making an appropriate call to DoPlayerTurn/DoPlayerHorizon. This
is done in case a call to DoPlayerTurn/DoPlayerHorizon is missed.
This change is not applied for a dead player, though.
2020-06-07 10:19:49 +02:00
NY00123
039458d14d sw/src/draw.cpp:drawscreen: Removing the PF_DEAD test
in 1a3c9e3a15ba788607dfd96ebcc75a2198be6d69 was a mistake.
The interpolation should still apply, albeit not while
the viewing angle is changed via the player's own input.
We should also continue interpolating in coop view.
2020-06-07 10:19:48 +02:00
NY00123
ce2aee49df SW: This should hopefully be a better way of fixing the lack of
interpolation of player turning/aiming/movement, while being carried
by a sector object, without SO interpolation. This is a continuation of
73a0aa394e906a65633d61f3c749c9b9b7e66aaa and bf31bc2987a3eccd31d343622327bd4ee0f9c5a1,
aiming to fix a jitter in case the player is continuously
getting pushed by a wall (e.g., on the boat in level 5).

Basically, this moves the relevant assignments from track.cpp:MovePlayer
and MovePoints to player.cpp:DoPlayerMove. Unless a call to one of these
functions has been missed, pushwall and clipmove can be called from
player.cpp in the following instances, which should be covered:
- Via DoPlayerMove, which is the function getting the fix now.
- Via DoPlayerSlide, which is called in the beginning of DoPlayerMove.
- Via DoPlayerCurrent when called from DoPlayerCrawl/DoPlayerWade,
followed by DoPlayerMove.
- Via DoPlayerCurrent when called from DoPlayerDive,
followed by DoPlayerMove if the player doesn't stop diving.

# Conflicts:
#	source/sw/src/track.cpp
2020-06-07 10:19:48 +02:00
Christoph Oelckers
cf6855904d - took projection and view matrix out of the render state.
This is a preparation to migrate to GZDoom's HWViewpointUniforms buffer.
2020-06-04 18:46:44 +02:00
Christoph Oelckers
68c97e3c25 Merge branch 'master' of https://github.com/coelckers/Raze
# Conflicts:
#	source/core/gamecontrol.h
#	source/duke3d/src/game.cpp
#	source/exhumed/src/exhumed.cpp
#	source/rr/src/game.cpp
2020-05-31 23:30:10 +02:00
Mitchell Richters
33b6b85d57 SW: Amend how game pauses.
- Pausing game with Pause key now works again.
2020-05-31 23:19:54 +02:00
Christoph Oelckers
efa1cd3048 - moved video files to 'common'.
# Conflicts:
#	source/blood/src/screen.cpp
2020-05-31 09:19:16 +02:00
Christoph Oelckers
1e2a3da5fd - video base code unified.
# Conflicts:
#	source/core/rendering/v_video.cpp
2020-05-31 09:18:43 +02:00
Christoph Oelckers
edb2cb31ee - backend update with GZDoom model code. 2020-05-31 08:55:00 +02:00
NY00123
8a812cc329 SW: Call OSD_DisplayQueued in DemoPlayback,
so OSD commands can have an effect from here
2020-05-30 23:28:24 +02:00
NY00123
9bf5ee046e SW: Remove TitleLevel (probably dating back to 1995 prototype builds)
# Conflicts:
#	source/sw/src/game.cpp
2020-05-30 23:28:24 +02:00
NY00123
6aeb366a93 SW: Remove DemoOverride, ScenePlayBack and SceneLevel
# Conflicts:
#	source/sw/src/demo.cpp
#	source/sw/src/game.cpp
2020-05-30 23:28:04 +02:00
NY00123
6920ef8fc3 SW - interpso.cpp: Imperfect hack for jittery coolies in level 1's train
(with SO interpolation turned on). It would be nicer to have something
better structured than the given hack, but this currently seems to work,
while not breaking the sprites on the boat in the beginning of level 5.
2020-05-30 23:27:18 +02:00
NY00123
217bf454f4 sw/src/interpso.cpp:so_dointerpolations:
Move ratio calculation out of inner loop.
2020-05-30 23:27:18 +02:00
Christoph Oelckers
193b940eef - palette code cleanup. 2020-05-27 22:19:02 +02:00
Christoph Oelckers
29db3febb8 - updated the platform code to be mostly identical with GZDoom 2020-05-26 00:08:26 +02:00
Christoph Oelckers
55a3c62b59 - use GZDoom's 2D drawer.
Console and menu font colors are not ok yet, aside from that it works.
2020-05-25 17:11:32 +02:00
Christoph Oelckers
a70b7fa698 - use the texture manager to handle texture data. 2020-05-24 23:26:47 +02:00
Christoph Oelckers
266364fc2e - properly implement texture offsets 2020-05-24 13:26:45 +02:00
Christoph Oelckers
cbeb481d59 - what is it with passing data to subfunctions through global variables? :( 2020-05-24 09:04:25 +02:00
Christoph Oelckers
00e7b2fa25 - simple stuff from the texture manager inclusion commit.
To get this out of the way first...
2020-05-24 00:27:24 +02:00
Christoph Oelckers
ae6403a205 - added a level of abstraction to the lookup table code to ease later refactoring. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
f929419a0a - refactoring of the lookup tables. 2020-05-23 22:43:04 +02:00
Christoph Oelckers
b971bc2717 - avoid using global palette settings when drawing 2D content with a custom palette.
Instead pass the palette info with the render call to avoid stale global state.
2020-05-23 22:43:01 +02:00
Christoph Oelckers
8d3199514d - removed some 'pragma' cruft. 2020-05-23 13:08:10 +02:00
Christoph Oelckers
8bd5f12b42 - matching sound backend code with GZDoom.
# Conflicts:
#	source/core/sound/s_soundinternal.h
2020-05-23 12:59:11 +02:00
Christoph Oelckers
6a8efb7520 - update of music code, in particular separating the engine-specific lookup from the backend.
# Conflicts:
#	source/core/music/music.cpp

# Conflicts:
#	source/build/src/palette.cpp
2020-05-23 12:37:47 +02:00
Christoph Oelckers
d0406e27b6 - all base palette data has been transitioned to GPalette. 2020-05-23 12:31:05 +02:00
Christoph Oelckers
6f9ee4b60f - store palettes in the palette container. 2020-05-23 12:31:05 +02:00
NY00123
cf22b4da0a sw/src/demo.cpp:DemoPlayBack: Add a call to timerUpdateClock, which
is now required. Previously, it would be called from faketimerhandler,
which in turn is called from the engine.
2020-05-22 23:41:13 +02:00
NY00123
a69f738287 sw/src/copysect.cpp: Temporarily disable interpolation of sector object
if any of its sectors is impacted by CopySectorWalls. Fixes
a possible flicker with the drill at the end of level 2.
2020-05-22 23:41:11 +02:00
NY00123
ccf6722b70 SW: Don't interpolate a sector object if the corresponding lasttic value is 0 2020-05-22 23:41:10 +02:00
NY00123
37c3f1cc46 SW: Add the macro SO_EMPTY and use it instead of
separate checks of the form sop->xmid == INT32_MAX
2020-05-22 23:41:09 +02:00
NY00123
d510b9b95a sw/src/sync.cpp:SOSync: Remove commented out code 2020-05-22 23:41:08 +02:00
NY00123
d43bffd118 SW: Remove unused DoubleInitAWE32 variable 2020-05-22 23:41:07 +02:00
NY00123
f94b38b138 SW: Modify getinput to update oq16ang/oq16horiz with the same amount
of change that camq16ang/camq16horiz gets. Such an update is possible
after making sure that UpdateInputs (faketimerhandler) is
never called from domovethings.

# Conflicts:
#	source/sw/src/game.cpp
2020-05-22 23:41:05 +02:00
NY00123
6b5cf9525b sw/src/network.cpp: Remove from UpdateInputs the checks of totalclock
and ready2send and the call to timerUpdateClock, which are now done
before calling UpdateInputs itself from RunLevel.

# Conflicts:
#	source/sw/src/network.cpp
2020-05-22 23:40:00 +02:00
NY00123
ae2bcdd1a6 Rename faketimerhandler -> UpdateInputs and keep an empty
faketimerhandler stub in SW. This basically deprecates
the usage of faketimerhandler in the game.
2020-05-22 23:39:45 +02:00
NY00123
6daf42a959 sw/src/game.cpp:RunLevel: Call faketimerhandler in a loop, based on code
from EDuke32-OldMP. Main difference from EDuke32-OldMP is that this is
done even while staying in the menu; Behaviors will otherwise break.
We should also call timerUpdateClock() before the loop, especially
after removing the call to this function from faketimerhandler soon.
2020-05-22 23:39:43 +02:00
NY00123
25b5d69cab SW: Remove commented out code accessing non-existing variable
# Conflicts:
#	source/sw/src/network.cpp
2020-05-22 23:39:42 +02:00
NY00123
7e2484f603 SW: Remove FAKETIMERHANDLER and calls to faketimerhandler via this macro
# Conflicts:
#	source/sw/src/sprite.cpp
2020-05-22 23:39:28 +02:00
NY00123
916cd01550 SW: While not exactly a favorite of mine, this fixes the floorz updates
of the secret rotating pillar in level 1 with SO interpolation.
The drill in level 2 is also covered. So far, SetVatorActive seems
to be the only place where interpolation of ceiling/floorz
may be set, outside of the SO interpolation code.
2020-05-22 23:39:12 +02:00
Christoph Oelckers
f53b348782 - stop the railgun's active sound if another weapon is selected. 2020-05-22 23:02:25 +02:00
Evan Ramos
71dc4ff5a4 SW: Fail gracefully from WarpToArea instead of aborting 2020-05-22 18:29:21 +02:00
Evan Ramos
f318d2282a SW: Clear the background during cinematics
# Conflicts:
#	source/sw/src/anim.cpp
2020-05-22 18:29:20 +02:00
Mitchell Richters
d98813f00f SW: Allow sector object interpolations to be disabled for debugging.
New code is causing some issues. Upstream allow it to be toggled, so let's do that also.
2020-05-22 16:43:34 +02:00