From 42e3c63b117fe1bff5b059d95564f52f8ed58563 Mon Sep 17 00:00:00 2001 From: Robert Špalek Date: Mon, 28 Sep 2009 02:54:38 +0000 Subject: get rid of static Common::String's svn-id: r44431 --- engines/draci/script.cpp | 10 +++++----- engines/draci/script.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'engines/draci') diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp index 8a256f4fcc..44a89eedc0 100644 --- a/engines/draci/script.cpp +++ b/engines/draci/script.cpp @@ -847,7 +847,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const { stk.push(res); debugC(4, kDraciBytecodeDebugLevel, "\t\t%d %s %d (res: %d)", - arg1, oper._name.c_str(), arg2, res); + arg1, oper._name, arg2, res); break; case kMathVariable: @@ -873,7 +873,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const { stk.push(0); debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s (not implemented)", - func._name.c_str()); + func._name); } else { arg1 = stk.pop(); @@ -884,7 +884,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const { stk.push(res); debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s(%d) (res: %d)", - func._name.c_str(), arg1, res); + func._name, arg1, res); } break; @@ -1047,7 +1047,7 @@ int Script::run(const GPL2Program &program, uint16 offset) { int tmp; // Print command name - debugC(1, kDraciBytecodeDebugLevel, "%s", cmd->_name.c_str()); + debugC(1, kDraciBytecodeDebugLevel, "%s", cmd->_name); for (int i = 0; i < cmd->_numParams; ++i) { if (cmd->_paramTypes[i] == 4) { @@ -1075,7 +1075,7 @@ int Script::run(const GPL2Program &program, uint16 offset) { (this->*(cmd->_handler))(params); } - } while (cmd->_name != "gplend" && cmd->_name != "exit" && !_endProgram); + } while (cmd->_number != 0 && !_endProgram); // 0 = gplend and exit _endProgram = false; _jump = oldJump; diff --git a/engines/draci/script.h b/engines/draci/script.h index 21a16c92fb..c594c6241c 100644 --- a/engines/draci/script.h +++ b/engines/draci/script.h @@ -56,19 +56,19 @@ typedef int (Script::* GPLFunctionHandler)(int) const; struct GPL2Command { byte _number; byte _subNumber; - Common::String _name; + const char *_name; uint16 _numParams; int _paramTypes[kMaxParams]; GPLHandler _handler; }; struct GPL2Operator { - Common::String _name; + const char *_name; GPLOperatorHandler _handler; }; struct GPL2Function { - Common::String _name; + const char *_name; GPLFunctionHandler _handler; }; -- cgit v1.2.3