[Scummvm-cvs-logs] scummvm master -> 34d85734e65ccf7103f06fc7682921da5d16ab8d

tramboi bertrand_augereau at yahoo.fr
Mon Nov 21 14:35:42 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
34d85734e6 DREAMWEB: Stub wrappers with a better signature for 'playchannel[0|1]'


Commit: 34d85734e65ccf7103f06fc7682921da5d16ab8d
    https://github.com/scummvm/scummvm/commit/34d85734e65ccf7103f06fc7682921da5d16ab8d
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-21T05:33:36-08:00

Commit Message:
DREAMWEB: Stub wrappers with a better signature for 'playchannel[0|1]'

Changed paths:
    engines/dreamweb/monitor.cpp
    engines/dreamweb/sprite.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h
    engines/dreamweb/vgafades.cpp



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index d0da5e3..cb41e75 100644
--- a/engines/dreamweb/monitor.cpp
+++ b/engines/dreamweb/monitor.cpp
@@ -90,8 +90,7 @@ void DreamGenContext::usemon() {
 	deallocatemem(data.word(kTextfile2));
 	deallocatemem(data.word(kTextfile3));
 	data.byte(kGetback) = 1;
-	al = 26;
-	playchannel1();
+	playchannel1(26);
 	data.byte(kManisoffscreen) = 0;
 	restoreall();
 	redrawmainscrn();
@@ -187,8 +186,7 @@ void DreamGenContext::scrollmonitor() {
 	printlogo();
 	printundermon();
 	workToScreenCPP();
-	al = 25;
-	playchannel1();
+	playchannel1(25);
 }
 
 void DreamGenContext::showcurrentfile() {
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 0200a9f..06b6739 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -321,11 +321,12 @@ void DreamGenContext::dodoor(Sprite *sprite, SetObject *objData, Common::Rect ch
 
 		++sprite->animFrame;
 		if (sprite->animFrame == 1) { // doorsound2
+			uint8 soundIndex;
 			if (data.byte(kReallocation) == 5) // hoteldoor2
-				al = 13;
+				soundIndex = 13;
 			else
-				al = 0;
-			playchannel1();
+				soundIndex = 0;
+			playchannel1(soundIndex);
 		}
 		if (objData->frames[sprite->animFrame] == 255)
 			--sprite->animFrame;
@@ -337,11 +338,12 @@ void DreamGenContext::dodoor(Sprite *sprite, SetObject *objData, Common::Rect ch
 		// shut door
 
 		if (sprite->animFrame == 5) { // doorsound1;
+			uint8 soundIndex;
 			if (data.byte(kReallocation) == 5) // hoteldoor1
-				al = 13;
+				soundIndex = 13;
 			else
-				al = 1;
-			playchannel1();
+				soundIndex = 1;
+			playchannel1(soundIndex);
 		}
 		if (sprite->animFrame != 0)
 			--sprite->animFrame;
@@ -373,8 +375,7 @@ void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) {
 	if (openDoor) {
 
 		if (sprite->animFrame == 1) {
-			al = 0;
-			playchannel1();
+			playchannel1(0);
 		}
 
 		if (sprite->animFrame == 6)
@@ -395,8 +396,7 @@ void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) {
 		// shut door
 
 		if (sprite->animFrame == 5) {
-			al = 1;
-			playchannel1();
+			playchannel1(1);
 		}
 
 		if (sprite->animFrame != 0)
@@ -559,11 +559,12 @@ void DreamGenContext::showrain() {
 	if (engine->randomNumber() >= 1) // play thunder with 1 in 256 chance
 		return;
 
+	uint8 soundIndex;
 	if (data.byte(kCh0playing) != 6)
-		al = 4;
+		soundIndex = 4;
 	else
-		al = 7;
-	playchannel1();
+		soundIndex = 7;
+	playchannel1(soundIndex);
 }
 
 static void (DreamGenContext::*reelCallbacks[])() = {
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 2bfa384..5ee27e1 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -544,8 +544,7 @@ void DreamGenContext::setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x,
 		al = textIndex;
 		loadspeech();
 		if (data.byte(kSpeechloaded) == 1) {
-			al = 50+12;
-			playchannel1();
+			playchannel1(50+12);
 		}
 		dx = pop();
 		cx = pop();
@@ -2204,5 +2203,15 @@ Frame * DreamGenContext::tempGraphics3() {
 	return (Frame *)segRef(data.word(kTempgraphics3)).ptr(0, 0);
 }
 
+void DreamGenContext::playchannel0(uint8 index) {
+	al = index;
+	playchannel0();
+}
+
+void DreamGenContext::playchannel1(uint8 index) {
+	al = index;
+	playchannel1();
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 3aedb10..c408ac2 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -321,4 +321,6 @@
 	void turnonpower();
 	void powerlighton();
 	void powerlightoff();
+	void playchannel0(uint8 index);
+	void playchannel1(uint8 index);
 
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index 6e0dd66..c4c473f 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -104,8 +104,7 @@ void DreamGenContext::fadeupmonfirst() {
 	data.byte(kColourpos) = 0;
 	data.byte(kNumtofade) = 128;
 	hangon(64);
-	al = 26;
-	playchannel1();
+	playchannel1(26);
 	hangon(64);
 }
 






More information about the Scummvm-git-logs mailing list