From 704ad4a5fbdef90bd9e53874b8930706d5184734 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 1 Jun 2008 22:38:29 +0000 Subject: Removed the now obsolete talk_dr_dch Merged talk_bartender and talk_taber2 Merged talk_pen and talk_pen2 svn-id: r32481 --- engines/drascula/animation.cpp | 56 ++++++++--------- engines/drascula/drascula.h | 10 +-- engines/drascula/rooms.cpp | 2 +- engines/drascula/talk.cpp | 140 ++++++++++++----------------------------- 4 files changed, 72 insertions(+), 136 deletions(-) (limited to 'engines') diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index fd75a41031..4c0ca7c72f 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -292,7 +292,7 @@ void DrasculaEngine::animation_1_1() { talk_igor_dch(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_dch(11); + talk_drascula(11, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -324,7 +324,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(13); - talk_dr_dch(13); + talk_drascula(13, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -1881,24 +1881,24 @@ void DrasculaEngine::animation_1_6() { loadAndDecompressPic("auxig2.alg", frontSurface, 1); loadAndDecompressPic("auxdr.alg", drawSurface2, 1); loadAndDecompressPic("car.alg", backSurface, 1); - talk_dr_dch(19); + talk_drascula(19, 1); talk(247); - talk_dr_dch(20); - talk_dr_dch(21); + talk_drascula(20, 1); + talk_drascula(21, 1); talk(248); - talk_dr_dch(22); + talk_drascula(22, 1); talk(249); - talk_dr_dch(23); + talk_drascula(23, 1); converse("op_11.cal"); - talk_dr_dch(26); + talk_drascula(26, 1); animate("fum.bin", 15); - talk_dr_dch(27); + talk_drascula(27, 1); talk(254); - talk_dr_dch(28); + talk_drascula(28, 1); talk(255); - talk_dr_dch(29); + talk_drascula(29, 1); fadeToBlack(1); clearRoom(); loadAndDecompressPic("time1.alg", screenSurface, 1); @@ -1912,7 +1912,7 @@ void DrasculaEngine::animation_1_6() { updateScreen(); fadeFromBlack(1); talk(256); - talk_dr_dch(30); + talk_drascula(30, 1); talk(257); fadeToBlack(0); clearRoom(); @@ -1925,14 +1925,14 @@ void DrasculaEngine::animation_1_6() { updateScreen(); fadeFromBlack(1); talk(258); - talk_dr_dch(31); + talk_drascula(31, 1); animation_5_6(); - talk_dr_dch(32); + talk_drascula(32, 1); talk_igor_dch(11); sentido_igor = 3; - talk_dr_dch(33); + talk_drascula(33, 1); talk_igor_front(12); - talk_dr_dch(34); + talk_drascula(34, 1); sentido_dr = 0; talk_drascula(35); @@ -1945,15 +1945,15 @@ void DrasculaEngine::animation_1_6() { } void DrasculaEngine::animation_2_6() { - talk_dr_dch(24); + talk_drascula(24, 1); } void DrasculaEngine::animation_3_6() { - talk_dr_dch(24); + talk_drascula(24, 1); } void DrasculaEngine::animation_4_6() { - talk_dr_dch(25); + talk_drascula(25, 1); } void DrasculaEngine::animation_5_6() { @@ -2095,36 +2095,36 @@ void DrasculaEngine::animation_10_6() { copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); updateScreen(); finishSound(); - talk_taber2(23); + talk_bartender(23, 1); flags[7] = 1; } void DrasculaEngine::animation_11_6() { - talk_taber2(10); + talk_bartender(10, 1); talk(268); - talk_taber2(11); + talk_bartender(11, 1); } void DrasculaEngine::animation_12_6() { - talk_taber2(12); + talk_bartender(12, 1); talk(270); - talk_taber2(13); - talk_taber2(14); + talk_bartender(13, 1); + talk_bartender(14, 1); } void DrasculaEngine::animation_13_6() { - talk_taber2(15); + talk_bartender(15, 1); } void DrasculaEngine::animation_14_6() { - talk_taber2(24); + talk_bartender(24, 1); addObject(21); flags[10] = 1; breakOut = 1; } void DrasculaEngine::animation_15_6() { - talk_taber2(16); + talk_bartender(16, 1); } void DrasculaEngine::animation_18_6() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 09973b8d41..9ac43e7e20 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -431,22 +431,18 @@ public: bool isTalkFinished(int* length); void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); - void talk_dr_dch(int); void talk_drascula(int index, int talkerType = 0); void talk_drascula(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_front(int); void talk_igor_front(const char *, const char *); - void talk_bartender(int); - void talk_bartender(const char *said, const char *filename); + void talk_bartender(int, int talkerType = 0); + void talk_bartender(const char *said, const char *filename, int talkerType = 0); void talk_igor_door(int); void talk_igor_door(const char *said, const char *filename); void talk_igor_wig(int); void talk_igor_wig(const char *said, const char *filename); - void talk_pen(const char *, const char *); - void talk_pen2(const char *, const char *); - void talk_taber2(int); - void talk_taber2(const char *, const char *); + void talk_pen(const char *, const char *, int); void talk_bj_bed(int); void talk_bj_bed(const char *said, const char * filename); void talk_htel(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 0e22e4a85c..135de8b9f5 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -978,7 +978,7 @@ bool DrasculaEngine::room_60(int fl) { talk(440); else if (pickedObject == kVerbTalk && fl == 52) { talk(266); - talk_taber2(1); + talk_bartender(1, 1); converse("op_12.cal"); withoutVerb(); pickedObject = 0; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 71e0b77587..701580e722 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -153,10 +153,6 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { updateScreen(); } -void DrasculaEngine::talk_dr_dch(int index) { - talk_drascula(index, 1); -} - void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); @@ -240,13 +236,13 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_bartender(int index) { +void DrasculaEngine::talk_bartender(int index, int talkerType) { char name[20]; sprintf(name, "t%i.als", index); talk_bartender(_textt[_lang][index], name); } -void DrasculaEngine::talk_bartender(const char *said, const char *filename) { +void DrasculaEngine::talk_bartender(const char *said, const char *filename, int talkerType) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int face; int length = strlen(said); @@ -256,21 +252,28 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { talkInit(filename); do { - if (currentChapter == 1) { - if (musicStatus() == 0) - playMusic(roomMusic); - } else if (currentChapter == 2) { - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); + if (talkerType == 0) { + if (currentChapter == 1) { + if (musicStatus() == 0) + playMusic(roomMusic); + } else if (currentChapter == 2) { + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); + } + + face = _rnd->getRandomNumber(8); + } else { + face = _rnd->getRandomNumber(5); } - face = _rnd->getRandomNumber(8); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); + if (talkerType == 0) + copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); + else + copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -280,7 +283,6 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { updateScreen(); pause(3); - } while (!isTalkFinished(&length)); updateRoom(); @@ -357,11 +359,11 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (currentChapter == 6) { if (flags[0] == 0 && roomNumber == 102) { - talk_pen(said, filename); + talk_pen(said, filename, 0); return; } if (flags[0] == 0 && roomNumber == 58) { - talk_pen2(said, filename); + talk_pen(said, filename, 1); return; } } @@ -780,70 +782,46 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_pen(const char *said, const char *filename) { +void DrasculaEngine::talk_pen(const char *said, const char *filename, int talkerType) { int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294}; + int x_talk2[5] = {122, 148, 174, 200, 226}; int face; int length = strlen(said); flags[1] = 1; - updateRoom(); - copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); - updateScreen(); - - color_abc(kColorYellow); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); - - updateRefresh(); - - if (withVoices == 0) - centerText(said, 160, 105); - + if (talkerType == 0) { + updateRoom(); + copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - updateScreen(); -} - -void DrasculaEngine::talk_pen2(const char *said, const char *filename) { - int x_talk[5]={122, 148, 174, 200, 226}; - int face; - int length = strlen(said); - - flags[1] = 1; + } color_abc(kColorYellow); talkInit(filename); do { - face = _rnd->getRandomNumber(4); + if (talkerType == 0) + face = _rnd->getRandomNumber(7); + else + face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - copyBackground(x_talk[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); + if (talkerType == 0) + copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); + else + copyBackground(x_talk2[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); updateRefresh(); - if (withVoices == 0) - centerText(said, 195, 107); + if (withVoices == 0) { + if (talkerType == 0) + centerText(said, 160, 105); + else + centerText(said, 195, 107); + } updateScreen(); @@ -856,44 +834,6 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_taber2(int index) { - char name[20]; - sprintf(name, "t%i.als", index); - talk_taber2(_textt[_lang][index], name); -} - -void DrasculaEngine::talk_taber2(const char *said, const char *filename) { - int x_talk[6] = {1, 23, 45, 67, 89, 111}; - int face; - int length = strlen(said); - - color_abc(kColorMaroon); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(5); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 132, 45); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - void DrasculaEngine::talk_bj_bed(int index) { char name[20]; sprintf(name, "BJ%i.als", index); -- cgit v1.2.3