Ticket #8612: kyra2_intro2.diff
File kyra2_intro2.diff, 9.0 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 kSequenceZanFaun = 6 35 36 }; 36 37 37 38 class WSAMovieV2; … … 87 88 int seq_introOverview(int seqNum); 88 89 int seq_introLibrary(int seqNum); 89 90 int seq_introHand(int seqNum); 91 int seq_introZanFaun(int seqNum); 90 92 91 93 void seq_introOverviewOver1(int currentFrame); 92 94 void seq_introOverviewForest(int currentFrame); -
screen.cpp
328 328 fadePalette(blackPal, delay); 329 329 } 330 330 331 void Screen::fadeToGrey(int delay) { 332 debugC(9, kDebugLevelScreen, "Screen::fadeToGreyScale()"); 333 for (int i = 0; i < 256; ++i) { 334 _currentPalette[4 * i + 0] = (_currentPalette[4 * i + 0] + _currentPalette[4 * i + 1] + _currentPalette[4 * i + 2]) / 3; 335 _currentPalette[4 * i + 1] = _currentPalette[4 * i + 0]; 336 _currentPalette[4 * i + 2] = _currentPalette[4 * i + 0]; 337 } 338 fadePalette(_currentPalette, delay); 339 } 340 331 341 void Screen::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) { 332 342 debugC(9, kDebugLevelScreen, "fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime); 333 343 assert(_vm->palTable1()[palIndex]); -
screen.h
131 131 void fadeFromBlack(int delay=0x54); 132 132 void fadeToBlack(int delay=0x54); 133 133 134 void fadeToGrey(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, "zanfaun.wsa", &KyraEngine_v2::seq_introZanFaun, 16, 90, 1, false, true} 50 51 }; 51 52 52 53 assert(startSeq >= 0 && endSeq < ARRAYSIZE(sequences) && startSeq <= endSeq); … … 137 138 delete[] _activeChat; 138 139 } 139 140 141 // FIXME: This part needs game dialogs, as it's not part of the intro, but 142 // rather a game video. It has speech only in the CD version 143 int KyraEngine_v2::seq_introZanFaun(int seqNum) { 144 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introZanFaun(%i)", seqNum); 145 146 switch (seqNum) { 147 case 0: 148 _sound->playTrack(8); 149 //XXX: palette stuff 150 //XXX: load dialogs 151 break; 152 case 1: 153 seq_loadWSA(1, "zanfaun.wsa", 9); 154 break; 155 case 0x294: 156 seq_waitForChatsToFinish(); 157 seq_unloadWSA(1); 158 return 0; 159 default: 160 break; 161 } 162 163 return -1; 164 } 165 140 166 int KyraEngine_v2::seq_introHand(int seqNum) { 141 167 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introHand(%i)", seqNum); 142 static const SequenceControl hand1bWSAControl[] = { 168 // XXX: commented out to prevent compiler warnings 169 /*static const SequenceControl hand1bWSAControl[] = { 143 170 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}, 144 171 {8, 6}, {9, 6}, {10, 6}, {11, 6}, {11, 12}, {12, 12}, {13, 12}, 145 172 {12, 12}, {11, 12}, {-1, -1} }; 146 173 147 174 static const SequenceControl hand1cWSAControl[] = { 148 175 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {3, 6}, 149 {4, 6}, {5, 64}, {5, 6}, {-1, -1} }; 176 {4, 6}, {5, 64}, {5, 6}, {-1, -1} };*/ 150 177 151 178 static const SequenceControl hand2WSAControl[] = { 152 179 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 153 180 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 154 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {-1, -1} }; 181 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, 182 {0, 6}, {1, 6}, {0, 6}, {1, 6}, {0, 6}, {1, 6}, {-1, -1} }; 155 183 156 184 static const SequenceControl hand3WSAControl[] = { 157 185 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 186 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 187 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 188 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 189 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 190 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 191 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 192 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 193 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 194 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 195 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 196 {0, 6}, {1, 6}, {2, 6}, {1, 6}, 158 197 {0, 6}, {-1, -1} }; 159 198 160 199 static const SequenceControl hand4WSAControl[] = { 161 200 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 162 {3, 6}, {2, 6}, {1, 6}, {-1, -1} }; 201 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 202 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 203 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 204 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 205 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 206 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 207 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 208 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 209 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 210 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 211 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 212 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 213 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 214 {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, 215 {3, 6}, {2, 6}, {1, 6}, {0, 6}, 216 {-1, -1} }; 163 217 164 218 switch (seqNum) { 165 219 case 0: 220 seq_waitForChatsToFinish(); 166 221 _sound->playTrack(6); 167 seq_playIntroChat(7); 222 seq_playIntroChat(7); // "Luckily, the Hand was experienced in these matters" 168 223 //palette stuff 169 224 break; 170 225 case 1: 171 226 // XXX: these show as garbage. New frame encode? 172 seq_loadWSA(1, "hand1a.wsa", 9);227 /*seq_loadWSA(1, "hand1a.wsa", 9); 173 228 seq_loadWSA(2, "hand1b.wsa", 9, 0, hand1bWSAControl); 174 seq_loadWSA(3, "hand1c.wsa", 9, 0, hand1cWSAControl); 229 seq_loadWSA(3, "hand1c.wsa", 9, 0, hand1cWSAControl);*/ 175 230 break; 176 231 case 0xc9: 177 232 // palette stuff 178 233 seq_loadWSA(4, "hand2.wsa", 9, 0, hand2WSAControl); 179 seq_playIntroChat(8); 234 seq_playIntroChat(8); // "and finally, a plan was approved" 180 235 break; 181 236 case 0x18b: 182 237 seq_waitForChatsToFinish(); 183 238 seq_loadWSA(5, "hand3.wsa", 9, 0, hand3WSAControl); 239 seq_playIntroChat(9); // "which required a magic anchorstone" 184 240 break; 185 241 case 0x1f4: 186 242 seq_waitForChatsToFinish(); 187 243 seq_loadWSA(6, "hand4.wsa", 9, 0, hand4WSAControl); 244 seq_playIntroChat(10); // "to be retrieved from the center of the world" 188 245 break; 189 case 0x21c: 190 seq_playIntroChat(10); 246 case 0x258: //0x21c: 247 seq_waitForChatsToFinish(); 248 _sound->playTrack(7); 249 seq_loadWSA(7, "point.wsa", 9); 250 seq_playIntroChat(11); // "Zanthia, youngest of the royal mystics has been selected" 191 251 break; 192 case 0x 276:252 case 0x320: //0x276: 193 253 seq_waitForChatsToFinish(); 194 254 seq_unloadWSA(1); 195 255 seq_unloadWSA(2); … … 197 257 seq_unloadWSA(4); 198 258 seq_unloadWSA(5); 199 259 seq_unloadWSA(6); 260 seq_unloadWSA(7); 200 261 return 0; 201 262 } 202 263 … … 214 275 switch (seqNum) { 215 276 case 0: 216 277 _sound->playTrack(5); 217 seq_playIntroChat(4); 278 seq_playIntroChat(4); // "The royal mystics are baffled" 218 279 //XXX: palette stuff 219 280 break; 220 281 case 1: … … 227 288 seq_loadWSA(2, "darm.wsa", 9); 228 289 break; 229 290 case 0x68: 230 seq_playIntroChat(5); 291 seq_playIntroChat(5); // "Every reference has been consulted" 231 292 break; 232 293 case 0xF0: 233 294 seq_waitForChatsToFinish(); … … 236 297 case 0x154: 237 298 // palette stuff 238 299 seq_loadWSA(4, "marco.wsa", 9); 239 seq_playIntroChat(6); 300 seq_playIntroChat(6); // "Even Marko and his new valet have been allowed" 240 301 break; 241 302 case 0x294: 242 303 seq_waitForChatsToFinish(); … … 266 327 seq_loadWSA(2, "over2.wsa", 9); 267 328 break; 268 329 case 120: 269 seq_playIntroChat(0); 330 seq_playIntroChat(0); // "Kyrandia is disappearing!" 270 331 break; 271 332 case 200: 272 333 seq_waitForChatsToFinish(); 273 334 // XXX: fade to grey 335 //_screen->fadeToGrey(40); 274 336 break; 275 337 case 201: 276 338 // XXX 277 339 break; 278 340 case 282: 279 341 seq_loadWSA(3, "forest.wsa", 6, &KyraEngine_v2::seq_introOverviewForest); 280 seq_playIntroChat(1); 342 seq_playIntroChat(1); // "Rock by rock..." 281 343 break; 282 344 case 434: 283 345 seq_loadWSA(4, "dragon.wsa", 6, &KyraEngine_v2::seq_introOverviewDragon); … … 311 373 seq_waitForChatsToFinish(); 312 374 else if(currentFrame == 12) { 313 375 delay(25); 314 seq_playIntroChat(2); 376 seq_playIntroChat(2); // "...and tree by tree..." 315 377 } 316 378 } 317 379 … … 319 381 debugC(9, kDebugLevelMain, "KyraEngine_v2::seq_introOverviewDragon(%i)", currentFrame); 320 382 321 383 if (currentFrame == 3) 322 seq_playIntroChat(3); 384 seq_playIntroChat(3); // "Kyrandia ceases to exist!" 323 385 else if(currentFrame == 11) 324 386 seq_waitForChatsToFinish(); 325 387 }