diff options
author | Max Horn | 2010-02-07 12:14:26 +0000 |
---|---|---|
committer | Max Horn | 2010-02-07 12:14:26 +0000 |
commit | e0218d1ba3db36740ab775c2921dfabd977bf78d (patch) | |
tree | a1f3c0511f77a6b5385350cea04a6c37b579cef5 /engines/sci | |
parent | 3b4c54f0e5cac47c3f3a402865a800b43fbe4646 (diff) | |
download | scummvm-rg350-e0218d1ba3db36740ab775c2921dfabd977bf78d.tar.gz scummvm-rg350-e0218d1ba3db36740ab775c2921dfabd977bf78d.tar.bz2 scummvm-rg350-e0218d1ba3db36740ab775c2921dfabd977bf78d.zip |
SCI: Get rid of GET_OP_ macros
svn-id: r47957
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/vm.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 5a013722e9..45ebd740eb 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -259,14 +259,6 @@ static void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, i #define PUSH32(a) (*(validate_stack_addr(s, (scriptState.xs->sp)++)) = (a)) #define POP32() (*(validate_stack_addr(s, --(scriptState.xs->sp)))) -// Getting instruction parameters -#define GET_OP_BYTE() ((uint8)code_buf[(scriptState.xs->addr.pc.offset)++]) -#define GET_OP_WORD() (READ_LE_UINT16(code_buf + ((scriptState.xs->addr.pc.offset) += 2) - 2)) -#define GET_OP_FLEX() ((opcode & 1)? GET_OP_BYTE() : GET_OP_WORD()) -#define GET_OP_SIGNED_BYTE() ((int8)(code_buf[(scriptState.xs->addr.pc.offset)++])) -#define GET_OP_SIGNED_WORD() (((int16)READ_LE_UINT16(code_buf + ((scriptState.xs->addr.pc.offset) += 2) - 2))) -#define GET_OP_SIGNED_FLEX() ((opcode & 1)? GET_OP_SIGNED_BYTE() : GET_OP_SIGNED_WORD()) - ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackPtr sp, reg_t calling_obj, uint16 argc, StackPtr argp) { int seg = s->_segMan->getScriptSegment(script); Script *scr = s->_segMan->getScriptIfLoaded(seg); @@ -1449,7 +1441,7 @@ void run_vm(EngineState *s, bool restoring) { PUSH32(scriptState.xs->objp); } else { // Debug opcode op_file, skip null-terminated string (file name) - while (GET_OP_BYTE()) ; + while (code_buf[scriptState.xs->addr.pc.offset++]) ; } break; |