aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorBertrand Augereau2011-11-21 14:33:36 +0100
committerBertrand Augereau2011-11-21 14:33:36 +0100
commit34d85734e65ccf7103f06fc7682921da5d16ab8d (patch)
treeff7a7e943bb07378bed00691e3828f1084cdf2e8 /engines/dreamweb
parent1e80ac08858ecbf2c32f906f4eb0552bf5bee666 (diff)
downloadscummvm-rg350-34d85734e65ccf7103f06fc7682921da5d16ab8d.tar.gz
scummvm-rg350-34d85734e65ccf7103f06fc7682921da5d16ab8d.tar.bz2
scummvm-rg350-34d85734e65ccf7103f06fc7682921da5d16ab8d.zip
DREAMWEB: Stub wrappers with a better signature for 'playchannel[0|1]'
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/monitor.cpp6
-rw-r--r--engines/dreamweb/sprite.cpp27
-rw-r--r--engines/dreamweb/stubs.cpp13
-rw-r--r--engines/dreamweb/stubs.h2
-rw-r--r--engines/dreamweb/vgafades.cpp3
5 files changed, 30 insertions, 21 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index d0da5e3110..cb41e75552 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 0200a9f88a..06b6739b3b 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 2bfa3849c6..5ee27e1878 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 3aedb105d6..c408ac2239 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 6e0dd665f6..c4c473f040 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);
}