mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Allow the episode 4 cutscenes to be skipped in their entirety with one keypress, as in the original DOS game, instead of requiring input for each ANM file.
git-svn-id: https://svn.eduke32.com/eduke32@4243 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9e968b0093
commit
1014af812f
4 changed files with 32 additions and 11 deletions
|
@ -207,7 +207,7 @@ static void endanimvol43(int32_t fr)
|
|||
}
|
||||
}
|
||||
|
||||
void G_PlayAnim(const char *fn, char t)
|
||||
int32_t G_PlayAnim(const char *fn, char t)
|
||||
{
|
||||
uint8_t *animbuf;
|
||||
int32_t i, length=0, numframes=0;
|
||||
|
@ -216,6 +216,7 @@ void G_PlayAnim(const char *fn, char t)
|
|||
#endif
|
||||
int32_t handle=-1;
|
||||
int32_t frametime = 0;
|
||||
int32_t running = 1;
|
||||
|
||||
// t parameter:
|
||||
//
|
||||
|
@ -237,6 +238,7 @@ void G_PlayAnim(const char *fn, char t)
|
|||
if (I_CheckAllInput())
|
||||
{
|
||||
FX_StopAllSounds();
|
||||
running = 0;
|
||||
goto end_anim;
|
||||
}
|
||||
|
||||
|
@ -249,7 +251,6 @@ void G_PlayAnim(const char *fn, char t)
|
|||
animvpx_codec_ctx codec;
|
||||
uint8_t *pic;
|
||||
uint32_t msecsperframe, nextframetime;
|
||||
int32_t running = 1;
|
||||
int32_t animidx, framenum=0, soundidx=0, numtotalsounds=0; // custom anim sounds
|
||||
|
||||
Bstrncpyz(vpxfn, fn, BMAX_PATH);
|
||||
|
@ -273,7 +274,7 @@ void G_PlayAnim(const char *fn, char t)
|
|||
OSD_Printf("Failed reading IVF file: %s\n",
|
||||
animvpx_read_ivf_header_errmsg[i]);
|
||||
kclose(handle);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
animvpx_setup_glstate();
|
||||
|
@ -281,7 +282,7 @@ void G_PlayAnim(const char *fn, char t)
|
|||
{
|
||||
OSD_Printf("Error initializing VPX codec.\n");
|
||||
animvpx_restore_glstate();
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
animidx = t-1;
|
||||
|
@ -352,14 +353,14 @@ void G_PlayAnim(const char *fn, char t)
|
|||
animvpx_uninit_codec(&codec);
|
||||
|
||||
I_ClearAllInput();
|
||||
return; // done with playing VP8!
|
||||
return !running; // done with playing VP8!
|
||||
}
|
||||
#endif
|
||||
// ANM playback --- v v v ---
|
||||
|
||||
handle = kopen4load(fn, 0);
|
||||
if (handle == -1)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
length = kfilelength(handle);
|
||||
if (length == 0)
|
||||
|
@ -421,7 +422,10 @@ void G_PlayAnim(const char *fn, char t)
|
|||
G_HandleAsync();
|
||||
|
||||
if (I_CheckAllInput())
|
||||
{
|
||||
running = 0;
|
||||
goto end_anim_restore_gl;
|
||||
}
|
||||
|
||||
if (g_restorePalette == 1)
|
||||
{
|
||||
|
@ -464,4 +468,6 @@ end_anim:
|
|||
I_ClearAllInput();
|
||||
ANIM_FreeAnim();
|
||||
walock[TILE_ANIM] = 1;
|
||||
|
||||
return !running;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
extern uint16_t anim_hi_numsounds[NUM_HARDCODED_ANIMS], *anim_hi_sounds[NUM_HARDCODED_ANIMS];
|
||||
# endif
|
||||
|
||||
void G_PlayAnim(const char *fn,char t);
|
||||
int32_t G_PlayAnim(const char *fn,char t);
|
||||
/*
|
||||
void endanimvol43(int32_t fr);
|
||||
void endanimvol42(int32_t fr);
|
||||
|
|
|
@ -12300,17 +12300,24 @@ static void G_BonusCutscenes(void)
|
|||
if (ud.lockout == 0)
|
||||
{
|
||||
I_ClearInputWaiting();
|
||||
G_PlayAnim("vol4e1.anm",8);
|
||||
t = G_PlayAnim("vol4e1.anm",8);
|
||||
clearallviews(0L);
|
||||
nextpage();
|
||||
G_PlayAnim("vol4e2.anm",10);
|
||||
if (t)
|
||||
goto end_vol4e;
|
||||
|
||||
t = G_PlayAnim("vol4e2.anm",10);
|
||||
clearallviews(0L);
|
||||
nextpage();
|
||||
if (t)
|
||||
goto end_vol4e;
|
||||
|
||||
G_PlayAnim("vol4e3.anm",11);
|
||||
clearallviews(0L);
|
||||
nextpage();
|
||||
}
|
||||
|
||||
end_vol4e:
|
||||
FX_StopAllSounds();
|
||||
S_ClearSoundLocks();
|
||||
S_PlaySound(ENDSEQVOL3SND4);
|
||||
|
|
|
@ -1390,15 +1390,23 @@ void G_NewGame(int32_t vn, int32_t ln, int32_t sk)
|
|||
clearview(0L);
|
||||
nextpage();
|
||||
|
||||
G_PlayAnim("vol41a.anm",6);
|
||||
i = G_PlayAnim("vol41a.anm",6);
|
||||
clearview(0L);
|
||||
nextpage();
|
||||
if (i)
|
||||
goto end_vol4a;
|
||||
|
||||
i = G_PlayAnim("vol42a.anm",7);
|
||||
clearview(0L);
|
||||
nextpage();
|
||||
if (i)
|
||||
goto end_vol4a;
|
||||
|
||||
G_PlayAnim("vol42a.anm",7);
|
||||
G_PlayAnim("vol43a.anm",9);
|
||||
clearview(0L);
|
||||
nextpage();
|
||||
|
||||
end_vol4a:
|
||||
FX_StopAllSounds();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue