get rid of static Common::String's
svn-id: r44431
This commit is contained in:
parent
d0db596311
commit
42e3c63b11
2 changed files with 8 additions and 8 deletions
|
@ -847,7 +847,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const {
|
||||||
stk.push(res);
|
stk.push(res);
|
||||||
|
|
||||||
debugC(4, kDraciBytecodeDebugLevel, "\t\t%d %s %d (res: %d)",
|
debugC(4, kDraciBytecodeDebugLevel, "\t\t%d %s %d (res: %d)",
|
||||||
arg1, oper._name.c_str(), arg2, res);
|
arg1, oper._name, arg2, res);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kMathVariable:
|
case kMathVariable:
|
||||||
|
@ -873,7 +873,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const {
|
||||||
stk.push(0);
|
stk.push(0);
|
||||||
|
|
||||||
debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s (not implemented)",
|
debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s (not implemented)",
|
||||||
func._name.c_str());
|
func._name);
|
||||||
} else {
|
} else {
|
||||||
arg1 = stk.pop();
|
arg1 = stk.pop();
|
||||||
|
|
||||||
|
@ -884,7 +884,7 @@ int Script::handleMathExpression(Common::MemoryReadStream *reader) const {
|
||||||
stk.push(res);
|
stk.push(res);
|
||||||
|
|
||||||
debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s(%d) (res: %d)",
|
debugC(4, kDraciBytecodeDebugLevel, "\t\tcall: %s(%d) (res: %d)",
|
||||||
func._name.c_str(), arg1, res);
|
func._name, arg1, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -1047,7 +1047,7 @@ int Script::run(const GPL2Program &program, uint16 offset) {
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
||||||
// Print command name
|
// 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) {
|
for (int i = 0; i < cmd->_numParams; ++i) {
|
||||||
if (cmd->_paramTypes[i] == 4) {
|
if (cmd->_paramTypes[i] == 4) {
|
||||||
|
@ -1075,7 +1075,7 @@ int Script::run(const GPL2Program &program, uint16 offset) {
|
||||||
(this->*(cmd->_handler))(params);
|
(this->*(cmd->_handler))(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (cmd->_name != "gplend" && cmd->_name != "exit" && !_endProgram);
|
} while (cmd->_number != 0 && !_endProgram); // 0 = gplend and exit
|
||||||
|
|
||||||
_endProgram = false;
|
_endProgram = false;
|
||||||
_jump = oldJump;
|
_jump = oldJump;
|
||||||
|
|
|
@ -56,19 +56,19 @@ typedef int (Script::* GPLFunctionHandler)(int) const;
|
||||||
struct GPL2Command {
|
struct GPL2Command {
|
||||||
byte _number;
|
byte _number;
|
||||||
byte _subNumber;
|
byte _subNumber;
|
||||||
Common::String _name;
|
const char *_name;
|
||||||
uint16 _numParams;
|
uint16 _numParams;
|
||||||
int _paramTypes[kMaxParams];
|
int _paramTypes[kMaxParams];
|
||||||
GPLHandler _handler;
|
GPLHandler _handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPL2Operator {
|
struct GPL2Operator {
|
||||||
Common::String _name;
|
const char *_name;
|
||||||
GPLOperatorHandler _handler;
|
GPLOperatorHandler _handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPL2Function {
|
struct GPL2Function {
|
||||||
Common::String _name;
|
const char *_name;
|
||||||
GPLFunctionHandler _handler;
|
GPLFunctionHandler _handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue