diff options
author | Max Horn | 2011-12-07 10:58:36 +0100 |
---|---|---|
committer | Max Horn | 2011-12-07 11:07:42 +0100 |
commit | 641e1bff5948416e6cab9c06ad4539ebf95c8bb4 (patch) | |
tree | 9aceef250e09826f07441a51198c4891e7c6b24b | |
parent | 7b71bb6444533b01ac992b1fcfcb303625529ca5 (diff) | |
download | scummvm-rg350-641e1bff5948416e6cab9c06ad4539ebf95c8bb4.tar.gz scummvm-rg350-641e1bff5948416e6cab9c06ad4539ebf95c8bb4.tar.bz2 scummvm-rg350-641e1bff5948416e6cab9c06ad4539ebf95c8bb4.zip |
DREAMWEB: Make DreamBase::engine protected
-rw-r--r-- | devtools/tasmrecover/tasm/cpp.py | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreambase.h | 10 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index e72779fa29..e507fd451d 100644 --- a/devtools/tasmrecover/tasm/cpp.py +++ b/devtools/tasmrecover/tasm/cpp.py @@ -644,7 +644,7 @@ namespace %s { """ class %sContext : public DreamBase, public Context { public: - DreamGenContext() : DreamBase(), Context(data) {} + DreamGenContext(DreamWeb::DreamWebEngine *en) : DreamBase(en), Context(data) {} void __start(); """ diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 4173499203..0d701c53ce 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -35,15 +35,19 @@ namespace DreamWeb { namespace DreamGen { class DreamBase { +protected: + DreamWeb::DreamWebEngine *engine; + public: enum { kDefaultDataSegment = 0x1000 }; - DreamWeb::DreamWebEngine *engine; - SegmentPtr _realData; ///< the primary data segment, points to a huge blob of binary data SegmentRef data; ///< fake segment register always pointing to data segment - DreamBase() : _realData(new Segment()), data(kDefaultDataSegment, _realData) { + DreamBase(DreamWeb::DreamWebEngine *en) : + engine(en), + _realData(new Segment()), + data(kDefaultDataSegment, _realData) { } diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 0dd7d8844a..8aab18d49d 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -538,7 +538,7 @@ static const uint16 kLenofreelrouts = (983-526); class DreamGenContext : public DreamBase, public Context { public: - DreamGenContext() : DreamBase(), Context(data) {} + DreamGenContext(DreamWeb::DreamWebEngine *en) : DreamBase(en), Context(data) {} void __start(); #include "stubs.h" // Allow hand-reversed functions to have a signature different than void f() diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 2220cdb47a..f2a91fa098 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -42,9 +42,8 @@ namespace DreamWeb { DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gameDesc) : - Engine(syst), _gameDescription(gameDesc), _rnd("dreamweb") { + Engine(syst), _gameDescription(gameDesc), _rnd("dreamweb"), _context(this) { - _context.engine = this; // Setup mixer _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); |