diff options
author | Filippos Karapetis | 2011-12-06 12:35:47 +0200 |
---|---|---|
committer | Filippos Karapetis | 2011-12-06 12:35:47 +0200 |
commit | d5b220220f61a16c0eaaa9ca88e3e0b4d39d1d33 (patch) | |
tree | fd673e19345231a3a3f00b4aecf9f48eeefb3530 /engines/dreamweb/sprite.cpp | |
parent | 7d9d53d2badfdf124fa67360599087f1e5fc06e2 (diff) | |
download | scummvm-rg350-d5b220220f61a16c0eaaa9ca88e3e0b4d39d1d33.tar.gz scummvm-rg350-d5b220220f61a16c0eaaa9ca88e3e0b4d39d1d33.tar.bz2 scummvm-rg350-d5b220220f61a16c0eaaa9ca88e3e0b4d39d1d33.zip |
DREAMWEB: 'intro1text', 'intro2text', 'intro3text', 'monks2text' ported to C++. textForMonk() has been converted to C++, too.
Diffstat (limited to 'engines/dreamweb/sprite.cpp')
-rw-r--r-- | engines/dreamweb/sprite.cpp | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 28b1ce8683..6c8c1356de 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -742,109 +742,109 @@ void DreamGenContext::initRain() { rain->x = 0xff; } +void DreamGenContext::intro1Text() { + if ((data.byte(kIntrocount) == 2 || data.byte(kIntrocount) == 4 || data.byte(kIntrocount) == 6) && + data.byte(kCh1playing) == 255) { + data.byte(kIntrocount) = data.byte(kIntrocount) - 1; + } else { + if (data.byte(kIntrocount) == 2) + setupTimedTemp(40, 82, 34, 130, 90, 1); + else if (data.byte(kIntrocount) == 4) + setupTimedTemp(41, 82, 34, 130, 90, 1); + else if (data.byte(kIntrocount) == 6) + setupTimedTemp(42, 82, 34, 130, 90, 1); + } +} + +void DreamGenContext::intro2Text() { + if (ax == 5) + setupTimedTemp(43, 82, 34, 40, 90, 1); + else if (ax == 15) + setupTimedTemp(44, 82, 34, 40, 90, 1); +} + +void DreamGenContext::intro3Text() { + if (ax == 107) + setupTimedTemp(45, 82, 36, 56, 100, 1); + else if (ax == 108) + setupTimedTemp(46, 82, 36, 56, 100, 1); +} + +void DreamGenContext::monks2text() { + if (data.byte(kIntrocount) == 1) + setupTimedTemp(8, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 4) + setupTimedTemp(9, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 7) + setupTimedTemp(10, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 10) + setupTimedTemp(11, 82, 0, 105, 120, 1); + else if (data.byte(kIntrocount) == 13) + setupTimedTemp(12, 82, 0, 120, 120, 1); + else if (data.byte(kIntrocount) == 16) + setupTimedTemp(13, 82, 0, 135, 120, 1); + else if (data.byte(kIntrocount) == 19) + setupTimedTemp(14, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 22) + setupTimedTemp(15, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 25) + setupTimedTemp(16, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 27) + setupTimedTemp(17, 82, 36, 160, 120, 1); + else if (data.byte(kIntrocount) == 31) + setupTimedTemp(18, 82, 36, 160, 120, 1); +} + void DreamGenContext::textForEnd() { if (data.byte(kIntrocount) == 20) - al = 0; + setupTimedTemp(0, 83, 34, 20, 60, 1); else if (data.byte(kIntrocount) == (isCD() ? 50 : 65)) - al = 1; + setupTimedTemp(1, 83, 34, 20, 60, 1); else if (data.byte(kIntrocount) == (isCD() ? 85 : 110)) - al = 2; - else - return; + setupTimedTemp(2, 83, 34, 20, 60, 1); +} - bl = 34; - bh = 20; - cx = 60; - dx = 1; - ah = 83; - setupTimedTemp(); +void DreamGenContext::textForMonkHelper(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { + if (isCD() && data.byte(kCh1playing) != 255) + data.byte(kIntrocount)--; + else + setupTimedTemp(textIndex, voiceIndex, x, y, countToTimed, timeCount); } void DreamGenContext::textForMonk() { - if (data.byte(kIntrocount) == 1) { - al = 19; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 5) { - al = 20; - bl = 68; - bh = 38; - cx = 120; - } else if (data.byte(kIntrocount) == 9) { - al = 21; - bl = 48; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 13) { - al = 22; - bl = 68; - bh = 38; - cx = 120; - } else if (data.byte(kIntrocount) == (isCD() ? 15 : 17)) { - al = 23; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 21) { - al = 24; - bl = 68; - bh = 38; - cx = 120; - } else if (data.byte(kIntrocount) == 25) { - al = 25; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 29) { - al = 26; - bl = 68; - bh = 38; - cx = 120; - } else if (data.byte(kIntrocount) == 33) { - al = 27; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 37) { - al = 28; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == 41) { - al = 29; - bl = 68; - bh = 38; - cx = 120; - } else if (data.byte(kIntrocount) == 45) { - al = 30; - bl = 68; - bh = 154; - cx = 120; - } else if (data.byte(kIntrocount) == (isCD() ? 52 : 49)) { - al = 31; - bl = 68; - bh = 154; - cx = 220; - } else if (data.byte(kIntrocount) == 53) { + if (data.byte(kIntrocount) == 1) + textForMonkHelper(19, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == 5) + textForMonkHelper(20, 82, 68, 38, 120, 1); + else if (data.byte(kIntrocount) == 9) + textForMonkHelper(21, 82, 48, 154, 120, 1); + else if (data.byte(kIntrocount) == 13) + textForMonkHelper(22, 82, 68, 38, 120, 1); + else if (data.byte(kIntrocount) == (isCD() ? 15 : 17)) + textForMonkHelper(23, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == 21) + textForMonkHelper(24, 82, 68, 38, 120, 1); + else if (data.byte(kIntrocount) == 25) + textForMonkHelper(25, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == 29) + textForMonkHelper(26, 82, 68, 38, 120, 1); + else if (data.byte(kIntrocount) == 33) + textForMonkHelper(27, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == 37) + textForMonkHelper(28, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == 41) + textForMonkHelper(29, 82, 68, 38, 120, 1); + else if (data.byte(kIntrocount) == 45) + textForMonkHelper(30, 82, 68, 154, 120, 1); + else if (data.byte(kIntrocount) == (isCD() ? 52 : 49)) + textForMonkHelper(31, 82, 68, 154, 220, 1); + else if (data.byte(kIntrocount) == 53) { fadeScreenDowns(); if (isCD()) { data.byte(kVolumeto) = 7; data.byte(kVolumedirection) = 1; } - return; - } else { - return; } - - dx = 1; - ah = 82; - if (isCD() && data.byte(kCh1playing) != 255) { - data.byte(kIntrocount)--; - return; - } - - setupTimedTemp(); } void DreamGenContext::reelsOnScreen() { |