36#define COUNTDOWN_BORROW(c) \
699#if VERSION_US || VERSION_JP
700#define MENU_SPRITES 0x2770000
702#define MENU_SPRITES 0x2860000
705#define TEXT_ENTRY(file, n) ((file) << 16 | (n))
706#elif VERSION_EU || VERSION_JP
707#define TEXT_ENTRY(file, n) ((LANGUAGE << 16) + ((file) << 16 | (n)))
717#define EXTRA_TEXT (TEXT_EVENTS_900 - 1)
719#define EXTRA_TEXT 0x939
732#define EVENT_TEXT(n) (EVENT_TEXT_FILE << 16 | (n))
736#define SOUND_MTL_DOWN 0x40012
737#define SOUND_COMAT102 0x8004213E
738#define SOUND_COMAT103 0x800421BF
739#define SOUND_COMEX105 0x800442C1
740#define SOUND_COMEX112 0x80044648
741#define SOUND_COMEX114 0x8004474A
742#define SOUND_BULB_000 0x340001
743#define SOUND_BULB_001 0x340002
744#define SOUND_GONDRA_B 0x340003
745#define SOUND_BULB_002 0x4C0001
746#define SOUND_FLOOR_LT 0x4C0002
747#define SOUND_DIGITAMA 0x540001
748#define SOUND_SE000000 0xA40004
749#define SOUND_DOOROPEN 0x80A4203C
750#define SOUND_LOGINEF 0xCC0001
751#define SOUND_FLOOR_DN 0xEC0001
752#define SOUND_ENTRY_02 0x1000000
753#define SOUND_SIGNALON 0x1000002
754#define SOUND_DOORCLSE 0x8100303C
755#define SOUND_CCOMBINE 0x8100383C
756#define SOUND_DIGI_EN0 0x10C0000
757#define SOUND_DIGI_EN1 0x10C0001
758#define SOUND_DIGI_EN2 0x10C0002
#define TASK_HEADER(Type)
void(* stageFuncs[])(void)
The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a t...
AnimFrame effectClutFrames[]
const CVECTOR stageColor
the color the setup copies to FIELDSTG_state.spriteColor
FieldActorEntry * stageActors[]
void updateTileAnims(StageTileAnims *task)
Animates the map objects of animation 1 with updateTileAnimsFrames, stepped again for each map object...
void setupStage(void)
Sets the stage up: its map, actors, battles and events, playing KANRIBGM; BGM_0029 instead except at ...
StagePoints * placePoints[]
Names some stages define.
StageEffect * createStageEffect(s32 x, s32 y, s32 frame)
Creates a StageEffect at (x, y) with its sprites' frames from FRAME.
StageTile stageObjects[]
The tables and color setupStage gives FIELDSTG_state (FieldState)
void updateStage()
The names every stage defines, each its own (config/<version>/stages/<stage>.txt).
FieldBattles stageBattles[]
What the stage overlays and the executable use of FIELDSTG (fieldstg.h has the rest): its layers and ...
Where an actor's frames go in VRAM: one of the records after the FieldImage (Actor....
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
One frame of a sprite animation; frame 0xFF ends it (or loops it)
A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs.
A character of the field (FieldState.actors, a list of pointers up to NULL), which FIELDSTG_updateFie...
The battles of a place (FieldState.battles), by area of the map: the fourth area's are also the ones ...
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
A sprite drawn over a character (FIELDSTG's actor found by its key)
An animation played at (x, y)
What moves a StageFaller or the StageMover of WSTAG415 at (x, y) in 8.8, and its animation: one layou...
s16 timer
the mover's frames of falling; a faller never sets it
s16 mode
the mover's; a faller's is 1 once it has bounced
An animation of a table of byte pairs (frame, duration; duration 0 loops to frame)
s32 cur
the animation playing
s32 anim
the animation wanted
Two StageByteAnim animations.
A looping animation of a table of byte pairs (frame, duration; frame 0 loops)
A sprite effect a stage creates at (x, y) with the given frame, by kind.
A sprite at (x, y) from the stage's sheet (FieldState.sheetEntry) with an animated palette,...
AnimState anim
the one-shot animation
StageSprite sprites[2]
drawn at depth 6 and 4
Where a StageFaller starts and how it falls.
s16 bounce
divides vy when bouncing, 0 for no bounce
A sprite of WSTAG415 that falls from a point of a table, bounces once and dies at the bottom.
Sets its children to TASK_DONE one after the other, at the times of a table.
A frame of a StageFloaterPart's animation, with what it adds to value.
A sprite of a StageFloater, its animation and what the animation adds up.
Where a StageFloater is created.
A sprite from the stage's sheet at (x, y) that moves up or down in TASK_DONE.
StageFloaterPart parts[3]
s32 y8
y << 8 while moving
The children of a StageFloaterChain.
StageFloater * floaters[27]
Two pictures that change by turns, and the flyers they let out.
s32 right
the picture of the third (0-2)
s32 left
the picture of the first two (0-2)
s32 spawnA
let out the first set of flyers
s32 spawnB
let out the second set
A sprite that flies off diagonally, animated.
s32 right
else left; also flips the sprite
s32 still
doesn't move or animate
The table of a stage's functions: its setup, then the menu stages' tween (startTween and updateTween)...
void(* start)(PanelAnim *tween, s32 up)
void(* setup)(void)
fills FIELDSTG_state
s32(* update)(PanelAnim *tween)
whether it has ended
A brightness that rises from 12 to 28, holds, then falls back.
A map object that moves by a speed in 8.8.
The object of WSTAG415 that events 0x331 to 0x334 drive.
StageTile * tile
the map object (FieldState.objects) with animation 1
The children of a task with one per party slot.
Where an exit (StageSlot) leads: copyPlacePoints copies a place's points to the stage's first slots,...
The points of a place (GAME.place and GAME.placeArg, which the exit the player came through set)
A texture of a StageQuad: its page, square at (u, v), and palette.
A quad of the screen: its corners and what it shows.
s16 kind
0-1: the frame of that animation, else the texture
A frame of a StageRiser's animation; the last (frame 0xFF) sets move.
A map object animated and moved by its animation.
s32 move
added to the map object's y
Map objects that events start moving.
s16 pushing
moves the player
A step of a StageTileSeq: its animation, and the step after it ends.
s16 next
0: hide the map object
s16 once
play once, then go to next
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
The map object with animation 1, played once with a sound when the substate is set to 1 (frame 5 befo...
s16 voice
what SOUND.playSound returned
The animations of sprites drawn all over the stage.
StageBytePlay anims[10]
nine used
A trap's effect over a partner it leaves at 1 HP (events 9000 to 9015 of WSTAG740 and WSTAG741,...
s32 pad50
never read or written
A sprite of the stage: where, which animation, and flipped.
A sprite of a StageEffect: its frame (0 for none) and palette row.
The task a stage starts (startStage), updated by its updateStage.
A map object animated while playing is set.
A map object with the animation that sets its frame.
The task that animates the map objects.
AnimState anims[4]
as many as the stage uses
Where a StageTileAt is created.
The map object with the given animation, moved to (x, y)
The children of a StageTileSwitch.
Where a sequence of StageTileFrame animations (NULL-terminated) is at.
The map objects with animations 1 to 5, each playing a sequence.
StageTileCursor cursors[5]
Two map objects (animations 8 and 9) shown while mode isn't 0, and hidden by a one-shot animation wai...
Three map objects (animations 1 to 3) moved to (x, y) and animated once when the substate is set to 1...
A frame of a StageTileFrame animation, which sets two frames of a map object.
u8 last
go to the next animation of the sequence after it
u8 clutRow
for StageTile.clutRow
The map objects with animations 2 to 9.
Two map objects, animated.
A frame of a looping animation: after the last (frame 0xFF) it goes back to loop.
The map objects with animations 3 and 4, each animated once.
s32 pad50
never read or written
StageTileAnimFlag tiles[2]
StageTilePair with halfword flags.
StageTilePair with byte flags, for the map objects of two given animations.
s16 anim
the map objects' animations: anim and anim + 1
u8 done
1: start in TASK_DONE
Animates the map objects with animations 1 and 2: the first alone while running, both when done.
s32 done
start in TASK_DONE
s32 playing
the second animation of the first map object
The map objects with animations 1 to 4.
StageTileSeq with a byte setFrame and a sound to play at frame 0x34.
A map object played through a sequence of animations.
s16 seq
the step playing, 0 when finished
s16 setFrame
0: the animation sets clutRow, else frame
The map objects with animations 1 to 4, sequenced.
The map objects with animations 4 to 1, animated.
AnimState anim2
animation 1's, looping
StageTile * tiles[4]
animations 4, 3, 2 and 1
s32 done
start in TASK_DONE
StageTileSix with flagged map objects.
StageTileAnimFlag tiles[6]
Six map objects, animated by mode.
StageTileDuo with one map object.
The map object with animation 2, animated by substate, and the StageTileAt children that events set t...
s32 silent
no sound when an event comes
s32 spawn
the child to set to TASK_DONE, + 1
The map object with animation 1 and a frame counter.
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
StageWanderer moving two map objects: tileAnim and tileAnim + 9.
A map object that wanders around where it starts, animated, turning every period frames: towards home...
s32 start
the first frame and timer
u8 tileAnim
the map object (FieldState.objects) it moves
s16 mode
0: hidden, 1: wandering, 2: waiting, 3: slowing down
s16 period
frames between turns
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...