DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
runscript_opcodes.hpp File Reference

Go to the source code of this file.

Functions

int _SET_MOTION (RS_STACKDATA *stack, int argc)
 
int _CHK_MOTION_FRM (RS_STACKDATA *stack, int argc)
 
int _GET_MOTION_FRM (RS_STACKDATA *stack, int argc)
 
int _SET_MOTION_FRM (RS_STACKDATA *stack, int argc)
 
int _GET_DISTANCE (RS_STACKDATA *stack, int argc)
 
int _GET_POSITION (RS_STACKDATA *stack, int argc)
 
int _SET_ROTATION (RS_STACKDATA *stack, int argc)
 
int _CHK_ROTATION (RS_STACKDATA *stack, int argc)
 
int _CHK_MOVE (RS_STACKDATA *stack, int argc)
 
int _CHK_USER_INNER_PRODUCT (RS_STACKDATA *stack, int argc)
 
int _GET_VECTOR (RS_STACKDATA *stack, int argc)
 
int _GET_DIRECTION (RS_STACKDATA *stack, int argc)
 
int _SET_MOVE (RS_STACKDATA *stack, int argc)
 
int _CHK_MOVE_INFO (RS_STACKDATA *stack, int argc)
 
int _SET_MOVE_CANSEL (RS_STACKDATA *stack, int argc)
 
int _SET_ROT_CANSEL (RS_STACKDATA *stack, int argc)
 
