aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-06-27 15:26:33 +0000
committerDenis Kasak2009-06-27 15:26:33 +0000
commit1e70f25fcfed439149a5fc1a87a4ce0461656127 (patch)
tree21e9e4dca18c12d99335984458a6ea153bee3bf5
parent4c524f5e0a62fe34c3c3bb9978ee8cd3c0c3ccbc (diff)
downloadscummvm-rg350-1e70f25fcfed439149a5fc1a87a4ce0461656127.tar.gz
scummvm-rg350-1e70f25fcfed439149a5fc1a87a4ce0461656127.tar.bz2
scummvm-rg350-1e70f25fcfed439149a5fc1a87a4ce0461656127.zip
Added Script instance to DraciEngine. Restored disassembling of a demo script on engine startup (previously via gpldisasm(), now via _script->run()).
svn-id: r41921
-rw-r--r--engines/draci/draci.cpp6
-rw-r--r--engines/draci/draci.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 42023588ec..1d86b730da 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -70,6 +70,7 @@ int DraciEngine::init() {
_font = new Font();
_mouse = new Mouse(this);
_game = new Game();
+ _script = new Script();
// Load default font
_font->setFont(kFontBig);
@@ -108,7 +109,7 @@ int DraciEngine::init() {
}
// Disassemble GPL script for the first location
- //gpldisasm(f->_data, f->_length);
+ _script->run(f->_data, f->_length);
return Common::kNoError;
}
@@ -214,9 +215,12 @@ int DraciEngine::go() {
DraciEngine::~DraciEngine() {
// Dispose your resources here
+ // TODO: Investigate possibility of using sharedPtr or similar
delete _screen;
delete _font;
delete _mouse;
+ delete _game;
+ delete _script;
// Remove all of our debug levels here
Common::clearAllDebugChannels();
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index 5062eba563..ae9826464a 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -34,6 +34,7 @@
#include "draci/mouse.h"
#include "draci/screen.h"
#include "draci/font.h"
+#include "draci/script.h"
namespace Draci {
@@ -52,6 +53,7 @@ public:
Screen *_screen;
Mouse *_mouse;
Game *_game;
+ Script *_script;
private:
Common::RandomSource _rnd;