diff options
author | Eugene Sandulenko | 2016-02-14 14:16:33 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:23 +0100 |
commit | e83a0ce32e584c1581166bb4c40c04d6ca591670 (patch) | |
tree | 86174d5b0985d24395cb58e3de6adc9c4a155c25 /engines | |
parent | eacbe42e3a995038150527f3bab0c9a20316da33 (diff) | |
download | scummvm-rg350-e83a0ce32e584c1581166bb4c40c04d6ca591670.tar.gz scummvm-rg350-e83a0ce32e584c1581166bb4c40c04d6ca591670.tar.bz2 scummvm-rg350-e83a0ce32e584c1581166bb4c40c04d6ca591670.zip |
WAGE: Moved non-trivial method implementation to .cpp file
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wage/script.cpp | 20 | ||||
-rw-r--r-- | engines/wage/script.h | 20 |
2 files changed, 21 insertions, 19 deletions
diff --git a/engines/wage/script.cpp b/engines/wage/script.cpp index f875321153..a08b324574 100644 --- a/engines/wage/script.cpp +++ b/engines/wage/script.cpp @@ -54,6 +54,26 @@ namespace Wage { +Common::String Script::Operand::toString() { + switch(_type) { + case NUMBER: + return Common::String::format("%d", _value.number); + case STRING: + case TEXT_INPUT: + return *_value.string; + case OBJ: + return _value.obj->toString(); + case CHR: + return _value.chr->toString(); + case SCENE: + return _value.scene->toString(); + case CLICK_INPUT: + return _value.inputClick->toString(); + default: + error("Unhandled operand type: _type"); + } +} + Script::Script(Common::SeekableReadStream *data) : _data(data) { convertToText(); } diff --git a/engines/wage/script.h b/engines/wage/script.h index f4ee105be5..1a7d07d29a 100644 --- a/engines/wage/script.h +++ b/engines/wage/script.h @@ -113,25 +113,7 @@ private: delete _value.string; } - Common::String toString() { - switch(_type) { - case NUMBER: - return Common::String::format("%d", _value.number); - case STRING: - case TEXT_INPUT: - return *_value.string; - case OBJ: - return _value.obj->toString(); - case CHR: - return _value.chr->toString(); - case SCENE: - return _value.scene->toString(); - case CLICK_INPUT: - return _value.inputClick->toString(); - default: - error("Unhandled operand type: _type"); - } - } + Common::String toString(); }; struct ScriptText { |