aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/sprite.cpp5
-rw-r--r--engines/dreamweb/stubs.cpp7
-rw-r--r--engines/dreamweb/stubs.h2
3 files changed, 9 insertions, 5 deletions
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index da9d8c96f4..e01fdca976 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -765,10 +765,7 @@ void DreamGenContext::updatepeople() {
}
void DreamGenContext::madmantext() {
- // The original sources has two codepaths depending if the game is 'if cd' or not
- // This is a hack to guess which version to use with the assumption that if we have a cd version
- // we managed to load the speech.
- if (data.byte(kSpeechloaded)) {
+ if (isCD()) {
if (data.byte(kSpeechcount) >= 63)
return;
_cmp(data.byte(kCh1playing), 255);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9130a6c846..c7c78e3aa2 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1071,5 +1071,12 @@ void DreamGenContext::showpanel() {
showframe(frame, 192, 0, 19, 0, &width, &height);
}
+bool DreamGenContext::isCD() {
+ // The original sources has two codepaths depending if the game is 'if cd' or not
+ // This is a hack to guess which version to use with the assumption that if we have a cd version
+ // we managed to load the speech. At least it is isolated in this function and can be changed.
+ // Maybe detect the version during game id?
+ return (data.byte(kSpeechloaded) == 1);
+}
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5b8839fad9..81fbf0e1e9 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -129,5 +129,5 @@
void showpanel();
void updatepeople();
void madmantext();
-
+ bool isCD();