Open main menu

Difference between revisions of "SCUMM/V5 opcodes"

33 bytes added ,  05:28, 26 April 2009
m
Fix some v3, v4 variant info
m
m (Fix some v3, v4 variant info)
Line 367: Line 367:


===Variants===
===Variants===
Small header games only support the parameters used with sub-opcode $01, e.g:
Small header games (v3 and v4) only support the parameters used with sub-opcode $01, e.g:
  opcode object[p16] xpos[p16] ypos[p16]
  opcode object[p16] xpos[p16] ypos[p16]
Accordingly, they have three parameter bits, and hence more possible opcodes.
Accordingly, they have three parameter bits, and hence more possible opcodes.
Line 633: Line 633:


===Variants===
===Variants===
In small header games, the encoding becomes:
In small header games, this opcode is used for the "ifState" instruction.
opcode object[p16] state[p8] target[16]
operation becomes
unless (getState(object) == state) goto target




Line 696: Line 693:


===Operation===
===Operation===
  unless (stateOf(object) != state) goto target
  unless (getState(object) != state) goto target




==ifState ($4F) (V3-4)==
==ifState ($0F) (V3-4)==
This opcode is not present in SCUMM V5.
This opcode is not present in SCUMM V5.


Line 706: Line 703:


===Operation===
===Operation===
  unless (stateOf(object) == state) goto target
  unless (getState(object) == state) goto target




Line 914: Line 911:




==oldRoomEffect ($5C) (V4)==
==oldRoomEffect ($5C) (V3-4)==
This opcode/instruction is only present in SCUMM V4.
This opcode/instruction not present in SCUMM V5.


===Encoding===
===Encoding===
Line 922: Line 919:
sub-opcodes:
sub-opcodes:
  $03 effect[p16]
  $03 effect[p16]
$?? effect[p16]


===Operation===
===Operation===
Line 968: Line 966:




==pickupObject ($25)==
==pickupObject ($25) (v5)==
This instruction is only present in SCUMM V5.


===Encoding===
===Encoding===
Line 980: Line 979:




==pickupObjectOld ($50) (V4)==
==pickupObject ($50) (V3-4)==
This opcode is not present in SCUMM V5.
This opcode/instruction is not present in SCUMM V5.


===Encoding===
===Encoding===
Line 1,233: Line 1,232:
  opcode arg1[p16] arg2[p16] sub-opcode
  opcode arg1[p16] arg2[p16] sub-opcode


Small header games include an extra sub-opcode, $02 (SO_ROOM_COLOR), which adjusts the room's palette:
Small header games (V3 and V4) include an extra sub-opcode, $02 (SO_ROOM_COLOR), which adjusts the room's palette:
  opcode $02 colour[p16] index[p16]
  opcode $02 colour[p16] index[p16]
  ... or for V3 games ...
  ... or for V3 games ...
Line 1,459: Line 1,458:


===Variants===
===Variants===
In SCUMM V3 (small header) games, this opcode is used for the WaitForSentence instruction.
In SCUMM V3 and V4 (small header) games, this opcode is used for the WaitForSentence instruction.




Line 1,763: Line 1,762:
===Operation===
===Operation===
Sets the actor to begin walking to the given object's position.
Sets the actor to begin walking to the given object's position.


=Variables=
=Variables=
125

edits