aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorBertrand Augereau2011-08-16 03:15:43 +0200
committerBertrand Augereau2011-08-16 03:24:13 +0200
commitd8ff4182f7cf249c560f4917c2a4faa0cc0f95a9 (patch)
treeebd3a06f1d98971a5527afec05dc4c842c230a62 /engines
parent3971a0dbf51b52df0762e43cc90b214978484c1e (diff)
downloadscummvm-rg350-d8ff4182f7cf249c560f4917c2a4faa0cc0f95a9.tar.gz
scummvm-rg350-d8ff4182f7cf249c560f4917c2a4faa0cc0f95a9.tar.bz2
scummvm-rg350-d8ff4182f7cf249c560f4917c2a4faa0cc0f95a9.zip
DREAMWEB: Encapsulate the hack to guess if this is a CD build or not
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();