mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Switch fadepal() and fadepaltile() over to using I_CheckAllInput()/I_ClearAllInput() instead of checking for the spacebar exclusively
git-svn-id: https://svn.eduke32.com/eduke32@7855 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a0231cf90c
commit
e65fb8ab2a
1 changed files with 7 additions and 9 deletions
|
@ -1405,6 +1405,7 @@ void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_
|
||||||
{
|
{
|
||||||
if (ud.screenfade == 0)
|
if (ud.screenfade == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (videoGetRenderMode() >= REND_POLYMOST)
|
if (videoGetRenderMode() >= REND_POLYMOST)
|
||||||
{
|
{
|
||||||
G_FadePalette(r, g, b, end);
|
G_FadePalette(r, g, b, end);
|
||||||
|
@ -1414,15 +1415,14 @@ void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_
|
||||||
// (end-start)/step + 1 iterations
|
// (end-start)/step + 1 iterations
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (KB_KeyPressed(sc_Space))
|
if (I_CheckAllInput())
|
||||||
{
|
{
|
||||||
KB_ClearKeyDown(sc_Space);
|
I_ClearAllInput();
|
||||||
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_FadePalette(r, g, b, start);
|
G_FadePalette(r, g, b, start);
|
||||||
|
|
||||||
start += step;
|
start += step;
|
||||||
} while (start != end+step);
|
} while (start != end+step);
|
||||||
}
|
}
|
||||||
|
@ -1432,6 +1432,7 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
|
||||||
{
|
{
|
||||||
if (ud.screenfade == 0)
|
if (ud.screenfade == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// STEP must evenly divide END-START
|
// STEP must evenly divide END-START
|
||||||
Bassert(klabs(end-start)%step == 0);
|
Bassert(klabs(end-start)%step == 0);
|
||||||
|
|
||||||
|
@ -1440,18 +1441,15 @@ static void fadepaltile(int32_t r, int32_t g, int32_t b, int32_t start, int32_t
|
||||||
// (end-start)/step + 1 iterations
|
// (end-start)/step + 1 iterations
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
#ifdef __ANDROID__ //Needed for N7 2013 to stop corruption while fading video
|
if (I_CheckAllInput())
|
||||||
videoClearViewableArea(0);
|
|
||||||
#endif
|
|
||||||
if (KB_KeyPressed(sc_Space))
|
|
||||||
{
|
{
|
||||||
KB_ClearKeyDown(sc_Space);
|
I_ClearAllInput();
|
||||||
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
videoFadePalette(r, g, b, end); // have to set to end fade value if we break!
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, tile, 0, 0, 2+8+64+BGSTRETCH);
|
rotatesprite_fs(160<<16, 100<<16, 65536L, 0, tile, 0, 0, 2+8+64+BGSTRETCH);
|
||||||
G_FadePalette(r, g, b, start);
|
G_FadePalette(r, g, b, start);
|
||||||
|
|
||||||
start += step;
|
start += step;
|
||||||
} while (start != end+step);
|
} while (start != end+step);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue