mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-02 14:40:40 +00:00
- revert some inline if statement conversions when re-creating dobonus()
as a ScreenJob.
* Inline if statements were applying `DrawTexture()` calls to cases where they were not being called before, affecting animation. * Repaired issue where with high frame rates, the code behind `if (totalclock > (1000000000L) && totalclock < (1000000320L))` wasn't triggered because `totalclock` hadn't become `1000000001` yet. * Fixes #34.
This commit is contained in:
parent
4836744d26
commit
31b7e7fa3d
1 changed files with 28 additions and 17 deletions
|
@ -905,30 +905,41 @@ public:
|
||||||
PrintSecrets(totalclock);
|
PrintSecrets(totalclock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (totalclock > (1000000000L) && totalclock < (1000000320L))
|
if (totalclock >= (1000000000L) && totalclock < (1000000320L))
|
||||||
{
|
{
|
||||||
int val = (totalclock >> 4) % 15;
|
switch ((totalclock >> 4) % 15)
|
||||||
if (val == 0)
|
|
||||||
{
|
{
|
||||||
if (bonuscnt == 6)
|
case 0:
|
||||||
{
|
if (bonuscnt == 6)
|
||||||
bonuscnt++;
|
{
|
||||||
S_PlaySound(SHOTGUN_COCK, CHAN_AUTO, CHANF_UI);
|
bonuscnt++;
|
||||||
S_PlaySound(BONUS_SPEECH1 + (rand() & 3), CHAN_AUTO, CHANF_UI);
|
S_PlaySound(SHOTGUN_COCK, CHAN_AUTO, CHANF_UI);
|
||||||
}
|
S_PlaySound(BONUS_SPEECH1 + (rand() & 3), CHAN_AUTO, CHANF_UI);
|
||||||
}
|
}
|
||||||
//else
|
case 1:
|
||||||
{
|
case 4:
|
||||||
int tile = val == 2 || val == 3 ? gfx_offset + 4 : gfx_offset + 3;
|
case 5:
|
||||||
DrawTexture(twod, tileGetTexture(tile), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
DrawTexture(twod, tileGetTexture(gfx_offset + 3), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
DrawTexture(twod, tileGetTexture(gfx_offset + 4), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (totalclock > (10240 + 120L)) return 0;
|
else if (totalclock > (10240 + 120L)) return 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int val = (totalclock >> 5) & 3;
|
switch((totalclock >> 5) & 3)
|
||||||
int tile = val == 2 ? gfx_offset + 2 : gfx_offset + 1;
|
{
|
||||||
DrawTexture(twod, tileGetTexture(tile), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
case 1:
|
||||||
|
case 3:
|
||||||
|
DrawTexture(twod, tileGetTexture(gfx_offset + 1), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
DrawTexture(twod, tileGetTexture(gfx_offset + 2), 199, 31, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200, DTA_TopLeft, true, TAG_DONE);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (totalclock > 10240 && totalclock < 10240 + 10240)
|
if (totalclock > 10240 && totalclock < 10240 + 10240)
|
||||||
|
|
Loading…
Reference in a new issue