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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri May 30 13:04:40 CEST 2008


Revision: 32395
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32395&view=rev
Author:   thebluegr
Date:     2008-05-30 04:04:40 -0700 (Fri, 30 May 2008)

Log Message:
-----------
Simplified calls to playSound()

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

Modified: scummvm/trunk/engines/drascula/animation.cpp
===================================================================
--- scummvm/trunk/engines/drascula/animation.cpp	2008-05-30 10:55:43 UTC (rev 32394)
+++ scummvm/trunk/engines/drascula/animation.cpp	2008-05-30 11:04:40 UTC (rev 32395)
@@ -103,7 +103,7 @@
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		clearRoom();
-		playSound("s5.als");
+		playSound(5);
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
 			break;
 		if (animate("scr2.bin", 17))
@@ -287,7 +287,7 @@
 			break;
 		if (animate("rayo1.bin", 16))
 			break;
-		playSound("s5.als");
+		playSound(5);
 		if (animate("rayo2.bin", 15))
 			break;
 		if (animate("frel2.bin", 16))
@@ -434,7 +434,7 @@
 			break;
 
 		pause(4);
-		playSound("s1.als");
+		playSound(1);
 		hiccup(18);
 		stopSound();
 		if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE))
@@ -721,7 +721,7 @@
 	updateAnim(55, 201, 87, 50, 52, 6, frontSurface);
 	updateAnim(109, 201, 87, 50, 52, 6, frontSurface);
 
-	playSound("s2.als");
+	playSound(2);
 
 	updateAnim(1, 201, 87, 50, 52, 6, extraSurface);
 	updateAnim(55, 201, 87, 50, 52, 6, extraSurface);
@@ -734,7 +734,7 @@
 
 	pause (4);
 
-	playSound("s1.als");
+	playSound(1);
 	hipo_sin_nadie(12);
 	stopSound();
 }
@@ -882,7 +882,7 @@
 
 	decompressPic(drawSurface1, 1);
 
-	playSound("s7.als");
+	playSound(7);
 	hiccup(15);
 
 	stopSound();
@@ -1220,7 +1220,7 @@
 
 	flags[24] = 0;
 
-	playSound("s6.als");
+	playSound(6);
 
 	for (n = 0; n >= -160; n = n - 8) {
 		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
@@ -1376,7 +1376,7 @@
 
 	pause(19);
 
-	playSound("s1.als");
+	playSound(1);
 	hipo_sin_nadie(18);
 	stopSound();
 
@@ -1516,7 +1516,7 @@
 
 	pause(50);
 
-	playSound("s5.als");
+	playSound(5);
 
 	updateScreen(0, 0, 0, 0, 320, 200, extraSurface);
 	pause(3);
@@ -1709,7 +1709,7 @@
 	}
 	updateScreen(0, 0, 0, 0, 320, 200, drawSurface1);
 
-	playSound("s1.als");
+	playSound(1);
 	stopSound();
 
 	loadPic("99.alg");
@@ -1786,7 +1786,7 @@
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 	pause(27);
 	animate("rayo1.bin", 23);
-	playSound("s5.als");
+	playSound(5);
 	animate("rayo2.bin", 17);
 	sentido_hare = 1;
 	updateRoom();
@@ -1861,7 +1861,7 @@
 	flags[1] = 1;
 
 	animation_13_5();
-	playSound("s1.als");
+	playSound(1);
 	hiccup(12);
 	stopSound();
 
@@ -1927,7 +1927,7 @@
 
 void DrasculaEngine::animation_14_5() {
 	flags[11] = 1;
-	playSound("s3.als");
+	playSound(3);
 	updateRoom();
 	updateScreen(0, 0, 0,0 , 320, 200, screenSurface);
 	stopSound();
@@ -1936,7 +1936,7 @@
 	talk(246);
 	lleva_al_hare(89, 160);
 	flags[10] = 1;
-	playSound("s7.als");
+	playSound(7);
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 	stopSound();
@@ -2199,7 +2199,7 @@
 }
 
 void DrasculaEngine::animation_10_6() {
-	playSound ("s14.als");
+	playSound(14);
 	copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 	updateRefresh_pre();
 	copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface);
@@ -2254,7 +2254,7 @@
 	pause(6);
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
-	playSound("s4.als");
+	playSound(4);
 	pause(6);
 	stopSound();
 }
@@ -2342,7 +2342,7 @@
 		updateScreen(225, 113, 225, 113, 50, 59, screenSurface);
 		x = x + 50;
 		if (n == 2)
-			playSound("s9.als");
+			playSound(9);
 		pause(3);
 	}
 
@@ -2421,7 +2421,7 @@
 	sentido_hare=2;
 	updateRoom();
 	updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
-	playSound("s13.als");
+	playSound(13);
 	stopSound();
 	sentido_hare = 1;
 
