aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-02 06:31:47 +0000
committerPaweł Kołodziejski2002-10-02 06:31:47 +0000
commite10366ec3d1f02a40d70d8ed6da2224b89e42c05 (patch)
tree121949323b5d1a6c087e68e43406698184b74f24 /scumm
parent5520e38a4ee2db16340b5d30bdf3457ad07c2f2f (diff)
downloadscummvm-rg350-e10366ec3d1f02a40d70d8ed6da2224b89e42c05.tar.gz
scummvm-rg350-e10366ec3d1f02a40d70d8ed6da2224b89e42c05.tar.bz2
scummvm-rg350-e10366ec3d1f02a40d70d8ed6da2224b89e42c05.zip
added stubs for ImuseDigital::doCommand
svn-id: r5070
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp55
1 files changed, 52 insertions, 3 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 68df773f11..6217040778 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -4942,7 +4942,7 @@ void IMuseDigital::startSound(int sound) {
uint32 tag, size = 0;
for (;;) {
- tag = READ_BE_UINT32(ptr); ptr += 4;
+ tag = READ_BE_UINT32(ptr); ptr += 4;
switch(tag) {
case MKID_BE('FRMT'):
ptr += 12;
@@ -5063,8 +5063,57 @@ void IMuseDigital::stopAll() {
}
int32 IMuseDigital::doCommand(int a, int b, int c, int d, int e, int f, int g, int h) {
- debug(1, "stub IMuseDigital::doCommand(%d,%d,%d,%d,%d,%d,%d,%d,%d)",
- a >> 8, a & 0xFF, b, c, d, e, f, g, h);
+ byte cmd = a & 0xFF;
+ byte param = a >> 8;
+ byte sample = b;
+ byte sub_cmd = c >> 8;
+
+ if (!(cmd || param))
+ return 1;
+
+ if (param == 0) {
+ switch (cmd) {
+ case 12:
+ switch (sub_cmd) {
+ case 5: // param seems always set 0 (maybe reset)
+ debug(1, "IMuseDigital::doCommand stub cmd=%d,param=%d,sample=%d,sub_cmd=%d,params=(%d,%d,%d)", param, cmd, sample, sub_cmd, d, e, f);
+ return 0;
+ case 6: // left pan control (0-127) i think
+ debug(1, "IMuseDigital::doCommand stub cmd=%d,param=%d,sample=%d,sub_cmd=%d,params=(%d,%d,%d)", param, cmd, sample, sub_cmd, d, e, f);
+ return 0;
+ case 7: // right pan control (0-127) i think
+ debug(1, "IMuseDigital::doCommand stub cmd=%d,param=%d,sample=%d,sub_cmd=%d,params=(%d,%d,%d)", param, cmd, sample, sub_cmd, d, e, f);
+ return 0;
+ default:
+ warning("IMuseDigital::doCommand (param=0, cmd=12) default sub command %d", sub_cmd);
+ return 1;
+ }
+
+ return 0;
+ case 14: // maybe volume fading
+ debug(1, "IMuseDigital::doCommand %d,%d(%d,%d,%d,%d,%d)", param, cmd, b, c, d, e, f);
+ return 0;
+ default:
+ warning("IMuseDigital::doCommand (param=0) default command %d", cmd);
+ return 1;
+ }
+ } else if (param == 16) { // unknown commands
+ switch (cmd) {
+ case 0:
+ debug(1, "IMuseDigital::doCommand %d,%d(%d,%d,%d,%d,%d)", param, cmd, b, c, d, e, f);
+ return 0;
+ case 1:
+ debug(1, "IMuseDigital::doCommand %d,%d(%d,%d,%d,%d,%d)", param, cmd, b, c, d, e, f);
+ return 0;
+ case 3:
+ debug(1, "IMuseDigital::doCommand %d,%d(%d,%d,%d,%d,%d)", param, cmd, b, c, d, e, f);
+ return 0;
+ default:
+ warning("IMuseDigital::doCommand (param=16) default command %d", cmd);
+ return 1;
+ }
+ }
+
return 1;
}