Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs them. More...
Go to the source code of this file.
Macros | |
| #define | SC_LABEL(n) |
| Branch destination. | |
| #define | SC_TO(n) |
| #define | SC_TOP 0 |
| Script start. | |
| #define | SC_FOREVER 0xffff |
| #define | SC_WAIT(n) |
| Wait n frames. | |
| #define | SC_SYNC 0x01 |
| Wait for arrival. | |
| #define | SC_POS(x, y, z) |
| Set position. | |
| #define | SC_MOVE(x, y, z) |
| Move toward the target. | |
| #define | SC_MOVE_BY(x, y, z) |
| Move by a relative offset. | |
| #define | SC_FACE_LINK 0x05 |
| Face the linked object. | |
| #define | SC_MOVE_LINK 0x06 |
| Move to the linked object. | |
| #define | SC_MOVE_LOCAL(a, b) |
| #define | SC_WANDER(a, b, c) |
| Wander. | |
| #define | SC_WANDER_HOME(a, b, c) |
| #define | SC_APPROACH_LINK 0x0a |
| #define | SC_CAMERA 0x0b |
| Follow the leader. | |
| #define | SC_LOOP(n, to) |
| Repeat up to n times. | |
| #define | SC_JUMP(to) |
| #define | SC_IF(to) |
| Branch if the result is true. | |
| #define | SC_IFNOT(to) |
| Branch if the result is false. | |
| #define | SC_END 0x10 |
| Return to the main script. | |
| #define | SC_FLAG_CHECK(f) |
| #define | SC_FLAG_ON(f) |
| #define | SC_FLAG_OFF(f) |
| #define | SC_FLAG_REV(f) |
| #define | SC_SET(w, v) |
| Write a work value. | |
| #define | SC_ADD(w, v) |
| #define | SC_CMP(w, v) |
| #define | SC_PLAYER 0x18 |
| Player input control. | |
| #define | SC_KEYS 0x19 |
| #define | SC_WORLD 0x1a |
| World map control. | |
| #define | SC_FREE 0x1b |
| Release. | |
| #define | SC_ARG(v) |
| #define | SC_NOP(v) |
| #define | SC_SE(n) |
| Sound effect. | |
| #define | SC_BASE 0x1f |
| Restart from the next word. | |
| #define | SC_B54_OFF 0x20 |
| #define | SC_B54_ON 0x21 |
| #define | SC_CALL(fn) |
| #define | SC_KEY_COUNT 0x23 |
Enumerations | |
| enum | ScriptWork { SW_SCRIPT = 0x00 , SW_CURSOR = 0x01 , SW_FACING = 0x03 , SW_X = 0x05 , SW_Y = 0x06 , SW_Z = 0x07 , SW_RADIUS = 0x08 , SW_SCALE_X = 0x09 , SW_SCALE_Y = 0x0a , SW_VELOCITY_X = 0x0c , SW_VELOCITY_Y = 0x0d , SW_VELOCITY_Z = 0x0e , SW_SPEED = 0x0f , SW_ACCEL = 0x10 , SW_TARGET_X = 0x11 , SW_TARGET_Y = 0x12 , SW_TARGET_Z = 0x13 , SW_BOUNCE = 0x14 , SW_GRAVITY = 0x15 , SW_GROUND = 0x16 , SW_MOTION = 0x1a , SW_ARRIVAL = 0x1b , SW_RESULT = 0x1c , SW_SNAP = 0x1d , SW_COLLISION = 0x1e , SW_STEERING = 0x1f , SW_PAUSED = 0x20 , SW_REPEAT = 0x21 , SW_WAIT = 0x22 , SW_HOOK = 0x26 } |
| Script work values for SC_SET, SC_ADD and SC_CMP. More... | |
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs them.
Each macro expands to the words of one command. Coordinates are 16.16 fixed point (PIXELS).
Definition in file objcmd.h.
| #define SC_LABEL | ( | n | ) |
Branch destination.
| #define SC_FOREVER 0xffff |
Definition at line 14 of file objcmd.h.
Referenced by Script_RepeatOrJump().
| #define SC_POS | ( | x, | |
| y, | |||
| z ) |
| #define SC_MOVE | ( | x, | |
| y, | |||
| z ) |
| #define SC_MOVE_BY | ( | x, | |
| y, | |||
| z ) |
| #define SC_WANDER | ( | a, | |
| b, | |||
| c ) |
| #define SC_WANDER_HOME | ( | a, | |
| b, | |||
| c ) |
| #define SC_LOOP | ( | n, | |
| to ) |
| #define SC_IF | ( | to | ) |
| #define SC_IFNOT | ( | to | ) |
| #define SC_END 0x10 |
Return to the main script.
Definition at line 32 of file objcmd.h.
Referenced by ObjectDispatch_WaitForValue16().
| #define SC_SET | ( | w, | |
| v ) |
| enum ScriptWork |
Script work values for SC_SET, SC_ADD and SC_CMP.