diff options
Diffstat (limited to 'engines/drascula/talk.cpp')
-rw-r--r-- | engines/drascula/talk.cpp | 174 |
1 files changed, 80 insertions, 94 deletions
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index a89c5ff734..5ee7f13a25 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -70,11 +70,11 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { do { if (talkerType == kIgorDch || talkerType == kIgorFront) { face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); } else if (talkerType == kIgorSeated || talkerType == kIgorWig) { face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); } @@ -127,7 +127,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { } if (talkerType == kIgorDch || (talkerType == kIgorFront && currentChapter == 1)) { - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); placeIgor(); placeDrascula(); } @@ -152,7 +152,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { do { face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); @@ -179,7 +179,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { } while (!isTalkFinished(&length)); if (talkerType == 0) - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); if (talkerType == 1 && currentChapter == 6) updateRoom(); @@ -193,6 +193,41 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { updateScreen(); } +void DrasculaEngine::talk_drascula_big(int index) { + char filename[20]; + sprintf(filename, "d%i.als", index); + const char *said = _textd[_lang][index]; + int x_talk[4] = {47, 93, 139, 185}; + int face; + int l = 0; + int length = strlen(said); + + color_abc(kColorRed); + + talkInit(filename); + + do { + face = _rnd->getRandomNumber(3); + copyBackground(); + copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); + copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); + l++; + if (l == 7) + l = 0; + + if (withVoices == 0) + centerText(said, 191, 69); + + updateScreen(); + + pause(3); + + byte key = getScan(); + if (key == Common::KEYCODE_ESCAPE) + term_int = 1; + } while (!isTalkFinished(&length)); +} + void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); @@ -204,7 +239,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { talkInit(filename); if (currentChapter == 6) - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); do { if (withVoices == 0) { @@ -219,7 +254,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { } while (!isTalkFinished(&length)); if (currentChapter == 6) { - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateScreen(); } } @@ -260,7 +295,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) { face = _rnd->getRandomNumber(5); } - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); @@ -299,7 +334,7 @@ void DrasculaEngine::talk_bj(int index) { if (currentChapter != 5) { face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); @@ -375,7 +410,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { do { face = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); if (currentChapter == 2) @@ -498,7 +533,10 @@ void DrasculaEngine::talk_drunk(int index) { } } -void DrasculaEngine::talk_vonBraun(int index) { +// talker types: +// 0: kVonBraunNormal +// 1: KVonBraunDoor +void DrasculaEngine::talk_vonBraun(int index, int talkerType) { char filename[20]; sprintf(filename, "VB%i.als", index); const char *said = _textvb[_lang][index]; @@ -513,49 +551,32 @@ void DrasculaEngine::talk_vonBraun(int index) { copyBackground(vonBraunX + 5, 64, OBJWIDTH + 1, 0, 25, 27, bgSurface, drawSurface3); do { - if (trackVonBraun == 1) { - face = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); - - moveCharacters(); - moveVonBraun(); - - copyBackground(OBJWIDTH + 1, 0, vonBraunX + 5, 64, 25, 27, drawSurface3, screenSurface); - copyRect(x_talk[face], 34, vonBraunX + 5, 64, 25, 27, frontSurface, screenSurface); - updateRefresh(); - } - - if (withVoices == 0) - centerText(said, vonBraunX, 66); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); -} + if (talkerType == kVonBraunNormal) { + if (trackVonBraun == 1) { + face = _rnd->getRandomNumber(5); + copyBackground(); -void DrasculaEngine::talk_vonBraunpuerta(int index) { - char filename[20]; - sprintf(filename, "VB%i.als", index); - const char *said = _textvb[_lang][index]; - int length = strlen(said); + moveCharacters(); + moveVonBraun(); - color_abc(kColorBrown); + copyBackground(OBJWIDTH + 1, 0, vonBraunX + 5, 64, 25, 27, drawSurface3, screenSurface); + copyRect(x_talk[face], 34, vonBraunX + 5, 64, 25, 27, frontSurface, screenSurface); + updateRefresh(); + } - talkInit(filename); + if (withVoices == 0) + centerText(said, vonBraunX, 66); - do { - updateRoom(); + updateScreen(); + pause(3); + } else { + updateRoom(); - if (withVoices == 0) - centerText(said, 150, 80); + if (withVoices == 0) + centerText(said, 150, 80); - updateScreen(); + updateScreen(); + } } while (!isTalkFinished(&length)); updateRoom(); @@ -580,13 +601,13 @@ void DrasculaEngine::talk_blind(int index) { color_abc(kColorBrown); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateScreen(); talkInit(filename); do { - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); pos_blind[5] = 149; char c = toupper(syncChar[p]); @@ -623,7 +644,7 @@ void DrasculaEngine::talk_hacker(int index) { const char *said = _textd[_lang][index]; int length = strlen(said); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateScreen(); color_abc(kColorYellow); @@ -683,7 +704,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker else face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); if (talkerType == 0) @@ -706,7 +727,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker } while (!isTalkFinished(&length)); flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); updateScreen(); } @@ -726,7 +747,7 @@ void DrasculaEngine::talk_bj_bed(int index) { do { face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); @@ -771,7 +792,7 @@ void DrasculaEngine::talk_htel(int index) { else faceBuffer = (char *)backSurface; - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)faceBuffer, screenSurface); @@ -782,7 +803,7 @@ void DrasculaEngine::talk_htel(int index) { pause(3); } while (!isTalkFinished(&length)); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateScreen(); } @@ -808,7 +829,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha strncpy(buf, &syncChar[p], 1); face = atoi(buf); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); if (currentChapter == 2) @@ -871,7 +892,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha playMusic(roomMusic); } -void DrasculaEngine::talk_baul(int index) { +void DrasculaEngine::talk_trunk(int index) { char filename[20]; sprintf(filename, "d%i.als", index); const char *said = _text[_lang][index]; @@ -903,41 +924,6 @@ void DrasculaEngine::talk_baul(int index) { updateScreen(); } -void DrasculaEngine::talk_dr_grande(int index) { - char filename[20]; - sprintf(filename, "D%i.als", index); - const char *said = _textd[_lang][index]; - int x_talk[4] = {47, 93, 139, 185}; - int face; - int l = 0; - int length = strlen(said); - - color_abc(kColorRed); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); - copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); - copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); - l++; - if (l == 7) - l = 0; - - if (withVoices == 0) - centerText(said, 191, 69); - - updateScreen(); - - pause(3); - - byte key = getScan(); - if (key == Common::KEYCODE_ESCAPE) - term_int = 1; - } while (!isTalkFinished(&length)); -} - void DrasculaEngine::talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords, byte* surface) { int face; int length = strlen(said); @@ -946,7 +932,7 @@ void DrasculaEngine::talk_generic(const char* said, const char* filename, int* f do { face = _rnd->getRandomNumber(faceCount - 1); - copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); + copyBackground(); updateRefresh_pre(); copyBackground(faces[face], coords[0], coords[1], coords[2], coords[3], coords[4], surface, screenSurface); |