mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
- Exhumed: Rename remaining use of totalclock
locally in screenjobs to currentclock
like Duke.
This commit is contained in:
parent
a6cc3c4128
commit
2748d6dc64
1 changed files with 19 additions and 19 deletions
|
@ -656,14 +656,14 @@ public:
|
||||||
int Frame(uint64_t clock, bool skiprequest) override
|
int Frame(uint64_t clock, bool skiprequest) override
|
||||||
|
|
||||||
{
|
{
|
||||||
int totalclock = int(clock * 120 / 1'000'000'000);
|
int currentclock = int(clock * 120 / 1'000'000'000);
|
||||||
|
|
||||||
twod->ClearScreen();
|
twod->ClearScreen();
|
||||||
|
|
||||||
if ((totalclock - startTime) / kTimerTicks)
|
if ((currentclock - startTime) / kTimerTicks)
|
||||||
{
|
{
|
||||||
nIdleSeconds++;
|
nIdleSeconds++;
|
||||||
startTime = totalclock;
|
startTime = currentclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tileY = curYPos;
|
int tileY = curYPos;
|
||||||
|
@ -684,7 +684,7 @@ public:
|
||||||
{
|
{
|
||||||
for (int j = 0; j < MapLevelFires[i].nFires; j++)
|
for (int j = 0; j < MapLevelFires[i].nFires; j++)
|
||||||
{
|
{
|
||||||
int nFireFrame = ((totalclock >> 4) & 3);
|
int nFireFrame = ((currentclock >> 4) & 3);
|
||||||
assert(nFireFrame >= 0 && nFireFrame < 4);
|
assert(nFireFrame >= 0 && nFireFrame < 4);
|
||||||
|
|
||||||
int nFireType = MapLevelFires[i].fires[j].nFireType;
|
int nFireType = MapLevelFires[i].fires[j].nFireType;
|
||||||
|
@ -700,7 +700,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int t = (((totalclock & 16) >> 4));
|
int t = (((currentclock & 16) >> 4));
|
||||||
|
|
||||||
int nTile = mapNamePlaques[i].tiles[t].nTile;
|
int nTile = mapNamePlaques[i].tiles[t].nTile;
|
||||||
|
|
||||||
|
@ -714,7 +714,7 @@ public:
|
||||||
|
|
||||||
if (nLevelNew == i)
|
if (nLevelNew == i)
|
||||||
{
|
{
|
||||||
shade = (Sin(16 * totalclock) + 31) >> 8;
|
shade = (Sin(16 * currentclock) + 31) >> 8;
|
||||||
}
|
}
|
||||||
else if (nLevelBest >= i)
|
else if (nLevelBest >= i)
|
||||||
{
|
{
|
||||||
|
@ -732,9 +732,9 @@ public:
|
||||||
if (curYPos != destYPos)
|
if (curYPos != destYPos)
|
||||||
{
|
{
|
||||||
// scroll the map every couple of ms
|
// scroll the map every couple of ms
|
||||||
if (totalclock - runtimer >= (kTimerTicks / 32)) {
|
if (currentclock - runtimer >= (kTimerTicks / 32)) {
|
||||||
curYPos += var_2C;
|
curYPos += var_2C;
|
||||||
runtimer = totalclock;
|
runtimer = currentclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputState.CheckAllInput())
|
if (inputState.CheckAllInput())
|
||||||
|
@ -1113,17 +1113,17 @@ private:
|
||||||
PlayLocalSound(StaticSound[kSound75], 0, false, CHANF_UI);
|
PlayLocalSound(StaticSound[kSound75], 0, false, CHANF_UI);
|
||||||
phase = 1;
|
phase = 1;
|
||||||
}
|
}
|
||||||
int totalclock = clock * 120 / 1'000'000'000;
|
int currentclock = clock * 120 / 1'000'000'000;
|
||||||
switch (phase)
|
switch (phase)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
if (totalclock >= nextclock)
|
if (currentclock >= nextclock)
|
||||||
{
|
{
|
||||||
Phase1();
|
Phase1();
|
||||||
nextclock += 4;
|
nextclock += 4;
|
||||||
}
|
}
|
||||||
DrawTexture(twod, tileGetTexture(kTileLoboLaptop), 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, TAG_DONE);
|
DrawTexture(twod, tileGetTexture(kTileLoboLaptop), 0, 0, DTA_FullscreenEx, FSMode_ScaleToFit43, TAG_DONE);
|
||||||
if (skiprequest || totalclock >= 240)
|
if (skiprequest || currentclock >= 240)
|
||||||
{
|
{
|
||||||
InitPhase2();
|
InitPhase2();
|
||||||
phase = 2;
|
phase = 2;
|
||||||
|
@ -1132,7 +1132,7 @@ private:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (totalclock >= nextclock)
|
if (currentclock >= nextclock)
|
||||||
{
|
{
|
||||||
if (screentext[nStringTypeOn][nCharTypeOn] != ' ')
|
if (screentext[nStringTypeOn][nCharTypeOn] != ' ')
|
||||||
PlayLocalSound(StaticSound[kSound71], 0, false, CHANF_UI);
|
PlayLocalSound(StaticSound[kSound71], 0, false, CHANF_UI);
|
||||||
|
@ -1145,7 +1145,7 @@ private:
|
||||||
nStringTypeOn++;
|
nStringTypeOn++;
|
||||||
if (nStringTypeOn >= screentext.Size())
|
if (nStringTypeOn >= screentext.Size())
|
||||||
{
|
{
|
||||||
nextclock = (kTimerTicks * (screentext.Size() + 2)) + totalclock;
|
nextclock = (kTimerTicks * (screentext.Size() + 2)) + currentclock;
|
||||||
phase = 3;
|
phase = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1154,35 +1154,35 @@ private:
|
||||||
DisplayPhase2();
|
DisplayPhase2();
|
||||||
if (skiprequest)
|
if (skiprequest)
|
||||||
{
|
{
|
||||||
nextclock = (kTimerTicks * (screentext.Size() + 2)) + totalclock;
|
nextclock = (kTimerTicks * (screentext.Size() + 2)) + currentclock;
|
||||||
phase = 3;
|
phase = 3;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
DisplayPhase2();
|
DisplayPhase2();
|
||||||
if (totalclock >= nextclock || skiprequest)
|
if (currentclock >= nextclock || skiprequest)
|
||||||
{
|
{
|
||||||
PlayLocalSound(StaticSound[kSound75], 0, false, CHANF_UI);
|
PlayLocalSound(StaticSound[kSound75], 0, false, CHANF_UI);
|
||||||
phase = 4;
|
phase = 4;
|
||||||
nextclock = totalclock + 240;
|
nextclock = currentclock + 240;
|
||||||
skiprequest = 0;
|
skiprequest = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
if (totalclock >= nextclock)
|
if (currentclock >= nextclock)
|
||||||
{
|
{
|
||||||
skiprequest |= !Phase3();
|
skiprequest |= !Phase3();
|
||||||
nextclock += 4;
|
nextclock += 4;
|
||||||
}
|
}
|
||||||
if (skiprequest || totalclock >= 240)
|
if (skiprequest || currentclock >= 240)
|
||||||
{
|
{
|
||||||
// Go to the next text page.
|
// Go to the next text page.
|
||||||
if (screencnt != 2)
|
if (screencnt != 2)
|
||||||
{
|
{
|
||||||
screencnt++;
|
screencnt++;
|
||||||
nextclock = totalclock + 240;
|
nextclock = currentclock + 240;
|
||||||
skiprequest = 0;
|
skiprequest = 0;
|
||||||
phase = 1;
|
phase = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue