SCUMM/V5 opcodes/Table
< SCUMM | V5 opcodes
Jump to navigation
Jump to search
Revision as of 04:00, 13 April 2009 by Jestar jokin (talk | contribs) (→Table of Parameters: setObjectName A = A0)
Table of Parameters
This table shows a summary of the SCUMM V5 opcodes and their parameters in a concise fashion.
Argument types:
- V = variable
- B = byte constant
- W = word constant
- P8 = variable or byte
- P16 = variable or word
- L = list
- J = jump (used by almost all boolean expressions, comparisons) (equivalent to W)
- D = delay; 24-bit constant (only used by delay instruction, strangely enough)
- A = ASCII string, terminated by the following argument ($00, $FF, $FE...)
- A0 = ASCII string, null-terminated
- A1 = ASCII string, $FF terminated
- FF = the hex value $FF, used for terminating some lists, strings etc.
- SO = sub-opcode, variants listed underneath as "opcode$sub-opcode"
- NS = non-standard encoding that cannot be sufficiently expressed in this table
- + = one or more of the preceding argument (parameter bits usually don't matter)
- None = does not take that argument argument
Instruction | Opcode | Descumm equiv. | Returns a Value | Arg 1 | Arg 2 | Arg 3 |
actorFollowCamera | $52 | == | False | P8 | None | None |
actorFromPos | $15 | == | True | P16 | P16 | None |
actorOps | $13 | ActorOps | False | P8 | SO+ | FF |
actorOps$00 | $00 | Unknown | False | P8 | None | None |
actorOps$01 | $01 | Costume | False | P8 | None | None |
actorOps$02 | $02 | WalkSpeed | False | P8 | P8 | None |
actorOps$03 | $03 | Sound | False | P8 | None | None |
actorOps$04 | $04 | WalkAnimNr | False | P8 | None | None |
actorOps$05 | $05 | TalkAnimNr | False | P8 | P8 | None |
actorOps$06 | $06 | StandAnimNr | False | P8 | None | None |
actorOps$07 | $07 | Nothing | False | P8 | P8 | P8 |
actorOps$08 | $08 | Init | False | None | None | None |
actorOps$09 | $09 | Elevation | False | P16 | None | None |
actorOps$0A | $0A | DefaultAnims | False | None | None | None |
actorOps$0B | $0B | Palette | False | P8 | P8 | None |
actorOps$0C | $0C | TalkColor | False | P8 | None | None |
actorOps$0D | $0D | Name | False | A0 | None | None |
actorOps$0E | $0E | InitAnimNr | False | P8 | None | None |
actorOps$10 | $10 | Width | False | P8 | None | None |
actorOps$11 | $11 | Scale | False | P8 | P8 | None |
actorOps$12 | $12 | NeverZClip | False | None | None | None |
actorOps$13 | $13 | SetZClip | False | P8 | None | None |
actorOps$14 | $14 | IgnoreBoxes | False | None | None | None |
actorOps$15 | $15 | FollowBoxes | False | P8 | None | None |
actorOps$16 | $16 | AnimSpeed | False | P8 | None | None |
actorOps$17 | $17 | ShadowMode | False | P8 | None | None |
actorSetClass | $5D | setClass | False | P16 | L | None |
add | $5A | (inline) | True | P16 | None | None |
and | $17 | (inline) | True | P16 | None | None |
animateActor | $11 | animateCostume | False | P8 | P8 | None |
breakHere | $80 | == | False | None | None | None |
chainScript | $42 | == | False | P8 | L | None |
cursorCommand | $2C | (none) | False | SO | None | None |
cursorCommand$01 | $01 | CursorShow | False | None | None | None |
cursorCommand$02 | $02 | CursorHide | False | None | None | None |
cursorCommand$03 | $03 | UserputOn | False | None | None | None |
cursorCommand$04 | $04 | UserputOff | False | None | None | None |
cursorCommand$05 | $05 | CursorSoftOn | False | None | None | None |
cursorCommand$06 | $06 | CursorSoftOff | False | None | None | None |
cursorCommand$07 | $07 | UserputSoftOn | False | None | None | None |
cursorCommand$08 | $08 | UserputSoftOff | False | None | None | None |
cursorCommand$0A | $0A | SetCursorImg | False | P8 | P8 | None |
cursorCommand$0B | $0B | setCursorHotspot | False | P8 | P8 | P8 |
cursorCommand$0C | $0C | InitCursor | False | P8 | None | None |
cursorCommand$0D | $0D | InitCharset | False | P8 | None | None |
cursorCommand$0E | $0E | CursorCommand | False | L | None | None |
cutscene | $40 | == | False | L | None | None |
debug | $6B | debug? | False | P16 | None | None |
decrement | $C6 | (inline) | True | None | None | None |
delay | $2E | == | False | D | None | None |
delayVariable | $2B | == | False | V | None | None |
divide | $5B | (inline) | True | P16 | None | None |
doSentence | $19 | == | False | P8 | P16 | P16 |
drawBox | $3F | == | False | P16 | P16 | NS |
drawObject | $05 | == | False | P16 | SO | None |
drawObject$01 | $01 | setXY | False | P16 | P16 | None |
drawObject$02 | $02 | setImage | False | P16 | None | None |
drawObject$1F | $1F | () | False | None | None | None |
dummy | $A7 | dummy(A7) | False | None | None | None |
endCutscene | $C0 | == | False | None | None | None |
equalZero | $28 | inline | False | V | J | None |
expression | $AC | Exprmode | True | SO+ | FF | None |
expression$01 | $01 | (inline) | False | P16 | None | None |
expression$02 | $02 | (inline) | False | None | None | None |
expression$03 | $03 | (inline) | False | None | None | None |
expression$04 | $04 | (inline) | False | None | None | None |
expression$05 | $05 | (inline) | False | None | None | None |
expression$06 | $06 | (inline) | False | NS | None | None |
faceActor | $09 | == | False | P8 | P16 | None |
findInventory | $3D | == | True | P8 | P8 | None |
findObject | $35 | == | True | P8 | P8 | None |
freezeScripts | $60 | == | False | P8 | None | None |
getActorCostume | $71 | == | True | P8 | None | None |
getActorElevation | $06 | == | True | P8 | None | None |
getActorFacing | $63 | == | True | P8 | None | None |
getActorMoving | $56 | == | True | P8 | None | None |
getActorRoom | $03 | == | True | P8 | None | None |
getActorScale | $3B | == | True | P8 | None | None |
getActorWalkBox | $7B | == | True | P8 | None | None |
getActorWidth | $6C | == | True | P8 | None | None |
getActorX | $43 | == | True | P16 | None | None |
getActorY | $23 | == | True | P16 | None | None |
getAnimCounter | $22 | == | True | P8 | None | None |
getClosestObjActor | $66 | == | True | P16 | None | None |
getDist | $34 | == | True | P16 | P16 | None |
getInventoryCount | $31 | == | True | P8 | None | None |
getObjectOwner | $10 | == | True | P16 | None | None |
getObjectState | $0F | == | True | P16 | None | None |
getRandomNumber | $16 | getRandomNr | True | P8 | None | None |
getScriptRunning | $68 | isScriptRunning | True | P8 | None | None |
getStringWidth | $67 | == | True | P8 | None | None |
getVerbEntryPoint | $0B | == | True | P16 | P16 | None |
ifClassOfIs | $1D | classOfIs | False | P16 | NS | J |
ifNotState | $2F | getState (inline) | False | P16 | P8 | J |
ifState | $4F | getState (inline) | False | P16 | P8 | J |
increment | $46 | (inline) | True | None | None | None |
isActorInBox | $1F | == | False | P8 | P8 | J |
isEqual | $48 | (inline) | False | V | P16 | J |
isGreater | $78 | (inline) | False | V | P16 | J |
isGreaterEqual | $04 | (inline) | False | V | P16 | J |
isLess | $44 | (inline) | False | V | P16 | J |
isNotEqual | $08 | (inline) | False | V | P16 | J |
isSoundRunning | $7C | == | True | P8 | None | None |
jumpRelative | $18 | (inline) or goto | False | J | None | None |
lessOrEqual | $38 | (inline) | False | V | P16 | J |
lights | $70 | == | False | P8 | B | B |
loadRoom | $72 | == | False | P8 | None | None |
loadRoomWithEgo | $24 | == | False | P16 | P8 | NS |
matrixOp | $30 | N/A | False | SO | None | None |
matrixOp$01 | $01 | setBoxFlags | False | P8 | P8 | None |
matrixOp$02 | $02 | setBoxScale | False | P8 | P8 | None |
matrixOp$03 | $03 | SetBoxSlot | False | P8 | P8 | None |
matrixOp$04 | $04 | createBoxMatrix | False | None | None | None |
move | $1A | (inline) | True | P16 | None | None |
multiply | $1B | (inline) | True | P16 | None | None |
notEqualZero | $A8 | (inline) | False | V | J | None |
oldRoomEffect | $5C | oldRoomEffect-fadein | False | SO | None | None |
oldRoomEffect$03 | $03 | oldRoomEffect-set | False | P16 | None | None |
or | $57 | (inline) | True | P16 | None | None |
override | $58 | N/A | False | SO | None | None |
override$00 | $00 | endOverride | False | None | None | None |
override$01 | $01 | beginOverride | False | NS | J | None |
panCameraTo | $12 | == | False | P16 | None | None |
pickupObject | $25 | == | False | P16 | P8 | None |
pickupObjectOld | $50 | pickupObject | False | P16 | None | None |
$14 | == | False | P8 | SO+ | None | |
print$00 | $00 | Pos | False | P16 | P16 | None |
print$01 | $01 | Color | False | P8 | None | None |
print$02 | $02 | Clipped | False | P16 | None | None |
print$03 | $03 | RestoreBG | False | P16 | P16 | None |
print$04 | $04 | Center | False | None | None | None |
print$06 | $06 | Left | False | None | None | None |
print$07 | $07 | Overhead | False | None | None | None |
print$08 | $08 | PlayCDTrack | False | P16 | P16 | None |
print$0F | $0F | Text() | False | A1 | None | None |
printEgo | $D8 | == | False | SO+ | None | None |
printEgo$00 | $00 | Pos | False | P16 | P16 | None |
printEgo$01 | $01 | Color | False | P8 | None | None |
printEgo$02 | $02 | Clipped | False | P16 | None | None |
printEgo$03 | $03 | RestoreBG | False | P16 | P16 | None |
printEgo$04 | $04 | Center | False | None | None | None |
printEgo$06 | $06 | Left | False | None | None | None |
printEgo$07 | $07 | Overhead | False | None | None | None |
printEgo$08 | $08 | PlayCDTrack | False | P16 | P16 | None |
printEgo$0F | $0F | Text() | False | A1 | None | None |
pseudoRoom | $CC | PsuedoRoom | False | B | NS | NS |
putActor | $01 | == | False | P8 | P16 | P16 |
putActorAtObject | $0E | == | False | P8 | P16 | None |
putActorInRoom | $2D | == | False | P8 | P8 | None |
resourceRoutines | $0C | Resource. | False | SO | None | None |
resourcesRoutines$01 | $01 | loadScript | False | P8 | None | None |
resourcesRoutines$02 | $02 | loadSound | False | P8 | None | None |
resourcesRoutines$03 | $03 | loadCostume | False | P8 | None | None |
resourcesRoutines$04 | $04 | loadRoom | False | P8 | None | None |
resourcesRoutines$05 | $05 | nukeScript | False | P8 | None | None |
resourcesRoutines$06 | $06 | nukeSound | False | P8 | None | None |
resourcesRoutines$07 | $07 | nukeCostume | False | P8 | None | None |
resourcesRoutines$08 | $08 | nukeRoom | False | P8 | None | None |
resourcesRoutines$09 | $09 | lockScript | False | P8 | None | None |
resourcesRoutines$0A | $0A | lockSound | False | P8 | None | None |
resourcesRoutines$0B | $0B | lockCostume | False | P8 | None | None |
resourcesRoutines$0C | $0C | lockRoom | False | P8 | None | None |
resourcesRoutines$0D | $0D | unlockScript | False | P8 | None | None |
resourcesRoutines$0E | $0E | unlockSound | False | P8 | None | None |
resourcesRoutines$0F | $0F | unlockCostume | False | P8 | None | None |
resourcesRoutines$10 | $10 | unlockRoom | False | P8 | None | None |
resourcesRoutines$11 | $11 | clearHeap | False | P8 | None | None |
resourcesRoutines$12 | $12 | loadCharset | False | P8 | None | None |
resourcesRoutines$13 | $13 | nukeCharset | False | P8 | None | None |
resourcesRoutines$14 | $14 | loadFlObject | False | P8 | P16 | None |
roomOps | $33 | N/A | False | SO | None | None |
roomOps$01 | $01 | RoomScroll | False | P16 | P16 | None |
roomOps$03 | $03 | SetScreen | False | P16 | P16 | None |
roomOps$04 | $04 | SetPalColor | False | P16 | P16 | NS |
roomOps$05 | $05 | ShakeOn | False | None | None | None |
roomOps$06 | $06 | ShakeOff | False | None | None | None |
roomOps$07 | $07 | Unused | False | P8 | P8 | NS |
roomOps$08 | $08 | RoomIntensity | False | P8 | P8 | P8 |
roomOps$09 | $09 | saveLoad? | False | P8 | P8 | None |
roomOps$0A | $0A | screenEffect? | False | P16 | None | None |
roomOps$0B | $0B | setRGBRoomIntensity | False | P16 | P16 | NS |
roomOps$0C | $0C | setRoomShadow | False | P16 | P16 | NS |
roomOps$0D | $0D | saveString | False | P8 | NS | NS |
roomOps$0E | $0E | loadString | False | P8 | NS | NS |
roomOps$0F | $0F | palManipulate | False | P8 | NS | NS |
roomOps$10 | $10 | colorCycleDelay | False | P8 | P8 | None |
saveRestoreVerbs | $AB | N/A | False | NS | NS | NS |
saveRestoreVerbs$01 | $01 | saveVerbs | False | None | None | None |
saveRestoreVerbs$02 | $02 | restoreVerbs | False | None | None | None |
saveRestoreVerbs$03 | $03 | deleteVerbs | False | None | None | None |
setCameraAt | $32 | == | False | P16 | None | None |
setObjectName | $54 | == | False | P16 | A0 | None |
setOwnerOf | $29 | == | False | P16 | P8 | None |
setState | $07 | == | False | P16 | P8 | None |
setVarRange | $26 | == | True | B | NS | NS |
soundKludge | $4C | == | False | L | None | None |
startMusic | $02 | == | False | P8 | None | None |
startObject | $37 | == | False | P16 | P8 | L |
startScript | $0A | == | False | P8 | L | None |
startSound | $1C | == | False | P8 | None | None |
stopMusic | $20 | == | False | None | None | None |
stopObjectCode | $00 | == | False | None | None | None |
stopObjectScript | $6E | == | False | P16 | None | None |
stopScript | $62 | == | False | P8 | None | None |
stopSound | $3C | == | False | P8 | None | None |
stringOps | $27 | == | False | SO | None | None |
stringOps$01 | $01 | PutCodeInString | False | P8 | A0 | None |
stringOps$02 | $02 | CopyString | False | P8 | P8 | None |
stringOps$03 | $03 | SetStringChar | False | P8 | P8 | B |
stringOps$04 | $04 | GetStringChar | True | P8 | P8 | None |
stringOps$05 | $05 | CreateString | False | P8 | P8 | None |
subtract | $3A | (inline) | True | P16 | None | None |
systemOps | $98 | systemOps | False | SO | None | None |
systemOps$01 | $01 | N/A | False | None | None | None |
systemOps$02 | $02 | N/A | False | None | None | None |
systemOps$03 | $03 | N/A | False | None | None | None |
verbOps | $7A | VerbOps | False | P8 | SO+ | FF |
verbOps$01 | $01 | Image | False | P16 | None | None |
verbOps$02 | $02 | Text | False | A0 | None | None |
verbOps$03 | $03 | Color | False | P8 | None | None |
verbOps$04 | $04 | HiColor | False | P8 | None | None |
verbOps$05 | $05 | SetXY | False | P16 | P16 | None |
verbOps$06 | $06 | On | False | None | None | None |
verbOps$07 | $07 | Off | False | None | None | None |
verbOps$08 | $08 | Delete | False | None | None | None |
verbOps$09 | $09 | New | False | None | None | None |
verbOps$10 | $10 | DimColor | False | P8 | None | None |
verbOps$11 | $11 | Dim | False | None | None | None |
verbOps$12 | $12 | Key | False | P8 | None | None |
verbOps$13 | $13 | Center | False | None | None | None |
verbOps$14 | $14 | SetToString | False | P16 | None | None |
verbOps$16 | $16 | SetToObject | False | P16 | P8 | None |
verbOps$17 | $17 | BackColor | False | P8 | None | None |
wait | $AE | N/A | False | SO | None | None |
wait$01 | $01 | WaitForActor | False | P8 | None | None |
wait$02 | $02 | WaitForMessage | False | None | None | None |
wait$03 | $03 | WaitForCamera | False | None | None | None |
wait$04 | $04 | WaitForSentence | False | None | None | None |
walkActorTo | $1E | == | False | P8 | P16 | P16 |
walkActorToActor | $0D | == | False | P8 | P8 | B |
walkActorToObject | $36 | == | False | P8 | P16 | None |