Open main menu

Difference between revisions of "SCUMM/V5 opcodes"

275 bytes added ,  08:18, 31 March 2009
→‎SCUMM V5 opcodes: Added some missing instructions, small fixes
(→‎SCUMM V5 opcodes: Added some missing instructions, small fixes)
Line 574: Line 574:
===Variants===
===Variants===
This opcode is used for saveLoadGame in SCUMM V3.
This opcode is used for saveLoadGame in SCUMM V3.


==getClosestObjActor ($66)==
==getClosestObjActor ($66)==
Line 666: Line 667:


===Encoding===
===Encoding===
  opcode value[p16] args[p16]... target[16]
  opcode value[p16] args[p16]... $FF target[16]


===Operation===
===Operation===
Line 674: Line 675:


Target is a byte offset (measured from after this instruction), which will be added to the instruction pointer.
Target is a byte offset (measured from after this instruction), which will be added to the instruction pointer.
==ifNotState ($2F)==
===Encoding===
opcode object[p16] state[p8] target[16]
===Operation===
unless (stateOf(object) != state) goto target
==ifState ($4F)==
===Encoding===
opcode object[p16] state[p8] target[16]
===Operation===
unless (stateOf(object) == state) goto target




Line 1,004: Line 1,023:


===Encoding===
===Encoding===
  opcode text[sf]
  opcode sub-opcode


===Operation===
===Operation===
Exactly the same as print, except the actor is implicitly Ego.
Exactly the same as print, except the actor is implicitly Ego. See the entry for "print" for further explanation.




Line 1,128: Line 1,147:




==roomOp ($33)==
==roomOps ($33)==


===Encoding===
===Encoding===
Line 1,139: Line 1,158:
  $05
  $05
  $06
  $06
  $07 scale1[p8] y1[p8] scale2[p8] y2[p8] slot[p8]
  $07 scale1[p8] y1[p8] aux scale2[p8] y2[p8] aux slot[p8]
  $08 scale[p8] startcolour[p8] endcolour[p8]
  $08 scale[p8] startcolour[p8] endcolour[p8]
  $09 loadflag[p8] loadslot[p8]
  $09 loadflag[p8] loadslot[p8]
Line 1,272: Line 1,291:


===Encoding===
===Encoding===
  opcode object[p16]
  opcode object[p16] name[c]... $00


===Operation===
===Operation===
Sets the given object's name, as determined in some fashion from the resources (clears existing resource and reloads it?).
Sets the given object's name.




Line 1,294: Line 1,313:
===Operation===
===Operation===
Sets the state of the object.
Sets the state of the object.


==setVarRange ($26)==
==setVarRange ($26)==
Line 1,356: Line 1,376:
|other||Track Length||Returns the track length in seconds.
|other||Track Length||Returns the track length in seconds.
|}
|}


==startObject ($37)==
==startObject ($37)==
Line 1,626: Line 1,647:
===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=
126

edits