mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- use flags instead of bools.
This commit is contained in:
parent
af3eac8456
commit
fb5e2fe0c0
7 changed files with 19 additions and 12 deletions
|
@ -317,14 +317,14 @@ public:
|
|||
|
||||
ScreenJobRunner *runner;
|
||||
|
||||
void RunScreenJob(JobDesc* jobs, int count, CompletionFunc completion, bool clearbefore, bool blockingui, bool skipall)
|
||||
void RunScreenJob(JobDesc* jobs, int count, CompletionFunc completion, int flags)
|
||||
{
|
||||
assert(completion != nullptr);
|
||||
videoclearFade();
|
||||
if (count)
|
||||
{
|
||||
runner = new ScreenJobRunner(jobs, count, completion, clearbefore, skipall);
|
||||
gameaction = blockingui? ga_intro : ga_intermission;
|
||||
runner = new ScreenJobRunner(jobs, count, completion, !(flags & SJ_DONTCLEAR), !!(flags & SJ_SKIPALL));
|
||||
gameaction = (flags & SJ_BLOCKUI)? ga_intro : ga_intermission;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -138,8 +138,15 @@ struct JobDesc
|
|||
//bool ignoreifskipped;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SJ_DONTCLEAR = 1,
|
||||
SJ_BLOCKUI = 2,
|
||||
SJ_SKIPALL = 4
|
||||
};
|
||||
|
||||
void RunScreenJob(JobDesc *jobs, int count, CompletionFunc completion, bool clearbefore = true, bool blockingui = false, bool skipall = false);
|
||||
|
||||
void RunScreenJob(JobDesc *jobs, int count, CompletionFunc completion, int flags = 0);
|
||||
void EndScreenJob();
|
||||
void DeleteScreenJob();
|
||||
bool ScreenJobResponder(event_t* ev);
|
||||
|
|
|
@ -89,7 +89,7 @@ void playlogos()
|
|||
RunScreenJob(jobs, job, [](bool) {
|
||||
Mus_Stop();
|
||||
gameaction = ga_mainmenu;
|
||||
}, true, true);
|
||||
}, SJ_BLOCKUI);
|
||||
}
|
||||
|
||||
void playSmk(const char *smk, const char *wav, int wavid, CompletionFunc func)
|
||||
|
|
|
@ -307,7 +307,7 @@ void Logo_d(const CompletionFunc &completion)
|
|||
}
|
||||
else S_PlaySpecialMusic(MUS_INTRO);
|
||||
jobs[job++] = { Create<DTitleScreen>(), []() { S_PlaySound(NITEVISION_ONOFF, CHAN_AUTO, CHANF_UI); } };
|
||||
RunScreenJob(jobs, job, completion, true, true);
|
||||
RunScreenJob(jobs, job, completion, SJ_BLOCKUI);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1131,7 +1131,7 @@ void e4intro(const CompletionFunc& completion)
|
|||
jobs[job++] = { PlayVideo("vol41a.anm", vol41a, framespeed_10), nullptr };
|
||||
jobs[job++] = { PlayVideo("vol42a.anm", vol42a, framespeed_14), nullptr };
|
||||
jobs[job++] = { PlayVideo("vol43a.anm", vol43a, framespeed_10), nullptr };
|
||||
RunScreenJob(jobs, job, completion, true, false, true);
|
||||
RunScreenJob(jobs, job, completion, SJ_SKIPALL);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -204,7 +204,7 @@ void Logo_r(const CompletionFunc& completion)
|
|||
{
|
||||
jobs[job++] = { PlayVideo("redint.mve"), nullptr };
|
||||
}
|
||||
RunScreenJob(jobs, job, completion, true, true);
|
||||
RunScreenJob(jobs, job, completion, SJ_BLOCKUI);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -528,7 +528,7 @@ void DoTitle(CompletionFunc completion)
|
|||
jobs[job++] = { PlayMovie("book.mov") };
|
||||
jobs[job++] = { Create<DMainTitle>() };
|
||||
|
||||
RunScreenJob(jobs, job, completion, true, true);
|
||||
RunScreenJob(jobs, job, completion, SJ_BLOCKUI);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ void Logo(const CompletionFunc& completion)
|
|||
int job = 0;
|
||||
jobs[job++] = { Create<DSWDRealmsScreen>() };
|
||||
jobs[job++] = { PlayVideo("sw.anm", logosound, logoframetimes, true)};
|
||||
RunScreenJob(jobs, job, completion, true, true);
|
||||
RunScreenJob(jobs, job, completion, SJ_BLOCKUI);
|
||||
}
|
||||
else completion(false);
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ void StatScreen(int FinishAnim, CompletionFunc completion)
|
|||
{
|
||||
jobs[job++] = { Create<DSWMultiSummaryScreen>() };
|
||||
}
|
||||
RunScreenJob(jobs, job, completion, true);
|
||||
RunScreenJob(jobs, job, completion);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -638,7 +638,7 @@ void SybexScreen(CompletionFunc completion)
|
|||
else
|
||||
{
|
||||
JobDesc job = { Create<DImageScreen>(tileGetTexture(5261), DScreenJob::fadein | DScreenJob::fadeout, 0x7fffffff) };
|
||||
RunScreenJob(&job, 1, completion, true, true);
|
||||
RunScreenJob(&job, 1, completion, SJ_BLOCKUI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue