|
Digimon World 3 decomp
The European version, SLES_039.36
|
WSTAG805: Magasta 1F, Undersea Base. More...
#include "common.h"#include "field/stage.h"#include "common/is_on_screen.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_07) |
| #define | EVENT_TEXT_FILE (TEXT_EVENTS_800 - 1) |
| #define | STAGE_FILE 0x672 |
Functions | |
| StageFloater * | createFloater (s32 x, s32 y, s32 up) |
| Defined below, after the code that uses them. | |
| void | updateFloaterChain (StageFloaterChain *task, StageFloaters *children) |
| Creates the 27 floaters; in TASK_DONE sets them moving one after the other. | |
| void | handleCommand841 (StageFloaterChain *task, s32 id) |
| Starts the chain when the event of map object 0x335 happens. | |
| void * | createFloaterChain (s32 arg) |
| Creates the chain of floaters. | |
| s32 | stepTileLoop (StageTileAnim *obj, StageTileLoopFrame *frames, s32 depth) |
| Advances a looping animation, returns its frame. | |
| void | updateTileQuad (StageTileQuad *task) |
| Animates the map objects with animations 1 to 4: 2 and 3 hidden while running. | |
| void | handleCommand840 (StageTileQuad *task, s32 id) |
| Plays a sound and starts the map objects' TASK_DONE animations when the event of map object 0x35B happens. | |
| void * | createTileQuad (s32 arg) |
| Creates the map objects of event 881, where the Juggernaut launches (updateTileQuad), with an id. | |
| s32 | stepFloaterPart (StageFloaterPart *obj, StageFloaterFrame *frames, s32 once, s32 depth) |
| Advances a part's animation (adding up its deltas when once), returns its frame. | |
| void | drawFloaterPart (StageFloater *task, Layer *layer, s32 idx) |
| Draws a part of a floater. | |
| void | updateFloater (StageFloater *task) |
| A floater: animated in place while running, moving up or down with a sound in TASK_DONE. | |
| void | updateStage (StageTask *task, void **children) |
| Creates two objects and the event object of flags 0x4046/0x4048 that applies. | |
| void | endEvent880 (void) |
| After event 880, with Royal Guard: starts the stage's event battle 0 and keeps it from playing again. | |
| void | endEvent881 (void) |
| After event 881, with the player: gives the player the Wing Helmet. | |
| void | endEvent882 (void) |
| After event 882, with Royal Guard: keeps it from playing again. | |
| void | setupStage (void) |
| Sets the stage up: its map, actors, battles and events, playing BGM_0011. | |
Variables | |
| StageFloaterSpot | updateFloaterChainSpots [] |
| s16 | floaterChainTimes [] |
| StageTileLoopFrame * | updateTileQuadFrames [] |
| StageFloaterFrame | updateFloaterFrames0 [] |
| StageFloaterFrame | updateFloaterFrames2 [] |
| StageFloaterFrame | updateFloaterFrames3 [] |
| StageFloaterFrame | updateFloaterFrames1 [] |
| StageTileLoopFrame | updateTileQuadFrames_3 [] |
| StageTileLoopFrame | updateTileQuadFrames_0 [] |
| StageTileLoopFrame | updateTileQuadFrames_1 [] |
| StageTileLoopFrame | updateTileQuadFrames_2 [] |
| const CVECTOR | stageColor = { 0x80, 0x80, 0x80, 0x00 } |
| the color the setup copies to FIELDSTG_state.spriteColor | |
| s16 | script880 [] |
| s16 | script881 [] |
| s16 | script882 [] |
| AreaBattle | area0Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
| AreaBattle | area0Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 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 = { 22, 18, (0x60000000 | ( 0x23 ) << 18 | ( 0 )) } |
| AreaBattle | area3Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 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 | actor0Conditions [] = { (0x6000 | ( STORY_REAL_WORLD )) , 1, 0xFFFF } |
| u16 | actor1Conditions [] |
| u16 | actor2Conditions [] = { (0x6000 | ( STORY_REAL_WORLD )) , 1, 0xFFFF } |
| FieldActorEntry | actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 0 } |
| FieldActorEntry | actor1 = { actor1Conditions, ((void *)0) , 0xD2, 5, 360, 197, 3 } |
| FieldActorEntry | actor2 = { actor2Conditions, ((void *)0) , 0x13C, 6, 0, 0, 1 } |
| FieldActorEntry * | stageActors [] |
| StageTile | stageObjects [] |
| The tables and color setupStage gives FIELDSTG_state (FieldState) | |
| 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 [] |
| #define STAGE_CHILDREN_SIZE 0xC |
Definition at line 348 of file wstag805.c.
| #define STAGE_TEXT TEXT_FILE(TEXT_TALKS_07) |
Definition at line 376 of file wstag805.c.
| #define EVENT_TEXT_FILE (TEXT_EVENTS_800 - 1) |
Definition at line 377 of file wstag805.c.
| #define STAGE_FILE 0x672 |
Definition at line 378 of file wstag805.c.
| StageFloater * createFloater | ( | s32 | x, |
| s32 | y, | ||
| s32 | up | ||
| ) |
Defined below, after the code that uses them.
Creates a floater at (x, y)
Definition at line 307 of file wstag805.c.
Referenced by updateFloaterChain().
| void updateFloaterChain | ( | StageFloaterChain * | task, |
| StageFloaters * | children | ||
| ) |
Creates the 27 floaters; in TASK_DONE sets them moving one after the other.
Definition at line 22 of file wstag805.c.
Referenced by createFloaterChain().
| void handleCommand841 | ( | StageFloaterChain * | task, |
| s32 | id | ||
| ) |
Starts the chain when the event of map object 0x335 happens.
Definition at line 51 of file wstag805.c.
| void * createFloaterChain | ( | s32 | arg | ) |
Creates the chain of floaters.
Definition at line 60 of file wstag805.c.
Referenced by updateStage().
| s32 stepTileLoop | ( | StageTileAnim * | obj, |
| StageTileLoopFrame * | frames, | ||
| s32 | depth | ||
| ) |
Advances a looping animation, returns its frame.
Definition at line 65 of file wstag805.c.
Referenced by stepTileLoop(), and updateTileQuad().
| void updateTileQuad | ( | StageTileQuad * | task | ) |
Animates the map objects with animations 1 to 4: 2 and 3 hidden while running.
Definition at line 92 of file wstag805.c.
Referenced by createTileQuad().
| void handleCommand840 | ( | StageTileQuad * | task, |
| s32 | id | ||
| ) |
Plays a sound and starts the map objects' TASK_DONE animations when the event of map object 0x35B happens.
Definition at line 186 of file wstag805.c.
| void * createTileQuad | ( | s32 | arg | ) |
Creates the map objects of event 881, where the Juggernaut launches (updateTileQuad), with an id.
Definition at line 197 of file wstag805.c.
Referenced by updateStage().
| s32 stepFloaterPart | ( | StageFloaterPart * | obj, |
| StageFloaterFrame * | frames, | ||
| s32 | once, | ||
| s32 | depth | ||
| ) |
Advances a part's animation (adding up its deltas when once), returns its frame.
Definition at line 202 of file wstag805.c.
Referenced by stepFloaterPart(), and updateFloater().
| void drawFloaterPart | ( | StageFloater * | task, |
| Layer * | layer, | ||
| s32 | idx | ||
| ) |
Draws a part of a floater.
Definition at line 238 of file wstag805.c.
Referenced by updateFloater().
| void updateFloater | ( | StageFloater * | task | ) |
A floater: animated in place while running, moving up or down with a sound in TASK_DONE.
< the map, its objects and characters, and the menus
Definition at line 250 of file wstag805.c.
Referenced by createFloater().
| void updateStage | ( | StageTask * | task, |
| void ** | children | ||
| ) |
Creates two objects and the event object of flags 0x4046/0x4048 that applies.
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
Definition at line 317 of file wstag805.c.
| void endEvent880 | ( | void | ) |
After event 880, with Royal Guard: 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 355 of file wstag805.c.
| void endEvent881 | ( | void | ) |
After event 881, with the player: gives the player the Wing Helmet.
Definition at line 361 of file wstag805.c.
| void endEvent882 | ( | void | ) |
After event 882, with Royal Guard: keeps it from playing again.
< 0x40 0x00-0x40: FLAGS_00, GAME.flags02-flags40
Definition at line 366 of file wstag805.c.
| void setupStage | ( | void | ) |
Sets the stage up: its map, actors, battles and events, playing BGM_0011.
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_0011: the Undersea Base (Magasta), and the Deeper Crevice's gondola
< BGM_0011: the Undersea Base (Magasta), and the Deeper Crevice's gondola
Definition at line 381 of file wstag805.c.
| StageFloaterSpot updateFloaterChainSpots |
Definition at line 551 of file wstag805.c.
Referenced by updateFloaterChain().
| s16 floaterChainTimes |
Definition at line 580 of file wstag805.c.
Referenced by updateFloaterChain().
| StageTileLoopFrame * updateTileQuadFrames |
| StageFloaterFrame updateFloaterFrames0 |
Definition at line 636 of file wstag805.c.
Referenced by updateFloater().
| StageFloaterFrame updateFloaterFrames2 |
Definition at line 647 of file wstag805.c.
Referenced by updateFloater().
| StageFloaterFrame updateFloaterFrames3 |
Definition at line 658 of file wstag805.c.
Referenced by updateFloater().
| StageFloaterFrame updateFloaterFrames1 |
Definition at line 671 of file wstag805.c.
Referenced by updateFloater().
| StageTileLoopFrame updateTileQuadFrames_3 |
Definition at line 602 of file wstag805.c.
Referenced by updateTileQuad().
| StageTileLoopFrame updateTileQuadFrames_0 |
Definition at line 586 of file wstag805.c.
Referenced by updateTileQuad().
| StageTileLoopFrame updateTileQuadFrames_1 |
Definition at line 611 of file wstag805.c.
Referenced by updateTileQuad().
| StageTileLoopFrame updateTileQuadFrames_2 |
Definition at line 620 of file wstag805.c.
Referenced by updateTileQuad().
| const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 } |
the color the setup copies to FIELDSTG_state.spriteColor
the color the setup copies to FIELDSTG_state.spriteColor
It starts the stage, before its jump tables: in wstag924.c GCC would align them to 8 bytes after it, so it is a file of its own, linked first
Definition at line 370 of file wstag805.c.
Referenced by setupStage().
| s16 script880[] |
Definition at line 400 of file wstag805.c.
| s16 script881[] |
Definition at line 445 of file wstag805.c.
| s16 script882[] |
Definition at line 514 of file wstag805.c.
| AreaBattle area0Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 680 of file wstag805.c.
| AreaBattle area0Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 681 of file wstag805.c.
| AreaBattle area0Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 682 of file wstag805.c.
| AreaBattle area0Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 683 of file wstag805.c.
| AreaBattle area0Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 684 of file wstag805.c.
| AreaBattle area0Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 685 of file wstag805.c.
| AreaBattle area0Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 686 of file wstag805.c.
| AreaBattle area0Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 687 of file wstag805.c.
| BattleList area0Battles |
Definition at line 688 of file wstag805.c.
| AreaBattle area1Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 693 of file wstag805.c.
| AreaBattle area1Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 694 of file wstag805.c.
| AreaBattle area1Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 695 of file wstag805.c.
| AreaBattle area1Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 696 of file wstag805.c.
| AreaBattle area1Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 697 of file wstag805.c.
| AreaBattle area1Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 698 of file wstag805.c.
| AreaBattle area1Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 699 of file wstag805.c.
| AreaBattle area1Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 700 of file wstag805.c.
| BattleList area1Battles |
Definition at line 701 of file wstag805.c.
| AreaBattle area2Battle0 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 706 of file wstag805.c.
| AreaBattle area2Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 707 of file wstag805.c.
| AreaBattle area2Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 708 of file wstag805.c.
| AreaBattle area2Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 709 of file wstag805.c.
| AreaBattle area2Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 710 of file wstag805.c.
| AreaBattle area2Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 711 of file wstag805.c.
| AreaBattle area2Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 712 of file wstag805.c.
| AreaBattle area2Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 713 of file wstag805.c.
| BattleList area2Battles |
Definition at line 714 of file wstag805.c.
| AreaBattle area3Battle0 = { 22, 18, (0x60000000 | ( 0x23 ) << 18 | ( 0 )) } |
Definition at line 719 of file wstag805.c.
| AreaBattle area3Battle1 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 720 of file wstag805.c.
| AreaBattle area3Battle2 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 721 of file wstag805.c.
| AreaBattle area3Battle3 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 722 of file wstag805.c.
| AreaBattle area3Battle4 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 723 of file wstag805.c.
| AreaBattle area3Battle5 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 724 of file wstag805.c.
| AreaBattle area3Battle6 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 725 of file wstag805.c.
| AreaBattle area3Battle7 = { 0, 0, (0x60000000 | ( 1 ) << 18 | ( 0 )) } |
Definition at line 726 of file wstag805.c.
| BattleList area3Battles |
Definition at line 727 of file wstag805.c.
| FieldBattles stageBattles[] |
| ActorImage stageImages[] |
Definition at line 735 of file wstag805.c.
Referenced by setupStage().
| u16 actor0Conditions[] = { (0x6000 | ( STORY_REAL_WORLD )) , 1, 0xFFFF } |
Definition at line 746 of file wstag805.c.
| u16 actor1Conditions[] |
Definition at line 747 of file wstag805.c.
| u16 actor2Conditions[] = { (0x6000 | ( STORY_REAL_WORLD )) , 1, 0xFFFF } |
Definition at line 752 of file wstag805.c.
| FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 0 } |
Definition at line 753 of file wstag805.c.
| FieldActorEntry actor1 = { actor1Conditions, ((void *)0) , 0xD2, 5, 360, 197, 3 } |
Definition at line 754 of file wstag805.c.
| FieldActorEntry actor2 = { actor2Conditions, ((void *)0) , 0x13C, 6, 0, 0, 1 } |
Definition at line 755 of file wstag805.c.
| FieldActorEntry* stageActors[] |
Definition at line 756 of file wstag805.c.
Referenced by setupStage().
| StageTile stageObjects[] |
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition at line 762 of file wstag805.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 769 of file wstag805.c.
| FieldEvent stageEvents[] |
Definition at line 772 of file wstag805.c.
Referenced by setupStage().