[Scummvm-cvs-logs] SF.net SVN: scummvm: [32481] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Jun 2 00:38:29 CEST 2008


Revision: 32481
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32481&view=rev
Author:   thebluegr
Date:     2008-06-01 15:38:29 -0700 (Sun, 01 Jun 2008)

Log Message:
-----------
Removed the now obsolete talk_dr_dch
Merged talk_bartender and talk_taber2
Merged talk_pen and talk_pen2

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/animation.cpp
    scummvm/trunk/engines/drascula/drascula.h
    scummvm/trunk/engines/drascula/rooms.cpp
    scummvm/trunk/engines/drascula/talk.cpp

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-06-01 21:57:30 UTC (rev 32480)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-06-01 22:38:29 UTC (rev 32481)
@@ -292,7 +292,7 @@
 		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 @@
 		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 @@
 	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 @@
 	updateScreen();
 	fadeFromBlack(1);
 	talk(256);
-	talk_dr_dch(30);
+	talk_drascula(30, 1);
 	talk(257);
 	fadeToBlack(0);
 	clearRoom();
@@ -1925,14 +1925,14 @@
 	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_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 @@
 	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() {

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-06-01 21:57:30 UTC (rev 32480)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-06-01 22:38:29 UTC (rev 32481)
@@ -431,22 +431,18 @@
 	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);

Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp	2008-06-01 21:57:30 UTC (rev 32480)
+++ scummvm/trunk/engines/drascula/rooms.cpp	2008-06-01 22:38:29 UTC (rev 32481)
@@ -978,7 +978,7 @@
 		talk(440);
 	else if (pickedObject == kVerbTalk && fl == 52) {
 		talk(266);
-		talk_taber2(1);
+		talk_bartender(1, 1);
 		converse("op_12.cal");
 		withoutVerb();
 		pickedObject = 0;

Modified: scummvm/trunk/engines/drascula/talk.cpp
===================================================================
--- scummvm/trunk/engines/drascula/talk.cpp	2008-06-01 21:57:30 UTC (rev 32480)
+++ scummvm/trunk/engines/drascula/talk.cpp	2008-06-01 22:38:29 UTC (rev 32481)
@@ -153,10 +153,6 @@
 	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 @@
 	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 @@
 	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 @@
 		updateScreen();
 
 		pause(3);
-
 	} while (!isTalkFinished(&length));
 
 	updateRoom();
@@ -357,11 +359,11 @@
 
 	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 @@
 	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 @@
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list