void seq_StartNextFullScreenVideo(void) { bool bPlayedOK; currentPlaySeq++; if (currentPlaySeq >= MAX_SEQ_LIST) { bPlayedOK = false; } else { bPlayedOK = seq_StartFullScreenVideo(aSeqList[currentPlaySeq].pSeq, aSeqList[currentPlaySeq].pAudio, VIDEO_USER_CHOSEN_RESOLUTION); } if (bPlayedOK == false) { //don't do the callback if we're playing the win/lose video if (!getScriptWinLoseVideo()) { debug(LOG_SCRIPT, "*** Called video quit trigger!"); // Not sure this is correct... CHECK, since the callback should ONLY // be called when a video is playing (always?) if (seq_Playing()) { eventFireCallbackTrigger((TRIGGER_TYPE)CALL_VIDEO_QUIT); } } else { displayGameOver(getScriptWinLoseVideo() == PLAY_WIN); } } }
/* The video playback loop */ void videoLoop() { bool videoFinished; ASSERT(videoMode == 1, "videoMode out of sync"); // display a frame of the FMV videoFinished = !seq_UpdateFullScreenVideo(nullptr); pie_ScreenFlip(CLEAR_BLACK); // should we stop playing? if (videoFinished || keyPressed(KEY_ESC) || mouseReleased(MOUSE_LMB)) { seq_StopFullScreenVideo(); //set the next video off - if any if (videoFinished && seq_AnySeqLeft()) { seq_StartNextFullScreenVideo(); } else { // remove the intelligence screen if necessary if (messageIsImmediate()) { intResetScreen(true); setMessageImmediate(false); } //don't do the callback if we're playing the win/lose video if (!getScriptWinLoseVideo()) { eventFireCallbackTrigger((TRIGGER_TYPE)CALL_VIDEO_QUIT); } else if (!bMultiPlayer) { displayGameOver(getScriptWinLoseVideo() == PLAY_WIN, false); } triggerEvent(TRIGGER_VIDEO_QUIT); } } }