From 68b7628f56c85a89d2bf0210d29c318fa439faad Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 18:12:25 +0200 Subject: [PATCH 1/4] - RRRA: Sector effector type 156 is not supposed to scroll the floor texture. --- source/games/duke/src/actors.cpp | 4 ++-- source/games/duke/src/actors_d.cpp | 2 +- source/games/duke/src/actors_r.cpp | 2 +- source/games/duke/src/funct.h | 2 +- source/games/duke/src/spawn.cpp | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 04d9e311e..ccce5da8c 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -4505,7 +4505,7 @@ void handle_se27(DDukeActor* actor) // //--------------------------------------------------------------------------- -void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, int TRIPBOMB, int LASERLINE, int CRANE, int shift) +void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift) { int* t = &actor->temp_data[0]; @@ -4575,7 +4575,7 @@ void handle_se24(DDukeActor *actor, int16_t *list1, int16_t *list2, int TRIPBOMB } } } - sector[actor->s.sectnum].addfloorxpan(actor->s.yvel / 128.f); + if (scroll) sector[actor->s.sectnum].addfloorxpan(actor->s.yvel / 128.f); } //--------------------------------------------------------------------------- diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 3ceaf8ed2..308866bd8 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3697,7 +3697,7 @@ void moveeffectors_d(void) //STATNUM 3 { static int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, FOOTPRINTS4, BULLETHOLE, BLOODSPLAT1, BLOODSPLAT2, BLOODSPLAT3, BLOODSPLAT4, -1 }; static int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, SIDEBOLT1, SIDEBOLT1 + 1, SIDEBOLT1 + 2, SIDEBOLT1 + 3, -1 }; - handle_se24(act, list1, list2, TRIPBOMB, LASERLINE, CRANE, 2); + handle_se24(act, list1, list2, false, TRIPBOMB, LASERLINE, CRANE, 2); break; } case SE_35: diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a6935be5a..f4988af0d 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -3576,7 +3576,7 @@ void moveeffectors_r(void) //STATNUM 3 { static int16_t list1[] = { BLOODPOOL, PUKE, FOOTPRINTS, FOOTPRINTS2, FOOTPRINTS3, -1 }; static int16_t list2[] = { BOLT1, BOLT1 + 1,BOLT1 + 2, BOLT1 + 3, -1 }; - handle_se24(act, list1, list2, BULLETHOLE, -1, CRANE, 1); + handle_se24(act, list1, list2, st != 156, BULLETHOLE, -1, CRANE, 1); break; } diff --git a/source/games/duke/src/funct.h b/source/games/duke/src/funct.h index 29a56af54..1785fabce 100644 --- a/source/games/duke/src/funct.h +++ b/source/games/duke/src/funct.h @@ -84,7 +84,7 @@ void handle_se19(DDukeActor* i, int BIGFORCE); void handle_se20(DDukeActor* i); void handle_se21(DDukeActor* i); void handle_se22(DDukeActor* i); -void handle_se24(DDukeActor* actor, int16_t* list1, int16_t* list2, int TRIPBOMB, int LASERLINE, int CRANE, int shift); +void handle_se24(DDukeActor* actor, int16_t* list1, int16_t* list2, bool scroll, int TRIPBOMB, int LASERLINE, int CRANE, int shift); void handle_se25(DDukeActor* a, int t_index, int snd1, int snd2); void handle_se26(DDukeActor* i); void handle_se27(DDukeActor* i); diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index 1a85073a5..11f64ca7d 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -785,7 +785,8 @@ void spawneffector(DDukeActor* actor) break; } case 156: - if (!isRRRA()) break; + break; + case 34: StartInterpolation(sect, Interp_Sect_FloorPanX); break; From 58fb938aa7c3617d1efc2653c23b2c86d008e7f6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 19:39:48 +0200 Subject: [PATCH 2/4] - block opening of the menu in the fade out phase of a screenjob and in Exhumed's map/intermission screens. At these places there's some inteference that can bring the engine into an unstable state. This is not a real fix, just a quick workaround. The actual problem requires closer examination why these are the only places where this happens. --- source/core/mainloop.cpp | 1 + source/core/screenjob.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 286f016cb..efdd496d4 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -189,6 +189,7 @@ static void GameTicker() case ga_newgame: FX_StopAllSounds(); case ga_newgamenostopsound: + DeleteScreenJob(); newGameStarted = true; FX_SetReverb(0); gi->FreeLevelData(); diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index 886ade1c1..97413104e 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -915,6 +915,7 @@ public: startTime = -1; clock = 0; jobs[index].job->fadestate = DScreenJob::fadeout; + gamestate = GS_INTRO; // block menu and console during fadeout - this can cause timing problems. actionState = State_Fadeout; } else @@ -959,6 +960,7 @@ void DeleteScreenJob() delete runner; runner = nullptr; } + twod->SetScreenFade(1); } void RunScreenJobFrame() From a80c5db02b597f367125ef989503abe674179744 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 21:37:01 +0200 Subject: [PATCH 3/4] - forgot to save the Exhumed part of the last commit --- source/games/exhumed/src/gameloop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index 4307b1325..949670c75 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -193,7 +193,7 @@ static void Intermission(MapRecord *from_map, MapRecord *to_map) gameaction = ga_nextlevel; } - }); + }, true, true); } } From 8cc3a81c3bc28cb8623d2053c71ecb89e55311e7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Apr 2021 23:56:01 +0200 Subject: [PATCH 4/4] - enable the render backend switch in the menu. Vulkan is working now so this can be reactivated. --- wadsrc/static/menudef.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 35e2a9cb1..675a6b08b 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1494,9 +1494,8 @@ OptionMenu VideoModeMenu protected { Title "$VIDMNU_TITLE" - // does not work yet. - //Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend" - //StaticText " " + Option "$VIDMNU_PREFERBACKEND", "vid_preferbackend", "PreferBackend" + StaticText " " Option "$VIDMNU_FULLSCREEN", "vid_fullscreen", "YesNo" IfOption(Mac)