int _SET_POSITION (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_FALL (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_MUTEKI (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_ALPHA (RS_STACKDATA *stack, int argc)
 
int _STATUS_CHK_ALPHA (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_DEAD (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_EVENT (RS_STACKDATA *stack, int argc)
 
int _RUN_SCRIPT (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_COL_OFF (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_LIFE_RATE (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_USER_VECTOR (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_HEIGHT (RS_STACKDATA *stack, int argc)
 
int _GET_RAND (RS_STACKDATA *stack, int argc)
 
int _GET_RANDF (RS_STACKDATA *stack, int argc)
 
int _SIN_DEG (RS_STACKDATA *stack, int argc)
 
int _COS_DEG (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_PALLET (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_CLIPLEVEL (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_HITDMG_VOL (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_MOTION_ID (RS_STACKDATA *stack, int argc)
 
int _STATUS_GET_DMG_ID (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_LOCKON_DIST (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_SHADOW_LEN (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_LOCKON_TRG (RS_STACKDATA *stack, int argc)
 
int _SET_MOV_COL (RS_STACKDATA *stack, int argc)
 
int _SET_BODY_COL (RS_STACKDATA *stack, int argc)
 
int _SET_BODY_COL_PARA (RS_STACKDATA *stack, int argc)
 
int _SET_DMG_COL (RS_STACKDATA *stack, int argc)
 
int _SET_DMG_PARA (RS_STACKDATA *stack, int argc)
 
int _SET_SHOT (RS_STACKDATA *stack, int argc)
 
int _SET_SHOT2 (RS_STACKDATA *stack, int argc)
 
int _SET_SND_FRM (RS_STACKDATA *stack, int argc)
 
int _SET_LOOP_SND (RS_STACKDATA *stack, int argc)
 
int _STOP_LOOP_SND (RS_STACKDATA *stack, int argc)
 
int _DEL_LOOP_SND (RS_STACKDATA *stack, int argc)
 
int _SET_SND_NOW (RS_STACKDATA *stack, int argc)
 
int _STOP_SND_NOW (RS_STACKDATA *stack, int argc)
 
int _GET_CHR_ID (RS_STACKDATA *stack, int argc)
 
int _GET_COL_HIT_ID (RS_STACKDATA *stack, int argc)
 
int _GET_SCRIPT_ID (RS_STACKDATA *stack, int argc)
 
int _GET_MONSTOR_POS (RS_STACKDATA *stack, int argc)
 
int _GET_MONSTOR_FRM (RS_STACKDATA *stack, int argc)
 
int _SET_MONSTOR_POS (RS_STACKDATA *stack, int argc)
 
int _SET_MONSTOR_MOVE (RS_STACKDATA *stack, int argc)
 
int _SET_MONSTOR_LINK_MOVE (RS_STACKDATA *stack, int argc)
 
int _SET_MONSTOR_MOVE_CANSEL (RS_STACKDATA *stack, int argc)
 
int _SET_LOCKON_DIST (RS_STACKDATA *stack, int argc)
 
int _SET_LOCKON_SW (RS_STACKDATA *stack, int argc)
 
int _SET_MONSTOR_MOTION (RS_STACKDATA *stack, int argc)
 
int _SET_GLOBAL_INT (RS_STACKDATA *stack, int argc)
 
int _GET_GLOBAL_INT (RS_STACKDATA *stack, int argc)
 
int _SET_ROTATION_X (RS_STACKDATA *stack, int argc)
 
int _LOOKAT (RS_STACKDATA *stack, int argc)
 
int _SET_MOTION_CHANGE_STEP (RS_STACKDATA *stack, int argc)
 
int _GET_MONSTOR_VECTOR (RS_STACKDATA *stack, int argc)
 
int _STATUS_SET_LIFE (RS_STACKDATA *stack, int argc)
 
int _SET_BIN2 (RS_STACKDATA *stack, int argc)
 
int _SET_STATUS_CHANGE (RS_STACKDATA *stack, int argc)
 
int _SET_TEX_ANIME_SW (RS_STACKDATA *stack, int argc)
 
int _GET_STATUS_BIN2 (RS_STACKDATA *stack, int argc)
 
int _SET_COLLISION_WIDTH (RS_STACKDATA *stack, int argc)
 
int _GET_NEAR_MONSTER (RS_STACKDATA *stack, int argc)
 
int _BOSS_FADE_OUT (RS_STACKDATA *stack, int argc)
 
int _CHEKC_FADE_OUT (RS_STACKDATA *stack, int argc)
 
int _SET_GRAVITY (RS_STACKDATA *stack, int argc)
 
int _SET_GUARD_FRAME (RS_STACKDATA *stack, int argc)
 
int _GUARD_SEARCH (RS_STACKDATA *stack, int argc)
 
int _GET_MOVE_VEC (RS_STACKDATA *stack, int argc)
 
int _PUSH_IGLOBAL (RS_STACKDATA *stack, int argc)
 
int _POP_IGLOBAL (RS_STACKDATA *stack, int argc)
 
int _GET_USER_STATUS (RS_STACKDATA *stack, int argc)
 
int _SET_REFERENCE (RS_STACKDATA *stack, int argc)
 
int _DEL_REFERENCE (RS_STACKDATA *stack, int argc)
 
int _SET_SHADOW_FLAG (RS_STACKDATA *stack, int argc)
 
int BtSetEventScript (CRunScript *script, char *program, CDataAlloc2< 1 > *arena)
 
void BtSetEventExtendTable ()
 

Variables

int PUSH_INT_DATA [16][8]
 
int GL_INT [10]
 
int(* ext_func [256])(RS_STACKDATA *, int)
 
int elmColor [6][3]
 

Detailed Description

Declares the opcodes a monster's battle script can call.

Every opcode reads its arguments off the script's argument stack and reports whether the script may carry on. The monster it acts on is the one NowMonstorUnit currently names, except where the opcode takes a monster index of its own.

Definition in file runscript_opcodes.hpp.

Function Documentation

◆ _SET_MOTION()

int _SET_MOTION ( RS_STACKDATA *  stack,
int  argc 
)

Starts a motion on the monster and every part linked to it, optionally at a given speed and repeat count.

Mangled name:
_SET_MOTION__FP12RS_STACKDATAi
Address:
0x1E1710
Size:
0x478

Definition at line 85 of file runscript_opcodes.cpp.

◆ _CHK_MOTION_FRM()

int _CHK_MOTION_FRM ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the monster's motion has reached its last frame.

Mangled name:
_CHK_MOTION_FRM__FP12RS_STACKDATAi
Address:
0x1E1B90
Size:
0xCC

Definition at line 161 of file runscript_opcodes.cpp.

◆ _GET_MOTION_FRM()

int _GET_MOTION_FRM ( RS_STACKDATA *  stack,
int  argc 
)

Reads the frame the monster's motion currently stands on.

Mangled name:
_GET_MOTION_FRM__FP12RS_STACKDATAi
Address:
0x1E1C60
Size:
0x44

Definition at line 181 of file runscript_opcodes.cpp.

◆ _SET_MOTION_FRM()

int _SET_MOTION_FRM ( RS_STACKDATA *  stack,
int  argc 
)

Moves the monster's motion to a given frame.

Mangled name:
_SET_MOTION_FRM__FP12RS_STACKDATAi
Address:
0x1E1CB0
Size:
0x48

Definition at line 188 of file runscript_opcodes.cpp.

◆ _GET_DISTANCE()

int _GET_DISTANCE ( RS_STACKDATA *  stack,
int  argc 
)

Measures the distance from the monster to the player or to a given point.

Mangled name:
_GET_DISTANCE__FP12RS_STACKDATAi
Address:
0x1E1D00
Size:
0xEC

Definition at line 195 of file runscript_opcodes.cpp.

◆ _GET_POSITION()

int _GET_POSITION ( RS_STACKDATA *  stack,
int  argc 
)

Reads the world position of the monster or of the player.

Mangled name:
_GET_POSITION__FP12RS_STACKDATAi
Address:
0x1E1DF0
Size:
0xEC

Definition at line 214 of file runscript_opcodes.cpp.

◆ _SET_ROTATION()

int _SET_ROTATION ( RS_STACKDATA *  stack,
int  argc 
)

Turns the monster towards a point, immediately where no turn rate is given.

Mangled name:
_SET_ROTATION__FP12RS_STACKDATAi
Address:
0x1E1EE0
Size:
0x1C4

Definition at line 233 of file runscript_opcodes.cpp.

◆ _CHK_ROTATION()

int _CHK_ROTATION ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the monster has finished turning.

Mangled name:
_CHK_ROTATION__FP12RS_STACKDATAi
Address:
0x1E20B0
Size:
0x70

Definition at line 257 of file runscript_opcodes.cpp.

◆ _CHK_MOVE()

int _CHK_MOVE ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the monster has finished moving, and how far it still has to go.

Mangled name:
_CHK_MOVE__FP12RS_STACKDATAi
Address:
0x1E2120
Size:
0xFC

Definition at line 269 of file runscript_opcodes.cpp.

◆ _CHK_USER_INNER_PRODUCT()

int _CHK_USER_INNER_PRODUCT ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the player stands within a cone in front of the monster and near enough to it.

Mangled name:
_CHK_USER_INNER_PRODUCT__FP12RS_STACKDATAi
Address:
0x1E2220
Size:
0x210

Definition at line 289 of file runscript_opcodes.cpp.

◆ _GET_VECTOR()

int _GET_VECTOR ( RS_STACKDATA *  stack,
int  argc 
)

Gives the unit vector from the monster to a point, optionally turned about the vertical axis.

Mangled name:
_GET_VECTOR__FP12RS_STACKDATAi
Address:
0x1E2430
Size:
0x210

Definition at line 332 of file runscript_opcodes.cpp.

◆ _GET_DIRECTION()

int _GET_DIRECTION ( RS_STACKDATA *  stack,
int  argc 
)

Gives the unit vector the monster faces, optionally turned about the vertical axis.

Mangled name:
_GET_DIRECTION__FP12RS_STACKDATAi
Address:
0x1E2640
Size:
0x17C

Definition at line 381 of file runscript_opcodes.cpp.

◆ _SET_MOVE()

int _SET_MOVE ( RS_STACKDATA *  stack,
int  argc 
)

Sends the monster towards a point at a given speed.

Mangled name:
_SET_MOVE__FP12RS_STACKDATAi
Address:
0x1E27C0
Size:
0x15C

Definition at line 414 of file runscript_opcodes.cpp.

◆ _CHK_MOVE_INFO()

int _CHK_MOVE_INFO ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the floor carries the monster all the way to a point.

Mangled name:
_CHK_MOVE_INFO__FP12RS_STACKDATAi
Address:
0x1E2920
Size:
0x140

Definition at line 439 of file runscript_opcodes.cpp.

◆ _SET_MOVE_CANSEL()

int _SET_MOVE_CANSEL ( RS_STACKDATA *  stack,
int  argc 
)

Stops the monster where it stands.

Mangled name:
_SET_MOVE_CANSEL__FP12RS_STACKDATAi
Address:
0x1E2A60
Size:
0x38

Definition at line 462 of file runscript_opcodes.cpp.

◆ _SET_ROT_CANSEL()

int _SET_ROT_CANSEL ( RS_STACKDATA *  stack,
int  argc 
)

Stops the monster's turn at its current angle.

Mangled name:
_SET_ROT_CANSEL__FP12RS_STACKDATAi
Address:
0x1E2AA0
Size:
0x38

Definition at line 467 of file runscript_opcodes.cpp.

◆ _SET_POSITION()

int _SET_POSITION ( RS_STACKDATA *  stack,
int  argc 
)

Puts the monster at a world position.

Mangled name:
_SET_POSITION__FP12RS_STACKDATAi
Address:
0x1E2AE0
Size:
0x84

Definition at line 472 of file runscript_opcodes.cpp.

◆ _STATUS_SET_FALL()

int _STATUS_SET_FALL ( RS_STACKDATA *  stack,
int  argc 
)

Sets whether gravity pulls the monster down.

Mangled name:
_STATUS_SET_FALL__FP12RS_STACKDATAi
Address:
0x1E2B70
Size:
0x5C

Definition at line 482 of file runscript_opcodes.cpp.

◆ _STATUS_SET_MUTEKI()

int _STATUS_SET_MUTEKI ( RS_STACKDATA *  stack,
int  argc 
)

Makes the monster proof against damage, unless it is already dying.

Mangled name:
_STATUS_SET_MUTEKI__FP12RS_STACKDATAi
Address:
0x1E2BD0
Size:
0x8C

Definition at line 489 of file runscript_opcodes.cpp.

◆ _STATUS_SET_ALPHA()

int _STATUS_SET_ALPHA ( RS_STACKDATA *  stack,
int  argc 
)

Fades the monster towards an opacity, or sets that opacity outright.

Mangled name:
_STATUS_SET_ALPHA__FP12RS_STACKDATAi
Address:
0x1E2C60
Size:
0xB4

Definition at line 501 of file runscript_opcodes.cpp.

◆ _STATUS_CHK_ALPHA()

int _STATUS_CHK_ALPHA ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the monster has finished fading out, or in.

Mangled name:
_STATUS_CHK_ALPHA__FP12RS_STACKDATAi
Address:
0x1E2D20
Size:
0x10C

Definition at line 515 of file runscript_opcodes.cpp.

◆ _STATUS_SET_DEAD()

int _STATUS_SET_DEAD ( RS_STACKDATA *  stack,
int  argc 
)

Marks the monster dead and takes it off the live count.

Mangled name:
_STATUS_SET_DEAD__FP12RS_STACKDATAi
Address:
0x1E2E30
Size:
0x4C

Definition at line 539 of file runscript_opcodes.cpp.

◆ _STATUS_SET_EVENT()

int _STATUS_SET_EVENT ( RS_STACKDATA *  stack,
int  argc 
)

Chooses the script the monster runs next.

Mangled name:
_STATUS_SET_EVENT__FP12RS_STACKDATAi
Address:
0x1E2E80
Size:
0x2C

Definition at line 547 of file runscript_opcodes.cpp.

◆ _RUN_SCRIPT()

int _RUN_SCRIPT ( RS_STACKDATA *  stack,
int  argc 
)

Chooses the script the monster runs next and reports the change.

Mangled name:
_RUN_SCRIPT__FP12RS_STACKDATAi
Address:
0x1E2EB0
Size:
0x3C

Definition at line 552 of file runscript_opcodes.cpp.

◆ _STATUS_SET_COL_OFF()

int _STATUS_SET_COL_OFF ( RS_STACKDATA *  stack,
int  argc 
)

Sets whether the monster takes part in collision.

Mangled name:
_STATUS_SET_COL_OFF__FP12RS_STACKDATAi
Address:
0x1E2EF0
Size:
0x5C

Definition at line 558 of file runscript_opcodes.cpp.

◆ _STATUS_GET_LIFE_RATE()

int _STATUS_GET_LIFE_RATE ( RS_STACKDATA *  stack,
int  argc 
)

Gives the monster's remaining life as a percentage of its maximum.

Mangled name:
_STATUS_GET_LIFE_RATE__FP12RS_STACKDATAi
Address:
0x1E2F50
Size:
0x88

Definition at line 565 of file runscript_opcodes.cpp.

◆ _STATUS_GET_USER_VECTOR()

int _STATUS_GET_USER_VECTOR ( RS_STACKDATA *  stack,
int  argc 
)

Gives the vector the player faces, turned by an angle and optionally normalized.

Mangled name:
_STATUS_GET_USER_VECTOR__FP12RS_STACKDATAi
Address:
0x1E2FE0
Size:
0x104

Definition at line 574 of file runscript_opcodes.cpp.

◆ _STATUS_GET_HEIGHT()

int _STATUS_GET_HEIGHT ( RS_STACKDATA *  stack,
int  argc 
)

Gives the monster's height.

Mangled name:
_STATUS_GET_HEIGHT__FP12RS_STACKDATAi
Address:
0x1E30F0
Size:
0x50

Definition at line 606 of file runscript_opcodes.cpp.

◆ _GET_RAND()

int _GET_RAND ( RS_STACKDATA *  stack,
int  argc 
)

Gives a random integer below a bound.

Mangled name:
_GET_RAND__FP12RS_STACKDATAi
Address:
0x1E3140
Size:
0x88

Definition at line 611 of file runscript_opcodes.cpp.

◆ _GET_RANDF()

int _GET_RANDF ( RS_STACKDATA *  stack,
int  argc 
)

Gives a random whole number below a bound, as a float.

Mangled name:
_GET_RANDF__FP12RS_STACKDATAi
Address:
0x1E31D0
Size:
0x84

Definition at line 620 of file runscript_opcodes.cpp.

◆ _SIN_DEG()

int _SIN_DEG ( RS_STACKDATA *  stack,
int  argc 
)

Gives the sine of an angle in degrees.

Mangled name:
_SIN_DEG__FP12RS_STACKDATAi
Address:
0x1E3260
Size:
0x54

Definition at line 627 of file runscript_opcodes.cpp.

◆ _COS_DEG()

int _COS_DEG ( RS_STACKDATA *  stack,
int  argc 
)

Gives the cosine of an angle in degrees.

Mangled name:
_COS_DEG__FP12RS_STACKDATAi
Address:
0x1E32C0
Size:
0x54

Definition at line 635 of file runscript_opcodes.cpp.

◆ _STATUS_SET_PALLET()

int _STATUS_SET_PALLET ( RS_STACKDATA *  stack,
int  argc 
)

Tints the monster, either with a given colour or with the colour of its element.

Mangled name:
_STATUS_SET_PALLET__FP12RS_STACKDATAi
Address:
0x1E3320
Size:
0x1D4

Definition at line 649 of file runscript_opcodes.cpp.

◆ _STATUS_SET_CLIPLEVEL()

int _STATUS_SET_CLIPLEVEL ( RS_STACKDATA *  stack,
int  argc 
)

Sets the distance at which the monster stops being drawn.

Mangled name:
_STATUS_SET_CLIPLEVEL__FP12RS_STACKDATAi
Address:
0x1E3500
Size:
0x54

Definition at line 670 of file runscript_opcodes.cpp.

◆ _STATUS_GET_HITDMG_VOL()

int _STATUS_GET_HITDMG_VOL ( RS_STACKDATA *  stack,
int  argc 
)

Gives the damage the monster took from the last hit.

Mangled name:
_STATUS_GET_HITDMG_VOL__FP12RS_STACKDATAi
Address:
0x1E3560
Size:
0x50

Definition at line 677 of file runscript_opcodes.cpp.

◆ _STATUS_GET_MOTION_ID()

int _STATUS_GET_MOTION_ID ( RS_STACKDATA *  stack,
int  argc 
)

Gives the motion the monster is playing.

Mangled name:
_STATUS_GET_MOTION_ID__FP12RS_STACKDATAi
Address:
0x1E35B0
Size:
0x44

Definition at line 682 of file runscript_opcodes.cpp.

◆ _STATUS_GET_DMG_ID()

int _STATUS_GET_DMG_ID ( RS_STACKDATA *  stack,
int  argc 
)

Gives the damage collision that last struck the monster.

Mangled name:
_STATUS_GET_DMG_ID__FP12RS_STACKDATAi
Address:
0x1E3600
Size:
0x50

Definition at line 687 of file runscript_opcodes.cpp.

◆ _STATUS_SET_LOCKON_DIST()

int _STATUS_SET_LOCKON_DIST ( RS_STACKDATA *  stack,
int  argc 
)

Sets how far away the player may lock on to the monster.

Mangled name:
_STATUS_SET_LOCKON_DIST__FP12RS_STACKDATAi
Address:
0x1E3650
Size:
0x54

Definition at line 692 of file runscript_opcodes.cpp.

◆ _STATUS_SET_SHADOW_LEN()

int _STATUS_SET_SHADOW_LEN ( RS_STACKDATA *  stack,
int  argc 
)

Sets the length of the monster's shadow.

Mangled name:
_STATUS_SET_SHADOW_LEN__FP12RS_STACKDATAi
Address:
0x1E36B0
Size:
0x54

Definition at line 699 of file runscript_opcodes.cpp.

◆ _STATUS_SET_LOCKON_TRG()

int _STATUS_SET_LOCKON_TRG ( RS_STACKDATA *  stack,
int  argc 
)

Puts the lock-on marker on a named frame of the monster's model.

Mangled name:
_STATUS_SET_LOCKON_TRG__FP12RS_STACKDATAi
Address:
0x1E3710
Size:
0x130

Definition at line 706 of file runscript_opcodes.cpp.

◆ _SET_MOV_COL()

int _SET_MOV_COL ( RS_STACKDATA *  stack,
int  argc 
)

Gives the monster a movement collision sphere on a named frame.

Mangled name:
_SET_MOV_COL__FP12RS_STACKDATAi
Address:
0x1E3840
Size:
0x1A8

Definition at line 733 of file runscript_opcodes.cpp.

◆ _SET_BODY_COL()

int _SET_BODY_COL ( RS_STACKDATA *  stack,
int  argc 
)

Gives the monster a body collision sphere on a named frame, and clears its parameters.

Mangled name:
_SET_BODY_COL__FP12RS_STACKDATAi
Address:
0x1E39F0
Size:
0x2A8

Definition at line 758 of file runscript_opcodes.cpp.

◆ _SET_BODY_COL_PARA()

int _SET_BODY_COL_PARA ( RS_STACKDATA *  stack,
int  argc 
)

Sets one parameter of the body collision sphere the last opcode created.

Mangled name:
_SET_BODY_COL_PARA__FP12RS_STACKDATAi
Address:
0x1E3CA0
Size:
0x104

Definition at line 805 of file runscript_opcodes.cpp.

◆ _SET_DMG_COL()

int _SET_DMG_COL ( RS_STACKDATA *  stack,
int  argc 
)

Gives the monster a damage collision sphere on a named frame.

Mangled name:
_SET_DMG_COL__FP12RS_STACKDATAi
Address:
0x1E3DB0
Size:
0x214

Definition at line 825 of file runscript_opcodes.cpp.

◆ _SET_DMG_PARA()

int _SET_DMG_PARA ( RS_STACKDATA *  stack,
int  argc 
)

Sets the damage, kind and effect of the damage collision the last opcode created.

Mangled name:
_SET_DMG_PARA__FP12RS_STACKDATAi
Address:
0x1E3FD0
Size:
0x150

Definition at line 856 of file runscript_opcodes.cpp.

◆ _SET_SHOT()

int _SET_SHOT ( RS_STACKDATA *  stack,
int  argc 
)

Fires the monster's first projectile from a named frame.

Mangled name:
_SET_SHOT__FP12RS_STACKDATAi
Address:
0x1E4120
Size:
0x1EC

Definition at line 874 of file runscript_opcodes.cpp.

◆ _SET_SHOT2()

int _SET_SHOT2 ( RS_STACKDATA *  stack,
int  argc 
)

Fires the monster's second projectile from a named frame.

Mangled name:
_SET_SHOT2__FP12RS_STACKDATAi
Address:
0x1E4310
Size:
0x20C

Definition at line 909 of file runscript_opcodes.cpp.

◆ _SET_SND_FRM()

int _SET_SND_FRM ( RS_STACKDATA *  stack,
int  argc 
)

Schedules a sound to play when the motion reaches a frame.

Mangled name:
_SET_SND_FRM__FP12RS_STACKDATAi
Address:
0x1E4520
Size:
0x144

Definition at line 945 of file runscript_opcodes.cpp.

◆ _SET_LOOP_SND()

int _SET_LOOP_SND ( RS_STACKDATA *  stack,
int  argc 
)

Starts a sound that keeps playing until it is stopped.

Mangled name:
_SET_LOOP_SND__FP12RS_STACKDATAi
Address:
0x1E4670
Size:
0xC8

Definition at line 972 of file runscript_opcodes.cpp.

◆ _STOP_LOOP_SND()

int _STOP_LOOP_SND ( RS_STACKDATA *  stack,
int  argc 
)

Stops the monster's looping sound.

Mangled name:
_STOP_LOOP_SND__FP12RS_STACKDATAi
Address:
0x1E4740
Size:
0x6C

Definition at line 982 of file runscript_opcodes.cpp.

◆ _DEL_LOOP_SND()

int _DEL_LOOP_SND ( RS_STACKDATA *  stack,
int  argc 
)

Forgets the monster's looping sound without stopping it.

Mangled name:
_DEL_LOOP_SND__FP12RS_STACKDATAi
Address:
0x1E47B0
Size:
0x34

Definition at line 995 of file runscript_opcodes.cpp.

◆ _SET_SND_NOW()

int _SET_SND_NOW ( RS_STACKDATA *  stack,
int  argc 
)

Plays a sound at once.

Mangled name:
_SET_SND_NOW__FP12RS_STACKDATAi
Address:
0x1E47F0
Size:
0x38

Definition at line 1003 of file runscript_opcodes.cpp.

◆ _STOP_SND_NOW()

int _STOP_SND_NOW ( RS_STACKDATA *  stack,
int  argc 
)

Stops a sound at once.

Mangled name:
_STOP_SND_NOW__FP12RS_STACKDATAi
Address:
0x1E4830
Size:
0x34

Definition at line 1008 of file runscript_opcodes.cpp.

◆ _GET_CHR_ID()

int _GET_CHR_ID ( RS_STACKDATA *  stack,
int  argc 
)

Gives the character the player is controlling.

Mangled name:
_GET_CHR_ID__FP12RS_STACKDATAi
Address:
0x1E4870
Size:
0x2C

Definition at line 1013 of file runscript_opcodes.cpp.

◆ _GET_COL_HIT_ID()

int _GET_COL_HIT_ID ( RS_STACKDATA *  stack,
int  argc 
)

Gives the body collision that was last struck.

Mangled name:
_GET_COL_HIT_ID__FP12RS_STACKDATAi
Address:
0x1E48A0
Size:
0x50

Definition at line 1018 of file runscript_opcodes.cpp.

◆ _GET_SCRIPT_ID()

int _GET_SCRIPT_ID ( RS_STACKDATA *  stack,
int  argc 
)

Gives the index of the monster the script is running for.

Mangled name:
_GET_SCRIPT_ID__FP12RS_STACKDATAi
Address:
0x1E48F0
Size:
0x2C

Definition at line 1023 of file runscript_opcodes.cpp.

◆ _GET_MONSTOR_POS()

int _GET_MONSTOR_POS ( RS_STACKDATA *  stack,
int  argc 
)

Reads the world position of another monster.

Mangled name:
_GET_MONSTOR_POS__FP12RS_STACKDATAi
Address:
0x1E4920
Size:
0x98

Definition at line 1028 of file runscript_opcodes.cpp.

◆ _GET_MONSTOR_FRM()

int _GET_MONSTOR_FRM ( RS_STACKDATA *  stack,
int  argc 
)

Reads the motion frame another monster stands on.

Mangled name:
_GET_MONSTOR_FRM__FP12RS_STACKDATAi
Address:
0x1E49C0
Size:
0x58

Definition at line 1038 of file runscript_opcodes.cpp.

◆ _SET_MONSTOR_POS()

int _SET_MONSTOR_POS ( RS_STACKDATA *  stack,
int  argc 
)

Puts another monster at a world position.

Mangled name:
_SET_MONSTOR_POS__FP12RS_STACKDATAi
Address:
0x1E4A20
Size:
0x9C

Definition at line 1047 of file runscript_opcodes.cpp.

◆ _SET_MONSTOR_MOVE()

int _SET_MONSTOR_MOVE ( RS_STACKDATA *  stack,
int  argc 
)

Sends another monster towards a point at a given speed.

Mangled name:
_SET_MONSTOR_MOVE__FP12RS_STACKDATAi
Address:
0x1E4AC0
Size:
0x13C

Definition at line 1058 of file runscript_opcodes.cpp.

◆ _SET_MONSTOR_LINK_MOVE()

int _SET_MONSTOR_LINK_MOVE ( RS_STACKDATA *  stack,
int  argc 
)

Gives one monster the heading and speed of another.

Mangled name:
_SET_MONSTOR_LINK_MOVE__FP12RS_STACKDATAi
Address:
0x1E4C00
Size:
0xBC

Definition at line 1076 of file runscript_opcodes.cpp.

◆ _SET_MONSTOR_MOVE_CANSEL()

int _SET_MONSTOR_MOVE_CANSEL ( RS_STACKDATA *  stack,
int  argc 
)

Stops another monster where it stands.

Mangled name:
_SET_MONSTOR_MOVE_CANSEL__FP12RS_STACKDATAi
Address:
0x1E4CC0
Size:
0x4C

Definition at line 1085 of file runscript_opcodes.cpp.

◆ _SET_LOCKON_DIST()

int _SET_LOCKON_DIST ( RS_STACKDATA *  stack,
int  argc 
)

Sets how far away the player may lock on to the monster.

Mangled name:
_SET_LOCKON_DIST__FP12RS_STACKDATAi
Address:
0x1E4D10
Size:
0x54

Definition at line 1092 of file runscript_opcodes.cpp.

◆ _SET_LOCKON_SW()

int _SET_LOCKON_SW ( RS_STACKDATA *  stack,
int  argc 
)

Sets whether the player may lock on to the monster at all.

Mangled name:
_SET_LOCKON_SW__FP12RS_STACKDATAi
Address:
0x1E4D70
Size:
0x5C

Definition at line 1099 of file runscript_opcodes.cpp.

◆ _SET_MONSTOR_MOTION()

int _SET_MONSTOR_MOTION ( RS_STACKDATA *  stack,
int  argc 
)

Starts a motion on another monster and every part linked to it.

Mangled name:
_SET_MONSTOR_MOTION__FP12RS_STACKDATAi
Address:
0x1E4DD0
Size:
0x3B4

Definition at line 1106 of file runscript_opcodes.cpp.

◆ _SET_GLOBAL_INT()

int _SET_GLOBAL_INT ( RS_STACKDATA *  stack,
int  argc 
)

Stores an integer in a slot every monster script shares.

Mangled name:
_SET_GLOBAL_INT__FP12RS_STACKDATAi
Address:
0x1E5190
Size:
0x5C

Definition at line 1157 of file runscript_opcodes.cpp.

◆ _GET_GLOBAL_INT()

int _GET_GLOBAL_INT ( RS_STACKDATA *  stack,
int  argc 
)

Reads an integer out of a slot every monster script shares.

Mangled name:
_GET_GLOBAL_INT__FP12RS_STACKDATAi
Address:
0x1E51F0
Size:
0x50

Definition at line 1164 of file runscript_opcodes.cpp.

◆ _SET_ROTATION_X()

int _SET_ROTATION_X ( RS_STACKDATA *  stack,
int  argc 
)

Pitches the monster towards a point.

Mangled name:
_SET_ROTATION_X__FP12RS_STACKDATAi
Address:
0x1E5310
Size:
0x168

Definition at line 1188 of file runscript_opcodes.cpp.

◆ _LOOKAT()

int _LOOKAT ( RS_STACKDATA *  stack,
int  argc 
)

Aims one of the monster's three axes at a point.

Mangled name:
_LOOKAT__FP12RS_STACKDATAi
Address:
0x1E5480
Size:
0x338

Definition at line 1205 of file runscript_opcodes.cpp.

◆ _SET_MOTION_CHANGE_STEP()

int _SET_MOTION_CHANGE_STEP ( RS_STACKDATA *  stack,
int  argc 
)

Sets how quickly the monster and its linked parts blend between motions.

Mangled name:
_SET_MOTION_CHANGE_STEP__FP12RS_STACKDATAi
Address:
0x1E57C0
Size:
0xA8

Definition at line 1259 of file runscript_opcodes.cpp.

◆ _GET_MONSTOR_VECTOR()

int _GET_MONSTOR_VECTOR ( RS_STACKDATA *  stack,
int  argc 
)

Gives the unit vector from another monster to a point, optionally turned about the vertical axis.

Mangled name:
_GET_MONSTOR_VECTOR__FP12RS_STACKDATAi
Address:
0x1E5870
Size:
0x214

Definition at line 1272 of file runscript_opcodes.cpp.

◆ _STATUS_SET_LIFE()

int _STATUS_SET_LIFE ( RS_STACKDATA *  stack,
int  argc 
)

Sets the monster's life to a fraction of its maximum.

Mangled name:
_STATUS_SET_LIFE__FP12RS_STACKDATAi
Address:
0x1E5A90
Size:
0x84

Definition at line 1321 of file runscript_opcodes.cpp.

◆ _SET_BIN2()

int _SET_BIN2 ( RS_STACKDATA *  stack,
int  argc 
)

Stores the monster's script flag word.

Mangled name:
_SET_BIN2__FP12RS_STACKDATAi
Address:
0x1E5B20
Size:
0x5C

Definition at line 1329 of file runscript_opcodes.cpp.

◆ _SET_STATUS_CHANGE()

int _SET_STATUS_CHANGE ( RS_STACKDATA *  stack,
int  argc 
)

Sets one of a monster's five status-change resistances.

Mangled name:
_SET_STATUS_CHANGE__FP12RS_STACKDATAi
Address:
0x1E5B80
Size:
0xCC

Definition at line 1336 of file runscript_opcodes.cpp.

◆ _SET_TEX_ANIME_SW()

int _SET_TEX_ANIME_SW ( RS_STACKDATA *  stack,
int  argc 
)

Turns one of a monster's texture animations on or off.

Mangled name:
_SET_TEX_ANIME_SW__FP12RS_STACKDATAi
Address:
0x1E5C50
Size:
0x10C

Definition at line 1353 of file runscript_opcodes.cpp.

◆ _GET_STATUS_BIN2()

int _GET_STATUS_BIN2 ( RS_STACKDATA *  stack,
int  argc 
)

Reads the monster's script flag word.

Mangled name:
_GET_STATUS_BIN2__FP12RS_STACKDATAi
Address:
0x1E5D60
Size:
0x58

Definition at line 1373 of file runscript_opcodes.cpp.

◆ _SET_COLLISION_WIDTH()

int _SET_COLLISION_WIDTH ( RS_STACKDATA *  stack,
int  argc 
)

Sets the radius the monster occupies for collision.

Mangled name:
_SET_COLLISION_WIDTH__FP12RS_STACKDATAi
Address:
0x1E5DC0
Size:
0x54

Definition at line 1382 of file runscript_opcodes.cpp.

◆ _GET_NEAR_MONSTER()

int _GET_NEAR_MONSTER ( RS_STACKDATA *  stack,
int  argc 
)

Finds the nearest other live monster within two hundred and forty units.

Mangled name:
_GET_NEAR_MONSTER__FP12RS_STACKDATAi
Address:
0x1E5E20
Size:
0x198

Definition at line 1389 of file runscript_opcodes.cpp.

◆ _BOSS_FADE_OUT()

int _BOSS_FADE_OUT ( RS_STACKDATA *  stack,
int  argc 
)

Starts the fade to black that ends a boss fight.

Mangled name:
_BOSS_FADE_OUT__FP12RS_STACKDATAi
Address:
0x1E5FC0
Size:
0x50

Definition at line 1421 of file runscript_opcodes.cpp.

◆ _CHEKC_FADE_OUT()

int _CHEKC_FADE_OUT ( RS_STACKDATA *  stack,
int  argc 
)

Reports whether the boss fade has finished.

Mangled name:
_CHEKC_FADE_OUT__FP12RS_STACKDATAi
Address:
0x1E6010
Size:
0x40

Definition at line 1429 of file runscript_opcodes.cpp.

◆ _SET_GRAVITY()

int _SET_GRAVITY ( RS_STACKDATA *  stack,
int  argc 
)

Sets the gravity applied to the monster.

Mangled name:
_SET_GRAVITY__FP12RS_STACKDATAi
Address:
0x1E6050
Size:
0x5C

Definition at line 1436 of file runscript_opcodes.cpp.

◆ _SET_GUARD_FRAME()

int _SET_GUARD_FRAME ( RS_STACKDATA *  stack,
int  argc 
)

Opens a window, in motion frames, during which the monster guards.

Mangled name:
_SET_GUARD_FRAME__FP12RS_STACKDATAi
Address:
0x1E60B0
Size:
0x14C

Definition at line 1443 of file runscript_opcodes.cpp.

◆ _GUARD_SEARCH()

int _GUARD_SEARCH ( RS_STACKDATA *  stack,
int  argc 
)

Reports the player's guard state, distance and character while the monster is guarding.

Mangled name:
_GUARD_SEARCH__FP12RS_STACKDATAi
Address:
0x1E6200
Size:
0x158

Definition at line 1470 of file runscript_opcodes.cpp.

◆ _GET_MOVE_VEC()

int _GET_MOVE_VEC ( RS_STACKDATA *  stack,
int  argc 
)

Gives the direction the player is moving in.

Mangled name:
_GET_MOVE_VEC__FP12RS_STACKDATAi
Address:
0x1E6360
Size:
0x5C

Definition at line 1496 of file runscript_opcodes.cpp.

◆ _PUSH_IGLOBAL()

int _PUSH_IGLOBAL ( RS_STACKDATA *  stack,
int  argc 
)

Stores an integer in one of the monster's own eight slots.

Mangled name:
_PUSH_IGLOBAL__FP12RS_STACKDATAi
Address:
0x1E63C0
Size:
0x94

Definition at line 1503 of file runscript_opcodes.cpp.

◆ _POP_IGLOBAL()

int _POP_IGLOBAL ( RS_STACKDATA *  stack,
int  argc 
)

Reads an integer out of one of the monster's own eight slots.

Mangled name:
_POP_IGLOBAL__FP12RS_STACKDATAi
Address:
0x1E6460
Size:
0x88

Definition at line 1517 of file runscript_opcodes.cpp.

◆ _GET_USER_STATUS()

int _GET_USER_STATUS ( RS_STACKDATA *  stack,
int  argc 
)

Gives the status ailment the player is suffering.

Mangled name:
_GET_USER_STATUS__FP12RS_STACKDATAi
Address:
0x1E64F0
Size:
0x74

Definition at line 1531 of file runscript_opcodes.cpp.

◆ _SET_REFERENCE()

int _SET_REFERENCE ( RS_STACKDATA *  stack,
int  argc 
)

Attaches the monster's model to a named frame of its own hierarchy.

Mangled name:
_SET_REFERENCE__FP12RS_STACKDATAi
Address:
0x1E6570
Size:
0xC0

Definition at line 1544 of file runscript_opcodes.cpp.

◆ _DEL_REFERENCE()

int _DEL_REFERENCE ( RS_STACKDATA *  stack,
int  argc 
)

Detaches another monster's model from whatever it was attached to.

Mangled name:
_DEL_REFERENCE__FP12RS_STACKDATAi
Address:
0x1E6630
Size:
0x5C

Definition at line 1566 of file runscript_opcodes.cpp.

◆ _SET_SHADOW_FLAG()

int _SET_SHADOW_FLAG ( RS_STACKDATA *  stack,
int  argc 
)

Sets whether the monster casts a shadow.

Mangled name:
_SET_SHADOW_FLAG__FP12RS_STACKDATAi
Address:
0x1E6690
Size:
0x5C

Definition at line 1578 of file runscript_opcodes.cpp.

◆ BtSetEventScript()

int BtSetEventScript ( CRunScript *  script,
char *  program,
CDataAlloc2< 1 > *  arena 
)

Loads a monster script, giving it its argument stack, call stack and opcode table.

Mangled name:
BtSetEventScript__FP10CRunScriptPcP14CDataAlloc2_1_
Address:
0x1E66F0
Size:
0xA4

Definition at line 1585 of file runscript_opcodes.cpp.

◆ BtSetEventExtendTable()

void BtSetEventExtendTable ( )

Builds the opcode table out of the extension list, refusing a list that names one twice.

Mangled name:
BtSetEventExtendTable__Fv
Address:
0x1E67A0
Size:
0x12C

Definition at line 1691 of file runscript_opcodes.cpp.

Variable Documentation

◆ PUSH_INT_DATA

int PUSH_INT_DATA[16][8]
extern

Integers each monster's script pushes and pops, eight per monster.

Definition at line 29 of file runscript_opcodes.cpp.

◆ GL_INT

int GL_INT[10]
extern

Integers the monster scripts share, set and read by index.

Definition at line 30 of file runscript_opcodes.cpp.

◆ ext_func

int(* ext_func[256])(RS_STACKDATA *, int) ( RS_STACKDATA *  ,
int   
)
extern

Opcode table the monster scripts dispatch through, indexed by operation number.

Definition at line 31 of file runscript_opcodes.cpp.

◆ elmColor

int elmColor[6][3]
extern

Palette colour each element tints a hit monster with, as red, green and blue.

Definition at line 644 of file runscript_opcodes.cpp.