2022-04-10 06:59:10 +00:00
|
|
|
|
|
|
|
|
2022-04-11 11:12:37 +00:00
|
|
|
class IntermissionController native ui
|
2022-04-10 06:59:10 +00:00
|
|
|
{
|
|
|
|
// This is mostly a black box to the native intermission code.
|
|
|
|
// May be scriptified later, but right now we do not need it.
|
2022-04-26 16:06:26 +00:00
|
|
|
|
2022-05-10 22:04:44 +00:00
|
|
|
native void Start();
|
2022-04-26 16:06:26 +00:00
|
|
|
native bool Responder(InputEvent ev);
|
2022-04-10 06:59:10 +00:00
|
|
|
native bool Ticker();
|
|
|
|
native void Drawer();
|
|
|
|
native bool NextPage();
|
|
|
|
}
|
|
|
|
|
2022-04-26 16:06:26 +00:00
|
|
|
// Wrapper to play the native intermissions within a screen job.
|
2022-04-10 06:59:10 +00:00
|
|
|
class IntermissionScreenJob : ScreenJob
|
|
|
|
{
|
|
|
|
IntermissionController controller;
|
2022-04-11 11:12:37 +00:00
|
|
|
|
2022-04-26 16:06:26 +00:00
|
|
|
ScreenJob Init(IntermissionController ctrl, bool allowwipe)
|
2022-04-22 10:43:08 +00:00
|
|
|
{
|
2022-04-26 16:06:26 +00:00
|
|
|
Super.Init();
|
|
|
|
if (allowwipe && wipetype != 0) flags = wipetype << ScreenJob.transition_shift;
|
2022-04-22 10:43:08 +00:00
|
|
|
controller = ctrl;
|
|
|
|
return self;
|
|
|
|
}
|
2022-04-10 06:59:10 +00:00
|
|
|
|
2022-05-10 22:04:44 +00:00
|
|
|
override void Start() { controller.Start(); }
|
2022-04-10 06:59:10 +00:00
|
|
|
override bool OnEvent(InputEvent evt) { return controller.Responder(evt); }
|
2022-04-11 11:12:37 +00:00
|
|
|
override void OnTick() { if (!controller.Ticker()) jobstate = finished; }
|
|
|
|
override void Draw(double smoothratio) { controller.Drawer(); }
|
2022-04-10 06:59:10 +00:00
|
|
|
|
|
|
|
override void OnDestroy()
|
|
|
|
{
|
|
|
|
controller.Destroy();
|
|
|
|
Super.OnDestroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-04-22 10:43:08 +00:00
|
|
|
class DoomCutscenes ui
|
2022-04-11 11:12:37 +00:00
|
|
|
{
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
static void BuildMapTransition(ScreenJobRunner runner, IntermissionController inter, StatusScreen status)
|
|
|
|
{
|
|
|
|
if (status)
|
|
|
|
{
|
2022-04-26 16:06:26 +00:00
|
|
|
runner.Append(status);
|
2022-04-11 11:12:37 +00:00
|
|
|
}
|
|
|
|
if (inter)
|
|
|
|
{
|
2022-04-26 16:06:26 +00:00
|
|
|
runner.Append(new("IntermissionScreenJob").Init(inter, status != null));
|
2022-04-11 11:12:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|