Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag375.c
Go to the documentation of this file.
1/*
2 * WSTAG375: Protocol Ruins, East Sector.
3 */
4
5#include "common.h"
6#include "field/stage.h"
7/* Defined below, after the tables that use them */
8extern Vec2 farSpriteSpots[];
9
10/* The file of the sprites, which the versions number differently */
11#if VERSION_US || VERSION_JP
12#define SPRITES 0x1B1
13#elif VERSION_EU
14#define SPRITES 0x1BF
15#endif
16
17/* Draws 36 sprites of file SPRITES at the positions of farSpriteSpots, scrolled at 1/8 */
19 SpriteDrawer drawer;
20 s32 pos[2];
21 s32 scroll[2];
22 Layer *layer;
23 s32 i;
24
25 switch (task->state) {
26 case TASK_INIT:
27 default:
28 task->nextState(task);
29 break;
30 case TASK_RUN:
31 initSpriteDrawer(&drawer);
32 drawer.setLayerId(FIELD_LAYER_MAP, 0xC);
33 drawer.setTexture(0x140, 0x100);
34 drawer.setAltClut(0, 0x1F0);
36 layer->getScroll(layer, scroll);
37 pos[0] = (scroll[0] - 0x2C0) >> 3;
38 pos[1] = (scroll[1] - 0x280) >> 3;
39 for (i = 0; i < 0x24; i++) {
40 drawer.draw(FILE_CACHE.getEntry(SPRITES << 16), 0, farSpriteSpots[i].x + pos[0], farSpriteSpots[i].y + pos[1]);
41 }
42 break;
43 case TASK_DONE:
44 case TASK_KILL:
45 break;
46 }
47}
48
50
51/* Creates the stage helper task, and the event object when flag 0x4053 is set and 0x4054 is not */
52void updateStage(StageTask *task, void **children) {
53 switch (task->state) {
54 case TASK_INIT:
55 default:
56 children[0] = createFarSprites();
58 children[1] = FIELDSTG_startEvent(0x4ED);
59 }
60 task->nextState(task);
61 break;
62 case TASK_RUN:
63 case TASK_DONE:
64 case TASK_KILL:
65 break;
66 }
67}
68
69#define STAGE_CHILDREN_SIZE 0x8
71
72/* After event 1260, with Pharaohmon: lets event 1261 start and starts the stage's event battle 0 */
77
78/*
79 * After event 1261, with Pharaohmon: gives the player the Old Wand and keeps
80 * it from playing again
81 */
82void endEvent1261(void) {
83 FLAGS_00.applyAction(ITEM(3, 0x8D), 1);
84 FLAGS_00.applyAction(FLAG(0x40, 0x54), 1);
85}
86
87/* Defined below, after the code that uses them */
90const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 };
91#if VERSION_US || VERSION_JP
92#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
93#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
94#define STAGE_FILE 0x1B1
95#define STAGE_ARCHIVE 0x2C2
96#elif VERSION_EU
97#define STAGE_TEXT TEXT_FILE(TEXT_TALKS_06)
98#define EVENT_TEXT_FILE (TEXT_EVENTS_300 - 1)
99#define STAGE_FILE 0x1BF
100#define STAGE_ARCHIVE 0x2D1
101#endif
102/*
103 * Sets the stage up: its map, actors, battles and events, playing PYRA_BGM;
104 * battle list 0 before STORY_TEDDY_FOUND, 1 from then on
105 */
132
134 SCRIPT_FOLLOW(1, 2),
135 SCRIPT_WALK(2, 0x414, 0x9F, 5),
136 SCRIPT_PLACE(0x3B, 0x431, 0x91),
137 SCRIPT_POSE(0x3B, 1, 1),
140 SCRIPT_POSE(2, 1, 5),
141 SCRIPT_WAIT(6),
142 SCRIPT_WAIT(0x1E),
143 SCRIPT_TALK(0, 1, 2, 3),
144 SCRIPT_POSE(2, 7, 5),
146 SCRIPT_POSE(2, 1, 5),
147 SCRIPT_WAIT(0x1E),
148 SCRIPT_TALK(0, 2, 0x3B, 0),
150 SCRIPT_WAIT(0x1E),
151 SCRIPT_TALK(0, 3, 2, 3),
152 SCRIPT_POSE(2, 7, 5),
154 SCRIPT_POSE(2, 1, 5),
155 SCRIPT_WAIT(0x1E),
156 SCRIPT_TALK(0, 4, 0x3B, 0),
158 SCRIPT_WAIT(0x1E),
160 /* after the end, the original's padding up to a word, which isn't zeros */
161#if VERSION_EU || VERSION_JP
162 0x640,
163#endif
164};
166 SCRIPT_FOLLOW(1, 2),
167 SCRIPT_PLACE(2, 0x414, 0x9F),
168 SCRIPT_POSE(2, 1, 5),
169 SCRIPT_PLACE(0x3B, 0x431, 0x91),
170 SCRIPT_POSE(0x3B, 1, 1),
171 SCRIPT_WAIT(0x78),
172 SCRIPT_TALK(0, 1, 0x3B, 0),
174 SCRIPT_WAIT(0x1E),
175 SCRIPT_TALK(0, 2, 2, 3),
176 SCRIPT_POSE(2, 7, 5),
178 SCRIPT_POSE(2, 1, 5),
179 SCRIPT_WAIT(0x1E),
180 SCRIPT_TALK(0, 3, 0x3B, 0),
183 SCRIPT_WAIT(0x3C),
184 SCRIPT_TALK(0, 4, 2, 3),
185 SCRIPT_POSE(2, 7, 5),
187 SCRIPT_POSE(2, 1, 5),
188 SCRIPT_WAIT(0x1E),
189 SCRIPT_TALK(0, 5, 0x3B, 0),
191 SCRIPT_WAIT(0x3C),
193};
195 { 596, 399 }, { 809, 564 }, { 820, 832 }, { 1143, 1009 },
196 { 738, 1035 }, { 416, 1055 }, { 36, 28 }, { 140, 0 },
197 { 178, 159 }, { 218, 202 }, { 186, 242 }, { 299, 93 },
198 { 418, 16 }, { 440, 329 }, { 476, 369 }, { 725, 82 },
199 { 1137, 24 }, { 1213, 103 }, { 1281, 147 }, { 1349, 48 },
200 { 669, 632 }, { 491, 796 }, { 661, 889 }, { 624, 926 },
201 { 998, 634 }, { 1026, 648 }, { 890, 940 }, { 915, 959 },
202 { 826, 1119 }, { 1028, 1089 }, { 1227, 1002 }, { 1306, 861 },
203 { 498, 1190 }, { 146, 569 }, { 187, 590 }, { 394, 616 },
204};
316 { 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
317 { 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
318 { 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
319 { 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
320 { 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
321 { 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
322 { 0x140, 0x100, 0x162, 0x128, 0x88, 0x28, 0x170, 0x1FF },
323 { 0x140, 0x100, 0x16A, 0x128, 0xA8, 0x28, 0x140, 0x1FE },
324 { 0x140, 0x100, 0x15A, 0x100, 0x68, 0, 0x150, 0x1FE },
325 { 0x140, 0x100, 0x150, 0x100, 0x40, 0, 0x160, 0x1FE },
326 { 0x140, 0x100, 0x162, 0x100, 0x88, 0, 0x170, 0x1FE },
327 { 0x140, 0x100, 0x16A, 0x100, 0xA8, 0, 0x140, 0x1FD },
328 { 0x140, 0x100, 0x150, 0x130, 0x40, 0x30, 0x150, 0x1FD },
329 { 0x140, 0x100, 0x172, 0x140, 0xC8, 0x40, 0x160, 0x1FD },
330};
427 ITEM(1, 0x5A), 0,
428 ITEM(0, 0xE), 0,
431 CODES_END,
432};
434 ITEM(0, 0xE), 0,
436 ITEM(1, 0x5A), 1,
438 CODES_END,
439};
443 { NULL, NULL, 0xED },
444 { NULL, NULL, 0 },
445};
447 { NULL, NULL, 0xEF },
448 { NULL, NULL, 0 },
449};
452 { actor2Talk1Conditions, NULL, 0x2A7 },
453 { NULL, NULL, 0 },
454};
464 { actor4Talk1Conditions, NULL, 0x2A7 },
465 { NULL, NULL, 0 },
466};
476 { actor6Talk1Conditions, NULL, 0x1B8 },
477 { NULL, NULL, 0 },
478};
481 { actor7Talk1Conditions, NULL, 0x1B0 },
482 { NULL, NULL, 0 },
483};
486 { actor8Talk1Conditions, NULL, 0x1B1 },
487 { NULL, NULL, 0 },
488};
491 { actor9Talk1Conditions, NULL, 0x1B2 },
492 { NULL, NULL, 0 },
493};
530 { actor17Talk0Conditions, NULL, 0xEC },
532 { actor17Talk2Conditions, NULL, 0x2DB },
533 { NULL, NULL, 0 },
534};
536 { actor18Talk0Conditions, NULL, 0x2AA },
538 { actor18Talk2Conditions, NULL, 0x2AC },
539 { NULL, NULL, 0 },
540};
542 { NULL, NULL, 0x2AC },
543 { NULL, NULL, 0 },
544};
546 { NULL, NULL, 0x2AD },
547 { NULL, NULL, 0 },
548};
558 { NULL, NULL, 0xEE },
559 { NULL, NULL, 0 },
560};
562 { NULL, NULL, 0x2A6 },
563 { NULL, NULL, 0 },
564};
622 &actor0,
623 &actor1,
624 &actor2,
625 &actor3,
626 &actor4,
627 &actor5,
628 &actor6,
629 &actor7,
630 &actor8,
631 &actor9,
632 &actor10,
633 &actor11,
634 &actor12,
635 &actor13,
636 &actor14,
637 &actor15,
638 &actor16,
639 &actor17,
640 &actor18,
641 &actor19,
642 &actor20,
643 &actor21,
644 &actor22,
645 &actor23,
646 NULL,
647};
649 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
650};
652 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_EXIT, 0x225, 0x510, 0x88, 1, 0, 0, 0 },
653 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DEPTH, 8, 0, 0, 0, 0, 0, 0 },
654 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DEPTH, 4, 0, 0, 0, 0, 0, 0 },
655 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_MAP, 1, 0, 0, 0, 0, 0, 0 },
656 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_MAP, 0, 0, 0, 0, 0, 0, 0 },
657 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 6, 0, 0, 0, 0, 0, 0 },
658 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_DROP, 5, 0, 0, 0, 0, 0, 0 },
659 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_UP, 9, 0x7E, 0x1AF, 0, 0, 0, 0 },
660 { { { CODES_END, 0 }, { CODES_END, 0 } }, SLOT_CLIMB_DOWN, 9, 0x6D, 0x117, 0, 0, 0, 0 },
661 { { { FLAG(0, FIELD_FLAG_ENCOUNTERED), 0 }, { CODES_END, 0 } }, SLOT_EVENT, 0x2328, 0, 0, 0, 0, 0, 0 },
662 { { { CODES_END, 0 }, { CODES_END, 0 } }, 0, 0, 0, 0, 0, 0, 0, 0 },
663};
664void (*stageFuncs[])(void) = {
666};
668 { 1260, script1260, EVENT_TEXT(0x1B), NULL, endEvent1260 },
669 { 1261, script1261, EVENT_TEXT(0x1C), NULL, endEvent1261 },
670 { 9000, NULL, 0, FIELDSTG_startEventBattle5, NULL },
671 { -1, NULL, 0, NULL, NULL },
672};
#define NULL
Definition common.h:17
signed int s32
Definition common.h:11
signed short s16
Definition common.h:9
unsigned short u16
Definition common.h:10
void * createFarSprites(void)
Creates the updateFarSprites task.
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
GameFlags FLAGS_00
The flag bitset FLAGS_00 and the event functions.
Definition events.c:701
GameState GAME
The save data, the game mode and the methods.
Definition state.c:64
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
EventTask * FIELDSTG_startEvent(s32 id)
Starts the event id of FieldState.events: its script, start and end, and its text; the player stands ...
Definition event.c:250
The stage overlays (AAA/PRO/WSTAG###.PRO), loaded at 0x800A4CA4 on top of FIELDSTG.
#define EVENT_TEXT(n)
An entry of the stage's events' text file, for FieldEvent.text.
Definition stage.h:732
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
void * FIELDSTG_startEventBattle5(void)
Starts battle 5 of the fourth area: the end of the stages' events 9000.
Definition field.c:1010
#define SLOT_CLIMB_UP
Definition field_map.h:256
#define SCRIPT_WAIT_WALK(id)
until the character gets to its goal
Definition field_map.h:168
#define FIELD_COMMAND_HALT_PARTNERS
The field commands, which an event script hands FIELD_TASK_COMMANDS as the first argument of a pose c...
Definition field_map.h:41
#define SLOT_DEPTH
the player's depth, arg
Definition field_map.h:259
#define SCRIPT_END
The commands of an event script (FieldEvent.script), as FIELDSTG_runEvent reads them: a halfword kind...
Definition field_map.h:156
#define FIELD_LAYER_MAP
the map, its objects and characters, and the menus
Definition field_map.h:20
#define SLOT_MAP
the map the player is on, arg (FieldMap.setMap)
Definition field_map.h:260
#define SCRIPT_COMMAND(id, command, arg)
the same word for a script command's id: FIELDSTG_setEventPose creates its task if none runs and hand...
Definition field_map.h:161
#define SCRIPT_FOLLOW(snap, id)
FIELDSTG_followWithCamera.
Definition field_map.h:171
#define FIELD_MAP_FLOOR0
Some of FieldMap's maps (files): those of the floors the player walks on come first,...
Definition field_map.h:85
#define FIELD_COMMAND_ICON3
its substate 3, with ITEM_GET
Definition field_map.h:44
#define SLOT_CLIMB_DOWN
Definition field_map.h:257
#define SLOT_EVENT
starts the event arg
Definition field_map.h:262
#define FIELD_FLAG_ENCOUNTERED
The FLAGS_00 flag that every encounter sets (FIELDSTG_startEncounter); until it is set,...
Definition field_map.h:190
#define SCRIPT_WALK(id, x, y, dir)
Actor.setGoal: walks to (x, y), then faces dir.
Definition field_map.h:162
#define FIELD_MAP_FLOOR1
Definition field_map.h:86
#define SCRIPT_WAIT_BOX
until box 0 closes
Definition field_map.h:167
#define SLOT_EXIT
The kinds of StageSlot (type).
Definition field_map.h:255
#define FIELD_MAP_AREAS
a cell's value: its battle area (FieldBattles), or 0
Definition field_map.h:87
#define SCRIPT_POSE(id, set, dir)
Actor.setPose: its animation set, facing dir.
Definition field_map.h:158
#define FIELD_MAP_TRIGGERS
a cell's value: a direction (3 bits) and a StageSlot (5)
Definition field_map.h:88
#define SCRIPT_WAIT(frames)
Definition field_map.h:166
#define FIELD_TASK_COMMANDS
script command 813 (FIELDSTG_startCommandTask): the field commands
Definition field_map.h:33
#define SCRIPT_PLACE(id, x, y)
puts a character at (x, y)
Definition field_map.h:157
#define SLOT_DROP
Definition field_map.h:258
#define SCRIPT_TALK(box, entry, id, kind)
box of the event's boxes shows the event text's entry: a talk box at the corner kind next to the char...
Definition field_map.h:165
FieldMap FIELDSTG_map
Definition fieldstg.c:3660
FieldState FIELDSTG_state
Definition fieldstg.c:2641
FileCache FILE_CACHE
The file cache.
Definition file_cache.c:7
#define START_EVENT(index)
action: FIELDSTG_startListedEvent
Definition game_state.h:81
#define EVENT_BATTLE(id)
action: FIELDSTG_battleFuncs.startEventBattle
Definition game_state.h:72
#define CODES_END
Definition game_state.h:83
#define ITEM(kind, id)
an item, in the bag or equipped; kind (bits 9-11) isn't read, and the scripts set it after the item's...
Definition game_state.h:80
#define PROGRESS(n)
GAME.progress is n.
Definition game_state.h:69
#define FLAG(group, id)
The codes of the (code, value) pairs that FLAGS_00 checks as conditions and applies as actions (event...
Definition game_state.h:68
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
Definition sound.h:76
#define MUSIC_PROTOCOL_RUINS
PYRA_BGM: the Protocol Ruins.
Definition sound.h:85
#define MUSIC_BOSS
BOSS_000: the sectors' boss battles.
Definition sound.h:108
#define MUSIC(bank, n)
A field's or a battle's music (FieldState.music, Battle.music): track (SEP) n of the first sequence o...
Definition sound.h:70
#define MUSIC_BANK(music)
The sound bank of a music, which a stage loads for it (FieldState.soundBank)
Definition sound.h:148
void initSpriteDrawer(SpriteDrawer *obj)
Clears a sprite drawer to neutral (no scale, gray tint, follows the scroll), gives it its methods and...
FIELDSTG's start of the stage (StageEntry.init in FIELDSTG_stages): the stage's task,...
#define SPECIAL_UNLOCK_VEEMON
an action: unlocks PARTNER_VEEMON; the talks that take or give its DDNA apply it
Definition story.h:1738
#define FLAG_TOM_SEIRYU_LEADER_TALKED
wstag430 Seiryu Tower: Repeating Tom says the Seiryu Leader trains at the Protocol Ruins; the Leader ...
Definition story.h:1155
#define SPECIAL_STORY_JUNGLE_SOUND_TO_AMATERASU_BRIDGE
GAME.progress is from STORY_JUNGLE_SOUND to STORY_AMATERASU_BRIDGE (PROGRESS_RANGES[0x12])
Definition story.h:1917
@ STORY_PRESIDENT_ARRESTED
WSTAG226 (Login Room, Amaterasu City), event 935, after the President of MAGAMI gives himself up (WST...
Definition story.h:136
@ STORY_AGUMON_SUITS
WSTAG380 (Divermon's Lake), event 205: the Mischievous Mat, caught in his Etemon Suit,...
Definition story.h:52
@ STORY_SEPIKMON_MASK_LOST
WSTAG480 (Jungle Grave), event 171: Sepikmon will say how to beat Zanbamon once the player finds his ...
Definition story.h:49
@ STORY_GENJI_BEATEN
WSTAG200, event 52: after the first battle, won against Tamer Genji (event 50), the Digimon Navi give...
Definition story.h:36
@ STORY_TEDDY_FOUND
WSTAG212, event 352: Teddy is found; MAGAMI is part of the A.o.A, and the player sets off to beat the...
Definition story.h:67
@ STORY_LOOKING_FOR_TEDDY
WSTAG212, event 273: Kail and the player will put on the Agumon Suits to look for Teddy.
Definition story.h:61
@ STORY_MOVIE_BATTLES
WSTAG820, event 1080, with Snatchmon: each encounter plays MODE_BATTLE_MOVIE first.
Definition story.h:146
#define SPECIAL_STORY_ASUKA_HEADQUARTERS_TO_OPERATION_SIGMA
GAME.progress is from STORY_ASUKA_HEADQUARTERS to STORY_OPERATION_SIGMA (PROGRESS_RANGES[0x13])
Definition story.h:1920
#define FLAG_BARONMON_SEPIKMON_TALKED
wstag375 Protocol Ruins: Baronmon says Sepikmon had his mask and was last seen in Asuka City; Asuka t...
Definition story.h:1067
#define SPECIAL_STORY_ZANBAMON_DRIVEN_OFF_TO_AGUMON_DISGUISE
GAME.progress is from STORY_ZANBAMON_DRIVEN_OFF to STORY_AGUMON_DISGUISE (PROGRESS_RANGES[0x1E])
Definition story.h:1953
#define SPECIAL_STORY_DE_SINCERITY_TO_LISA_SAVED
GAME.progress is from STORY_DE_SINCERITY to STORY_LISA_SAVED (PROGRESS_RANGES[0xF])
Definition story.h:1908
#define FLAG_SEPIKMON_BOMB_HINT_TALKED
wstag475 Shaman House: Sepikmon says to ask his friend Baronmon about bombs; Baronmon then talks abou...
Definition story.h:1109
#define SPECIAL_STORY_BYAKKO_BADGE_TO_PRESIDENT_ARRESTED
GAME.progress is from STORY_BYAKKO_BADGE to STORY_PRESIDENT_ARRESTED (PROGRESS_RANGES[0x1D])
Definition story.h:1950
#define SPECIAL_PARTY_LEVEL_TOTAL_30
the party's levels add up to 30 or more (0 * 15 + 30)
Definition story.h:1765
#define FLAG_SEPIKMON_LOST_MASK_SEEN
wstag475 Shaman House event 180: the player meets maskless Sepikmon ("A monster!"),...
Definition story.h:1064
#define FLAG_DRI_BOB_TALKED
wstag375 Protocol Ruins: DRI Bob introduces himself once ("I'll tell you a secret"); set there,...
Definition story.h:1103
#define FLAG_BARONMON_TNT_BALL_TALKED
wstag375 Protocol Ruins: Baronmon can make the TNT Chip but needs a TNT Ball; then he says Triceramon...
Definition story.h:1272
#define SPECIAL_STORY_SEIRYU_BADGE_TO_ZANBAMON_DRIVEN_OFF
GAME.progress is from STORY_SEIRYU_BADGE to STORY_ZANBAMON_DRIVEN_OFF (PROGRESS_RANGES[0xE])
Definition story.h:1905
#define SPECIAL_VEEMON_LOCKED
PARTNER_VEEMON is still locked.
Definition story.h:1783
#define SPECIAL_SHOW_ITEM_GET_ICON
an action: the player's icon plays its animation 3 with SOUND_ITEM_GET (FIELD_COMMAND_ICON3); the tal...
Definition story.h:1982
#define SPECIAL_STORY_KNIGHTMON_REPROGRAMMED_TO_BULBMON_FOUND
GAME.progress is from STORY_KNIGHTMON_REPROGRAMMED to STORY_BULBMON_FOUND (PROGRESS_RANGES[0x11])
Definition story.h:1914
#define FLAG_PHARAOHMON_BEATEN
wstag375 Protocol Ruins: set when Pharaohmon's event 1260 starts ("I lose!", gives the Old Wand); lat...
Definition story.h:609
#define FLAG_PHARAOHMON_WIN_SEEN
wstag375 event 1260: Pharaohmon loses and gives the Old Wand; set at its end, tested 1 to start event...
Definition story.h:1466
#define SPECIAL_VEEMON_UNLOCKED
PARTNER_VEEMON is unlocked.
Definition story.h:1701
#define FLAG_SEIRYU_LEADER_REFUSED
wstag375 Protocol Ruins: the Seiryu Leader won't fight until MasterTyranno is beaten; MasterTyranno t...
Definition story.h:1158
#define SPECIAL_STORY_BYAKKO_LEADER_FOUGHT_TO_CONTROL_ROOM
GAME.progress is from STORY_BYAKKO_LEADER_FOUGHT to STORY_CONTROL_ROOM (PROGRESS_RANGES[0x10])
Definition story.h:1911
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
Definition field_map.h:114
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
Definition field_map.h:402
The battles of an area of the map (its cells' value at FieldMap.files[4]), one picked at random.
Definition field_map.h:411
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
Definition field_map.h:194
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
Definition field_map.h:422
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Definition field_map.h:141
void(* setFile)(s32 index, s32 file)
FIELDSTG_setMapFile.
Definition field_map.h:100
void(* setFirstMap)(s32 index)
FIELDSTG_setFirstMap: the map the player starts on (GAME.mapIndex), when the mode is new.
Definition field_map.h:104
s32 sheetEntry
the stage's sprite sheet, loaded before the field starts, or 0
Definition field_map.h:445
FieldEvent * events
up to the first id -1
Definition field_map.h:451
s32 soundBank
SOUND.loadBank's, or 0.
Definition field_map.h:459
StageTile * objects
the map objects, up to the first margin 0
Definition field_map.h:446
s32 imageFile
or an image archive file, or 0
Definition field_map.h:449
FieldBattles * battles
Definition field_map.h:450
Vec2 start
where the player starts
Definition field_map.h:456
StageSlot * slots
up to the first type 0
Definition field_map.h:447
ActorImage * actors
then the actors', from actors[2]
Definition field_map.h:454
s32 mapFile
the file of the map's tiles (FIELDSTG_createMapStreamer)
Definition field_map.h:444
s32 startDir
and its direction
Definition field_map.h:457
CVECTOR spriteColor
the field's sprites' color, unless cd is 0
Definition field_map.h:458
s32 textFile
the stage's text file, for the talks
Definition field_map.h:461
union FieldState::@12 images
s32 music
SOUND.playSound's, or 0.
Definition field_map.h:460
What a character says (FIELDSTG_runActorAction): the first whose conditions hold, or the last,...
Definition field_map.h:176
void *(* getEntry)(u32 fileAndIndex)
Definition file.h:96
void(* applyAction)(s32 code, s32 value)
Definition game_state.h:52
s32(* checkCondition)(u16 code, u16 value)
Definition game_state.h:53
struct Layer *(* getLayer)(s32 id)
Definition gfx.h:28
GfxFuncs funcs
Definition gfx.h:77
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
Definition gfx.h:128
void(* getScroll)()
Definition gfx.h:148
Draws sprites from a sprite sheet (such as file 0x277, the menu graphics): a sheet has a table of fra...
Definition gfx.h:223
void(* setAltClut)()
(x, y)
Definition gfx.h:243
void(* setLayerId)()
(id, depth)
Definition gfx.h:244
void(* draw)()
(sheet, frame, x, y)
Definition gfx.h:246
void(* setTexture)()
(x, y)
Definition gfx.h:242
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
Definition field_map.h:276
The task a stage starts (startStage), updated by its updateStage.
Definition stage.h:26
void(* nextState)(struct StageTask *task)
Definition stage.h:27
s32 state
Definition stage.h:27
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
Definition field_map.h:208
Definition gfx.h:352
s32 y
Definition gfx.h:354
s32 x
Definition gfx.h:353
u16 actor1Conditions[]
Definition wstag375.c:566
u16 actor6Talk0Actions[]
Definition wstag375.c:370
FieldActorEntry actor0
Definition wstag375.c:597
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
Definition wstag375.c:664
FieldActorEntry actor6
Definition wstag375.c:603
AreaBattle battles1Area3Battle5
Definition wstag375.c:301
u16 actor7Talk1Conditions[]
Definition wstag375.c:374
BattleList battles1Area1Battles
Definition wstag375.c:278
u16 actor11Conditions[]
Definition wstag375.c:584
u16 actor5Talk3Conditions[]
Definition wstag375.c:363
AreaBattle battles0Area1Battle4
Definition wstag375.c:222
FieldTalk actor2Talks[]
Definition wstag375.c:450
AreaBattle battles0Area0Battle3
Definition wstag375.c:208
u16 actor8Talk1Conditions[]
Definition wstag375.c:377
u16 actor3Talk3Conditions[]
Definition wstag375.c:344
Vec2 farSpriteSpots[]
Defined below, after the tables that use them.
Definition wstag375.c:194
u16 actor5Talk2Actions[]
Definition wstag375.c:362
AreaBattle battles1Area2Battle4
Definition wstag375.c:287
u16 actor2Talk1Conditions[]
Definition wstag375.c:333
FieldBattles stageBattles0[]
Defined below, after the code that uses them.
Definition wstag375.c:309
AreaBattle battles0Area1Battle2
Definition wstag375.c:220
void endEvent1261(void)
After event 1261, with Pharaohmon: gives the player the Old Wand and keeps it from playing again.
Definition wstag375.c:82
u16 actor10Conditions[]
Definition wstag375.c:583
BattleList battles0Area3Battles
Definition wstag375.c:252
AreaBattle battles1Area2Battle2
Definition wstag375.c:285
AreaBattle battles1Area0Battle4
Definition wstag375.c:261
BattleList battles1Area3Battles
Definition wstag375.c:304
AreaBattle battles0Area1Battle3
Definition wstag375.c:221
u16 actor18Conditions[]
Definition wstag375.c:591
FieldActorEntry actor17
Definition wstag375.c:614
BattleList battles0Area0Battles
Definition wstag375.c:213
u16 actor21Talk0Conditions[]
Definition wstag375.c:418
u16 actor5Talk0Conditions[]
Definition wstag375.c:353
FieldTalk actor14Talks[]
Definition wstag375.c:514
FieldActorEntry actor18
Definition wstag375.c:615
FieldTalk actor5Talks[]
Definition wstag375.c:467
AreaBattle battles0Area3Battle3
Definition wstag375.c:247
u16 actor11Talk1Conditions[]
Definition wstag375.c:386
AreaBattle battles1Area1Battle5
Definition wstag375.c:275
FieldBattles stageBattles1[]
Definition wstag375.c:312
AreaBattle battles1Area1Battle3
Definition wstag375.c:273
AreaBattle battles1Area0Battle5
Definition wstag375.c:262
FieldActorEntry actor5
Definition wstag375.c:602
AreaBattle battles0Area0Battle7
Definition wstag375.c:212
AreaBattle battles1Area3Battle0
Definition wstag375.c:296
u16 actor22Conditions[]
Definition wstag375.c:595
FieldActorEntry actor2
Definition wstag375.c:599
#define SPRITES
The file of the sprites, which the versions number differently.
Definition wstag375.c:14
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
Definition wstag375.c:90
AreaBattle battles1Area0Battle6
Definition wstag375.c:263
u16 actor9Talk0Conditions[]
Definition wstag375.c:378
u16 actor6Talk1Conditions[]
Definition wstag375.c:371
u16 actor3Talk0Conditions[]
Definition wstag375.c:334
AreaBattle battles1Area0Battle0
Definition wstag375.c:257
u16 actor18Talk1Actions[]
Definition wstag375.c:412
AreaBattle battles1Area2Battle6
Definition wstag375.c:289
BattleList battles1Area0Battles
Definition wstag375.c:265
FieldActorEntry actor23
Definition wstag375.c:620
FieldActorEntry actor19
Definition wstag375.c:616
u16 actor9Conditions[]
Definition wstag375.c:582
u16 actor7Talk0Conditions[]
Definition wstag375.c:372
AreaBattle battles0Area0Battle5
Definition wstag375.c:210
FieldActorEntry * stageActors[]
Definition wstag375.c:621
u16 actor7Talk0Actions[]
Definition wstag375.c:373
AreaBattle battles0Area2Battle2
Definition wstag375.c:233
AreaBattle battles1Area1Battle2
Definition wstag375.c:272
u16 actor23Conditions[]
Definition wstag375.c:596
AreaBattle battles0Area3Battle7
Definition wstag375.c:251
u16 actor17Talk2Conditions[]
Definition wstag375.c:405
u16 actor10Talk1Conditions[]
Definition wstag375.c:383
u16 actor17Talk1Conditions[]
Definition wstag375.c:403
void endEvent1260(void)
After event 1260, with Pharaohmon: lets event 1261 start and starts the stage's event battle 0.
Definition wstag375.c:73
u16 actor21Talk2Conditions[]
Definition wstag375.c:426
u16 actor11Talk0Conditions[]
Definition wstag375.c:384
AreaBattle battles1Area3Battle7
Definition wstag375.c:303
u16 actor4Talk1Conditions[]
Definition wstag375.c:352
AreaBattle battles0Area3Battle1
Definition wstag375.c:245
AreaBattle battles0Area2Battle1
Definition wstag375.c:232
u16 actor12Talk0Actions[]
Definition wstag375.c:388
FieldActorEntry actor22
Definition wstag375.c:619
u16 actor18Talk1Conditions[]
Definition wstag375.c:407
u16 actor16Talk0Actions[]
Definition wstag375.c:400
u16 actor10Talk0Conditions[]
Definition wstag375.c:381
AreaBattle battles1Area3Battle2
Definition wstag375.c:298
FieldTalk actor1Talks[]
Definition wstag375.c:446
u16 actor13Conditions[]
Definition wstag375.c:586
u16 actor21Talk3Conditions[]
Definition wstag375.c:433
AreaBattle battles1Area2Battle3
Definition wstag375.c:286
AreaBattle battles1Area3Battle6
Definition wstag375.c:302
AreaBattle battles0Area2Battle3
Definition wstag375.c:234
AreaBattle battles0Area0Battle4
Definition wstag375.c:209
AreaBattle battles0Area3Battle6
Definition wstag375.c:250
BattleList battles0Area2Battles
Definition wstag375.c:239
u16 actor17Talk0Conditions[]
Definition wstag375.c:402
u16 actor13Talk0Conditions[]
Definition wstag375.c:390
u16 actor21Talk4Conditions[]
Definition wstag375.c:441
FieldTalk actor0Talks[]
Definition wstag375.c:442
#define STAGE_ARCHIVE
Definition wstag375.c:100
FieldTalk actor21Talks[]
Definition wstag375.c:549
FieldTalk actor20Talks[]
Definition wstag375.c:545
u16 actor3Talk2Conditions[]
Definition wstag375.c:337
FieldActorEntry actor10
Definition wstag375.c:607
u16 actor21Talk3Actions[]
Definition wstag375.c:440
u16 actor3Talk1Conditions[]
Definition wstag375.c:336
u16 actor2Talk0Actions[]
Definition wstag375.c:332
u16 actor19Conditions[]
Definition wstag375.c:592
FieldTalk actor4Talks[]
Definition wstag375.c:462
u16 actor4Conditions[]
Definition wstag375.c:573
FieldActorEntry actor4
Definition wstag375.c:601
u16 actor3Conditions[]
Definition wstag375.c:572
AreaBattle battles0Area1Battle6
Definition wstag375.c:224
AreaBattle battles0Area2Battle0
Definition wstag375.c:231
FieldTalk actor17Talks[]
Definition wstag375.c:529
AreaBattle battles1Area1Battle1
Definition wstag375.c:271
FieldTalk actor11Talks[]
Definition wstag375.c:499
FieldActorEntry actor8
Definition wstag375.c:605
u16 actor21Talk1Conditions[]
Definition wstag375.c:419
AreaBattle battles0Area2Battle5
Definition wstag375.c:236
u16 actor15Talk1Conditions[]
Definition wstag375.c:398
AreaBattle battles1Area0Battle3
Definition wstag375.c:260
ActorImage stageImages[]
Definition wstag375.c:315
u16 actor14Talk1Conditions[]
Definition wstag375.c:395
AreaBattle battles0Area1Battle5
Definition wstag375.c:223
BattleList battles0Area1Battles
Definition wstag375.c:226
AreaBattle battles0Area2Battle4
Definition wstag375.c:235
FieldTalk actor6Talks[]
Definition wstag375.c:474
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing PYRA_BGM; battle list 0 before STORY_...
Definition wstag375.c:106
u16 actor12Talk0Conditions[]
Definition wstag375.c:387
u16 actor13Talk0Actions[]
Definition wstag375.c:391
FieldTalk actor19Talks[]
Definition wstag375.c:541
u16 actor10Talk0Actions[]
Definition wstag375.c:382
u16 actor4Talk0Conditions[]
Definition wstag375.c:350
FieldTalk actor23Talks[]
Definition wstag375.c:561
AreaBattle battles1Area3Battle4
Definition wstag375.c:300
u16 actor16Conditions[]
Definition wstag375.c:589
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
Definition wstag375.c:648
u16 actor16Talk1Conditions[]
Definition wstag375.c:401
AreaBattle battles0Area1Battle7
Definition wstag375.c:225
FieldActorEntry actor9
Definition wstag375.c:606
u16 actor8Conditions[]
Definition wstag375.c:581
AreaBattle battles1Area1Battle4
Definition wstag375.c:274
FieldActorEntry actor20
Definition wstag375.c:617
AreaBattle battles0Area3Battle4
Definition wstag375.c:248
u16 actor9Talk1Conditions[]
Definition wstag375.c:380
u16 actor5Conditions[]
Definition wstag375.c:574
FieldTalk actor10Talks[]
Definition wstag375.c:494
FieldTalk actor3Talks[]
Definition wstag375.c:455
FieldTalk actor9Talks[]
Definition wstag375.c:489
u16 actor3Talk2Actions[]
Definition wstag375.c:343
FieldTalk actor15Talks[]
Definition wstag375.c:519
AreaBattle battles0Area2Battle6
Definition wstag375.c:237
u16 actor5Talk0Actions[]
Definition wstag375.c:354
AreaBattle battles1Area2Battle0
Definition wstag375.c:283
u16 actor2Talk0Conditions[]
Definition wstag375.c:331
FieldActorEntry actor15
Definition wstag375.c:612
FieldActorEntry actor12
Definition wstag375.c:609
FieldActorEntry actor16
Definition wstag375.c:613
u16 actor15Conditions[]
Definition wstag375.c:588
AreaBattle battles0Area0Battle1
Definition wstag375.c:206
u16 actor6Talk0Conditions[]
Definition wstag375.c:369
BattleList battles1Area2Battles
Definition wstag375.c:291
AreaBattle battles1Area2Battle5
Definition wstag375.c:288
u16 actor6Conditions[]
Definition wstag375.c:579
u16 actor12Talk1Conditions[]
Definition wstag375.c:389
u16 actor14Talk0Actions[]
Definition wstag375.c:394
u16 actor14Conditions[]
Definition wstag375.c:587
AreaBattle battles1Area1Battle0
Definition wstag375.c:270
FieldActorEntry actor7
Definition wstag375.c:604
u16 actor17Talk1Actions[]
Definition wstag375.c:404
StageSlot stageSlots[]
Definition wstag375.c:651
u16 actor5Talk1Conditions[]
Definition wstag375.c:355
FieldActorEntry actor13
Definition wstag375.c:610
u16 actor8Talk0Actions[]
Definition wstag375.c:376
AreaBattle battles1Area3Battle3
Definition wstag375.c:299
u16 actor5Talk2Conditions[]
Definition wstag375.c:356
FieldActorEntry actor11
Definition wstag375.c:608
u16 actor16Talk0Conditions[]
Definition wstag375.c:399
FieldActorEntry actor1
Definition wstag375.c:598
void updateFarSprites(StageTask *task)
Draws 36 sprites of file SPRITES at the positions of farSpriteSpots, scrolled at 1/8.
Definition wstag375.c:18
FieldActorEntry actor21
Definition wstag375.c:618
u16 actor9Talk0Actions[]
Definition wstag375.c:379
FieldTalk actor13Talks[]
Definition wstag375.c:509
#define STAGE_FILE
Definition wstag375.c:99
u16 actor4Talk0Actions[]
Definition wstag375.c:351
AreaBattle battles0Area0Battle0
Definition wstag375.c:205
AreaBattle battles0Area2Battle7
Definition wstag375.c:238
AreaBattle battles1Area2Battle1
Definition wstag375.c:284
u16 actor18Talk2Conditions[]
Definition wstag375.c:413
AreaBattle battles1Area0Battle7
Definition wstag375.c:264
s16 script1261[]
Definition wstag375.c:165
AreaBattle battles0Area1Battle1
Definition wstag375.c:219
u16 actor11Talk0Actions[]
Definition wstag375.c:385
u16 actor7Conditions[]
Definition wstag375.c:580
AreaBattle battles0Area3Battle2
Definition wstag375.c:246
AreaBattle battles1Area2Battle7
Definition wstag375.c:290
u16 actor2Conditions[]
Definition wstag375.c:567
u16 actor13Talk1Conditions[]
Definition wstag375.c:392
FieldTalk actor18Talks[]
Definition wstag375.c:535
s16 script1260[]
Definition wstag375.c:133
FieldTalk actor7Talks[]
Definition wstag375.c:479
u16 actor21Talk1Actions[]
Definition wstag375.c:425
AreaBattle battles0Area1Battle0
Definition wstag375.c:218
AreaBattle battles0Area3Battle5
Definition wstag375.c:249
u16 actor20Conditions[]
Definition wstag375.c:593
u16 actor15Talk0Conditions[]
Definition wstag375.c:396
#define STAGE_TEXT
Definition wstag375.c:97
AreaBattle battles1Area0Battle1
Definition wstag375.c:258
AreaBattle battles1Area1Battle6
Definition wstag375.c:276
u16 actor3Talk0Actions[]
Definition wstag375.c:335
FieldTalk actor8Talks[]
Definition wstag375.c:484
u16 actor15Talk0Actions[]
Definition wstag375.c:397
u16 actor18Talk0Conditions[]
Definition wstag375.c:406
FieldTalk actor12Talks[]
Definition wstag375.c:504
AreaBattle battles0Area0Battle2
Definition wstag375.c:207
u16 actor21Conditions[]
Definition wstag375.c:594
AreaBattle battles0Area3Battle0
Definition wstag375.c:244
u16 actor8Talk0Conditions[]
Definition wstag375.c:375
AreaBattle battles0Area0Battle6
Definition wstag375.c:211
FieldTalk actor16Talks[]
Definition wstag375.c:524
u16 actor17Conditions[]
Definition wstag375.c:590
AreaBattle battles1Area1Battle7
Definition wstag375.c:277
AreaBattle battles1Area3Battle1
Definition wstag375.c:297
FieldActorEntry actor3
Definition wstag375.c:600
AreaBattle battles1Area0Battle2
Definition wstag375.c:259
FieldActorEntry actor14
Definition wstag375.c:611
FieldEvent stageEvents[]
Definition wstag375.c:667
u16 actor12Conditions[]
Definition wstag375.c:585
FieldTalk actor22Talks[]
Definition wstag375.c:557
u16 actor14Talk0Conditions[]
Definition wstag375.c:393
u16 actor0Conditions[]
Definition wstag375.c:565