Ticket #8612: kyra2_intro3.diff
File kyra2_intro3.diff, 11.7 KB (added by , 18 years ago) |
---|
-
kyra2.cpp
112 112 case 0: 113 113 break; 114 114 case 1: 115 seq_playSequences(kSequenceOverview, kSequence Library);115 seq_playSequences(kSequenceOverview, kSequenceZanFaun); 116 116 break; 117 117 case 2: 118 118 break; -
kyra2.h
31 31 kSequenceTitle = 2, 32 32 kSequenceOverview = 3, 33 33 kSequenceLibrary = 4, 34 kSequenceHand = 5 34 kSequenceHand = 5, 35 kSequencePoint = 6, 36 kSequenceZanFaun = 7 35 37 }; 36 38 37 39 class WSAMovieV2; … … 87 89 int seq_introOverview(int seqNum); 88 90 int seq_introLibrary(int seqNum); 89 91 int seq_introHand(int seqNum); 92 int seq_introPoint(int seqNum); 93 int seq_introZanFaun(int seqNum); 90 94 91 95 void seq_introOverviewOver1(int currentFrame); 92 96 void seq_introOverviewForest(int currentFrame); -
screen.cpp
328 328 fadePalette(blackPal, delay); 329 329 } 330 330 331 void Screen::k2IntroFadeToGrey(int delay) { 332 debugC(9, kDebugLevelScreen, "Screen::k2IntroFadeToGrey()"); 333 334 for (int i = 0; i <= 50; ++i) { 335 if (i <= 8 || i >= 30) 336 { 337 _currentPalette[3 * i + 0] = (_currentPalette[3 * i + 0] + 338 _currentPalette[3 * i + 1] + 339 _currentPalette[3 * i + 2]) / 3; 340 _currentPalette[3 * i + 1] = _currentPalette[3 * i + 0]; 341 _currentPalette[3 * i + 2] = _currentPalette[3 * i + 0]; 342 } 343 } 344 345 // color 71 is the same in both the overview and closeup scenes 346 // Converting it to greyscale makes the trees in the closeup look dull 347 for (int i = 71; i < 200; ++i) { 348 _currentPalette[3 * i + 0] = (_currentPalette[3 * i + 0] + 349 _currentPalette[3 * i + 1] + 350 _currentPalette[3 * i + 2]) / 3; 351 _currentPalette[3 * i + 1] = _currentPalette[3 * i + 0]; 352 _currentPalette[3 * i + 2] = _currentPalette[3 * i + 0]; 353 } 354 fadePalette(_currentPalette, delay); 355 // Make the font color white again 356 setPaletteIndex(254, 254, 254, 254); 357 } 358 331 359 void Screen::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) { 332 360 debugC(9, kDebugLevelScreen, "fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime); 333 361 assert(_vm->palTable1()[palIndex]); -
screen.h
131 131 void fadeFromBlack(int delay=0x54); 132 132 void fadeToBlack(int delay=0x54); 133 133 134 void k2IntroFadeToGrey(int delay=0x54); 135 134 136 void fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime); 135 137 void fadePalette(const uint8 *palData, int delay); 136 138 -
sequences_v2.cpp
46 46 {1, "title.wsa", &KyraEngine_v2::seq_introTitle, 6, 10, 26, false, false}, 47 47 {2, "over.cps", &KyraEngine_v2::seq_introOverview, 16, 30, 1, false, true}, 48 48 {2, "library.cps", &KyraEngine_v2::seq_introLibrary, 16, 30, 1, false, true}, 49 {2, "hand.cps", &KyraEngine_v2::seq_introHand, 16, 90, 1, false, true} 49 {2, "hand.cps", &KyraEngine_v2::seq_introHand, 16, 90, 1, false, true}, 50 {1, "point.wsa", &KyraEngine_v2::seq_introPoint, 16, 30, 1, false, true}, 51 {1, "zanfaun.wsa", &KyraEngine_v2::seq_introZanFaun, 16, 90, 1, false, true} 50 52 }; 51 53 52 54 assert(startSeq >= 0 && endSeq < ARRAYSIZE(sequences) && startSeq <= endSeq); … … 94 96 seqDelay += _system->getMillis(); 95 97 bool mayEndLoop = sequences[i].timeOut; 96 98 97 while (!_quitFlag && !_skipFlag) { 99 // Skip the movie if esc is pressed or the mouse is clicked 100 // However, don't skip the menu movie, to match the behavior of the original interpreter 101 while ((!_quitFlag && !_skipFlag) || i == kSequenceTitle) { 98 102 uint32 startTime = _system->getMillis(); 99 103 100 104 if (sequences[i].callback) { … … 137 141 delete[] _activeChat; 138 142 } 139 143 144 // FIXME: This part needs game dialogs, as it's not part of the intro, but 145 // rather a game video. It has speech only in the CD version 146 int KyraEngine_v2::seq_introZanFaun(int seqNum) { 147 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introZanFaun(%i)", seqNum); 148 149 static const SequenceControl zanFaunWSAControl[] = { 150 {0, 6}, {1, 6}, {2, 6}, {3, 6}, 151 {4, 6}, {5, 6}, {6, 6}, {7, 6}, 152 {8, 6}, {9, 6}, {10, 6}, {11, 6}, 153 {12, 6}, {13, 6}, {14, 6}, {15, 6}, 154 {16, 6}, {17, 6}, {18, 6}, {19, 6}, 155 {20, 6}, {21, 6}, {22, 6}, {23, 6}, 156 {23, 6}, {22, 6}, {21, 6}, {20, 6}, 157 {19, 6}, {18, 6}, {17, 6}, {16, 6}, 158 {15, 6}, {14, 6}, {13, 6}, {12, 6}, 159 {11, 6}, {10, 6}, {9, 6}, {8, 6}, 160 {7, 6}, {6, 6}, {5, 6}, {4, 6}, 161 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 162 {8, 6}, {9, 6}, {10, 6}, {-1, -1} }; 163 164 switch (seqNum) { 165 case 0: 166 _sound->playTrack(8); 167 //XXX: palette stuff 168 //XXX: load dialogs 169 break; 170 case 1: 171 seq_loadWSA(1, "zanfaun.wsa", 9, 0, zanFaunWSAControl); 172 break; 173 case 0x294: 174 seq_waitForChatsToFinish(); 175 seq_unloadWSA(1); 176 return 0; 177 default: 178 break; 179 } 180 181 return -1; 182 } 183 184 int KyraEngine_v2::seq_introPoint(int seqNum) { 185 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introPoint(%i)", seqNum); 186 187 switch (seqNum) { 188 case 0: 189 _sound->playTrack(7); 190 break; 191 case 1: 192 seq_loadWSA(1, "point.wsa", 9); 193 seq_playIntroChat(11); // "Zanthia, youngest of the royal mystics has been selected" 194 break; 195 case 0x96: 196 seq_waitForChatsToFinish(); 197 seq_unloadWSA(1); 198 return 0; 199 default: 200 break; 201 } 202 203 return -1; 204 } 205 140 206 int KyraEngine_v2::seq_introHand(int seqNum) { 141 207 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introHand(%i)", seqNum); 142 static const SequenceControl hand1bWSAControl[] = { 208 // XXX: commented out to prevent compiler warnings 209 /*static const SequenceControl hand1bWSAControl[] = { 143 210 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}, 144 211 {8, 6}, {9, 6}, {10, 6}, {11, 6}, {11, 12}, {12, 12}, {13, 12}, 145 212 {12, 12}, {11, 12}, {-1, -1} }; 146 213 147 214 static const SequenceControl hand1cWSAControl[] = { 148 215 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {3, 6}, 149 {4, 6}, {5, 64}, {5, 6}, {-1, -1} }; 216 {4, 6}, {5, 64}, {5, 6}, {-1, -1} };*/ 150 217 151 218 static const SequenceControl hand2WSAControl[] = { 152 219 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 153 220 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 154 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {-1, -1} }; 221 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 222 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 223 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 224 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 225 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 226 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 227 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 228 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 229 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 230 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, {-1, -1} }; 155 231 156 232 static const SequenceControl hand3WSAControl[] = { 157 233 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 234 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 235 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 236 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 237 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 238 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 239 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 240 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 241 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 242 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 243 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 244 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 158 245 {0, 6}, {-1, -1} }; 159 246 160 247 static const SequenceControl hand4WSAControl[] = { 161 248 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 162 {3, 6}, {2, 6}, {1, 6}, {-1, -1} }; 249 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 250 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 251 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 252 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 253 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 254 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 255 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 256 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 257 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 258 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 259 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 260 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 261 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 262 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 263 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 264 {-1, -1} }; 163 265 164 266 switch (seqNum) { 165 267 case 0: 166 268 _sound->playTrack(6); 167 seq_playIntroChat(7);168 269 //palette stuff 169 270 break; 170 271 case 1: 171 272 // XXX: these show as garbage. New frame encode? 172 seq_loadWSA(1, "hand1a.wsa", 9);273 /*seq_loadWSA(1, "hand1a.wsa", 9); 173 274 seq_loadWSA(2, "hand1b.wsa", 9, 0, hand1bWSAControl); 174 seq_loadWSA(3, "hand1c.wsa", 9, 0, hand1cWSAControl); 275 seq_loadWSA(3, "hand1c.wsa", 9, 0, hand1cWSAControl);*/ 276 seq_playIntroChat(7); // "Luckily, the Hand was experienced in these matters" 175 277 break; 176 278 case 0xc9: 177 279 // palette stuff 178 280 seq_loadWSA(4, "hand2.wsa", 9, 0, hand2WSAControl); 179 seq_playIntroChat(8); 281 seq_waitForChatsToFinish(); 282 seq_playIntroChat(8); // "and finally, a plan was approved" 180 283 break; 181 284 case 0x18b: 285 seq_loadWSA(5, "hand3.wsa", 9, 0, hand3WSAControl); 182 286 seq_waitForChatsToFinish(); 183 seq_ loadWSA(5, "hand3.wsa", 9, 0, hand3WSAControl);287 seq_playIntroChat(9); // "which required a magic anchorstone" 184 288 break; 185 289 case 0x1f4: 290 seq_loadWSA(6, "hand4.wsa", 9, 0, hand4WSAControl); 186 291 seq_waitForChatsToFinish(); 187 seq_ loadWSA(6, "hand4.wsa", 9, 0, hand4WSAControl);292 seq_playIntroChat(10); // "to be retrieved from the center of the world" 188 293 break; 189 case 0x21c: 190 seq_playIntroChat(10); 191 break; 192 case 0x276: 294 case 0x320: 193 295 seq_waitForChatsToFinish(); 194 seq_unloadWSA(1);296 /*seq_unloadWSA(1); 195 297 seq_unloadWSA(2); 196 seq_unloadWSA(3); 298 seq_unloadWSA(3);*/ 197 299 seq_unloadWSA(4); 198 300 seq_unloadWSA(5); 199 301 seq_unloadWSA(6); … … 214 316 switch (seqNum) { 215 317 case 0: 216 318 _sound->playTrack(5); 217 seq_playIntroChat(4); 319 seq_playIntroChat(4); // "The royal mystics are baffled" 218 320 //XXX: palette stuff 219 321 break; 220 322 case 1: … … 227 329 seq_loadWSA(2, "darm.wsa", 9); 228 330 break; 229 331 case 0x68: 230 seq_playIntroChat(5); 332 seq_waitForChatsToFinish(); 333 seq_playIntroChat(5); // "Every reference has been consulted" 231 334 break; 232 335 case 0xF0: 233 336 seq_waitForChatsToFinish(); 234 337 seq_loadWSA(3, "library.wsa", 9); 235 338 break; 236 339 case 0x154: 340 seq_waitForChatsToFinish(); 237 341 // palette stuff 238 342 seq_loadWSA(4, "marco.wsa", 9); 239 seq_playIntroChat(6); 343 seq_playIntroChat(6); // "Even Marko and his new valet have been allowed" 240 344 break; 241 345 case 0x294: 242 346 seq_waitForChatsToFinish(); … … 266 370 seq_loadWSA(2, "over2.wsa", 9); 267 371 break; 268 372 case 120: 269 seq_playIntroChat(0); 373 seq_playIntroChat(0); // "Kyrandia is disappearing!" 270 374 break; 271 375 case 200: 272 376 seq_waitForChatsToFinish(); 273 377 // XXX: fade to grey 378 _screen->k2IntroFadeToGrey(40); 274 379 break; 275 380 case 201: 276 381 // XXX 277 382 break; 278 383 case 282: 384 seq_waitForChatsToFinish(); 279 385 seq_loadWSA(3, "forest.wsa", 6, &KyraEngine_v2::seq_introOverviewForest); 280 seq_playIntroChat(1); 386 seq_playIntroChat(1); // "Rock by rock..." 281 387 break; 282 388 case 434: 389 seq_waitForChatsToFinish(); 283 390 seq_loadWSA(4, "dragon.wsa", 6, &KyraEngine_v2::seq_introOverviewDragon); 284 391 break; 285 392 case 540: … … 311 418 seq_waitForChatsToFinish(); 312 419 else if(currentFrame == 12) { 313 420 delay(25); 314 seq_playIntroChat(2); 421 seq_playIntroChat(2); // "...and tree by tree..." 315 422 } 316 423 } 317 424 … … 319 426 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introOverviewDragon(%i)", currentFrame); 320 427 321 428 if (currentFrame == 3) 322 seq_playIntroChat(3); 429 seq_playIntroChat(3); // "Kyrandia ceases to exist!" 323 430 else if(currentFrame == 11) 324 431 seq_waitForChatsToFinish(); 325 432 }