|
Digimon World 3 decomp
The European version, SLES_039.36
|
WSTAG545: Bug Maze Pit, Network Break. More...
#include "common.h"#include "field/stage.h"#include "common/step_animation_once.inc.c"#include "common/step_tile_animation.inc.c"#include "common/start_stage.inc.c"Go to the source code of this file.
Macros | |
| #define | STAGE_CHILDREN_SIZE 0xC |
| #define | STAGE_TEXT TEXT_FILE(TEXT_TALKS_06) |
| #define | EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1) |
| #define | STAGE_FILE 0x276 |
| #define | STAGE_ARCHIVE 0x3DF |
Functions | |
| s32 | stepHeldAnimation (StageTileAnim *obj, AnimFrame *frames, s32 depth) |
| Steps an animation, holding its last frame, and returns the frame. | |
| void | updateTileAt (StageTileAt *task) |
| Moves the map object with the given animation to (x, y); hidden while running, shown and animated when done. | |
| StageTileAt * | createTileAt (s32 anim, s32 x, s32 y) |
| Creates a StageTileAt for the map object with the given animation. | |
| void | updateTileTask (StageTileTask *task) |
| Shows the map object with animation 1 (frame 0x18); when done, animates it once with a sound and goes back to TASK_RUN. | |
| void | handleCommand847 (StageTask *task, s32 id) |
| Command 847 of the event scripts: told 0x35A in event 710 (Bulbmon's earthquake), ends its task. | |
| void * | createTileTask (s32 arg) |
| Creates the map object that event 710, Bulbmon's earthquake, sets off (updateTileTask), with an id. | |
| static void | playSwitchOnce (StageTileSwitch *task, StageTile *tile, s32 n, s32 done, s32 next) |
| Plays the switch's animation N once (from its start, on step 0), then holds frame DONE and goes on to substate NEXT. | |
| void | updateTileSwitch (StageTileSwitch *task, StageTileAts *children) |
| The switch, the map object with animation 2, played by substate (events 0x35D to 0x35F); also sets the child that events 0x360 to 0x364 pick to TASK_DONE. | |
| void | handleCommand848 (void *arg, s32 id) |
| Events 0x35D to 0x364: animate the map object (substates 1, 3, 5) or pick a child to set to TASK_DONE. | |
| void * | createCommand848 (s32 id) |
| Creates the task of updateTileSwitch with the given id. | |
| void | updateStage (StageTask *task, void **children) |
| Creates the stage object of flag 0x4051, and the event object of story progress 0x1A. | |
| void | endEvent710 (void) |
| After event 710, with the player: starts the stage's event battle 0 and keeps it from playing again. | |
| void | endEvent711 (void) |
| After event 711, with the player: moves the story on to STORY_JUNGLE_SOUND. | |
| void | setupStage (void) |
| Sets the stage up: its map, actors, battles and events, playing BGM_0017. | |
Variables | |
| AnimFrame | updateTileAtFrames [] |
| Defined below, after the code that uses them. | |
| AnimFrame | updateTileTaskFrames [] |
| AnimFrame * | updateTileSwitchFrames [3] = { updateTileSwitchFrames_0, updateTileSwitchFrames_1, updateTileSwitchFrames_2 } |
| StageTileAtSpot | updateTileSwitchSpots [] |
| s16 | script710 [] |
| s16 | script711 [] |
| AnimFrame | updateTileSwitchFrames_0 [] |
| AnimFrame | updateTileSwitchFrames_1 [] |
| AnimFrame | updateTileSwitchFrames_2 [] |
| AreaBattle | area0Battle0 = { 165, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle1 = { 165, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle2 = { 173, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle3 = { 173, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle4 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle5 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle6 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle7 = { 92, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
| BattleList | area0Battles |
| AreaBattle | area1Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area1Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| BattleList | area1Battles |
| AreaBattle | area2Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area2Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| BattleList | area2Battles |
| AreaBattle | area3Battle0 = { 12, 10, (0x60000000 | ( 0x22 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle1 = { 315, 10, (0x60000000 | ( 0x22 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| BattleList | area3Battles |
| FieldBattles | stageBattles [] |
| ActorImage | stageImages [] |
| u16 | actor0Talk0Actions [] |
| FieldTalk | actor0Talks [] |
| FieldTalk | actor1Talks [] |
| FieldTalk | actor2Talks [] |
| FieldTalk | actor3Talks [] |
| FieldTalk | actor4Talks [] |
| u16 | actor0Conditions [] = { (( 2 ) << 8 | ( 0x1B )) , 0, 0xFFFF } |
| u16 | actor1Conditions [] = { (0x6000 | ( STORY_BULBMON_FOUND )) , 1, 0xFFFF } |
| u16 | actor2Conditions [] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF } |
| u16 | actor3Conditions [] = { (0x7000 | ( 0x19 )) , 1, 0xFFFF } |
| u16 | actor4Conditions [] = { (0x6000 | ( STORY_PRESIDENT_ARRESTED )) , 1, 0xFFFF } |
| FieldActorEntry | actor0 = { actor0Conditions, actor0Talks, 0x21, 4, 785, 697, 1 } |
| FieldActorEntry | actor1 = { actor1Conditions, actor1Talks, 0x45, 5, 559, 1145, 1 } |
| FieldActorEntry | actor2 = { actor2Conditions, actor2Talks, 0x45, 5, 559, 1145, 1 } |
| FieldActorEntry | actor3 = { actor3Conditions, actor3Talks, 0x45, 5, 559, 1145, 1 } |
| FieldActorEntry | actor4 = { actor4Conditions, actor4Talks, 0x45, 5, 559, 1145, 1 } |
| FieldActorEntry * | stageActors [] |
| StageTile | stageObjects [] |
| The tables and color setupStage gives FIELDSTG_state (FieldState) | |
| StageSlot | stageSlots [] |
| void(* | stageFuncs [])(void) |
| The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage. | |
| FieldEvent | stageEvents [] |
WSTAG545: Bug Maze Pit, Network Break.
Definition in file wstag545.c.
| #define STAGE_CHILDREN_SIZE 0xC |
Definition at line 308 of file wstag545.c.
| #define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06) |
Definition at line 331 of file wstag545.c.
| #define EVENT_TEXT_FILE (TEXT_EVENTS_500 - 1) |
Definition at line 332 of file wstag545.c.
| #define STAGE_FILE 0x276 |
Definition at line 333 of file wstag545.c.
| #define STAGE_ARCHIVE 0x3DF |
Definition at line 334 of file wstag545.c.
| s32 stepHeldAnimation | ( | StageTileAnim * | obj, |
| AnimFrame * | frames, | ||
| s32 | depth | ||
| ) |
Steps an animation, holding its last frame, and returns the frame.
Definition at line 14 of file wstag545.c.
Referenced by stepHeldAnimation(), and updateTileAt().
| void updateTileAt | ( | StageTileAt * | task | ) |
Moves the map object with the given animation to (x, y); hidden while running, shown and animated when done.
Definition at line 39 of file wstag545.c.
Referenced by createTileAt().
| StageTileAt * createTileAt | ( | s32 | anim, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Creates a StageTileAt for the map object with the given animation.
Definition at line 76 of file wstag545.c.
Referenced by updateTileSwitch().
| void updateTileTask | ( | StageTileTask * | task | ) |
Shows the map object with animation 1 (frame 0x18); when done, animates it once with a sound and goes back to TASK_RUN.
Definition at line 88 of file wstag545.c.
Referenced by createTileTask().
Command 847 of the event scripts: told 0x35A in event 710 (Bulbmon's earthquake), ends its task.
Definition at line 139 of file wstag545.c.
| void * createTileTask | ( | s32 | arg | ) |
Creates the map object that event 710, Bulbmon's earthquake, sets off (updateTileTask), with an id.
Definition at line 149 of file wstag545.c.
Referenced by updateStage().
|
inlinestatic |
Plays the switch's animation N once (from its start, on step 0), then holds frame DONE and goes on to substate NEXT.
Definition at line 159 of file wstag545.c.
Referenced by updateTileSwitch().
| void updateTileSwitch | ( | StageTileSwitch * | task, |
| StageTileAts * | children | ||
| ) |
The switch, the map object with animation 2, played by substate (events 0x35D to 0x35F); also sets the child that events 0x360 to 0x364 pick to TASK_DONE.
Definition at line 182 of file wstag545.c.
Referenced by createCommand848().
| void handleCommand848 | ( | void * | arg, |
| s32 | id | ||
| ) |
Events 0x35D to 0x364: animate the map object (substates 1, 3, 5) or pick a child to set to TASK_DONE.
Definition at line 246 of file wstag545.c.
| void * createCommand848 | ( | s32 | id | ) |
Creates the task of updateTileSwitch with the given id.
Definition at line 284 of file wstag545.c.
| void updateStage | ( | StageTask * | task, |
| void ** | children | ||
| ) |
Creates the stage object of flag 0x4051, and the event object of story progress 0x1A.
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
Definition at line 289 of file wstag545.c.
| void endEvent710 | ( | void | ) |
After event 710, with the player: starts the stage's event battle 0 and keeps it from playing again.
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< action: FIELDSTG_battleFuncs.startEventBattle
Definition at line 315 of file wstag545.c.
| void endEvent711 | ( | void | ) |
After event 711, with the player: moves the story on to STORY_JUNGLE_SOUND.
Definition at line 321 of file wstag545.c.
| void setupStage | ( | void | ) |
Sets the stage up: its map, actors, battles and events, playing BGM_0017.
Sets the stage up: its map, actors, battles and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set.
< BGM_0017: the Bug Maze (Network Break)
< BGM_0017: the Bug Maze (Network Break)
< a cell's value: a direction (3 bits) and a StageSlot (5)
< a cell's value: its battle area (FieldBattles), or 0
Definition at line 337 of file wstag545.c.
| AnimFrame updateTileAtFrames |
Defined below, after the code that uses them.
Definition at line 436 of file wstag545.c.
Referenced by updateTileAt().
| AnimFrame updateTileTaskFrames |
Definition at line 442 of file wstag545.c.
Referenced by updateTileTask().
| AnimFrame * updateTileSwitchFrames = { updateTileSwitchFrames_0, updateTileSwitchFrames_1, updateTileSwitchFrames_2 } |
Definition at line 460 of file wstag545.c.
Referenced by playSwitchOnce(), and updateTileSwitch().
| StageTileAtSpot updateTileSwitchSpots |
Definition at line 461 of file wstag545.c.
Referenced by updateTileSwitch().
| s16 script710[] |
Definition at line 358 of file wstag545.c.
| s16 script711[] |
Definition at line 414 of file wstag545.c.
| AnimFrame updateTileSwitchFrames_0[] |
Definition at line 449 of file wstag545.c.
| AnimFrame updateTileSwitchFrames_1[] |
Definition at line 454 of file wstag545.c.
| AnimFrame updateTileSwitchFrames_2[] |
Definition at line 457 of file wstag545.c.
| AreaBattle area0Battle0 = { 165, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 468 of file wstag545.c.
| AreaBattle area0Battle1 = { 165, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 469 of file wstag545.c.
| AreaBattle area0Battle2 = { 173, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 470 of file wstag545.c.
| AreaBattle area0Battle3 = { 173, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 471 of file wstag545.c.
| AreaBattle area0Battle4 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 472 of file wstag545.c.
| AreaBattle area0Battle5 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 473 of file wstag545.c.
| AreaBattle area0Battle6 = { 150, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 474 of file wstag545.c.
| AreaBattle area0Battle7 = { 92, 10, (0x60000000 | ( 2 ) << 18 | ( 0 )) } |
Definition at line 475 of file wstag545.c.
| BattleList area0Battles |
Definition at line 476 of file wstag545.c.
| AreaBattle area1Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 481 of file wstag545.c.
| AreaBattle area1Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 482 of file wstag545.c.
| AreaBattle area1Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 483 of file wstag545.c.
| AreaBattle area1Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 484 of file wstag545.c.
| AreaBattle area1Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 485 of file wstag545.c.
| AreaBattle area1Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 486 of file wstag545.c.
| AreaBattle area1Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 487 of file wstag545.c.
| AreaBattle area1Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 488 of file wstag545.c.
| BattleList area1Battles |
Definition at line 489 of file wstag545.c.
| AreaBattle area2Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 494 of file wstag545.c.
| AreaBattle area2Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 495 of file wstag545.c.
| AreaBattle area2Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 496 of file wstag545.c.
| AreaBattle area2Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 497 of file wstag545.c.
| AreaBattle area2Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 498 of file wstag545.c.
| AreaBattle area2Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 499 of file wstag545.c.
| AreaBattle area2Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 500 of file wstag545.c.
| AreaBattle area2Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 501 of file wstag545.c.
| BattleList area2Battles |
Definition at line 502 of file wstag545.c.
| AreaBattle area3Battle0 = { 12, 10, (0x60000000 | ( 0x22 ) << 18 | ( 0 )) } |
Definition at line 507 of file wstag545.c.
| AreaBattle area3Battle1 = { 315, 10, (0x60000000 | ( 0x22 ) << 18 | ( 0 )) } |
Definition at line 508 of file wstag545.c.
| AreaBattle area3Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 509 of file wstag545.c.
| AreaBattle area3Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 510 of file wstag545.c.
| AreaBattle area3Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 511 of file wstag545.c.
| AreaBattle area3Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 512 of file wstag545.c.
| AreaBattle area3Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 513 of file wstag545.c.
| AreaBattle area3Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 514 of file wstag545.c.
| BattleList area3Battles |
Definition at line 515 of file wstag545.c.
| FieldBattles stageBattles[] |
| ActorImage stageImages[] |
Definition at line 523 of file wstag545.c.
Referenced by setupStage().
| u16 actor0Talk0Actions[] |
Definition at line 533 of file wstag545.c.
| FieldTalk actor0Talks[] |
Definition at line 539 of file wstag545.c.
| FieldTalk actor1Talks[] |
Definition at line 543 of file wstag545.c.
| FieldTalk actor2Talks[] |
Definition at line 547 of file wstag545.c.
| FieldTalk actor3Talks[] |
Definition at line 551 of file wstag545.c.
| FieldTalk actor4Talks[] |
Definition at line 555 of file wstag545.c.
| u16 actor0Conditions[] = { (( 2 ) << 8 | ( 0x1B )) , 0, 0xFFFF } |
Definition at line 559 of file wstag545.c.
| u16 actor1Conditions[] = { (0x6000 | ( STORY_BULBMON_FOUND )) , 1, 0xFFFF } |
Definition at line 560 of file wstag545.c.
| u16 actor2Conditions[] = { (0x7000 | ( 0x1A )) , 1, 0xFFFF } |
Definition at line 561 of file wstag545.c.
| u16 actor3Conditions[] = { (0x7000 | ( 0x19 )) , 1, 0xFFFF } |
Definition at line 562 of file wstag545.c.
| u16 actor4Conditions[] = { (0x6000 | ( STORY_PRESIDENT_ARRESTED )) , 1, 0xFFFF } |
Definition at line 563 of file wstag545.c.
| FieldActorEntry actor0 = { actor0Conditions, actor0Talks, 0x21, 4, 785, 697, 1 } |
Definition at line 564 of file wstag545.c.
| FieldActorEntry actor1 = { actor1Conditions, actor1Talks, 0x45, 5, 559, 1145, 1 } |
Definition at line 565 of file wstag545.c.
| FieldActorEntry actor2 = { actor2Conditions, actor2Talks, 0x45, 5, 559, 1145, 1 } |
Definition at line 566 of file wstag545.c.
| FieldActorEntry actor3 = { actor3Conditions, actor3Talks, 0x45, 5, 559, 1145, 1 } |
Definition at line 567 of file wstag545.c.
| FieldActorEntry actor4 = { actor4Conditions, actor4Talks, 0x45, 5, 559, 1145, 1 } |
Definition at line 568 of file wstag545.c.
| FieldActorEntry* stageActors[] |
Definition at line 569 of file wstag545.c.
Referenced by setupStage().
| StageTile stageObjects[] |
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition at line 577 of file wstag545.c.
Referenced by setupStage().
| StageSlot stageSlots[] |
Definition at line 591 of file wstag545.c.
Referenced by setupStage().
| void(* stageFuncs[])(void) | ( | void | ) |
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage.
Definition at line 599 of file wstag545.c.
| FieldEvent stageEvents[] |
Definition at line 602 of file wstag545.c.
Referenced by setupStage().