diff options
author | Robert Špalek | 2009-09-28 02:54:38 +0000 |
---|---|---|
committer | Robert Špalek | 2009-09-28 02:54:38 +0000 |
commit | 42e3c63b117fe1bff5b059d95564f52f8ed58563 (patch) | |
tree | 37aac6d71d99a1972f989fc7b6b6d0ae3e4ff1e0 | |
parent | d0db5963110929d0d2353278a4d64caca358f48a (diff) | |
download | scummvm-rg350-42e3c63b117fe1bff5b059d95564f52f8ed58563.tar.gz scummvm-rg350-42e3c63b117fe1bff5b059d95564f52f8ed58563.tar.bz2 scummvm-rg350-42e3c63b117fe1bff5b059d95564f52f8ed58563.zip |
get rid of static Common::String's
svn-id: r44431
-rw-r--r-- | engines/draci/script.cpp | 10 | ||||
-rw-r--r-- | engines/draci/script.h | 6 |
2 files changed, 8 insertions, 8 deletions
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; }; |