- transitioning helper for screen jobs.

This commit is contained in:
Christoph Oelckers 2020-08-15 10:55:21 +02:00
parent 53cf248269
commit 3f9cc1412c
3 changed files with 30 additions and 3 deletions

View file

@ -3688,7 +3688,6 @@ void PolymostProcessVoxels(void)
g_haveVoxels = 2;
Printf("Generating voxel models for Polymost. This may take a while...\n");
//videoNextPage();
for (bssize_t i = 0; i < MAXVOXELS; i++)
{

View file

@ -56,11 +56,13 @@ int spawn_d(int j, int pn)
{
switch (sp->picnum)
{
case BOSS5STAYPUT:
case BOSS2STAYPUT:
case BOSS3STAYPUT:
case BOSS5STAYPUT:
hittype[i].actorstayput = sp->sectnum;
case FIREFLY:
case BOSS5:
if (sp->picnum == BOSS5 || sp->picnum == BOSS5STAYPUT)
if (sp->picnum != FIREFLY)
{
if (j >= 0 && sprite[j].picnum == RESPAWN)
sp->pal = sprite[j].pal;

View file

@ -97,6 +97,9 @@ Things required to make savegames work:
#include "secrets.h"
#include "osdcmds.h"
#include "screenjob.h"
#include "inputstate.h"
#include "gamestate.h"
//#include "crc32.h"
@ -277,6 +280,29 @@ void RunLevel(void);
static FILE *debug_fout = NULL;
// Transitioning helper.
int SyncScreenJob(JobDesc *jobs, int count)
{
bool abort = false;
RunScreenJob(jobs, count, [&](bool) { abort = true; });
while (!abort)
{
handleevents();
updatePauseStatus();
D_ProcessEvents();
ControlInfo info;
CONTROL_GetInput(&info);
C_RunDelayedCommands();
RunScreenJobFrame(); // This handles continuation through its completion callback.
videoNextPage();
}
gamestate = GS_LEVEL;
return 0;
}
void DebugWriteString(char *string)
{