|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
Go to the source code of this file.
Classes | |
| struct | BT_OBJ_HANDLE |
Functions | |
| void | BtSystemScriptEventInfoInit () |
| BT_OBJ_HANDLE * | GetObjHDL (int index) |
| void | BtSystemScriptLoad (int floor) |
| void | BtSystemScriptInit () |
| void | BtSystemScriptAfter () |
| int | BtSystemScriptRun (int event, CDataAlloc2< 1 > *arena) |
| void | BtSetMapJumpFloor (int floor) |
| int | _GET_FLOOR_LEVEL (RS_STACKDATA *stack, int argument_count) |
| int | _SET_FLOOR_LEVEL (RS_STACKDATA *stack, int argument_count) |
| int | _GET_OLD_FLOOR_LEVEL (RS_STACKDATA *stack, int argument_count) |
| int | _GET_ACTION_MODE (RS_STACKDATA *stack, int argument_count) |
| int | _ITEM_USE_WINDOW (RS_STACKDATA *stack, int argument_count) |
| int | _CHECK_EVENT_FLG (RS_STACKDATA *stack, int argument_count) |
| int | _SET_EVENT_FLG (RS_STACKDATA *stack, int argument_count) |
| int | _GET_OBJHDL (RS_STACKDATA *stack, int argument_count) |
| int | _SET_OBJHDL_POS (RS_STACKDATA *stack, int argument_count) |
| int | _SET_OBJHDL_ROT (RS_STACKDATA *stack, int argument_count) |
| int | _SET_OBJHDL_DRAW_FLAG (RS_STACKDATA *stack, int argument_count) |
| int | _GET_OBJHDL_POS (RS_STACKDATA *stack, int argument_count) |
| int | _GET_OBJHDL_ROT (RS_STACKDATA *stack, int argument_count) |
| int | _SET_URA_DUNGEON (RS_STACKDATA *stack, int argument_count) |
| int | _GET_EVENT_POS (RS_STACKDATA *stack, int argument_count) |
| int | _GET_EVENT_ROT (RS_STACKDATA *stack, int argument_count) |
| int | _OPEN_ENTRANCE_WINDOW (RS_STACKDATA *stack, int argument_count) |
| int | _OPEN_ESCAPE_WINDOW (RS_STACKDATA *stack, int argument_count) |
| int | _GO_DUNGEON (RS_STACKDATA *stack, int argument_count) |
| int | _SET_DUNGEON_MAP (RS_STACKDATA *stack, int argument_count) |
| int | _LOAD_DUNGEON_MAP2 (RS_STACKDATA *stack, int argument_count) |
| int | _LOAD_MONSTOR (RS_STACKDATA *stack, int argument_count) |
| int | _SET_RANDOM_MAP (RS_STACKDATA *stack, int argument_count) |
| int | _SET_EVENT_SW (RS_STACKDATA *stack, int argument_count) |
| int | _SET_MONSTOR_ID (RS_STACKDATA *stack, int argument_count) |
| int | _CHK_ATRA_HAVE (RS_STACKDATA *stack, int argument_count) |
| int | _SET_ATRA (RS_STACKDATA *stack, int argument_count) |
| int | _SET_IBOX (RS_STACKDATA *stack, int argument_count) |
| int | _GET_NOW_USER_ID (RS_STACKDATA *stack, int argument_count) |
| int | _RUN_SCRIPT_NO (RS_STACKDATA *stack, int argument_count) |
| int | _CLEAN_MONSTOR_SCRIPT_NO (RS_STACKDATA *stack, int argument_count) |
| int | _GET_NPC_OBJHDL (RS_STACKDATA *stack, int argument_count) |
| int | _SET_MOTION_OBJHDL (RS_STACKDATA *stack, int argument_count) |
| int | _SET_NPC_ON_OFF (RS_STACKDATA *stack, int argument_count) |
| int | _GET_GATEKEY_NO (RS_STACKDATA *stack, int argument_count) |
| int | _USER_WEAPON_DRAW (RS_STACKDATA *stack, int argument_count) |
| int | _SET_MAIN_CHR2 (RS_STACKDATA *stack, int argument_count) |
| int | _RESET_MAIN_CHR (RS_STACKDATA *stack, int argument_count) |
| int | _SET_LIMMIT_ZONE (RS_STACKDATA *stack, int argument_count) |
| int | _SET_DEAD_FLAG (RS_STACKDATA *stack, int argument_count) |
| int | _ALL_DRAW_FLAG (RS_STACKDATA *stack, int argument_count) |
| int | _SET_FLOOR_TITLE (RS_STACKDATA *stack, int argument_count) |
| int | _GET_RUBY_ELEMENT (RS_STACKDATA *stack, int argument_count) |
| int | _SET_RUBY_ELEMENT (RS_STACKDATA *stack, int argument_count) |
| int | _SET_FLOOR_TITLE_OFF (RS_STACKDATA *stack, int argument_count) |
| int | _SET_RES_LIMMIT_ZONE (RS_STACKDATA *stack, int argument_count) |
| int | _CLEAR_DEAMON_SHAFT (RS_STACKDATA *stack, int argument_count) |
| int | _INIT_BEE (RS_STACKDATA *stack, int argument_count) |
| int | _END_BEE (RS_STACKDATA *stack, int argument_count) |
| int | _EASTKING_COMPLETE (RS_STACKDATA *stack, int argument_count) |
| int | _GET_ITEM_TRAPID (RS_STACKDATA *stack, int argument_count) |
| int | _RESET_ITEM_TRAP (RS_STACKDATA *stack, int argument_count) |
| int | _BOM_SET (RS_STACKDATA *stack, int argument_count) |
| int | _SET_STATUS_ERR (RS_STACKDATA *stack, int argument_count) |
| int | _CHECK_MARDAN (RS_STACKDATA *stack, int argument_count) |
| int | _NO_RESET_CHARA_NO (RS_STACKDATA *stack, int argument_count) |
| int | _CHECK_CHR_HELP (RS_STACKDATA *stack, int argument_count) |
| int | _HOLD_ITEM_EVENT (RS_STACKDATA *stack, int argument_count) |
| int | _STOP_BATTLE_BGM (RS_STACKDATA *stack, int argument_count) |
| int | _NO_STATUS_RECOVER (RS_STACKDATA *stack, int argument_count) |
| int | _SET_QUEST_DUNGEON (RS_STACKDATA *stack, int argument_count) |
| int | _GET_MAP_CODE (RS_STACKDATA *stack, int argument_count) |
| int | _SET_ACTIVE_ITEM_ICON (RS_STACKDATA *stack, int argument_count) |
| int | _GET_ITEM_UNIT_NO (RS_STACKDATA *stack, int argument_count) |
| int | _SET_IBOX_ANGLE (RS_STACKDATA *stack, int argument_count) |
| int | _SET_IBOX_FINISH (RS_STACKDATA *stack, int argument_count) |
| int | _GET_PIERO_ITEM (RS_STACKDATA *stack, int argument_count) |
| void | AddSystemEventScript () |
Variables | |
| BT_OBJ_HANDLE | BtObjHdl [32] |
| int | BtMapJumpFloor |
| char | BtLoadMapFileName [32] |
| s32 | BtLoadMapType |
Declares the opcodes a dungeon floor's system script can call.
The opcodes read their arguments off the script's argument stack and report whether the script may carry on. They reach the floor through NowDngMap and the party through UserStatus, and address the map's frames and characters through the thirty-two object handles GetObjHDL hands out.
Definition in file btsysscript.hpp.
| void BtSystemScriptEventInfoInit | ( | ) |
Clears the battle event state and points the event at the player's party.
Definition at line 46 of file btsysscript.cpp.
| BT_OBJ_HANDLE * GetObjHDL | ( | int | index | ) |
Gives one of the thirty-two object handles, or nothing where the index is out of range.
Definition at line 86 of file btsysscript.cpp.
| void BtSystemScriptLoad | ( | int | floor | ) |
Reads one floor's system script off the disc and installs its opcode table.
Definition at line 95 of file btsysscript.cpp.
| void BtSystemScriptInit | ( | ) |
Puts the battle event camera in place of the player's and clears the object handles.
Definition at line 131 of file btsysscript.cpp.
| void BtSystemScriptAfter | ( | ) |
Hands control back to the player's camera and clears what the event set.
Definition at line 203 of file btsysscript.cpp.
| int BtSystemScriptRun | ( | int | event, |
| CDataAlloc2< 1 > * | arena | ||
| ) |
Starts one system event script running out of an arena, giving back what EdEventInit reports.
Definition at line 257 of file btsysscript.cpp.
| void BtSetMapJumpFloor | ( | int | floor | ) |
Selects the floor used by the next battle-map jump.
Definition at line 261 of file btsysscript.cpp.
| int _GET_FLOOR_LEVEL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the floor the party stands on.
Definition at line 337 of file btsysscript.cpp.
| int _SET_FLOOR_LEVEL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Moves the party to a floor.
Definition at line 342 of file btsysscript.cpp.
| int _GET_OLD_FLOOR_LEVEL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the floor the party came from.
Definition at line 347 of file btsysscript.cpp.
| int _GET_ACTION_MODE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the mode the battle loop is running in.
Definition at line 352 of file btsysscript.cpp.
| int _ITEM_USE_WINDOW | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Opens the window that asks the player to choose one of a list of items.
Definition at line 357 of file btsysscript.cpp.
| int _CHECK_EVENT_FLG | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reads one of the dungeon's event flags.
Definition at line 381 of file btsysscript.cpp.
| int _SET_EVENT_FLG | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Writes one of the dungeon's fifty event flags.
Definition at line 388 of file btsysscript.cpp.
| int _GET_OBJHDL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Binds an object handle to a named frame of the map, or of one of its parts.
Definition at line 400 of file btsysscript.cpp.
| int _SET_OBJHDL_POS | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Puts the object a handle names at a world position.
Definition at line 434 of file btsysscript.cpp.
| int _SET_OBJHDL_ROT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Turns the object a handle names to three wrapped angles.
Definition at line 452 of file btsysscript.cpp.
| int _SET_OBJHDL_DRAW_FLAG | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Sets whether the object a handle names is drawn.
Definition at line 479 of file btsysscript.cpp.
| int _GET_OBJHDL_POS | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reads the world position of the object a handle names.
Definition at line 520 of file btsysscript.cpp.
| int _GET_OBJHDL_ROT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reads the heading of the object a handle names.
Definition at line 547 of file btsysscript.cpp.
| int _SET_URA_DUNGEON | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Requests a transition to the back dungeon.
Definition at line 578 of file btsysscript.cpp.
| int _GET_EVENT_POS | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the world position the event was started at.
Definition at line 583 of file btsysscript.cpp.
| int _GET_EVENT_ROT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the heading the event was started with.
Definition at line 590 of file btsysscript.cpp.
| int _OPEN_ENTRANCE_WINDOW | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Opens the dungeon entrance window and retains its result slot.
Definition at line 597 of file btsysscript.cpp.
| int _OPEN_ESCAPE_WINDOW | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Opens the dungeon escape window and retains its result slot.
Definition at line 607 of file btsysscript.cpp.
| int _GO_DUNGEON | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Requests entry into the selected dungeon floor.
Definition at line 618 of file btsysscript.cpp.
| int _SET_DUNGEON_MAP | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Names the map file and type the next floor loads from.
Definition at line 623 of file btsysscript.cpp.
| int _LOAD_DUNGEON_MAP2 | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Loads the map the previous opcode named.
Definition at line 631 of file btsysscript.cpp.
| int _LOAD_MONSTOR | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reloads and arranges the monsters on the current floor.
Definition at line 638 of file btsysscript.cpp.
| int _SET_RANDOM_MAP | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Lays out the floor, randomly or freely according to the map's own setting.
Definition at line 644 of file btsysscript.cpp.
| int _SET_EVENT_SW | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Turns one of the floor's event switches on or off.
Definition at line 654 of file btsysscript.cpp.
| int _SET_MONSTOR_ID | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Puts a monster on the floor, optionally clearing the ones already there first.
Definition at line 660 of file btsysscript.cpp.
| int _CHK_ATRA_HAVE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reports how many of one kind of Atla the party is carrying.
Definition at line 701 of file btsysscript.cpp.
| int _SET_ATRA | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Puts an Atla sphere on the floor at a world position.
Definition at line 710 of file btsysscript.cpp.
| int _SET_IBOX | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Puts a treasure chest on the floor at a world position.
Definition at line 721 of file btsysscript.cpp.
| int _GET_NOW_USER_ID | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the character the player is controlling.
Definition at line 732 of file btsysscript.cpp.
| int _RUN_SCRIPT_NO | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Queues another system script to run when this one ends.
Definition at line 739 of file btsysscript.cpp.
| int _CLEAN_MONSTOR_SCRIPT_NO | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Queues the script that clears the floor's monsters.
Definition at line 758 of file btsysscript.cpp.
| int _GET_NPC_OBJHDL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Binds an object handle to one of the floor's four non-player characters.
Definition at line 771 of file btsysscript.cpp.
| int _SET_MOTION_OBJHDL | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Starts a motion on one of the floor's non-player characters.
Definition at line 794 of file btsysscript.cpp.
| int _SET_NPC_ON_OFF | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Sets whether one of the floor's non-player characters takes part.
Definition at line 821 of file btsysscript.cpp.
| int _GET_GATEKEY_NO | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the key the floor's gate wants.
Definition at line 833 of file btsysscript.cpp.
| int _USER_WEAPON_DRAW | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Sets whether the player's weapon is drawn.
Definition at line 838 of file btsysscript.cpp.
| int _SET_MAIN_CHR2 | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Puts one of the six party members in the player's hands, remembering who was there.
Definition at line 847 of file btsysscript.cpp.
| int _RESET_MAIN_CHR | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Selects again, with mode 0, the character _SET_MAIN_CHR2 last asked for, and clears the record.
Definition at line 864 of file btsysscript.cpp.
| int _SET_LIMMIT_ZONE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Fences the party into a zone and loads the sound that warns them of it.
Definition at line 875 of file btsysscript.cpp.
| int _SET_DEAD_FLAG | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Marks the party dead.
Definition at line 881 of file btsysscript.cpp.
| int _ALL_DRAW_FLAG | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Sets whether the floor draws at all.
Definition at line 886 of file btsysscript.cpp.
| int _SET_FLOOR_TITLE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Opens the current floor's title display.
Definition at line 894 of file btsysscript.cpp.
| int _GET_RUBY_ELEMENT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the element the floor's sealed door wants.
Definition at line 899 of file btsysscript.cpp.
| int _SET_RUBY_ELEMENT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reads an element off the stack and discards it.
Definition at line 904 of file btsysscript.cpp.
| int _SET_FLOOR_TITLE_OFF | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Suppresses the plate that names the floor.
Definition at line 909 of file btsysscript.cpp.
| int _SET_RES_LIMMIT_ZONE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Restores the zone the party was fenced into and its warning sound.
Definition at line 914 of file btsysscript.cpp.
| int _CLEAR_DEAMON_SHAFT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Clears the recorded progress through the Demon Shaft.
Definition at line 924 of file btsysscript.cpp.
| int _INIT_BEE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Starts the swarm of bees on one of the party's characters.
Definition at line 929 of file btsysscript.cpp.
| int _END_BEE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Ends the swarm of bees.
Definition at line 935 of file btsysscript.cpp.
| int _EASTKING_COMPLETE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reports whether the Eastern king's puzzle has been completed.
Definition at line 940 of file btsysscript.cpp.
| int _GET_ITEM_TRAPID | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the trap on the chest the party is opening.
Definition at line 945 of file btsysscript.cpp.
| int _RESET_ITEM_TRAP | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Clears the trap on the chest the party is opening.
Definition at line 951 of file btsysscript.cpp.
| int _BOM_SET | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Sets off an explosion above the party and pushes it away from them.
Definition at line 958 of file btsysscript.cpp.
| int _SET_STATUS_ERR | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Inflicts a status ailment on the party and raises the collision that shows it.
Definition at line 978 of file btsysscript.cpp.
| int _CHECK_MARDAN | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reports the state of the Mardan Garayan fishing quest.
Definition at line 988 of file btsysscript.cpp.
| int _NO_RESET_CHARA_NO | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Keeps the controlled character across the end of the event.
Definition at line 993 of file btsysscript.cpp.
| int _CHECK_CHR_HELP | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Reports whether a party member is waiting to be rescued.
Definition at line 998 of file btsysscript.cpp.
| int _HOLD_ITEM_EVENT | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Holds the item event of a number back in both event managers.
Definition at line 1003 of file btsysscript.cpp.
| int _STOP_BATTLE_BGM | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Stops the current battle music.
Definition at line 1010 of file btsysscript.cpp.
| int _NO_STATUS_RECOVER | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Keeps status ailments across the end of the event.
Definition at line 1015 of file btsysscript.cpp.
| int _SET_QUEST_DUNGEON | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Records the party's progress through a quest dungeon.
Definition at line 1020 of file btsysscript.cpp.
| int _GET_MAP_CODE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the dungeon the party is in, counted from one.
Definition at line 1026 of file btsysscript.cpp.
| int _SET_ACTIVE_ITEM_ICON | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Loads the icons used by the active item slots.
Definition at line 1031 of file btsysscript.cpp.
| int _GET_ITEM_UNIT_NO | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the party member a weapon item belongs to, or -1 for an item that is not a weapon.
Definition at line 1036 of file btsysscript.cpp.
| int _SET_IBOX_ANGLE | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Turns the chest the party is opening.
Definition at line 1071 of file btsysscript.cpp.
| int _SET_IBOX_FINISH | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Closes the chest the party is opening and drops it out of sight.
Definition at line 1076 of file btsysscript.cpp.
| int _GET_PIERO_ITEM | ( | RS_STACKDATA * | stack, |
| int | argument_count | ||
| ) |
Gives the two items the clown trades on this floor.
Definition at line 1082 of file btsysscript.cpp.
| void AddSystemEventScript | ( | ) |
Fills the opcode table from the extension list, refusing a list that names one twice.
Definition at line 1169 of file btsysscript.cpp.
|
extern |
Table of object handles the battle script system can bind.
Definition at line 41 of file btsysscript.cpp.
|
extern |
Floor requested for the next battle-map jump.
Definition at line 43 of file btsysscript.cpp.
|
extern |
Name of the map file the next battle-map jump loads.
Definition at line 42 of file btsysscript.cpp.
|
extern |
Layout of the map the next battle-map jump loads.
Definition at line 44 of file btsysscript.cpp.