- summary screen is working again

minus the initial wipe…
This commit is contained in:
Christoph Oelckers 2022-04-22 13:39:44 +02:00
parent 336c45aaa4
commit 082daccd2d
4 changed files with 29 additions and 13 deletions

View File

@ -1025,11 +1025,7 @@ void D_Display ()
case GS_CUTSCENE: case GS_CUTSCENE:
case GS_INTRO: case GS_INTRO:
if (ScreenJobTick()) ScreenJobDraw();
{
// synchronize termination with the playsim.
Net_WriteByte(DEM_ENDSCREENJOB);
}
break; break;
@ -3699,7 +3695,8 @@ void D_Cleanup()
AM_ClearColorsets(); AM_ClearColorsets();
DeinitSWColorMaps(); DeinitSWColorMaps();
FreeSBarInfoScript(); FreeSBarInfoScript();
DeleteScreenJob();
// clean up game state // clean up game state
D_ErrorCleanup (); D_ErrorCleanup ();
P_Shutdown(); P_Shutdown();
@ -3728,7 +3725,7 @@ void D_Cleanup()
GameStartupInfo.LoadWidescreen = GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1; GameStartupInfo.LoadWidescreen = GameStartupInfo.LoadLights = GameStartupInfo.LoadBrightmaps = -1;
GameStartupInfo.DiscordAppId = ""; GameStartupInfo.DiscordAppId = "";
GameStartupInfo.SteamAppId = ""; GameStartupInfo.SteamAppId = "";
GC::FullGC(); // clean up before taking down the object list. GC::FullGC(); // clean up before taking down the object list.
// Delete the reference to the VM functions here which were deleted and will be recreated after the restart. // Delete the reference to the VM functions here which were deleted and will be recreated after the restart.

View File

@ -87,6 +87,7 @@
#include "d_buttons.h" #include "d_buttons.h"
#include "hwrenderer/scene/hw_drawinfo.h" #include "hwrenderer/scene/hw_drawinfo.h"
#include "doommenu.h" #include "doommenu.h"
#include "screenjob.h"
static FRandom pr_dmspawn ("DMSpawn"); static FRandom pr_dmspawn ("DMSpawn");
@ -969,6 +970,11 @@ bool G_Responder (event_t *ev)
if (ev->type != EV_Mouse && primaryLevel->localEventManager->Responder(ev)) // [ZZ] ZScript ate the event // update 07.03.17: mouse events are handled directly if (ev->type != EV_Mouse && primaryLevel->localEventManager->Responder(ev)) // [ZZ] ZScript ate the event // update 07.03.17: mouse events are handled directly
return true; return true;
if (gamestate == GS_INTRO || gamestate == GS_CUTSCENE)
{
return ScreenJobResponder(ev);
}
// any other key pops up menu if in demos // any other key pops up menu if in demos
// [RH] But only if the key isn't bound to a "special" command // [RH] But only if the key isn't bound to a "special" command
if (gameaction == ga_nothing && if (gameaction == ga_nothing &&
@ -1295,6 +1301,15 @@ void G_Ticker ()
} }
break; break;
case GS_CUTSCENE:
case GS_INTRO:
if (ScreenJobTick())
{
// synchronize termination with the playsim.
Net_WriteByte(DEM_ENDSCREENJOB);
}
break;
default: default:
break; break;
} }

View File

@ -37,7 +37,7 @@ class IntermissionScreenJob : ScreenJob
} }
class StatusScreenJob : SkippableScreenJob class StatusScreenJob : ScreenJob
{ {
StatusScreen controller; StatusScreen controller;
@ -49,7 +49,7 @@ class StatusScreenJob : SkippableScreenJob
override void OnTick() { controller.Ticker(); if (controller.CurState == StatusScreen.LeavingIntermission) jobstate = finished; } override void OnTick() { controller.Ticker(); if (controller.CurState == StatusScreen.LeavingIntermission) jobstate = finished; }
override void Draw(double smoothratio) { controller.Drawer(); } override void Draw(double smoothratio) { controller.Drawer(); }
override void OnSkip() { controller.NextStage(); } // skipping status screens is asynchronous, so yields no result override bool OnEvent(InputEvent evt) { return controller.Responder(evt); }
override void OnDestroy() override void OnDestroy()
{ {

View File

@ -796,11 +796,16 @@ class StatusScreen abstract ui version("2.5")
// //
// ==================================================================== // ====================================================================
void nextStage(void) virtual bool Responder(InputEvent evt)
{ {
accelerateStage = 1; if (evt.type == InputEvent.Type_KeyDown)
{
accelerateStage = 1;
return true;
}
return false;
} }
void checkForAccelerate() void checkForAccelerate()
{ {
// no longer used, but still needed for old content. // no longer used, but still needed for old content.
@ -836,7 +841,6 @@ class StatusScreen abstract ui version("2.5")
StartMusic(); StartMusic();
} }
checkForAccelerate();
bg.updateAnimatedBack(); bg.updateAnimatedBack();
switch (CurState) switch (CurState)