diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index d4476e2916..00b1e51248 100644
a
|
b
|
namespace Sky {
|
60 | 60 | #define PLAYBG 15 // play background sound |
61 | 61 | #define LOOPBG 16 // loop background sound |
62 | 62 | #define STOPBG 17 // stop background sound |
| 63 | #define CLEARBOTTOM 18 // clear the screen |
63 | 64 | #define SEQEND 65535 // end of intro sequence |
64 | 65 | |
| 66 | // Modifier flag for SHOWSCREEN when we want the image to cover the entire |
| 67 | // screen. |
| 68 | #define FULLSCREEN 0x8000 |
| 69 | |
65 | 70 | #define IC_PREPARE_TEXT 20 // commands used in COMMANDFLIRT block |
66 | 71 | #define IC_SHOW_TEXT 21 |
67 | 72 | #define IC_REMOVE_TEXT 22 |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
331 | 336 | WAITFLIRT, |
332 | 337 | WAITVOICE, |
333 | 338 | FADEDOWN, |
334 | | SHOWSCREEN, CD_19_LOG, |
| 339 | SHOWSCREEN | FULLSCREEN, CD_19_LOG, |
335 | 340 | FADEUP, CD_19_PAL, |
336 | 341 | PLAYVOICE, CDV_19, // Joey: "Foster! (zzzt) H-Help!" |
337 | 342 | WAITVOICE, |
338 | 343 | PLAYVOICE, CDV_20, // Joey: "Better make my next body move faster, Foster..." |
339 | 344 | FADEDOWN, |
340 | | SHOWSCREEN, CD_20_LOG, |
| 345 | SHOWSCREEN | FULLSCREEN, CD_20_LOG, |
341 | 346 | FADEUP, CD_19_PAL, |
342 | 347 | WAITVOICE, |
343 | 348 | LOADBG, 59496, // quiet heli |
344 | 349 | LOOPBG, |
345 | 350 | PLAYVOICE, CDV_21, // Foster: "He was only a robot, but, well, I loved the little guy." |
346 | 351 | FADEDOWN, |
347 | | SHOWSCREEN, CD_21_LOG, |
| 352 | SHOWSCREEN | FULLSCREEN, CD_21_LOG, |
348 | 353 | FADEUP, CD_19_PAL, |
349 | 354 | WAITVOICE, |
350 | 355 | PLAYVOICE, CDV_22, // Foster: "Then, as suddenly as it started, the shooting stopped." |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
355 | 360 | /* fade down while Foster's saying his line */ |
356 | 361 | FADEDOWN, |
357 | 362 | WAITVOICE, |
358 | | SHOWSCREEN, CD_24_LOG, |
| 363 | SHOWSCREEN | FULLSCREEN, CD_24_LOG, |
359 | 364 | FADEUP, CD_23_PAL, |
360 | 365 | PLAYVOICE, CDV_24, // Reich: "Whoever is in charge here, come forward..." |
361 | 366 | WAITVOICE, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
364 | 369 | PLAYVOICE, CDV_26, // Foster: "Only a fool would have argued with that firepower." |
365 | 370 | WAITVOICE, |
366 | 371 | FADEDOWN, |
367 | | SHOWSCREEN, CD_27_LOG, |
| 372 | SHOWSCREEN | FULLSCREEN, CD_27_LOG, |
368 | 373 | FADEUP, CD_27_PAL, |
369 | 374 | PLAYVOICE, CDV_27, // Shaman: "... I am the leader of these people... We are peaceful..." |
370 | 375 | WAITVOICE, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
374 | 379 | WAITVOICE, |
375 | 380 | BGFLIRT, CD_27, |
376 | 381 | PLAYVOICE, CDV_31, // Reich: "We're looking for someone..." |
| 382 | WAITFLIRT, |
| 383 | CLEARBOTTOM, |
377 | 384 | WAITVOICE, |
378 | 385 | PLAYVOICE, CDV_32, // Reich: "Someone who doesn't belong here..." |
379 | 386 | WAITVOICE, |
380 | 387 | PLAYVOICE, CDV_33, // Reich: "Who wasn't born in this garbage dump..." |
381 | 388 | WAITVOICE, |
382 | 389 | PLAYVOICE, CDV_34, // Reich: "Who came from the city as a child..." |
383 | | WAITFLIRT, |
384 | 390 | WAITVOICE, |
385 | 391 | PLAYVOICE, CDV_35, // Reich: "We want to take him home again." |
386 | 392 | WAITVOICE, |
387 | 393 | PLAYVOICE, CDV_36, // Foster: "My mind racing, I remembered where I'd seen that symbol before..." |
388 | 394 | FADEDOWN, |
389 | | SHOWSCREEN, CD_35_LOG, |
| 395 | SHOWSCREEN | FULLSCREEN, CD_35_LOG, |
390 | 396 | FADEUP, CD_35_PAL, |
391 | 397 | WAITVOICE, |
392 | 398 | PLAYVOICE, CDV_37, // Foster: "It was the day the tribe found me..." |
393 | 399 | DOFLIRT, CD_35, |
| 400 | CLEARBOTTOM, |
394 | 401 | WAITVOICE, |
395 | 402 | PLAYVOICE, CDV_38, // Foster: "The day of the crash..." |
396 | 403 | DOFLIRT, CD_37, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
398 | 405 | PLAYVOICE, CDV_39, // Foster: "The day my mother died." |
399 | 406 | WAITVOICE, |
400 | 407 | FADEDOWN, |
401 | | SHOWSCREEN, CD_40_LOG, |
| 408 | SHOWSCREEN | FULLSCREEN, CD_40_LOG, |
402 | 409 | FADEUP, CD_40_PAL, |
403 | 410 | PLAYVOICE, CDV_40, // Shaman: "You alright, city boy?" |
404 | 411 | WAITVOICE, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
407 | 414 | PLAYVOICE, CDV_42, // Foster: "R-Robert." |
408 | 415 | WAITVOICE, |
409 | 416 | FADEDOWN, |
410 | | SHOWSCREEN, CD_43_LOG, |
| 417 | SHOWSCREEN | FULLSCREEN, CD_43_LOG, |
411 | 418 | FADEUP, CD_43_PAL, |
412 | 419 | PLAYVOICE, CDV_43, // Shaman: "Hah! Welcome to the Gap, Robert!" |
413 | 420 | WAITVOICE, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
421 | 428 | DOFLIRT, CD_45, |
422 | 429 | WAITVOICE, |
423 | 430 | FADEDOWN, |
424 | | SHOWSCREEN, CD_47_LOG, |
| 431 | SHOWSCREEN | FULLSCREEN, CD_47_LOG, |
425 | 432 | FADEUP, CD_47_PAL, |
426 | 433 | PLAYVOICE, CDV_47, // Foster: "His tribe was poor, but they treated me like one of their own..." |
427 | 434 | WAITVOICE, |
428 | 435 | PLAYVOICE, CDV_48, // Foster: "I learned how to survive in the wasteland they called the Gap..." |
429 | 436 | FADEDOWN, |
430 | | SHOWSCREEN, CD_48_LOG, |
| 437 | SHOWSCREEN | FULLSCREEN, CD_48_LOG, |
431 | 438 | FADEUP, CD_48_PAL, |
432 | 439 | WAITVOICE, |
433 | 440 | BGFLIRT, CD_48, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
500 | 507 | FADEDOWN, |
501 | 508 | PLAYVOICE, CDV_71, // Reich: "Good. Detonate." |
502 | 509 | WAITVOICE, |
503 | | SHOWSCREEN, CD_72_LOG, |
| 510 | SHOWSCREEN | FULLSCREEN, CD_72_LOG, |
504 | 511 | FADEUP, CD_72_PAL, |
505 | 512 | PLAYVOICE, CDV_72, // Foster: "Much too late." |
506 | 513 | WAITVOICE, |
507 | 514 | FADEDOWN, |
508 | | SHOWSCREEN, CD_73_LOG, |
| 515 | SHOWSCREEN | FULLSCREEN, CD_73_LOG, |
509 | 516 | FADEUP, CD_73_PAL, |
510 | 517 | PLAYVOICE, CDV_73, // Foster: "Why, you murdering..." |
511 | 518 | WAITVOICE, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
513 | 520 | WAITVOICE, |
514 | 521 | PLAYVOICE, CDV_75, // Foster: "All I could do was wait." |
515 | 522 | FADEDOWN, |
516 | | SHOWSCREEN, CD_76_LOG, |
| 523 | SHOWSCREEN | FULLSCREEN, CD_76_LOG, |
517 | 524 | FADEUP, CD_76_PAL, |
518 | 525 | WAITVOICE, |
519 | 526 | PLAYVOICE, CDV_76, // Foster: "Just like on a hunt. Just like the old man taught me." |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
521 | 528 | PLAYVOICE, CDV_77, // Foster: "Wait... and be ready." |
522 | 529 | WAITVOICE, |
523 | 530 | FADEDOWN, |
| 531 | CLEARBOTTOM, |
524 | 532 | SHOWSCREEN, CD_78_LOG, |
525 | 533 | FADEUP, CD_78_PAL, |
526 | 534 | PLAYVOICE, CDV_78, // Foster: "It was dawn when we reached the City." |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
544 | 552 | PLAYVOICE, CDV_85, // Guard: "We're going to HIT!" |
545 | 553 | WAITVOICE, |
546 | 554 | WAITFLIRT, |
| 555 | CLEARBOTTOM, |
547 | 556 | SHOWSCREEN, CD_102_LOG, |
548 | 557 | PLAYVOICE, CDV_86, // Foster: "Maybe I'd get some answers now." |
549 | 558 | DOFLIRT, CD_102, |
550 | 559 | FADEDOWN, |
| 560 | // This one could be fullscreen, but that causes animation glitches. |
551 | 561 | SHOWSCREEN, CD_103_LOG, |
552 | 562 | FADEUP, CD_103_PAL, |
553 | 563 | BGFLIRT, CD_103, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
557 | 567 | WAITVOICE, |
558 | 568 | STARTMUSIC, 2, |
559 | 569 | FADEDOWN, |
560 | | SHOWSCREEN, CD_104_LOG, |
| 570 | SHOWSCREEN | FULLSCREEN, CD_104_LOG, |
561 | 571 | FADEUP, CD_104_PAL, |
562 | 572 | DOFLIRT, CD_104, |
563 | 573 | DOFLIRT, CD_105, |
… |
… |
uint16 Intro::_cdIntroSeq[] = {
|
565 | 575 | }; |
566 | 576 | |
567 | 577 | uint16 Intro::_floppyIntroSeq[] = { |
| 578 | // This one could be fullscreen, but that causes animation glitches. |
568 | 579 | SHOWSCREEN, 60081, |
569 | 580 | FADEUP, 60080, |
570 | 581 | DOFLIRT, 60082, |
… |
… |
uint16 Intro::_floppyIntroSeq[] = {
|
591 | 602 | 35, IC_SHOW_TEXT, 30, 160, |
592 | 603 | 3, IC_REMOVE_TEXT, |
593 | 604 | COMMANDEND, |
| 605 | CLEARBOTTOM, |
594 | 606 | SHOWSCREEN, 60090, |
595 | 607 | COMMANDFLIRT, 60091, // => command list 4c |
596 | 608 | 1000, IC_FX_VOLUME, 100, |
… |
… |
uint16 Intro::_floppyIntroSeq[] = {
|
599 | 611 | 4, IC_FX_VOLUME, 127, |
600 | 612 | COMMANDEND, |
601 | 613 | FADEDOWN, |
| 614 | // This one could be fullscreen, but that causes animation glitches. |
602 | 615 | SHOWSCREEN, 60093, |
603 | 616 | FADEUP, 60092, |
604 | 617 | COMMANDFLIRT, 60094, // => command list 5 |
… |
… |
uint16 Intro::_floppyIntroSeq[] = {
|
606 | 619 | COMMANDEND, |
607 | 620 | WAITMUSIC, |
608 | 621 | FADEDOWN, |
609 | | SHOWSCREEN, 60096, |
| 622 | SHOWSCREEN | FULLSCREEN, 60096, |
610 | 623 | STARTMUSIC, 2, |
611 | 624 | FADEUP, 60095, |
612 | 625 | COMMANDFLIRT, 60097, // => command list 6a |
… |
… |
bool Intro::nextPart(uint16 *&data) {
|
685 | 698 | |
686 | 699 | // return false means cancel intro |
687 | 700 | uint16 command = *data++; |
688 | | switch (command) { |
| 701 | switch (command & 0x7fff) { |
689 | 702 | case SHOWSCREEN: |
690 | | _skyScreen->showScreen(*data++); |
| 703 | _skyScreen->showScreen(*data++, (command & FULLSCREEN) ? true : false); |
691 | 704 | return true; |
692 | 705 | case FADEUP: |
693 | 706 | _skyScreen->paletteFadeUp(*data++); |
… |
… |
bool Intro::nextPart(uint16 *&data) {
|
767 | 780 | case STOPBG: |
768 | 781 | _mixer->stopID(SOUND_BG); |
769 | 782 | return true; |
| 783 | case CLEARBOTTOM: |
| 784 | { |
| 785 | byte *screenBuf = _skyScreen->giveCurrent() + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH; |
| 786 | memset(screenBuf, 0, GAME_SCREEN_WIDTH * (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT)); |
| 787 | _system->copyRectToScreen(screenBuf, GAME_SCREEN_WIDTH, 0, GAME_SCREEN_HEIGHT, GAME_SCREEN_WIDTH, FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT); |
| 788 | _system->updateScreen(); |
| 789 | } |
| 790 | return true; |
770 | 791 | default: |
771 | 792 | error("Unknown intro command %X", command); |
772 | 793 | } |
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp
index c96b449162..b91403c6bf 100644
a
|
b
|
Screen::~Screen() {
|
96 | 96 | free(_scrollScreen); |
97 | 97 | } |
98 | 98 | |
99 | | void Screen::clearScreen() { |
| 99 | void Screen::clearScreen(bool fullscreen) { |
100 | 100 | memset(_currentScreen, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT); |
101 | | _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); |
| 101 | _system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, fullscreen ? FULL_SCREEN_HEIGHT : GAME_SCREEN_HEIGHT); |
102 | 102 | _system->updateScreen(); |
103 | 103 | } |
104 | 104 | |
… |
… |
void Screen::setPalette(uint16 fileNum) {
|
146 | 146 | warning("Screen::setPalette: can't load file nr. %d",fileNum); |
147 | 147 | } |
148 | 148 | |
149 | | void Screen::showScreen(uint16 fileNum) { |
| 149 | void Screen::showScreen(uint16 fileNum, bool fullscreen) { |
150 | 150 | // This is only used for static images in the floppy and cd intro |
151 | 151 | free(_currentScreen); |
152 | 152 | _currentScreen = _skyDisk->loadFile(fileNum); |
153 | | // make sure the last 8 lines are forced to black. |
154 | | memset(_currentScreen + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH, 0, (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT) * GAME_SCREEN_WIDTH); |
| 153 | if (!fullscreen) { |
| 154 | // make sure the last 8 lines are forced to black. |
| 155 | memset(_currentScreen + GAME_SCREEN_HEIGHT * GAME_SCREEN_WIDTH, 0, (FULL_SCREEN_HEIGHT - GAME_SCREEN_HEIGHT) * GAME_SCREEN_WIDTH); |
| 156 | } |
155 | 157 | |
156 | 158 | if (_currentScreen) |
157 | | showScreen(_currentScreen); |
| 159 | showScreen(_currentScreen, fullscreen); |
158 | 160 | else |
159 | 161 | warning("Screen::showScreen: can't load file nr. %d",fileNum); |
160 | 162 | } |
161 | 163 | |
162 | | void Screen::showScreen(uint8 *pScreen) { |
163 | | _system->copyRectToScreen(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT); |
| 164 | void Screen::showScreen(uint8 *pScreen, bool fullscreen) { |
| 165 | _system->copyRectToScreen(pScreen, 320, 0, 0, GAME_SCREEN_WIDTH, fullscreen ? FULL_SCREEN_HEIGHT : GAME_SCREEN_HEIGHT); |
164 | 166 | _system->updateScreen(); |
165 | 167 | } |
166 | 168 | |
diff --git a/engines/sky/screen.h b/engines/sky/screen.h
index fa04cd91c3..f8ddd212f8 100644
a
|
b
|
public:
|
64 | 64 | void paletteFadeUp(uint8 *pal); |
65 | 65 | void paletteFadeUp(uint16 fileNr); |
66 | 66 | |
67 | | void showScreen(uint16 fileNum); |
68 | | void showScreen(uint8 *pScreen); |
| 67 | void showScreen(uint16 fileNum, bool fullscreen = false); |
| 68 | void showScreen(uint8 *pScreen, bool fullscreen = false); |
69 | 69 | |
70 | 70 | void handleTimer(); |
71 | 71 | void startSequence(uint16 fileNum); |
… |
… |
public:
|
83 | 83 | void fnFadeUp(uint32 palNum, uint32 scroll); |
84 | 84 | void fnFadeDown(uint32 scroll); |
85 | 85 | void fnDrawScreen(uint32 palette, uint32 scroll); |
86 | | void clearScreen(); |
| 86 | void clearScreen(bool fullscreen = false); |
87 | 87 | void setFocusRectangle(const Common::Rect& rect); |
88 | 88 | |
89 | 89 | void recreate(); |
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 674bfab95b..8d569407be 100644
a
|
b
|
Common::Error SkyEngine::go() {
|
187 | 187 | } |
188 | 188 | |
189 | 189 | if (!shouldQuit()) { |
| 190 | _skyScreen->clearScreen(true); |
190 | 191 | // restartGame() takes us to the first scene, without showing the |
191 | 192 | // initial animation where Foster is being chased. initScreen0() |
192 | 193 | // shows the first scene together with that animation. We can't |