mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 07:53:12 +00:00
MYST3: Implement Xbox specific opcode 77
This commit is contained in:
parent
3f882cc7e1
commit
4daa591360
@ -1126,6 +1126,20 @@ void Script::varDecrementMin(Context &c, const Opcode &cmd) {
|
||||
_vm->_state->setVar(cmd.args[0], value);
|
||||
}
|
||||
|
||||
void Script::varDecrementMinLooping(Context &c, const Opcode &cmd) {
|
||||
debugC(kDebugScript, "Opcode %d: Decrement var %d in range [%d, %d]",
|
||||
cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
|
||||
|
||||
int32 value = _vm->_state->getVar(cmd.args[0]);
|
||||
|
||||
value--;
|
||||
|
||||
if (value < cmd.args[1])
|
||||
value = cmd.args[2];
|
||||
|
||||
_vm->_state->setVar(cmd.args[0], value);
|
||||
}
|
||||
|
||||
void Script::varAddValueMax(Context &c, const Opcode &cmd) {
|
||||
debugC(kDebugScript, "Opcode %d: Add value %d to var %d with max value %d",
|
||||
cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
|
||||
|
@ -176,6 +176,7 @@ private:
|
||||
DECLARE_OPCODE(varAddValueMaxLooping);
|
||||
DECLARE_OPCODE(varDecrement);
|
||||
DECLARE_OPCODE(varDecrementMin);
|
||||
DECLARE_OPCODE(varDecrementMinLooping);
|
||||
DECLARE_OPCODE(varAddValueMax);
|
||||
DECLARE_OPCODE(varSubValueMin);
|
||||
DECLARE_OPCODE(varZeroRange);
|
||||
|
Loading…
x
Reference in New Issue
Block a user