aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r--engines/gob/inter_v1.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index 8e32e766db..1022d2cf48 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -1973,7 +1973,7 @@ bool Inter_v1::o1_setBackDelta(char &cmdCount, int16 &counter, int16 &retFlag) {
}
bool Inter_v1::o1_loadSound(char &cmdCount, int16 &counter, int16 &retFlag) {
- _vm->_game->interLoadSound(-1);
+ loadSound(-1);
return false;
}
@@ -2689,4 +2689,29 @@ void Inter_v1::o1_initGoblin(int16 &extraData, int32 *retVarPtr, Goblin::Gob_Obj
_vm->_util->beep(50);
}
+int16 Inter_v1::loadSound(int16 slot) {
+ char *dataPtr;
+ int16 id;
+
+ if (slot == -1)
+ slot = _vm->_parse->parseValExpr();
+
+ id = load16();
+ if (id == -1) {
+ _vm->_global->_inter_execPtr += 9;
+ return 0;
+ }
+
+ if (id >= 30000) {
+ dataPtr = _vm->_game->loadExtData(id, 0, 0);
+ _vm->_game->_soundFromExt[slot] = 1;
+ } else {
+ dataPtr = _vm->_game->loadTotResource(id);
+ _vm->_game->_soundFromExt[slot] = 0;
+ }
+
+ _vm->_game->loadSound(slot, dataPtr);
+ return 0;
+}
+
} // End of namespace Gob