Commit graph

11035 commits

Author SHA1 Message Date
Christoph Oelckers
5330964a7a - removed redundant initializers. 2020-06-07 15:07:32 +02:00
Christoph Oelckers
d7225c1965 - backend update from GZDoom 2020-06-07 15:02:54 +02:00
Christoph Oelckers
4c6abe1bb9 - pass the shade through the 2D drawer, so that palette emulation can still use it. 2020-06-07 14:50:12 +02:00
Christoph Oelckers
b6d204a88b - fixed: Weapons are part of the scene and always need to be rendered with the global base palette. 2020-06-07 13:50:41 +02:00
Christoph Oelckers
8da6b8796b - made presets work again.
Two fixes:
* fixed file system setup to mark the last main game resource.
* unbind all keys before loading a preset.
2020-06-07 13:35:23 +02:00
Christoph Oelckers
f2a637418d - moved palette.cpp out of Build folder. 2020-06-07 13:06:18 +02:00
Christoph Oelckers
3fe4dbed01 - fixed fog translation table generation. 2020-06-07 12:51:26 +02:00
Christoph Oelckers
724c8d4251 - fixed: The full dotted lump filter string was never used.
The code added all partial matches to the file system but not the full match.
2020-06-07 11:55:51 +02:00
Christoph Oelckers
f0d208bf56 - fixed compile error. 2020-06-07 10:46:35 +02:00
Christoph Oelckers
9aa2224110 - remove the remains of Lunatic from RR code. 2020-06-07 10:46:22 +02:00
NY00123
a54d408d59 Duke3D: Remove KEEPINSYNC comments referencing LUA code
# Conflicts:
#	source/duke3d/src/_functio.h
#	source/duke3d/src/duke3d.h
#	source/duke3d/src/game.h
#	source/duke3d/src/global.h
2020-06-07 10:38:55 +02:00
NY00123
ec11d22caf Use static instead of LUNATIC_EXTERN
# Conflicts:
#	source/build/include/build.h
#	source/duke3d/src/gamedef.cpp
2020-06-07 10:36:43 +02:00
NY00123
6a70389f1d Let's just use __fastcall instead of LUNATIC_FASTCALL
# Conflicts:
#	source/build/include/build.h
2020-06-07 10:36:04 +02:00
NY00123
cca922f023 Engine: Adjust krand for removal of LUNATIC
# Conflicts:
#	source/build/include/build.h
#	source/build/src/engine.cpp
2020-06-07 10:35:23 +02:00
NY00123
dba06d9601 Engine: Remove the LUNATIC-specific definitions
of engine_main_arrays_are_static, engine_v8 and Mulscale.

# Conflicts:
#	source/build/src/engine.cpp
2020-06-07 10:34:33 +02:00
NY00123
3592118e25 source/duke3d/src/actors.h: Remove last remaining mention of the
LUNATIC macro in Duke3D. AC_ACTIONTICS and AC_MOVFLAGS are still used.
2020-06-07 10:34:13 +02:00
NY00123
ea06e35025 source/duke3d/src/osdcmds.cpp:osdcmd_spawn: Remove
LUNATIC-specific code while defining the two loop vars at once.

# Conflicts:
#	source/duke3d/src/osdcmds.cpp
2020-06-07 10:34:12 +02:00
NY00123
40abf17f2f Duke3D: Remove a few more LUNATIC-specific definitions and macro references 2020-06-07 10:33:53 +02:00
NY00123
db71bb9ba7 source/duke3d/src/gamevars.cpp: Remove LUNATIC definition of ADDWEAPONVAR
# Conflicts:
#	source/duke3d/src/gamevars.cpp
2020-06-07 10:33:40 +02:00
NY00123
6a4960c774 source/duke3d/src/gamevars.cpp: Remove POSTADDWEAPONVAR, since this
is a no-op in non-LUNATIC builds, which will be the only ones to stay.
2020-06-07 10:33:18 +02:00
NY00123
fe020facf9 source/duke3d/src/player.cpp: Remove LUNATIC implementation of
G_HandlePal. In fact, let's not use a separate P_HandlePal function.
2020-06-07 10:33:17 +02:00
NY00123
a1bfbb0b21 source/duke3d/src/premap.cpp:P_ResetTintFade: Remove LUNATIC-specific
assignment, but keep the function instead of separately setting pals.f.
2020-06-07 10:33:17 +02:00
NY00123
c93ec9e405 source/duke3d/src/network.cpp: Remove LUNATIC-specific code 2020-06-07 10:33:17 +02:00
NY00123
7cf7ccfd05 source/duke3d/src: Remove almost all "#ifdef LUNATIC" blocks.
Surrounding "#if !defined LUNATIC"/"#endif" pairs are also covered.

