aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorEugene Sandulenko2012-02-23 23:55:45 -0800
committerEugene Sandulenko2012-02-23 23:55:45 -0800
commit54c87f20e344568bc1dedebcc0706b2151f94076 (patch)
tree7b28a41b86db419589d6a4806c83a9a7848690ec /engines/dreamweb
parentc3b52343dceaae253df9324a417a526f13c52333 (diff)
parent9628913cdc1cf832ba438a2015db4e25e7217524 (diff)
downloadscummvm-rg350-54c87f20e344568bc1dedebcc0706b2151f94076.tar.gz
scummvm-rg350-54c87f20e344568bc1dedebcc0706b2151f94076.tar.bz2
scummvm-rg350-54c87f20e344568bc1dedebcc0706b2151f94076.zip
Merge pull request #189 from fingolfin/cleanup
ALL: Cleanup
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/detection.cpp10
-rw-r--r--engines/dreamweb/detection_tables.h4
-rw-r--r--engines/dreamweb/dreamweb.cpp14
-rw-r--r--engines/dreamweb/dreamweb.h8
4 files changed, 21 insertions, 15 deletions
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index b891c2a3ea..9d3797db03 100644
--- a/engines/dreamweb/detection.cpp
+++ b/engines/dreamweb/detection.cpp
@@ -25,6 +25,8 @@
#include "common/algorithm.h"
#include "common/system.h"
+#include "engines/advancedDetector.h"
+
#include "graphics/thumbnail.h"
#include "dreamweb/dreamweb.h"
@@ -215,4 +217,12 @@ bool DreamWebEngine::canSaveGameStateCurrently() {
return false;
}
+Common::Language DreamWebEngine::getLanguage() const {
+ return _gameDescription->desc.language;
+}
+
+bool DreamWebEngine::isCD() {
+ return _gameDescription->desc.flags & ADGF_CD;
+}
+
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/detection_tables.h b/engines/dreamweb/detection_tables.h
index 75f5786268..216e6715dc 100644
--- a/engines/dreamweb/detection_tables.h
+++ b/engines/dreamweb/detection_tables.h
@@ -25,6 +25,10 @@
namespace DreamWeb {
+struct DreamWebGameDescription {
+ ADGameDescription desc;
+};
+
static const DreamWebGameDescription gameDescriptions[] = {
// International floppy release
{
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 0a5deb4657..2ee20210ba 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -30,6 +30,8 @@
#include "common/timer.h"
#include "common/util.h"
+#include "engines/advancedDetector.h"
+
#include "graphics/palette.h"
#include "graphics/surface.h"
@@ -60,8 +62,6 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_channel0 = 0;
_channel1 = 0;
- _language = gameDesc->desc.language;
-
_openChangeSize = kInventx+(4*kItempicsize);
_quitRequested = false;
@@ -477,10 +477,9 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const {
if (c < 128)
return c;
- switch(_language) {
+ switch(getLanguage()) {
case Common::DE_DEU:
- switch(c)
- {
+ switch(c) {
case 129:
return 'Z' + 3;
case 132:
@@ -528,11 +527,8 @@ uint8 DreamWebEngine::modifyChar(uint8 c) const {
}
}
-bool DreamWebEngine::isCD() {
- return _gameDescription->desc.flags & ADGF_CD;
-}
-
bool DreamWebEngine::hasSpeech() {
return isCD() && _hasSpeech;
}
+
} // End of namespace DreamWeb
diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h
index f49c38371d..6d7253da65 100644
--- a/engines/dreamweb/dreamweb.h
+++ b/engines/dreamweb/dreamweb.h
@@ -34,7 +34,6 @@
#include "audio/audiostream.h"
#include "audio/mixer.h"
-#include "engines/advancedDetector.h"
#include "engines/engine.h"
#include "dreamweb/console.h"
@@ -99,9 +98,7 @@ enum {
kDebugSaveLoad = (1 << 1)
};
-struct DreamWebGameDescription {
- ADGameDescription desc;
-};
+struct DreamWebGameDescription;
class DreamWebEngine : public Engine {
private:
@@ -150,7 +147,7 @@ public:
void enableSavingOrLoading(bool enable = true) { _enableSavingOrLoading = enable; }
- Common::Language getLanguage() const { return _language; }
+ Common::Language getLanguage() const;
uint8 modifyChar(uint8 c) const;
void stopSound(uint8 channel);
@@ -168,7 +165,6 @@ private:
bool _turbo;
uint _oldMouseState;
bool _enableSavingOrLoading;
- Common::Language _language;
struct Sample {
uint offset;