aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorKirben2016-06-22 11:01:02 +1000
committerKirben2016-06-22 11:01:02 +1000
commit6b07163600d6c63acb2c291ee42eaef72dc75cb9 (patch)
treeeacd4f72b2f125f74ee62553d30310780d79662e /engines
parent5b6114f4cc6605b122180fd069148387b9712739 (diff)
downloadscummvm-rg350-6b07163600d6c63acb2c291ee42eaef72dc75cb9.tar.gz
scummvm-rg350-6b07163600d6c63acb2c291ee42eaef72dc75cb9.tar.bz2
scummvm-rg350-6b07163600d6c63acb2c291ee42eaef72dc75cb9.zip
SCUMM HE: Document sound opcodes.
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/intern_he.h4
-rw-r--r--engines/scumm/he/script_v100he.cpp34
-rw-r--r--engines/scumm/he/script_v70he.cpp28
3 files changed, 33 insertions, 33 deletions
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index 7f7babc604..84ea295779 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -168,7 +168,7 @@ protected:
virtual void setDefaultCursor();
/* HE version 70 script opcodes */
- void o70_startSound();
+ void o70_soundOps();
void o70_pickupObject();
void o70_getActorRoom();
void o70_resourceRoutines();
@@ -622,7 +622,7 @@ protected:
void o100_redimArray();
void o100_roomOps();
void o100_setSystemMessage();
- void o100_startSound();
+ void o100_soundOps();
void o100_setSpriteInfo();
void o100_startScript();
void o100_systemOps();
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 4a4c340802..d609c069f1 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -184,7 +184,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(0x74, o6_delay);
OPCODE(0x75, o6_delayMinutes);
OPCODE(0x76, o6_delaySeconds);
- OPCODE(0x77, o100_startSound);
+ OPCODE(0x77, o100_soundOps);
/* 78 */
OPCODE(0x78, o80_sourceDebug);
OPCODE(0x79, o100_setSpriteInfo);
@@ -1742,69 +1742,69 @@ void ScummEngine_v100he::o100_setSystemMessage() {
}
}
-void ScummEngine_v100he::o100_startSound() {
+void ScummEngine_v100he::o100_soundOps() {
byte filename[260];
int var, value;
byte subOp = fetchScriptByte();
switch (subOp) {
- case 6:
+ case 6: // SO_AT
_heSndFlags |= 16;
_heSndOffset = pop();
break;
- case 47:
+ case 47: // SO_LOAD
copyScriptString(filename, sizeof(filename));
_heSndSoundId = pop();
if (_heSndSoundId)
debug(0, "Load sound %d from file %s\n", _heSndSoundId, filename);
break;
- case 55:
+ case 55: // SO_NOW
_heSndFlags |= 8;
break;
- case 83:
+ case 83: // SO_VARIABLE
value = pop();
var = pop();
_heSndSoundId = pop();
((SoundHE *)_sound)->setSoundVar(_heSndSoundId, var, value);
break;
- case 92:
+ case 92: // SO_END
_sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags);
break;
- case 128:
+ case 128: // SO_SOUND_ADD
_heSndFlags |= 2;
break;
- case 129:
+ case 129: // SO_SOUND_CHANNEL
_heSndChannel = pop();
break;
- case 130:
+ case 130: // SO_SOUND_FREQUENCY
_heSndFlags |= 64;
pop();
break;
- case 131:
+ case 131: // SO_SOUND_LOOPING
_heSndFlags |= 1;
break;
- case 132: // Music
- case 134: // Sound
+ case 132: // SO_SOUND_MODIFY
+ case 134: // SO_SOUND_START
_heSndSoundId = pop();
_heSndOffset = 0;
_heSndSoundFreq = 11025;
_heSndChannel = VAR(VAR_SOUND_CHANNEL);
_heSndFlags = 0;
break;
- case 133:
+ case 133: // SO_SOUND_PAN
_heSndFlags |= 128;
pop();
break;
- case 135:
+ case 135: // SO_SOUND_SOFT
_heSndFlags |= 4;
break;
- case 136:
+ case 136: // SO_SOUND_VOLUME
_heSndFlags |= 32;
pop();
break;
default:
- error("o100_startSound invalid case %d", subOp);
+ error("o100_soundOps invalid case %d", subOp);
}
}
diff --git a/engines/scumm/he/script_v70he.cpp b/engines/scumm/he/script_v70he.cpp
index b91943c685..4c608d6db5 100644
--- a/engines/scumm/he/script_v70he.cpp
+++ b/engines/scumm/he/script_v70he.cpp
@@ -39,7 +39,7 @@ namespace Scumm {
void ScummEngine_v70he::setupOpcodes() {
ScummEngine_v60he::setupOpcodes();
- OPCODE(0x74, o70_startSound);
+ OPCODE(0x74, o70_soundOps);
OPCODE(0x84, o70_pickupObject);
OPCODE(0x8c, o70_getActorRoom);
OPCODE(0x9b, o70_resourceRoutines);
@@ -52,60 +52,60 @@ void ScummEngine_v70he::setupOpcodes() {
OPCODE(0xfa, o70_setSystemMessage);
}
-void ScummEngine_v70he::o70_startSound() {
+void ScummEngine_v70he::o70_soundOps() {
int var, value;
byte subOp = fetchScriptByte();
switch (subOp) {
- case 9:
+ case 9: // SO_SOUND_SOFT?
_heSndFlags |= 4;
break;
- case 23:
+ case 23: // SO_VARIABLE
value = pop();
var = pop();
_heSndSoundId = pop();
((SoundHE *)_sound)->setSoundVar(_heSndSoundId, var, value);
break;
- case 25:
+ case 25: // SO_SOUND_VOLUME
value = pop();
_heSndSoundId = pop();
_sound->addSoundToQueue(_heSndSoundId, 0, 0, 8);
break;
- case 56:
+ case 56: // SO_NOW
_heSndFlags |= 16;
break;
- case 164:
+ case 164: // SO_SOUND_ADD
_heSndFlags |= 2;
break;
case 222:
// WORKAROUND: For errors in room script 240 (room 4) of maze
break;
- case 224:
+ case 224: // SO_SOUND_FREQUENCY
_heSndSoundFreq = pop();
break;
- case 230:
+ case 230: // SO_SOUND_CHANNEL
_heSndChannel = pop();
break;
- case 231:
+ case 231: // SO_AT
_heSndOffset = pop();
break;
- case 232:
+ case 232: // SO_SOUND_START
_heSndSoundId = pop();
_heSndOffset = 0;
_heSndSoundFreq = 11025;
_heSndChannel = VAR(VAR_SOUND_CHANNEL);
break;
- case 245:
+ case 245: // SO_SOUND_LOOPING
_heSndFlags |= 1;
break;
- case 255:
+ case 255: // SO_END
_sound->addSoundToQueue(_heSndSoundId, _heSndOffset, _heSndChannel, _heSndFlags);
_heSndFlags = 0;
break;
default:
- error("o70_startSound invalid case %d", subOp);
+ error("o70_soundOps invalid case %d", subOp);
}
}