mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- fixed the timer.
This commit is contained in:
parent
31b9995406
commit
e2e9c8ad01
1 changed files with 6 additions and 1 deletions
|
@ -120,12 +120,15 @@ public:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Printf("Movie clock = %d - %d = %d", ototalclock, totalclock, ototalclock - totalclock);
|
||||||
if (totalclock < ototalclock - 1)
|
if (totalclock < ototalclock - 1)
|
||||||
{
|
{
|
||||||
|
Printf("\n");
|
||||||
twod->ClearScreen();
|
twod->ClearScreen();
|
||||||
DrawTexture(twod, animtex.GetFrame(), 0, 0, DTA_FullscreenEx, 3, DTA_Masked, false, TAG_DONE);
|
DrawTexture(twod, animtex.GetFrame(), 0, 0, DTA_FullscreenEx, 3, DTA_Masked, false, TAG_DONE);
|
||||||
return skiprequest? -1 : 1;
|
return skiprequest? -1 : 1;
|
||||||
}
|
}
|
||||||
|
Printf(" advancing\n");
|
||||||
|
|
||||||
animtex.SetFrame(ANIM_GetPalette(&anim), ANIM_DrawFrame(&anim, curframe));
|
animtex.SetFrame(ANIM_GetPalette(&anim), ANIM_DrawFrame(&anim, curframe));
|
||||||
frametime = totalclock;
|
frametime = totalclock;
|
||||||
|
@ -237,7 +240,7 @@ class ScreenJobRunner
|
||||||
float screenfade;
|
float screenfade;
|
||||||
bool clearbefore;
|
bool clearbefore;
|
||||||
bool skipped = false;
|
bool skipped = false;
|
||||||
uint64_t startTime;
|
uint64_t startTime = -1;
|
||||||
int actionState;
|
int actionState;
|
||||||
int terminateState;
|
int terminateState;
|
||||||
|
|
||||||
|
@ -261,6 +264,7 @@ public:
|
||||||
while (index < jobs.Size() && (jobs[index].job == nullptr || (skip && jobs[index].ignoreifskipped))) index++;
|
while (index < jobs.Size() && (jobs[index].job == nullptr || (skip && jobs[index].ignoreifskipped))) index++;
|
||||||
actionState = clearbefore ? State_Clear : State_Run;
|
actionState = clearbefore ? State_Clear : State_Run;
|
||||||
if (index < jobs.Size()) screenfade = jobs[index].job->fadestyle & DScreenJob::fadein ? 0.f : 1.f;
|
if (index < jobs.Size()) screenfade = jobs[index].job->fadestyle & DScreenJob::fadein ? 0.f : 1.f;
|
||||||
|
startTime = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DisplayFrame()
|
int DisplayFrame()
|
||||||
|
@ -268,6 +272,7 @@ public:
|
||||||
auto& job = jobs[index];
|
auto& job = jobs[index];
|
||||||
auto now = I_nsTime();
|
auto now = I_nsTime();
|
||||||
bool skiprequest = inputState.CheckAllInput();
|
bool skiprequest = inputState.CheckAllInput();
|
||||||
|
if (startTime == -1) startTime = now;
|
||||||
auto clock = now - startTime;
|
auto clock = now - startTime;
|
||||||
if (screenfade < 1.f)
|
if (screenfade < 1.f)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue