1,079
edits
(initial V5 opcodes page from website) |
(Now using the opcode names (by which this list is sorted, after all) as section headers, not the meaningless hex values) |
||
Line 25: | Line 25: | ||
==$52== | ==actorFollowCamera ($52)== | ||
==$15== | ==actorFromPos ($15)== | ||
==$13== | ==actorSet ($13)== | ||
==$5D== | ==actorSetClass ($5D)== | ||
==$5A== | ==add ($5A)== | ||
===Encoding=== | ===Encoding=== | ||
Line 48: | Line 43: | ||
The variable pointed to by result is read, value is added to it, and the result written back. | The variable pointed to by result is read, value is added to it, and the result written back. | ||
==$17== | ==and ($17)== | ||
one parameter, uses result | one parameter, uses result | ||
Line 61: | Line 55: | ||
The variable pointed to by result is read, logically ANDed with value, and the result written back. | The variable pointed to by result is read, logically ANDed with value, and the result written back. | ||
==$11== | ==animateActor ($11)== | ||
==$27== | ==arrayOp ($27)== | ||
parameters depend on auxilary opcode | parameters depend on auxilary opcode | ||
Line 94: | Line 86: | ||
|} | |} | ||
==$80== | ==breakHere ($80)== | ||
no parameters | no parameters | ||
Line 105: | Line 96: | ||
Deschedules the currently running thread. Execution continues at the next instruction when the thread's next timeslot comes around. | Deschedules the currently running thread. Execution continues at the next instruction when the thread's next timeslot comes around. | ||
==$42== | ==chainScript ($42)== | ||
one parameter plus varargs | one parameter plus varargs | ||
Line 116: | Line 106: | ||
Replaces the currently running script with another one. The current script is terminated immediately and the new script, resource number script, is executed in the same thread. The new script has its local variables initialised to the list args. Uninitialised variables have undefined values. | Replaces the currently running script with another one. The current script is terminated immediately and the new script, resource number script, is executed in the same thread. The new script has its local variables initialised to the list args. Uninitialised variables have undefined values. | ||
==$2C== | ==cursorCommand ($2C)== | ||
==$40== | ==cutScene ($40)== | ||
==$6B== | ==debug ($6B)== | ||
one parameter, no result | one parameter, no result | ||
Line 133: | Line 120: | ||
Passes the parameter to the interpreter's debugger. What this does is entirely platform-specific (and may do nothing). | Passes the parameter to the interpreter's debugger. What this does is entirely platform-specific (and may do nothing). | ||
==$C6== | ==decrement ($C6)== | ||
no parameters, uses result | no parameters, uses result | ||
Line 146: | Line 132: | ||
Reads the variable pointed to by result, decrements it, and writes it back. | Reads the variable pointed to by result, decrements it, and writes it back. | ||
==$2E== | ==delay ($2E)== | ||
one constant parameter | one constant parameter | ||
Line 157: | Line 142: | ||
Suspends the current thread for the appropriate number of 1/60ths of a second. Yes, that really is a 24-bit LE constant. | Suspends the current thread for the appropriate number of 1/60ths of a second. Yes, that really is a 24-bit LE constant. | ||
==$2E== | ==delayVariable ($2E)== | ||
one constant parameter | one constant parameter | ||
Line 168: | Line 152: | ||
pointer is dereferenced and the current thread suspended for that number of 1/60ths of a second. Note that pointer is an inline constant, not a parameter. | pointer is dereferenced and the current thread suspended for that number of 1/60ths of a second. Note that pointer is an inline constant, not a parameter. | ||
==$5B== | ==divide ($5B)== | ||
one parameter, uses result | one parameter, uses result | ||
Line 181: | Line 164: | ||
The variable pointed to by result is read, divided by value, and the result written back. If value is zero, the result is undefined (and the interpeter may halt with an error). | The variable pointed to by result is read, divided by value, and the result written back. If value is zero, the result is undefined (and the interpeter may halt with an error). | ||
==$19== | ==doSentence ($19)== | ||
==$3F== | ==drawBox ($3F)== | ||
two parameters, does not use result, supplementary opcode byte with three more subsequent parameters | two parameters, does not use result, supplementary opcode byte with three more subsequent parameters | ||
Line 197: | Line 178: | ||
The only part of auxopcode that is relevant are the parameter bits. The rest of the opcode is ignored. | The only part of auxopcode that is relevant are the parameter bits. The rest of the opcode is ignored. | ||
==$05== | ==drawObject ($05)== | ||
==$67== | ==dummy ($67)== | ||
==$C0== | ==endCutScene ($C0)== | ||
==$28== | ==equalZero ($28)== | ||
==$AC== | ==expression ($AC)== | ||
==$09== | ==faceActor ($09)== | ||
==$3D== | ==findInventory ($3D)== | ||
==$35== | ==findObject ($35)== | ||
==$60== | ==freezeScripts ($60)== | ||
==$71== | ==getActorCostume ($71)== | ||
==$06== | ==getActorElevation ($06)== | ||
==$63== | ==getActorFacing ($63)== | ||
==$56== | ==getActorMoving ($56)== | ||
==$03== | ==getActorRoom ($03)== | ||
==$3B== | ==getActorScale ($3B)== | ||
==$7B== | ==getActorWalkBox ($7B)== | ||
==$6C== | ==getActorWidth ($6C)== | ||
==$43== | ==getActorX ($43)== | ||
==$23== | ==getActorY ($23)== | ||
==$22== | ==getAnimCounter ($22)== | ||
==$66== | ==getClosestObjActor ($66)== | ||
==$34== | ==getDist ($34)== | ||
==$31== | ==getInventoryCount ($31)== | ||
==$10== | ==getObjectOwner ($10)== | ||
==$0F== | ==getObjectState ($0F)== | ||
==$16== | ==getRandomNumber ($16)== | ||
==$68== | ==getScriptRunning ($68)== | ||
==$0B== | ==getVerbEntryPoint ($0B)== | ||
==$1D== | ==ifClassOfIs ($1D)== | ||
==$46== | ==increment ($46)== | ||
no parameters, uses result | no parameters, uses result | ||
Line 297: | Line 248: | ||
Reads the variable pointed to by result, increments it, and writes it back. | Reads the variable pointed to by result, increments it, and writes it back. | ||
==$1F== | ==isActorInBox ($1F)== | ||
==$48== | ==isEqual ($48)== | ||
==$78== | ==isGreater ($78)== | ||
==$04== | ==isGreaterEqual ($04)== | ||
==$44== | ==isLess ($44)== | ||
==$08== | ==isNotEqual ($08)== | ||
==$7C== | ==isSoundRunning ($7C)== | ||
==$18== | ==jumpRelative ($18)== | ||
non-standard encoding | non-standard encoding | ||
Line 331: | Line 274: | ||
The inline constant target is read as a signed word and added to the program counter after the instruction has been read. Therefore, if target is zero, the instruction will do nothing; if target is -3, an infinite loop will result. | The inline constant target is read as a signed word and added to the program counter after the instruction has been read. Therefore, if target is zero, the instruction will do nothing; if target is -3, an infinite loop will result. | ||
==$38== | ==lessOrEqual ($38)== | ||
==$70== | ==lights ($70)== | ||
==$72== | ==loadRoom ($72)== | ||
==$24== | ==loadRoomWithEgo ($24)== | ||
==$30== | ==matrixOp ($30)== | ||
==$1A== | ==move ($1A)== | ||
==$1B== | ==multiply ($1B)== | ||
==$A8== | ==notEqualZero ($A8)== | ||
==$57== | ==or ($57)== | ||
one parameter, uses result | one parameter, uses result | ||
Line 368: | Line 302: | ||
The variable pointed to by result is read, logically ORed with value, and the result written back. | The variable pointed to by result is read, logically ORed with value, and the result written back. | ||
==$58== | ==overRide ($58)== | ||
==$12== | ==panCameraTo ($12)== | ||
==$25== | ==pickupObject ($25)== | ||
==$14== | ==print ($14)== | ||
==$D8== | ==printEgo ($D8)== | ||
==$CC== | ==pseudoRoom ($CC)== | ||
==$01== | ==putActor ($01)== | ||
==$0E== | ==putActorAtObject ($0E)== | ||
==$2D== | ==putActorInRoom ($2D)== | ||
==$98== | ==quitPauseRestart ($98)== | ||
==$0C== | ==resourceRoutines ($0C)== | ||
==$33== | ==roomOp ($33)== | ||
==$AB== | ==saveRestoreVerbs ($AB)== | ||
==$32== | ==setCameraAt ($32)== | ||
==$54== | ==setObjectName ($54)== | ||
==$29== | ==setOwnerOf ($29)== | ||
==$07== | ==setState ($07)== | ||
==$26== | ==setVarRange ($26)== | ||
==$4C== | ==soundKludge ($4C)== | ||
==$01== | ==startMusic ($01)== | ||
==$37== | ==startObject ($37)== | ||
==$0A== | ==startScript ($0A)== | ||
one parameter plus varargs, extra encoding in opcode | one parameter plus varargs, extra encoding in opcode | ||
Line 451: | Line 363: | ||
|} | |} | ||
==$1C== | ==startSound ($1C)== | ||
==$20== | ==stopMusic ($20)== | ||
==$00== | ==stopObjectCode ($00)== | ||
==$6E== | ==stopObjectScript ($6E)== | ||
==$62== | ==stopScript ($62)== | ||
==$3C== | ==stopSound ($3C)== | ||
==$3A== | ==subtract ($3A)== | ||
==$11== | ==animateActor ($11)== | ||
==$AE== | ==wait ($AE)== | ||
==$1E== | ==walkActorTo ($1E)== | ||
==$0D== | ==walkActorToActor ($0D)== | ||
==$36== | ==walkActorToObject ($36)== | ||
All material © 2000-2002 David Given, unless where stated otherwise. | All material © 2000-2002 David Given, unless where stated otherwise. |
edits