mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
Add I_GeneralTrigger as a combination of Advance and Return and use it for skipping screens so that Esc works.
git-svn-id: https://svn.eduke32.com/eduke32@7894 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c80b01cfda
commit
29d4a7e634
4 changed files with 30 additions and 16 deletions
|
@ -395,7 +395,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
{
|
{
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_AdvanceTrigger()))
|
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_GeneralTrigger()))
|
||||||
{
|
{
|
||||||
running = 0;
|
running = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -500,7 +500,7 @@ int32_t Anim_Play(const char *fn)
|
||||||
tileSetSize(TILE_ANIM, 200, 320);
|
tileSetSize(TILE_ANIM, 200, 320);
|
||||||
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
tileInvalidate(TILE_ANIM, 0, 1 << 4); // JBF 20031228
|
||||||
|
|
||||||
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_AdvanceTrigger()))
|
if (VM_OnEventWithReturn(EVENT_SKIPCUTSCENE, g_player[screenpeek].ps->i, screenpeek, I_GeneralTrigger()))
|
||||||
{
|
{
|
||||||
running = 0;
|
running = 0;
|
||||||
goto end_anim_restore_gl;
|
goto end_anim_restore_gl;
|
||||||
|
|
|
@ -114,6 +114,17 @@ void I_ReturnTriggerClear(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t I_GeneralTrigger(void)
|
||||||
|
{
|
||||||
|
return I_AdvanceTrigger() || I_ReturnTrigger();
|
||||||
|
}
|
||||||
|
|
||||||
|
void I_GeneralTriggerClear(void)
|
||||||
|
{
|
||||||
|
I_AdvanceTriggerClear();
|
||||||
|
I_ReturnTriggerClear();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t I_EscapeTrigger(void)
|
int32_t I_EscapeTrigger(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,12 +28,15 @@ extern void I_ClearAllInput(void);
|
||||||
|
|
||||||
// Advance = Selecting a menu option || Saying "Yes" || Going forward in Help/Credits
|
// Advance = Selecting a menu option || Saying "Yes" || Going forward in Help/Credits
|
||||||
// Return = Closing a sub-menu || Saying "No"
|
// Return = Closing a sub-menu || Saying "No"
|
||||||
|
// General = Advance + Return = Skipping screens
|
||||||
// Escape = Opening the menu in-game (should not be any gamefuncs)
|
// Escape = Opening the menu in-game (should not be any gamefuncs)
|
||||||
|
|
||||||
extern int32_t I_AdvanceTrigger(void);
|
extern int32_t I_AdvanceTrigger(void);
|
||||||
extern void I_AdvanceTriggerClear(void);
|
extern void I_AdvanceTriggerClear(void);
|
||||||
extern int32_t I_ReturnTrigger(void);
|
extern int32_t I_ReturnTrigger(void);
|
||||||
extern void I_ReturnTriggerClear(void);
|
extern void I_ReturnTriggerClear(void);
|
||||||
|
extern int32_t I_GeneralTrigger(void);
|
||||||
|
extern void I_GeneralTriggerClear(void);
|
||||||
extern int32_t I_EscapeTrigger(void);
|
extern int32_t I_EscapeTrigger(void);
|
||||||
extern void I_EscapeTriggerClear(void);
|
extern void I_EscapeTriggerClear(void);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ static void G_HandleEventsWhileNoInput(void)
|
||||||
{
|
{
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
|
|
||||||
while (!I_AdvanceTrigger())
|
while (!I_GeneralTrigger())
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
|
@ -67,7 +67,7 @@ static int32_t G_PlaySoundWhileNoInput(int32_t soundnum)
|
||||||
while (S_CheckSoundPlaying(soundnum))
|
while (S_CheckSoundPlaying(soundnum))
|
||||||
{
|
{
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
if (I_AdvanceTrigger())
|
if (I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -1415,7 +1415,7 @@ 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 (I_AdvanceTrigger())
|
if (I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
I_ClearAllInput();
|
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!
|
||||||
|
@ -1441,7 +1441,7 @@ 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
|
||||||
{
|
{
|
||||||
if (I_AdvanceTrigger())
|
if (I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
I_ClearAllInput();
|
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!
|
||||||
|
@ -1476,7 +1476,7 @@ void gameDisplayTENScreen()
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, TENSCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, TENSCREEN, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||||
fadepaltile(0, 0, 0, 252, 0, -28, TENSCREEN);
|
fadepaltile(0, 0, 0, 252, 0, -28, TENSCREEN);
|
||||||
while (!I_AdvanceTrigger() && totalclock < 2400)
|
while (!I_GeneralTrigger() && totalclock < 2400)
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
fadepaltile(0, 0, 0, 0, 252, 28, TENSCREEN);
|
||||||
|
@ -1499,14 +1499,14 @@ void gameDisplaySharewareScreens()
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3291, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3291, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||||
fadepaltile(0, 0, 0, 252, 0, -28, 3291);
|
fadepaltile(0, 0, 0, 252, 0, -28, 3291);
|
||||||
while (!I_AdvanceTrigger())
|
while (!I_GeneralTrigger())
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
fadepaltile(0, 0, 0, 0, 252, 28, 3291);
|
fadepaltile(0, 0, 0, 0, 252, 28, 3291);
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3290, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
rotatesprite_fs(160 << 16, 100 << 16, 65536L, 0, 3290, 0, 0, 2 + 8 + 64 + BGSTRETCH);
|
||||||
fadepaltile(0, 0, 0, 252, 0, -28, 3290);
|
fadepaltile(0, 0, 0, 252, 0, -28, 3290);
|
||||||
while (!I_AdvanceTrigger())
|
while (!I_GeneralTrigger())
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
|
@ -1528,7 +1528,7 @@ void G_DisplayExtraScreens(void)
|
||||||
|
|
||||||
void gameDisplay3DRScreen()
|
void gameDisplay3DRScreen()
|
||||||
{
|
{
|
||||||
if (!I_CheckAllInput() && g_noLogoAnim == 0)
|
if (!I_GeneralTrigger() && g_noLogoAnim == 0)
|
||||||
{
|
{
|
||||||
buildvfs_kfd i;
|
buildvfs_kfd i;
|
||||||
Net_GetPackets();
|
Net_GetPackets();
|
||||||
|
@ -1557,7 +1557,7 @@ void gameDisplay3DRScreen()
|
||||||
fadepaltile(0, 0, 0, 252, 0, -28, DREALMS);
|
fadepaltile(0, 0, 0, 252, 0, -28, DREALMS);
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
|
|
||||||
while (totalclock < (120 * 7) && !I_CheckAllInput())
|
while (totalclock < (120 * 7) && !I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
if (G_FPSLimit())
|
if (G_FPSLimit())
|
||||||
{
|
{
|
||||||
|
@ -1598,7 +1598,7 @@ void gameDisplayTitleScreen(void)
|
||||||
#ifndef EDUKE32_SIMPLE_MENU
|
#ifndef EDUKE32_SIMPLE_MENU
|
||||||
totalclock < (860 + 120) &&
|
totalclock < (860 + 120) &&
|
||||||
#endif
|
#endif
|
||||||
!I_AdvanceTrigger())
|
!I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
if (G_FPSLimit())
|
if (G_FPSLimit())
|
||||||
{
|
{
|
||||||
|
@ -1719,7 +1719,7 @@ void G_DisplayLogo(void)
|
||||||
#endif
|
#endif
|
||||||
(logoflags & LOGO_PLAYANIM))
|
(logoflags & LOGO_PLAYANIM))
|
||||||
{
|
{
|
||||||
if (!I_AdvanceTrigger() && g_noLogoAnim == 0)
|
if (!I_GeneralTrigger() && g_noLogoAnim == 0)
|
||||||
{
|
{
|
||||||
Net_GetPackets();
|
Net_GetPackets();
|
||||||
Anim_Play("logo.anm");
|
Anim_Play("logo.anm");
|
||||||
|
@ -1889,7 +1889,7 @@ static void G_BonusCutscenes(void)
|
||||||
|
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
if (I_AdvanceTrigger()) break;
|
if (I_GeneralTrigger()) break;
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
fadepal(0, 0, 0, 0, 252, 4);
|
fadepal(0, 0, 0, 0, 252, 4);
|
||||||
|
@ -2057,7 +2057,7 @@ static void G_BonusCutscenes(void)
|
||||||
|
|
||||||
Anim_Play("RADLOGO.ANM");
|
Anim_Play("RADLOGO.ANM");
|
||||||
|
|
||||||
if (ud.lockout == 0 && !I_AdvanceTrigger())
|
if (ud.lockout == 0 && !I_GeneralTrigger())
|
||||||
{
|
{
|
||||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND5)) goto ENDANM;
|
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND5)) goto ENDANM;
|
||||||
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND6)) goto ENDANM;
|
if (G_PlaySoundWhileNoInput(ENDSEQVOL3SND6)) goto ENDANM;
|
||||||
|
@ -2071,7 +2071,7 @@ static void G_BonusCutscenes(void)
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
if (PLUTOPAK || (G_GetLogoFlags() & LOGO_NODUKETEAMPIC))
|
if (PLUTOPAK || (G_GetLogoFlags() & LOGO_NODUKETEAMPIC))
|
||||||
{
|
{
|
||||||
while (totalclock < 120 && !I_AdvanceTrigger())
|
while (totalclock < 120 && !I_GeneralTrigger())
|
||||||
G_HandleAsync();
|
G_HandleAsync();
|
||||||
|
|
||||||
I_ClearAllInput();
|
I_ClearAllInput();
|
||||||
|
|
Loading…
Reference in a new issue