aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/engine/kernel.cpp18
-rw-r--r--engines/sci/sound/music.cpp2
-rw-r--r--engines/sci/sound/music.h2
3 files changed, 19 insertions, 3 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index a7e5ab208a..70a0166b15 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -652,6 +652,14 @@ void Kernel::mapFunctions() {
bool Kernel::debugSetFunctionLogging(const char *kernelName, bool logging) {
if (strcmp(kernelName, "*")) {
+ const char *kernelSubName = strchr(kernelName, '(');
+ uint kernelSubNameLen = 0;
+ if (kernelSubName) {
+ kernelSubName++;
+ kernelSubNameLen = strlen(kernelSubName);
+ if ((!kernelSubNameLen) || (kernelSubName[kernelSubNameLen - 1] != ')'))
+ return false;
+ }
for (uint id = 0; id < _kernelFuncs.size(); id++) {
if (_kernelFuncs[id].name) {
if (!_kernelFuncs[id].subFunctions) {
@@ -662,7 +670,15 @@ bool Kernel::debugSetFunctionLogging(const char *kernelName, bool logging) {
}
} else {
// Sub-Functions available
- // TODO: do this
+ if (kernelSubName) {
+ KernelSubFunction *kernelSubCall = _kernelFuncs[id].subFunctions;
+ uint kernelSubCallCount = _kernelFuncs[id].subFunctionCount;
+ for (uint subId = 0; subId < kernelSubCallCount; subId++) {
+ if (kernelSubCall->function)
+ kernelSubCall->debugLogging = logging;
+ kernelSubCall++;
+ }
+ }
}
}
}
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp
index 64a94ee510..c3315bd2b5 100644
--- a/engines/sci/sound/music.cpp
+++ b/engines/sci/sound/music.cpp
@@ -598,7 +598,7 @@ MusicEntry::MusicEntry() {
priority = 0;
loop = 0;
volume = MUSIC_VOLUME_DEFAULT;
- hold = 0;
+ hold = -1;
pauseCounter = 0;
sampleLoopCounter = 0;
diff --git a/engines/sci/sound/music.h b/engines/sci/sound/music.h
index 943a5bd2a8..37e3c30030 100644
--- a/engines/sci/sound/music.h
+++ b/engines/sci/sound/music.h
@@ -71,7 +71,7 @@ public:
byte priority;
uint16 loop;
int16 volume;
- byte hold;
+ int16 hold;
int16 pauseCounter;
uint sampleLoopCounter;