Skip to content
Permalink
Browse files

ZVISION: Convert old code to use RenderManager

  • Loading branch information...
RichieSams committed Jul 19, 2013
1 parent 6d7541a commit 4bd95987d2119027fa175e08f22d0171f53358c0
Showing with 13 additions and 2 deletions.
  1. +2 −1 engines/zvision/console.cpp
  2. +1 −0 engines/zvision/console.h
  3. +6 −0 engines/zvision/zvision.cpp
  4. +4 −1 engines/zvision/zvision.h
@@ -29,6 +29,7 @@

#include "zvision/console.h"
#include "zvision/zvision.h"
#include "zvision/render_manager.h"
#include "zvision/zork_avi_decoder.h"
#include "zvision/zork_raw.h"
#include "zvision/utility.h"
@@ -47,7 +48,7 @@ bool Console::cmdLoadImage(int argc, const char **argv) {
DebugPrintf("Use loadimage <fileName> <x> <y> to load an image to the screen\n");
return true;
}
_engine->renderImageToScreen(argv[1], atoi(argv[2]), atoi(argv[3]));
_engine->getRenderManager()->renderImageToScreen(argv[1], atoi(argv[2]), atoi(argv[3]));

return true;
}
@@ -40,6 +40,7 @@ class Console : public GUI::Debugger {
bool cmdLoadImage(int argc, const char **argv);
bool cmdLoadVideo(int argc, const char **argv);
bool cmdLoadSound(int argc, const char **argv);
bool cmdRawToWav(int argc, const char **argv);
};

} // End of namespace ZVision
@@ -35,6 +35,7 @@
#include "zvision/zvision.h"
#include "zvision/console.h"
#include "zvision/script_manager.h"
#include "zvision/render_manager.h"
#include "zvision/zfs_archive.h"
#include "zvision/detection.h"

@@ -73,6 +74,7 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)

// Create managers
_scriptManager = new ScriptManager(this);
_renderManager = new RenderManager(_system);

debug("ZVision::ZVision");
}
@@ -151,6 +153,10 @@ ScriptManager *ZVision::getScriptManager() const {
return _scriptManager;
}

RenderManager *ZVision::getRenderManager() const {
return _renderManager;
}

Common::RandomSource *ZVision::getRandomSource() const {
return _rnd;
}
@@ -40,6 +40,7 @@ namespace ZVision {
struct ZVisionGameDescription;
class Console;
class ScriptManager;
class RenderManager;

// our engine debug channels
enum {
@@ -65,6 +66,8 @@ class ZVision : public Engine {
Common::RandomSource *_rnd;
// Managers
ScriptManager *_scriptManager;
RenderManager *_renderManager;

// To prevent allocation every time we process events
Common::Event _event;

@@ -77,10 +80,10 @@ class ZVision : public Engine {
Common::Language getLanguage() const;
virtual Common::Error run();
ScriptManager *getScriptManager() const;
RenderManager *getRenderManager() const;
Common::RandomSource *getRandomSource() const;
ZVisionGameId getGameId() const;

void renderImageToScreen(const Common::String &fileName, uint32 x, uint32 y);
void startVideo(Video::VideoDecoder *videoDecoder);
void continueVideo();

0 comments on commit 4bd9598

Please sign in to comment.
You can’t perform that action at this time.