@@ -2502,7 +2502,7 @@
 	updateAnim(1, 218, 79, 83, 75, 3, backSurface);
 	updateAnim(77, 218, 79, 83, 75, 3, backSurface);
 
-	playSound("s8.als");
+	playSound(8);
 
 	updateAnim(1, 218, 79, 83, 75, 3, extraSurface);
 
@@ -2637,7 +2637,7 @@
 	updateAnim(86, 213, 66, 53, 84, 6, extraSurface);
 	updateAnim(1, 213, 66, 53, 84, 6, frontSurface);
 
-	playSound("s1.als");
+	playSound(1);
 	updateAnim(86, 213, 66, 53, 84, 6, frontSurface);
 	stopSound_corte();
 

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 10:55:43 UTC (rev 32394)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 11:04:40 UTC (rev 32395)
@@ -2022,7 +2022,10 @@
 	}
 }
 
-void DrasculaEngine::playSound(const char *file) {
+void DrasculaEngine::playSound(int soundNum) {
+	char file[20];
+	sprintf(file, "s%i.als", soundNum);
+
 	if (hay_sb == 1) {
 		sku = new Common::File;
 		sku->open(file);
@@ -3269,7 +3272,7 @@
 
 void DrasculaEngine::para_grabar(char gameName[]) {
 	saveGame(gameName);
-	playSound("99.als");
+	playSound(99);
 	stopSound();
 }
 
@@ -4360,11 +4363,11 @@
 	if (flags[nflag] == 0) {
 		if (num_ejec == 1 /*|| num_ejec == 4*/) {
 			if (nflag != 7) {
-				playSound("s3.als");
+				playSound(3);
 				flags[nflag] = 1;
 			}
 		} else {
-			playSound("s3.als");
+			playSound(3);
 			flags[nflag] = 1;
 		}
 
@@ -4458,7 +4461,7 @@
 
 void DrasculaEngine::closeDoor(int nflag, int doorNum) {
 	if (flags[nflag] == 1) {
-		playSound("s4.als");
+		playSound(4);
 		flags[nflag] = 0;
 		if (doorNum != NO_DOOR)
 			updateDoor(doorNum);

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-05-30 10:55:43 UTC (rev 32394)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-05-30 11:04:40 UTC (rev 32395)
@@ -470,7 +470,7 @@
 	char LimitaVGA(char value);
 	void color_abc(int cl);
 	void centerText(const char *,int,int);
-	void playSound(const char *);
+	void playSound(int soundNum);
 	bool animate(const char *animation, int FPS);
 	void stopSound_corte();
 	void fadeToBlack(int VelocidadDeFundido);

Modified: scummvm/trunk/engines/drascula/rooms.cpp
===================================================================
--- scummvm/trunk/engines/drascula/rooms.cpp	2008-05-30 10:55:43 UTC (rev 32394)
+++ scummvm/trunk/engines/drascula/rooms.cpp	2008-05-30 11:04:40 UTC (rev 32395)
@@ -383,7 +383,7 @@
 		copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface);
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 		pause(10);
-		playSound("s3.als");
+		playSound(3);
 		flags[2] = 1;
 		updateRoom();
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
@@ -395,7 +395,7 @@
 		copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface);
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 		pause(5);
-		playSound("s4.als");
+		playSound(4);
 		updateRoom();
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 		stopSound();
@@ -405,7 +405,7 @@
 		copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface);
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 		pause(19);
-		playSound("s3.als");
+		playSound(3);
 		flags[1] = 1;
 		visible[4] = 1;
 		visible[2] = 0;
@@ -554,7 +554,7 @@
 		copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface);
 		copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface);
 		updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
-		playSound("s8.als");
+		playSound(8);
 		stopSound();
 		talk(338);
 		flags[27] = 0;
@@ -749,7 +749,7 @@
 	} else if (pickedObject == 22 && fl == 52) {
 		animate("up.bin",14);
 		flags[26]=1;
-		playSound("s1.als");
+		playSound(1);
 		hiccup(14);
 		stopSound();
 		withoutVerb();
@@ -1104,7 +1104,7 @@
 	else if (pickedObject == kVerbLook && fl == 205)
 		talk(140);
 	else if (fl == 206) {
-		playSound("s11.als");
+		playSound(11);
 		animate("det.bin", 17);
 		stopSound();
 		lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6);
@@ -1150,7 +1150,7 @@
 		talk(265);
 		flags[9] = 0;
 		if (flags[11] == 0) {
-			playSound("s12.als");
+			playSound(12);
 			delay(40);
 			stopSound();
 			delay(10);
@@ -1159,7 +1159,7 @@
 			updateRoom();
 			updateScreen(0, 0, 0, 0, 320, 200, screenSurface);
 			pause(40);
-			playSound("s12.als");
+			playSound(12);
 			pause(19);
 			stopSound_corte();
 			hare_se_ve = 0;


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