|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
Go to the source code of this file.
Variables | |
| int | PUSH_INT_DATA [16][8] |
| int | GL_INT [10] |
| int(* | ext_func [256])(RS_STACKDATA *, int) |
| int | elmColor [6][3] |
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.
| 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.
Definition at line 85 of file runscript_opcodes.cpp.
| int _CHK_MOTION_FRM | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the monster's motion has reached its last frame.
Definition at line 161 of file runscript_opcodes.cpp.
| int _GET_MOTION_FRM | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads the frame the monster's motion currently stands on.
Definition at line 181 of file runscript_opcodes.cpp.
| int _SET_MOTION_FRM | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Moves the monster's motion to a given frame.
Definition at line 188 of file runscript_opcodes.cpp.
| int _GET_DISTANCE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Measures the distance from the monster to the player or to a given point.
Definition at line 195 of file runscript_opcodes.cpp.
| int _GET_POSITION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads the world position of the monster or of the player.
Definition at line 214 of file runscript_opcodes.cpp.
| int _SET_ROTATION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Turns the monster towards a point, immediately where no turn rate is given.
Definition at line 233 of file runscript_opcodes.cpp.
| int _CHK_ROTATION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the monster has finished turning.
Definition at line 257 of file runscript_opcodes.cpp.
| int _CHK_MOVE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the monster has finished moving, and how far it still has to go.
Definition at line 269 of file runscript_opcodes.cpp.
| 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.
Definition at line 289 of file runscript_opcodes.cpp.
| int _GET_VECTOR | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the unit vector from the monster to a point, optionally turned about the vertical axis.
Definition at line 332 of file runscript_opcodes.cpp.
| int _GET_DIRECTION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the unit vector the monster faces, optionally turned about the vertical axis.
Definition at line 381 of file runscript_opcodes.cpp.
| int _SET_MOVE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sends the monster towards a point at a given speed.
Definition at line 414 of file runscript_opcodes.cpp.
| int _CHK_MOVE_INFO | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the floor carries the monster all the way to a point.
Definition at line 439 of file runscript_opcodes.cpp.
| int _SET_MOVE_CANSEL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stops the monster where it stands.
Definition at line 462 of file runscript_opcodes.cpp.
| int _SET_ROT_CANSEL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stops the monster's turn at its current angle.
Definition at line 467 of file runscript_opcodes.cpp.
| int _SET_POSITION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Puts the monster at a world position.
Definition at line 472 of file runscript_opcodes.cpp.
| int _STATUS_SET_FALL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets whether gravity pulls the monster down.
Definition at line 482 of file runscript_opcodes.cpp.
| int _STATUS_SET_MUTEKI | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Makes the monster proof against damage, unless it is already dying.
Definition at line 489 of file runscript_opcodes.cpp.
| int _STATUS_SET_ALPHA | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Fades the monster towards an opacity, or sets that opacity outright.
Definition at line 501 of file runscript_opcodes.cpp.
| int _STATUS_CHK_ALPHA | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the monster has finished fading out, or in.
Definition at line 515 of file runscript_opcodes.cpp.
| int _STATUS_SET_DEAD | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Marks the monster dead and takes it off the live count.
Definition at line 539 of file runscript_opcodes.cpp.
| int _STATUS_SET_EVENT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Chooses the script the monster runs next.
Definition at line 547 of file runscript_opcodes.cpp.
| int _RUN_SCRIPT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Chooses the script the monster runs next and reports the change.
Definition at line 552 of file runscript_opcodes.cpp.
| int _STATUS_SET_COL_OFF | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets whether the monster takes part in collision.
Definition at line 558 of file runscript_opcodes.cpp.
| int _STATUS_GET_LIFE_RATE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the monster's remaining life as a percentage of its maximum.
Definition at line 565 of file runscript_opcodes.cpp.
| int _STATUS_GET_USER_VECTOR | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the vector the player faces, turned by an angle and optionally normalized.
Definition at line 574 of file runscript_opcodes.cpp.
| int _STATUS_GET_HEIGHT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the monster's height.
Definition at line 606 of file runscript_opcodes.cpp.
| int _GET_RAND | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives a random integer below a bound.
Definition at line 611 of file runscript_opcodes.cpp.
| int _GET_RANDF | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives a random whole number below a bound, as a float.
Definition at line 620 of file runscript_opcodes.cpp.
| int _SIN_DEG | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the sine of an angle in degrees.
Definition at line 627 of file runscript_opcodes.cpp.
| int _COS_DEG | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the cosine of an angle in degrees.
Definition at line 635 of file runscript_opcodes.cpp.
| int _STATUS_SET_PALLET | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Tints the monster, either with a given colour or with the colour of its element.
Definition at line 649 of file runscript_opcodes.cpp.
| int _STATUS_SET_CLIPLEVEL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the distance at which the monster stops being drawn.
Definition at line 670 of file runscript_opcodes.cpp.
| int _STATUS_GET_HITDMG_VOL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the damage the monster took from the last hit.
Definition at line 677 of file runscript_opcodes.cpp.
| int _STATUS_GET_MOTION_ID | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the motion the monster is playing.
Definition at line 682 of file runscript_opcodes.cpp.
| int _STATUS_GET_DMG_ID | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the damage collision that last struck the monster.
Definition at line 687 of file runscript_opcodes.cpp.
| int _STATUS_SET_LOCKON_DIST | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets how far away the player may lock on to the monster.
Definition at line 692 of file runscript_opcodes.cpp.
| int _STATUS_SET_SHADOW_LEN | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the length of the monster's shadow.
Definition at line 699 of file runscript_opcodes.cpp.
| int _STATUS_SET_LOCKON_TRG | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Puts the lock-on marker on a named frame of the monster's model.
Definition at line 706 of file runscript_opcodes.cpp.
| int _SET_MOV_COL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the monster a movement collision sphere on a named frame.
Definition at line 733 of file runscript_opcodes.cpp.
| int _SET_BODY_COL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the monster a body collision sphere on a named frame, and clears its parameters.
Definition at line 758 of file runscript_opcodes.cpp.
| int _SET_BODY_COL_PARA | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets one parameter of the body collision sphere the last opcode created.
Definition at line 805 of file runscript_opcodes.cpp.
| int _SET_DMG_COL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the monster a damage collision sphere on a named frame.
Definition at line 825 of file runscript_opcodes.cpp.
| int _SET_DMG_PARA | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the damage, kind and effect of the damage collision the last opcode created.
Definition at line 856 of file runscript_opcodes.cpp.
| int _SET_SHOT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Fires the monster's first projectile from a named frame.
Definition at line 874 of file runscript_opcodes.cpp.
| int _SET_SHOT2 | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Fires the monster's second projectile from a named frame.
Definition at line 909 of file runscript_opcodes.cpp.
| int _SET_SND_FRM | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Schedules a sound to play when the motion reaches a frame.
Definition at line 945 of file runscript_opcodes.cpp.
| int _SET_LOOP_SND | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Starts a sound that keeps playing until it is stopped.
Definition at line 972 of file runscript_opcodes.cpp.
| int _STOP_LOOP_SND | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stops the monster's looping sound.
Definition at line 982 of file runscript_opcodes.cpp.
| int _DEL_LOOP_SND | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Forgets the monster's looping sound without stopping it.
Definition at line 995 of file runscript_opcodes.cpp.
| int _SET_SND_NOW | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Plays a sound at once.
Definition at line 1003 of file runscript_opcodes.cpp.
| int _STOP_SND_NOW | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stops a sound at once.
Definition at line 1008 of file runscript_opcodes.cpp.
| int _GET_CHR_ID | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the character the player is controlling.
Definition at line 1013 of file runscript_opcodes.cpp.
| int _GET_COL_HIT_ID | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the body collision that was last struck.
Definition at line 1018 of file runscript_opcodes.cpp.
| int _GET_SCRIPT_ID | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the index of the monster the script is running for.
Definition at line 1023 of file runscript_opcodes.cpp.
| int _GET_MONSTOR_POS | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads the world position of another monster.
Definition at line 1028 of file runscript_opcodes.cpp.
| int _GET_MONSTOR_FRM | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads the motion frame another monster stands on.
Definition at line 1038 of file runscript_opcodes.cpp.
| int _SET_MONSTOR_POS | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Puts another monster at a world position.
Definition at line 1047 of file runscript_opcodes.cpp.
| int _SET_MONSTOR_MOVE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sends another monster towards a point at a given speed.
Definition at line 1058 of file runscript_opcodes.cpp.
| int _SET_MONSTOR_LINK_MOVE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives one monster the heading and speed of another.
Definition at line 1076 of file runscript_opcodes.cpp.
| int _SET_MONSTOR_MOVE_CANSEL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stops another monster where it stands.
Definition at line 1085 of file runscript_opcodes.cpp.
| int _SET_LOCKON_DIST | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets how far away the player may lock on to the monster.
Definition at line 1092 of file runscript_opcodes.cpp.
| int _SET_LOCKON_SW | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets whether the player may lock on to the monster at all.
Definition at line 1099 of file runscript_opcodes.cpp.
| int _SET_MONSTOR_MOTION | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Starts a motion on another monster and every part linked to it.
Definition at line 1106 of file runscript_opcodes.cpp.
| int _SET_GLOBAL_INT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stores an integer in a slot every monster script shares.
Definition at line 1157 of file runscript_opcodes.cpp.
| int _GET_GLOBAL_INT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads an integer out of a slot every monster script shares.
Definition at line 1164 of file runscript_opcodes.cpp.
| int _SET_ROTATION_X | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Pitches the monster towards a point.
Definition at line 1188 of file runscript_opcodes.cpp.
| int _LOOKAT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Aims one of the monster's three axes at a point.
Definition at line 1205 of file runscript_opcodes.cpp.
| int _SET_MOTION_CHANGE_STEP | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets how quickly the monster and its linked parts blend between motions.
Definition at line 1259 of file runscript_opcodes.cpp.
| 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.
Definition at line 1272 of file runscript_opcodes.cpp.
| int _STATUS_SET_LIFE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the monster's life to a fraction of its maximum.
Definition at line 1321 of file runscript_opcodes.cpp.
| int _SET_BIN2 | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stores the monster's script flag word.
Definition at line 1329 of file runscript_opcodes.cpp.
| int _SET_STATUS_CHANGE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets one of a monster's five status-change resistances.
Definition at line 1336 of file runscript_opcodes.cpp.
| int _SET_TEX_ANIME_SW | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Turns one of a monster's texture animations on or off.
Definition at line 1353 of file runscript_opcodes.cpp.
| int _GET_STATUS_BIN2 | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads the monster's script flag word.
Definition at line 1373 of file runscript_opcodes.cpp.
| int _SET_COLLISION_WIDTH | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the radius the monster occupies for collision.
Definition at line 1382 of file runscript_opcodes.cpp.
| int _GET_NEAR_MONSTER | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Finds the nearest other live monster within two hundred and forty units.
Definition at line 1389 of file runscript_opcodes.cpp.
| int _BOSS_FADE_OUT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Starts the fade to black that ends a boss fight.
Definition at line 1421 of file runscript_opcodes.cpp.
| int _CHEKC_FADE_OUT | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports whether the boss fade has finished.
Definition at line 1429 of file runscript_opcodes.cpp.
| int _SET_GRAVITY | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets the gravity applied to the monster.
Definition at line 1436 of file runscript_opcodes.cpp.
| int _SET_GUARD_FRAME | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Opens a window, in motion frames, during which the monster guards.
Definition at line 1443 of file runscript_opcodes.cpp.
| int _GUARD_SEARCH | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reports the player's guard state, distance and character while the monster is guarding.
Definition at line 1470 of file runscript_opcodes.cpp.
| int _GET_MOVE_VEC | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the direction the player is moving in.
Definition at line 1496 of file runscript_opcodes.cpp.
| int _PUSH_IGLOBAL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Stores an integer in one of the monster's own eight slots.
Definition at line 1503 of file runscript_opcodes.cpp.
| int _POP_IGLOBAL | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Reads an integer out of one of the monster's own eight slots.
Definition at line 1517 of file runscript_opcodes.cpp.
| int _GET_USER_STATUS | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Gives the status ailment the player is suffering.
Definition at line 1531 of file runscript_opcodes.cpp.
| int _SET_REFERENCE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Attaches the monster's model to a named frame of its own hierarchy.
Definition at line 1544 of file runscript_opcodes.cpp.
| int _DEL_REFERENCE | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Detaches another monster's model from whatever it was attached to.
Definition at line 1566 of file runscript_opcodes.cpp.
| int _SET_SHADOW_FLAG | ( | RS_STACKDATA * | stack, |
| int | argc | ||
| ) |
Sets whether the monster casts a shadow.
Definition at line 1578 of file runscript_opcodes.cpp.
| int BtSetEventScript | ( | CRunScript * | script, |
| char * | program, | ||
| CDataAlloc2< 1 > * | arena | ||
| ) |
Loads a monster script, giving it its argument stack, call stack and opcode table.
Definition at line 1585 of file runscript_opcodes.cpp.
| void BtSetEventExtendTable | ( | ) |
Builds the opcode table out of the extension list, refusing a list that names one twice.
Definition at line 1691 of file runscript_opcodes.cpp.
|
extern |
Integers each monster's script pushes and pops, eight per monster.
Definition at line 29 of file runscript_opcodes.cpp.
|
extern |
Integers the monster scripts share, set and read by index.
Definition at line 30 of file runscript_opcodes.cpp.
|
extern |
Opcode table the monster scripts dispatch through, indexed by operation number.
Definition at line 31 of file runscript_opcodes.cpp.
|
extern |
Palette colour each element tints a hit monster with, as red, green and blue.
Definition at line 644 of file runscript_opcodes.cpp.