# Conflicts:
#	source/duke3d/src/astub.cpp
#	source/duke3d/src/cmdline.cpp
#	source/duke3d/src/demo.cpp
#	source/duke3d/src/duke3d.h
#	source/duke3d/src/game.cpp
#	source/duke3d/src/game.h
#	source/duke3d/src/gamedef.cpp
#	source/duke3d/src/gamedef.h
#	source/duke3d/src/gameexec.cpp
#	source/duke3d/src/gameexec.h
#	source/duke3d/src/gamevars.cpp
#	source/duke3d/src/gamevars.h
#	source/duke3d/src/namesdyn.cpp
#	source/duke3d/src/osdcmds.cpp
#	source/duke3d/src/premap.cpp
#	source/duke3d/src/savegame.cpp
#	source/duke3d/src/savegame.h
#	source/duke3d/src/sbar.cpp
#	source/duke3d/src/screens.cpp
2020-06-07 10:33:16 +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
Richard C. Gobeille
a0876223ab Assignments
# Conflicts:
#	source/build/src/clip.cpp
2020-06-07 10:17:33 +02:00
Christoph Oelckers
9fc5f2d2e7 - some shader cleanup.
I think it's now as close to GZDoom's backend interface as it can be without disabling needed features.
2020-06-07 10:15:31 +02:00
Christoph Oelckers
09e31fd5f4 - disabled sky texture clamping because it never really worked. 2020-06-07 10:14:32 +02:00
Christoph Oelckers
60d7f4f7c2 - got rid of the RF_NPOTEmulation flag.
This can easily be controlled with the 2 main variables alone.
2020-06-07 09:30:55 +02:00
Christoph Oelckers
353e3eb1fa - fixed RRRA E2L1 fog. 2020-06-07 08:24:12 +02:00
Christoph Oelckers
3adfdfcac5 - renamed a few more things in the shader. 2020-06-07 08:16:04 +02:00
Christoph Oelckers
fc466849ce - disabled demos in blood. 2020-06-06 09:23:44 +02:00
Christoph Oelckers
70ae86aff1 - disabled Blood's demo code because recent changes broke sync to the point where trying to fix it looks like a pointless endeavour. 2020-06-06 07:56:35 +02:00
Christoph Oelckers
232b0c1bb6 - store the lighting related uniforms in a GZDoom-style LightParms vec4. 2020-06-06 00:44:57 +02:00
Christoph Oelckers
f159496f6e - moved the ShadeDiv array into the lookup table and took the numshades-2 divisor out of the stored value.
The value was changed to allow easier reuse in scenarios where the size of the shade table does not matter anymore.
2020-06-05 23:18:21 +02:00
Christoph Oelckers
0bd460d9e3 - split up the visibility factor into a scene specific and an element specific part.
The main reason here is that the scene specific part contains a projection dependent component which would be a problem when transitioning to GZDoom's code. The global viewpoint data already has a field for such a factor so now that gets used.
This also means a significant simplification of the visibility code in Polymost and the removal of several global variables.
2020-06-05 19:06:31 +02:00
Christoph Oelckers
9dfd3ddd02 - migration of texture tinting to GZDoom's version.
- start of visibility migration - removing unused globvis variable.
2020-06-05 17:02:21 +02:00
Dino Bollinger
f3ed580b82 Prevent tripbombs from being placed at extreme distances.
Technically, an overflow is still possible, but with unsigned integers
it is highly unlikely to satisfy (sum_squares < 290*290) in practice.

# Conflicts:
#	source/duke3d/src/player.cpp
2020-06-04 21:39:14 +02:00
Jordon Moss
10511c4fee Fix bad call to updatesector in G_CollectSpawnPoints that broke spawns in overlapping sectors and TROR. p->cursectnum should equal the sprite's sectnum on initial spawn. 2020-06-04 21:38:12 +02:00
Jordon Moss
dd8192ebbf Fix bad call to updatesector in G_CollectSpawnPoints that broke spawns in overlapping sectors and TROR. p->cursectnum should equal the sprite's sectnum on initial spawn. 2020-06-04 21:38:12 +02:00
Christoph Oelckers
d812c2997c - start renaming uniforms to match GZDoom.
Needed to allow using the same shader with the backend.
2020-06-04 21:34:27 +02:00
Richard C. Gobeille
d92f56f36f Duke3d: mark compiled CON_MOVE/CON_AI/CON_ACTION with a trailing value
This is so I can tell the difference between actor .t_data[] values that are actually set to something defined in CON versus bullshit arbitrary internal usage of the same variable, which I need for a future commit.
2020-06-04 20:20:30 +02:00
Richard C. Gobeille
e353d38665 Duke3d: improve WT FLAMETHROWERFLAME enemy type check
I don't expect anyone to make an EDuke32-compatible WT mod where other enemies shoot FLAMETHROWERFLAME, but if they do the behavior will at least be consistent across enemy types.
2020-06-04 20:20:30 +02:00
Richard C. Gobeille
91d9883845 Duke3d: optimize A_RadiusDamage()
This results in far fewer calls to getwalldist(), inside(), and cansee(), which should significantly lessen the performance hit from a large number of A_RadiusDamage() calls in areas with many small detail sectors.

# Conflicts:
#	source/duke3d/src/actors.cpp
2020-06-04 20:20:29 +02:00
Christoph Oelckers
b15cc31a38 - transitioned matrix setup to use the backend's uniform buffer implementation. 2020-06-04 20:14:48 +02:00
Christoph Oelckers
40f085adea - draw fullscreen blends with the 2D drawer.
Removing one special case of render setup. Now all 2D content is done by the same code.
2020-06-04 18:54:10 +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
8430658cc5 - fixed texture filter menu entry. 2020-06-02 17:12:10 +02:00