From c0ca592d54813eab02deb3fbb6303f1db4559a3e Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Sat, 31 Mar 2007 18:20:52 +0000 Subject: fixed graphic glitch when playing the floppy intro with spanish subtitles and added a few comments. svn-id: r26333 --- engines/sky/compact.cpp | 8 +- engines/sky/intro.cpp | 180 ++++++++++++++++++++-------------------- engines/sky/logic.cpp | 2 +- engines/sky/music/gmchannel.cpp | 1 - engines/sky/screen.cpp | 4 +- 5 files changed, 102 insertions(+), 93 deletions(-) (limited to 'engines') diff --git a/engines/sky/compact.cpp b/engines/sky/compact.cpp index 9db5808fa1..c431e1b37f 100644 --- a/engines/sky/compact.cpp +++ b/engines/sky/compact.cpp @@ -272,8 +272,12 @@ Compact *SkyCompact::fetchCptInfo(uint16 cptId, uint16 *elems, uint16 *type, cha *elems = _cptSizes[cptId >> 12][cptId & 0xFFF]; if (type) *type = _cptTypes[cptId >> 12][cptId & 0xFFF]; - if (name) - strcpy(name, _cptNames[cptId >> 12][cptId & 0xFFF]); + if (name) { + if (_cptNames[cptId >> 12][cptId & 0xFFF] != NULL) + strcpy(name, _cptNames[cptId >> 12][cptId & 0xFFF]); + else + strcpy(name, "(null)"); + } return fetchCpt(cptId); } diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp index 2ac05d2555..42e0e92f5a 100644 --- a/engines/sky/intro.cpp +++ b/engines/sky/intro.cpp @@ -256,76 +256,79 @@ uint16 Intro::_mainIntroSeq[] = { }; uint16 Intro::_cdIntroSeq[] = { - PLAYVOICE, 59500, - LOADBG, 59499, + /* black screen */ + PLAYVOICE, CDV_00, // Foster: "The old man was trying to tell the future. Looking for pictures in the campfire..." + LOADBG, 59499, // Fire crackle LOOPBG, WAITVOICE, - PLAYVOICE, 59504, + PLAYVOICE, CDV_01, // Shaman: "ohhh, I see evil..." + /* Fade up shaman image while he says his line... */ SHOWSCREEN, CD_1_LOG, FADEUP, CD_PAL, + /* And then play the animation showing the shadows of the fire on his face */ BGFLIRT, CD_1, WAITVOICE, - PLAYVOICE, CDV_02, + PLAYVOICE, CDV_02, // Shaman: "Evil born deep beneath the city... far from the light of day." WAITVOICE, STOPFLIRT, BGFLIRT, CD_2, - PLAYVOICE, CDV_03, + PLAYVOICE, CDV_03, // Shaman: "I see it growing, safe beneath a sky of steel..." WAITVOICE, - PLAYVOICE, CDV_04, + PLAYVOICE, CDV_04, // Shaman: "Scheming in the dark... gathering strength." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_05, + PLAYVOICE, CDV_05, // Shaman: "And now... ohhh.... now the evil spreads..." DELAY, 2000, BGFLIRT, CD_3, WAITVOICE, - PLAYVOICE, CDV_06, + PLAYVOICE, CDV_06, // Shaman: "It sends deadly feelers over the land above..." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_07, + PLAYVOICE, CDV_07, // Shaman: "Across the gap... reaching towards this very place!" BGFLIRT, CD_5, WAITVOICE, - PLAYVOICE, CDV_08, + PLAYVOICE, CDV_08, // Foster: "I'd seen him do this a hundred times, but I humoured him." WAITVOICE, - PLAYVOICE, CDV_09, + PLAYVOICE, CDV_09, // Foster: "After all, he'd been like a father to me." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_10, + PLAYVOICE, CDV_10, // Foster: "And what does this evil want here?" BGFLIRT, CD_7, WAITVOICE, - PLAYVOICE, CDV_11, + PLAYVOICE, CDV_11, // Shaman: "Oh, my son. I fear..." WAITFLIRT, FADEDOWN, SHOWSCREEN, CD_11_LOG, FADEUP, CD_11_PAL, WAITVOICE, - PLAYVOICE, CDV_12, + PLAYVOICE, CDV_12, // Shaman: "I fear the evil wants you!" DELAY, 1600, BGFLIRT, CD_11, WAITVOICE, - PLAYVOICE, CDV_13, + PLAYVOICE, CDV_13, // Foster: "That was when Joey piped up..." WAITVOICE, WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_14, - LOADBG, 59498, // fade-in heli + PLAYVOICE, CDV_14, // Joey: "Foster! Sensors detect incoming audio source!" + LOADBG, 59498, // fire crackle to heli start PLAYBG, DOFLIRT, CD_13, WAITVOICE, - PLAYVOICE, CDV_15, + PLAYVOICE, CDV_15, // Shaman: "The evil! The evil is nearly here...!" FADEDOWN, SHOWSCREEN, CD_15_LOG, FADEUP, CD_15_PAL, WAITVOICE, LOADBG, 59496, // quiet heli LOOPBG, - PLAYVOICE, CDV_16, + PLAYVOICE, CDV_16, // Foster: "It sounded more like a 'copter than a demon." WAITVOICE, - PLAYVOICE, CDV_17, + PLAYVOICE, CDV_17, // Foster: "But next thing, all hell let loose anyway..." DELAY, 2000, SHOWSCREEN, CD_17_LOG, WAITVOICE, BGFLIRT, CD_17, - PLAYVOICE, CDV_18, + PLAYVOICE, CDV_18, // Shaman: "Run, Foster! Run! Hide from the evil!" LOADBG, 59497, // loud heli LOOPBG, WAITFLIRT, @@ -333,225 +336,226 @@ uint16 Intro::_cdIntroSeq[] = { FADEDOWN, SHOWSCREEN, CD_19_LOG, FADEUP, CD_19_PAL, - PLAYVOICE, CDV_19, + PLAYVOICE, CDV_19, // Joey: "Foster! (zzzt) H-Help!" WAITVOICE, - PLAYVOICE, CDV_20, + PLAYVOICE, CDV_20, // Joey: "Better make my next body move faster, Foster..." FADEDOWN, SHOWSCREEN, CD_20_LOG, FADEUP, CD_19_PAL, WAITVOICE, LOADBG, 59496, // quiet heli LOOPBG, - PLAYVOICE, CDV_21, + PLAYVOICE, CDV_21, // Foster: "He was only a robot, but, well, I loved the little guy." FADEDOWN, SHOWSCREEN, CD_21_LOG, FADEUP, CD_19_PAL, WAITVOICE, - PLAYVOICE, CDV_22, + PLAYVOICE, CDV_22, // Foster: "Then, as suddenly as it started, the shooting stopped." LOADBG, 59494, // heli whine PLAYBG, WAITVOICE, - PLAYVOICE, CDV_23, + PLAYVOICE, CDV_23, // Foster: "There was a moment's silence as the copter cut its rotors, then..." + /* fade down while Foster's saying his line */ FADEDOWN, WAITVOICE, SHOWSCREEN, CD_24_LOG, FADEUP, CD_23_PAL, - PLAYVOICE, CDV_24, + PLAYVOICE, CDV_24, // Reich: "Whoever is in charge here, come forward..." WAITVOICE, - PLAYVOICE, CDV_25, + PLAYVOICE, CDV_25, // Reich: "Now!!" WAITVOICE, - PLAYVOICE, CDV_26, + PLAYVOICE, CDV_26, // Foster: "Only a fool would have argued with that firepower." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_27_LOG, FADEUP, CD_27_PAL, - PLAYVOICE, CDV_27, + PLAYVOICE, CDV_27, // Shaman: "... I am the leader of these people... We are peaceful..." WAITVOICE, - PLAYVOICE, CDV_29, + PLAYVOICE, CDV_29, // Reich: "Bring him here." WAITVOICE, - PLAYVOICE, CDV_30, + PLAYVOICE, CDV_30, // Guard: "At once, Commander Reich." WAITVOICE, BGFLIRT, CD_27, - PLAYVOICE, CDV_31, + PLAYVOICE, CDV_31, // Reich: "We're looking for someone..." WAITVOICE, - PLAYVOICE, CDV_32, + PLAYVOICE, CDV_32, // Reich: "Someone who doesn't belong here..." WAITVOICE, - PLAYVOICE, CDV_33, + PLAYVOICE, CDV_33, // Reich: "Who wasn't born in this garbage dump..." WAITVOICE, - PLAYVOICE, CDV_34, + PLAYVOICE, CDV_34, // Reich: "Who came from the city as a child..." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_35, + PLAYVOICE, CDV_35, // Reich: "We want to take him home again." WAITVOICE, - PLAYVOICE, CDV_36, + PLAYVOICE, CDV_36, // Foster: "My mind racing, I remembered where I'd seen that symbol before..." FADEDOWN, SHOWSCREEN, CD_35_LOG, FADEUP, CD_35_PAL, WAITVOICE, - PLAYVOICE, CDV_37, + PLAYVOICE, CDV_37, // Foster: "It was the day the tribe found me..." DOFLIRT, CD_35, WAITVOICE, - PLAYVOICE, CDV_38, + PLAYVOICE, CDV_38, // Foster: "The day of the crash..." DOFLIRT, CD_37, WAITVOICE, - PLAYVOICE, CDV_39, + PLAYVOICE, CDV_39, // Foster: "The day my mother died." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_40_LOG, FADEUP, CD_40_PAL, - PLAYVOICE, CDV_40, + PLAYVOICE, CDV_40, // Shaman: "You alright, city boy?" WAITVOICE, - PLAYVOICE, CDV_41, + PLAYVOICE, CDV_41, // Shaman: "Got a name, son?" WAITVOICE, - PLAYVOICE, CDV_42, + PLAYVOICE, CDV_42, // Foster: "R-Robert." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_43_LOG, FADEUP, CD_43_PAL, - PLAYVOICE, CDV_43, + PLAYVOICE, CDV_43, // Shaman: "Hah! Welcome to the Gap, Robert!" WAITVOICE, DOFLIRT, CD_43, - PLAYVOICE, CDV_45, + PLAYVOICE, CDV_45, // Foster: "As he patched me up, the old man had gently explained that there was no way back into the City..." FADEDOWN, SHOWSCREEN, CD_45_LOG, FADEUP, CD_45_PAL, WAITVOICE, - PLAYVOICE, CDV_46, + PLAYVOICE, CDV_46, // Foster: "And I already knew there was nothing he could do for mother." DOFLIRT, CD_45, WAITVOICE, FADEDOWN, SHOWSCREEN, CD_47_LOG, FADEUP, CD_47_PAL, - PLAYVOICE, CDV_47, + PLAYVOICE, CDV_47, // Foster: "His tribe was poor, but they treated me like one of their own..." WAITVOICE, - PLAYVOICE, CDV_48, + PLAYVOICE, CDV_48, // Foster: "I learned how to survive in the wasteland they called the Gap..." FADEDOWN, SHOWSCREEN, CD_48_LOG, FADEUP, CD_48_PAL, WAITVOICE, BGFLIRT, CD_48, - PLAYVOICE, CDV_49, + PLAYVOICE, CDV_49, // Foster: "And scavenging from the City dumps." WAITVOICE, - PLAYVOICE, CDV_50, + PLAYVOICE, CDV_50, // Foster: "As the years passed, I forgot my life in the City." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_51, + PLAYVOICE, CDV_51, // Foster: "Discovered new talents..." BGFLIRT, CD_49, WAITVOICE, - PLAYVOICE, CDV_52, + PLAYVOICE, CDV_52, // Foster: "Hah!" WAITVOICE, - PLAYVOICE, CDV_53, + PLAYVOICE, CDV_53, // Joey: "I'm your (zzzt) friend... call me (zzzt) Joey." WAITVOICE, WAITFLIRT, - PLAYVOICE, CDV_54, + PLAYVOICE, CDV_54, // Foster: "And got a second name." DOFLIRT, CD_50, WAITVOICE, - PLAYVOICE, CDV_55, + PLAYVOICE, CDV_55, // Shaman: "This is what we'll call you now you've come of age, son." WAITVOICE, - PLAYVOICE, CDV_56, + PLAYVOICE, CDV_56, // Shaman: "We found you... we fostered you..." FADEDOWN, SHOWSCREEN, CD_55_LOG, FADEUP, CD_55_PAL, WAITVOICE, - PLAYVOICE, CDV_57, + PLAYVOICE, CDV_57, // Shaman: "So that makes you Robert Foster." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_58_LOG, FADEUP, CD_58_PAL, - PLAYVOICE, CDV_58, + PLAYVOICE, CDV_58, // Reich: "...Wasted enough time!" WAITVOICE, - PLAYVOICE, CDV_59, + PLAYVOICE, CDV_59, // Reich: "Give us the runaway or we'll shoot everyone..." WAITVOICE, - PLAYVOICE, CDV_60, + PLAYVOICE, CDV_60, // Reich: "Starting with you, grandad!" WAITVOICE, - PLAYVOICE, CDV_61, + PLAYVOICE, CDV_61, // Foster: "The old man had been right, for once..." WAITVOICE, - PLAYVOICE, CDV_62, + PLAYVOICE, CDV_62, // Foster: "It was me they wanted." BGFLIRT, CD_58, WAITVOICE, - PLAYVOICE, CDV_63, + PLAYVOICE, CDV_63, // Shaman: "No, my son! Don't let the evil take you! Run!" WAITVOICE, - PLAYVOICE, CDV_64, + PLAYVOICE, CDV_64, // Guard: "DNA scan confirms it's him, sir." WAITFLIRT, WAITVOICE, - PLAYVOICE, CDV_65, + PLAYVOICE, CDV_65, // Foster: "Evil had come to the Gap, just as he said." FADEDOWN, WAITVOICE, SHOWSCREEN, CD_66_LOG, FADEUP, CD_66_PAL, - PLAYVOICE, CDV_66, + PLAYVOICE, CDV_66, // Reich: "Take him." WAITVOICE, - PLAYVOICE, CDV_67, + PLAYVOICE, CDV_67, // Foster: "But had the old man seen why it wanted me?" FADEDOWN, SHOWSCREEN, CD_67_LOG, FADEUP, CD_67_PAL, WAITVOICE, - PLAYVOICE, CDV_68, + PLAYVOICE, CDV_68, // Foster: "Or what it would do next?" WAITVOICE, - PLAYVOICE, CDV_69, + PLAYVOICE, CDV_69, // Foster: "It was too late to ask him now." FADEDOWN, SHOWSCREEN, CD_69_LOG, FADEUP, CD_69_PAL, WAITVOICE, - PLAYVOICE, CDV_70, + PLAYVOICE, CDV_70, // Guard: "Leaving destruction zone, Commander Reich." DOFLIRT, CD_69, WAITVOICE, FADEDOWN, - PLAYVOICE, CDV_71, + PLAYVOICE, CDV_71, // Reich: "Good. Detonate." WAITVOICE, SHOWSCREEN, CD_72_LOG, FADEUP, CD_72_PAL, - PLAYVOICE, CDV_72, + PLAYVOICE, CDV_72, // Foster: "Much too late." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_73_LOG, FADEUP, CD_73_PAL, - PLAYVOICE, CDV_73, + PLAYVOICE, CDV_73, // Foster: "Why, you murdering..." WAITVOICE, - PLAYVOICE, CDV_74, + PLAYVOICE, CDV_74, // Reich: "Keep him quiet." WAITVOICE, - PLAYVOICE, CDV_75, + PLAYVOICE, CDV_75, // Foster: "All I could do was wait." FADEDOWN, SHOWSCREEN, CD_76_LOG, FADEUP, CD_76_PAL, WAITVOICE, - PLAYVOICE, CDV_76, + PLAYVOICE, CDV_76, // Foster: "Just like on a hunt. Just like the old man taught me." WAITVOICE, - PLAYVOICE, CDV_77, + PLAYVOICE, CDV_77, // Foster: "Wait... and be ready." WAITVOICE, FADEDOWN, SHOWSCREEN, CD_78_LOG, FADEUP, CD_78_PAL, - PLAYVOICE, CDV_78, + PLAYVOICE, CDV_78, // Foster: "It was dawn when we reached the City." WAITVOICE, - PLAYVOICE, CDV_79, + PLAYVOICE, CDV_79, // Reich: "Land in the central Security compound." WAITVOICE, - PLAYVOICE, CDV_80, + PLAYVOICE, CDV_80, // Foster: "A dawn my tribe would never see." BGFLIRT, CD_100, WAITVOICE, - PLAYVOICE, CDV_81, + PLAYVOICE, CDV_81, // Foster: "They were no more than a note in Reich's book now." WAITVOICE, - PLAYVOICE, CDV_82, + PLAYVOICE, CDV_82, // Guard: "Yes, sir. Locking on automatic landing beacon." WAITVOICE, WAITFLIRT, SHOWSCREEN, CD_101_LOG, BGFLIRT, CD_101, - PLAYVOICE, CDV_83, + PLAYVOICE, CDV_83, // Foster: "But what was I? Why did..." WAITVOICE, - PLAYVOICE, CDV_84, + PLAYVOICE, CDV_84, // Guard: "Sir! The guidance system! It's gone crazy!" WAITVOICE, - PLAYVOICE, CDV_85, + PLAYVOICE, CDV_85, // Guard: "We're going to HIT!" WAITVOICE, WAITFLIRT, SHOWSCREEN, CD_102_LOG, - PLAYVOICE, CDV_86, + PLAYVOICE, CDV_86, // Foster: "Maybe I'd get some answers now." DOFLIRT, CD_102, FADEDOWN, SHOWSCREEN, CD_103_LOG, FADEUP, CD_103_PAL, BGFLIRT, CD_103, WAITVOICE, - PLAYVOICE, CDV_87, + PLAYVOICE, CDV_87, // Foster: "If I survived another 'copter crash." WAITFLIRT, WAITVOICE, STARTMUSIC, 2, diff --git a/engines/sky/logic.cpp b/engines/sky/logic.cpp index bbe01a5576..0d54380edb 100644 --- a/engines/sky/logic.cpp +++ b/engines/sky/logic.cpp @@ -224,7 +224,7 @@ void Logic::arAnim() { // On character boundary. Have we been told to wait? // if not - are WE colliding? - if (_compact->waitingFor == 0xffff) { // 1st cycle of re-route does + if (_compact->waitingFor == 0xffff) { // 1st cycle of re-route does not require collision checks mainAnim(); return; } diff --git a/engines/sky/music/gmchannel.cpp b/engines/sky/music/gmchannel.cpp index 460cea545e..766bd2ff66 100644 --- a/engines/sky/music/gmchannel.cpp +++ b/engines/sky/music/gmchannel.cpp @@ -83,7 +83,6 @@ int32 GmChannel::getNextEventTime(void) { return -1; } else return retV; - } uint8 GmChannel::process(uint16 aktTime) { diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp index 071dab2585..eae0417d09 100644 --- a/engines/sky/screen.cpp +++ b/engines/sky/screen.cpp @@ -155,10 +155,12 @@ void Screen::setPalette(uint16 fileNum) { } void Screen::showScreen(uint16 fileNum) { - + // This is only used for static images in the floppy and cd intro if (_currentScreen) free(_currentScreen); _currentScreen = _skyDisk->loadFile(fileNum); + // make sure the last 8 lines are forced to black. + memset(_currentScreen + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH, 0, (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT) * GAME_SCREEN_WIDTH); if (_currentScreen) showScreen(_currentScreen); -- cgit v1.2.3