diff options
-rw-r--r-- | engines/wage/script.cpp | 6 | ||||
-rw-r--r-- | engines/wage/script.h | 4 | ||||
-rw-r--r-- | engines/wage/wage.cpp | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index e1f3c67535..f5e4cd475e 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -64,7 +64,11 @@ bool Script::execute(World *world, int loopCount, String *inputText, Designed *i _data->skip(12); while (_data->pos() < _data->size()) { - switch(_data->readByte()) { + byte command = _data->readByte(); + + debug(1, "Command: %x", command); + + switch(command) { case 0x80: // IF processIf(); break; diff --git a/engines/wage/script.h b/engines/wage/script.h index 4c8ce456c7..97d52f07b4 100644 --- a/engines/wage/script.h +++ b/engines/wage/script.h @@ -126,8 +126,10 @@ private: } }; - +public: bool execute(World *world, int loopCount, String *inputText, Designed *inputClick, WageEngine *callbacks); + +private: Operand *readOperand(); Operand *readStringOperand(); const char *readOperator(); diff --git a/engines/wage/wage.cpp b/engines/wage/wage.cpp index 00a7aadaf0..5ab2a90ac1 100644 --- a/engines/wage/wage.cpp +++ b/engines/wage/wage.cpp @@ -59,9 +59,10 @@ #include "graphics/palette.h" #include "wage/wage.h" +#include "wage/design.h" #include "wage/entities.h" +#include "wage/script.h" #include "wage/world.h" -#include "wage/design.h" namespace Wage { @@ -109,6 +110,9 @@ Common::Error WageEngine::run() { screen.create(640, 480, Graphics::PixelFormat::createFormatCLUT8()); Common::Rect r(0, 0, screen.w, screen.h); + Common::String input("look"); + _world->_globalScript->execute(_world, 1, &input, NULL, this); + _world->_orderedScenes[1]->_design->paint(&screen, _world->_patterns, false); _world->_objs["frank.1"]->_design->setBounds(&r); _world->_objs["frank.1"]->_design->paint(&screen, _world->_patterns, false); |