mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
DREAMWEB: Make DreamBase::engine protected
This commit is contained in:
parent
7b71bb6444
commit
641e1bff59
@ -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();
|
||||
"""
|
||||
|
@ -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) {
|
||||
}
|
||||
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user