diff options
author | Eugene Sandulenko | 2016-05-18 09:53:32 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 1a3d44edc9b97c97b4ff9dc80747703a952f2409 (patch) | |
tree | 3e1e189c9e5a09be4379e6cce6b89731891a2974 /engines/director/director.cpp | |
parent | c2414ae3815e92b768f194c8e353405e6b532919 (diff) | |
download | scummvm-rg350-1a3d44edc9b97c97b4ff9dc80747703a952f2409.tar.gz scummvm-rg350-1a3d44edc9b97c97b4ff9dc80747703a952f2409.tar.bz2 scummvm-rg350-1a3d44edc9b97c97b4ff9dc80747703a952f2409.zip |
DIRECTOR: Fix image loading, moved displaying to the engine
Diffstat (limited to 'engines/director/director.cpp')
-rw-r--r-- | engines/director/director.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp index f64af75cea..bf4d4c5f75 100644 --- a/engines/director/director.cpp +++ b/engines/director/director.cpp @@ -26,12 +26,15 @@ #include "common/debug.h" #include "common/scummsys.h" #include "common/error.h" +#include "common/events.h" #include "common/macresman.h" #include "common/stream.h" #include "common/system.h" #include "common/textconsole.h" #include "director/dib.h" +#include "engines/util.h" + #include "director/director.h" #include "director/resource.h" #include "graphics/surface.h" @@ -51,6 +54,17 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam const Common::FSNode gameDataDir(ConfMan.get("path")); SearchMan.addSubDirectoryMatching(gameDataDir, "data"); SearchMan.addSubDirectoryMatching(gameDataDir, "install"); +} + +DirectorEngine::~DirectorEngine() { + delete _mainArchive; + delete _macBinary; +} + +Common::Error DirectorEngine::run() { + debug("Starting v%d Director game", getVersion()); + + initGraphics(640, 480, true); //FIXME RIFFArchive riff; @@ -63,16 +77,21 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam Common::SeekableReadStream *dib = riff.getResource(MKTAG('D', 'I', 'B', ' '), 1103); img.loadStream(*dib); + bool stop = false; -} + while (!stop) { + Common::Event event; -DirectorEngine::~DirectorEngine() { - delete _mainArchive; - delete _macBinary; -} + while (_eventMan->pollEvent(event)) { + if (event.type == Common::EVENT_QUIT) + stop = true; + } -Common::Error DirectorEngine::run() { - debug("Starting v%d Director game", getVersion()); + g_system->updateScreen(); + g_system->delayMillis(50); + } + + return Common::kNoError; if (getPlatform() == Common::kPlatformWindows) loadEXE(); |