mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
MOHAWK: RIVEN: Fix the credits not showing in the Polish version
Fixes Trac#10589
This commit is contained in:
parent
8ec93852ad
commit
cf52951915
@ -206,16 +206,16 @@ void RivenStack::runDemoBoundaryDialog() {
|
||||
dialog.runModal();
|
||||
}
|
||||
|
||||
void RivenStack::runEndGame(uint16 videoCode, uint32 delay) {
|
||||
void RivenStack::runEndGame(uint16 videoCode, uint32 delay, uint32 videoFrameCountOverride) {
|
||||
_vm->_sound->stopAllSLST();
|
||||
RivenVideo *video = _vm->_video->openSlot(videoCode);
|
||||
video->enable();
|
||||
video->play();
|
||||
video->setLooping(false);
|
||||
runCredits(videoCode, delay);
|
||||
runCredits(videoCode, delay, videoFrameCountOverride);
|
||||
}
|
||||
|
||||
void RivenStack::runCredits(uint16 video, uint32 delay) {
|
||||
void RivenStack::runCredits(uint16 video, uint32 delay, uint32 videoFrameCountOverride) {
|
||||
// Initialize our credits state
|
||||
_vm->_cursor->hideCursor();
|
||||
_vm->_gfx->beginCredits();
|
||||
@ -223,9 +223,24 @@ void RivenStack::runCredits(uint16 video, uint32 delay) {
|
||||
|
||||
RivenVideo *videoPtr = _vm->_video->getSlot(video);
|
||||
|
||||
int32 frameCount;
|
||||
if (_vm->getLanguage() == Common::PL_POL && videoFrameCountOverride != 0) {
|
||||
// In the Polish version, the ending videos are not encoded the same way
|
||||
// as with the other languages. In the other versions, the video track
|
||||
// ends after a while, but the audio track keeps going while the credits
|
||||
// are shown.
|
||||
// In the Polish version, the video track keeps going until the end
|
||||
// of the file, but contains only white frames. This workaround stops
|
||||
// displaying the video track just before the first white frame.
|
||||
frameCount = videoFrameCountOverride;
|
||||
} else {
|
||||
frameCount = videoPtr->getFrameCount();
|
||||
}
|
||||
|
||||
while (!_vm->hasGameEnded() && _vm->_gfx->getCurCreditsImage() <= 320) {
|
||||
if (videoPtr->getCurFrame() >= (int32)videoPtr->getFrameCount() - 1) {
|
||||
if (videoPtr->getCurFrame() >= frameCount - 1) {
|
||||
if (nextCreditsFrameStart == 0) {
|
||||
videoPtr->disable();
|
||||
// Set us up to start after delay ms
|
||||
nextCreditsFrameStart = _vm->getTotalPlayTime() + delay;
|
||||
} else if (_vm->getTotalPlayTime() >= nextCreditsFrameStart) {
|
||||
|
@ -192,8 +192,8 @@ public:
|
||||
// Miscellaneous
|
||||
uint16 getComboDigit(uint32 correctCombo, uint32 digit);
|
||||
void runDemoBoundaryDialog();
|
||||
void runEndGame(uint16 videoCode, uint32 delay);
|
||||
void runCredits(uint16 video, uint32 delay);
|
||||
void runEndGame(uint16 videoCode, uint32 delay, uint32 videoFrameCountOverride);
|
||||
void runCredits(uint16 video, uint32 delay, uint32 videoFrameCountOverride);
|
||||
|
||||
void pageTurn(RivenTransition transition);
|
||||
bool keepTurningPages();
|
||||
|
@ -60,11 +60,11 @@ void OSpit::xorollcredittime(const ArgumentArray &args) {
|
||||
uint32 gehnState = _vm->_vars["agehn"];
|
||||
|
||||
if (gehnState == 0) // Gehn who?
|
||||
runEndGame(1, 9500);
|
||||
runEndGame(1, 9500, 1225);
|
||||
else if (gehnState == 4) // You freed him? Are you kidding me?
|
||||
runEndGame(2, 12000);
|
||||
runEndGame(2, 12000, 558);
|
||||
else // You already spoke with Gehn. What were you thinking?
|
||||
runEndGame(3, 8000);
|
||||
runEndGame(3, 8000, 857);
|
||||
}
|
||||
|
||||
void OSpit::xbookclick(const ArgumentArray &args) {
|
||||
@ -143,7 +143,7 @@ void OSpit::xbookclick(const ArgumentArray &args) {
|
||||
// Run the credits from here.
|
||||
if (_vm->_vars["agehn"] == 3) {
|
||||
_vm->_scriptMan->stopAllScripts();
|
||||
runCredits(args[0], 5000);
|
||||
runCredits(args[0], 5000, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,12 @@ void RSpit::xrcredittime(const ArgumentArray &args) {
|
||||
// For the record, when agehn == 4, Gehn will thank you for
|
||||
// showing him the rebel age and then leave you to die.
|
||||
// Otherwise, the rebels burn the book. Epic fail either way.
|
||||
runEndGame(1, 1500);
|
||||
|
||||
if (_vm->_vars["agehn"] == 4) {
|
||||
runEndGame(1, 1500, 712);
|
||||
} else {
|
||||
runEndGame(1, 1500, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void RSpit::xrshowinventory(const ArgumentArray &args) {
|
||||
|
@ -141,25 +141,25 @@ void TSpit::xtopenfissure() {
|
||||
// The best ending: Catherine is free, Gehn is trapped, Atrus comes to rescue you.
|
||||
// And now we fall back to Earth... all the way...
|
||||
_vm->getCard()->playMovie(8);
|
||||
runEndGame(8, 5000);
|
||||
runEndGame(8, 5000, 2640);
|
||||
} else if (_vm->_vars["agehn"] == 4) {
|
||||
// The ok ending: Catherine is still trapped, Gehn is trapped, Atrus comes to rescue you.
|
||||
// Nice going! Catherine and the islanders are all dead now! Just go back to your home...
|
||||
_vm->getCard()->playMovie(9);
|
||||
runEndGame(9, 5000);
|
||||
runEndGame(9, 5000, 2088);
|
||||
} else if (_vm->_vars["atrapbook"] == 1) {
|
||||
// The bad ending: Catherine is trapped, Gehn is free, Atrus gets shot by Gehn,
|
||||
// And then you get shot by Cho. Nice going! Catherine and the islanders are dead
|
||||
// and you have just set Gehn free from Riven, not to mention you're dead.
|
||||
_vm->getCard()->playMovie(10);
|
||||
runEndGame(10, 5000);
|
||||
runEndGame(10, 5000, 1703);
|
||||
} else {
|
||||
// The impossible ending: You don't have Catherine's journal and yet you were somehow
|
||||
// able to open the hatch on the telescope. The game provides an ending for those who
|
||||
// cheat, load a saved game with the combo, or just guess the telescope combo. Atrus
|
||||
// doesn't come and you just fall into the fissure.
|
||||
_vm->getCard()->playMovie(11);
|
||||
runEndGame(11, 5000);
|
||||
runEndGame(11, 5000, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user