diff options
author | Eugene Sandulenko | 2015-12-22 10:48:19 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2015-12-27 15:40:59 +0100 |
commit | 0b3e161d8536e832a84b3de80604f1bf68622523 (patch) | |
tree | 20485578b69422ab74f29ead65f09bba5f1e2312 /engines/wage | |
parent | e71fe81d0900c8f6797386251f5ea3ad9ca5c9ed (diff) | |
download | scummvm-rg350-0b3e161d8536e832a84b3de80604f1bf68622523.tar.gz scummvm-rg350-0b3e161d8536e832a84b3de80604f1bf68622523.tar.bz2 scummvm-rg350-0b3e161d8536e832a84b3de80604f1bf68622523.zip |
WAGE: Test script execution
Diffstat (limited to 'engines/wage')
-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); |