From 54329bd87bd528ed5461f08003868e56daf9ee82 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 22 Apr 2022 11:27:49 +0200 Subject: [PATCH] - make stuff compile again --- src/g_game.h | 1 + src/g_level.cpp | 9 +++++---- src/intermission/intermission_parse.cpp | 5 +++-- src/p_conversation.cpp | 1 + src/scripting/vmthunks.cpp | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/g_game.h b/src/g_game.h index fb20b9440..f3e235aca 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -106,6 +106,7 @@ void G_AddViewAngle (int yaw, bool mouse = false); class FBaseCVar; FBaseCVar* G_GetUserCVar(int playernum, const char* cvarname); +class DIntermissionController; void RunIntermission(DIntermissionController* intermissionScreen, DObject* statusScreen, std::function completionf); extern const AActor *SendItemUse, *SendItemDrop; diff --git a/src/g_level.cpp b/src/g_level.cpp index f72121114..4647c8b88 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -82,6 +82,7 @@ #include "p_effect.h" #include "stringtable.h" #include "c_buttons.h" +#include "screenjob.h" #include "gi.h" @@ -830,7 +831,7 @@ static wbstartstruct_t staticWmInfo; DIntermissionController* FLevelLocals::CreateIntermission() { - DIntermissionController* controller; + DIntermissionController* controller = nullptr; cluster_info_t *nextcluster; cluster_info_t *thiscluster; @@ -997,7 +998,8 @@ void G_DoCompleted (void) } // todo: create end of level screenjob - DObject* statusScreen = nullptr, *intermissionScreen = nullptr; + DObject* statusScreen = nullptr; + DIntermissionController* intermissionScreen = nullptr; if (playinter) { // [RH] If you ever get a statistics driver operational, adapt this. @@ -1008,8 +1010,7 @@ void G_DoCompleted (void) } bool endgame = intermissionScreen && intermissionScreen->mEndGame; intermissionScreen = primaryLevel->CreateIntermission(); - RunIntermission(intermissionScreen, statusScreen, [=](bool) { if (!endgame) primaryLevel->WorldDone(); } -) + RunIntermission(intermissionScreen, statusScreen, [=](bool) { if (!endgame) primaryLevel->WorldDone(); }); } //========================================================================== diff --git a/src/intermission/intermission_parse.cpp b/src/intermission/intermission_parse.cpp index a32e2ea9f..bda635448 100644 --- a/src/intermission/intermission_parse.cpp +++ b/src/intermission/intermission_parse.cpp @@ -42,6 +42,7 @@ #include "gstrings.h" #include "gi.h" #include "screenjob.h" +#include "d_event.h" static void ReplaceIntermission(FName intname,FIntermissionDescriptor *desc) @@ -910,14 +911,14 @@ DIntermissionController* F_StartFinale (const char *music, int musicorder, int c desc->mActions.Push(wiper); } - return F_StartIntermission(desc, true, ending? FSTATE_EndingGame : FSTATE_ChangingLevel); + return F_StartIntermission(desc, true); } else if (ending) { FIntermissionDescriptor **pdesc = IntermissionDescriptors.CheckKey(endsequence); if (pdesc != NULL) { - return F_StartIntermission(*pdesc, false, ending? FSTATE_EndingGame : FSTATE_ChangingLevel); + return F_StartIntermission(*pdesc, false); } } return nullptr; diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 6e9229332..21705fc79 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -60,6 +60,7 @@ #include "actorinlines.h" #include "v_draw.h" #include "doommenu.h" +#include "g_game.h" static FRandom pr_randomspeech("RandomSpeech"); diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 11bee9835..94baffd9f 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -1645,7 +1645,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset) PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals); PARAM_NAME(seq); PARAM_INT(state); - F_StartIntermission(seq, (uint8_t)state); + G_StartSlideshow(self, seq); return 0; }