get rid of static Common::String's

svn-id: r44431
This commit is contained in:
Robert Špalek 2009-09-28 02:54:38 +00:00
parent d0db596311
commit 42e3c63b11
2 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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;
};