19#define OVL_NAME(name) FIELDSTG_##name
27#define FIELD_SPRITES_X 0x200
28#define FIELD_SPRITES2_X 0x240
29#define FIELD_SPRITES_Y 0x100
30#define FIELD_OBJECTS_X 0x140
31#define FIELD_OBJECTS_Y 0x100
32#define FIELD_OBJECTS_CLUT_Y 0x1F0
33#define FIELD_CUTSCENE_X 0x280
34#define FIELD_CUTSCENE_CLUT_Y 0xF0
35#define FIELD_MENU_SPRITES_X 0x140
41#define SOUND_DIG_DEMO 0x40003
42#define SOUND_DIGIMENT 0x40004
43#define SOUND_ENCOUNTS 0x40005
44#define SOUND_FUKIDASH 0x40007
45#define SOUND_ITEM_GET 0x40009
46#define SOUND_PIYOPIYO 0x40013
47#define SOUND_SAVEDEMO 0x40015
48#define SOUND_SUB_DEMO 0x40018
49#define SOUND_BULB_003 0x440001
50#define SOUND_TRAP_OFF 0x700001
51#define SOUND_INFO_SIG 0xB80001
52#define SOUND_BM_ERASE 0x1100000
53#define SOUND_LD_ERASE 0x1100002
54#define SOUND_DEMO_BGM 0x60040002
55#define SOUND_COMCD111 0x80042DC7
56#define SOUND_COMCD201 0x800430BD
57#define SOUND_PLAYER00 0x8004583C
58#define SOUND_PLAYER01 0x800458BD
59#define SOUND_PLAYER02 0x8004593E
60#define SOUND_PLAYER08 0x80045C44
61#define SOUND_PLAYER09 0x80045CC5
62#define SOUND_PLAYER10 0x80045D46
63#define SOUND_TRESUREB 0x80045DC7
64#define SOUND_DIG_MOVE 0x80045FCB
65#define SOUND_MASK_SET 0x803C503C
66#define SOUND_BEAM_SHT 0x805458BD
67#define SOUND_WEAR_OFF 0x80E8383C
68#define SOUND_SN_ENTRY 0x8110303C
69#define SOUND_SN_ERASE 0x81103240
70#define SOUND_COMCD203 0xA00431BF
71#define SOUND_SUB_MOVE 0xA0045F4A
72#define SOUND_BEAM_HIT 0xA054583C
73#define SOUND_TRAP_ICE 0xA064683C
74#define SOUND_GAYALOOP 0xA10C703C
80#define ACTOR_ANIM_STAND 1
81#define ACTOR_ANIM_WALK 4
82#define ACTOR_ANIM_RUN 5
83#define ACTOR_ANIM_STOP 6
84#define ACTOR_ANIM_SEARCH 8
85#define ACTOR_ANIM_GAUGE_START 0x11
86#define ACTOR_ANIM_GAUGE_RESULT 0x12
87#define ACTOR_ANIM_GAUGE_PLAY 0x13
88#define ACTOR_ANIM_GAUGE_WAIT 0x14
89#define ACTOR_ANIM_GAUGE_END 0x15
90#define ACTOR_ANIM_DROP_OFF 0x16
91#define ACTOR_ANIM_FALL 0x17
92#define ACTOR_ANIM_FALL_FAR 0x18
93#define ACTOR_ANIM_LAND 0x19
94#define ACTOR_ANIM_CLIMB_UP 0x1A
95#define ACTOR_ANIM_CLIMB_DOWN 0x1B
96#define ACTOR_ANIM_GET_ON_WALL 0x1C
97#define ACTOR_ANIM_CLIMB_OFF_TOP 0x1D
98#define ACTOR_ANIM_GET_OVER_EDGE 0x1E
99#define ACTOR_ANIM_CLIMB_OFF_BOTTOM 0x1F
100#define ACTOR_ANIM_CLIMB 0x20
101#define ACTOR_ANIM_OPEN 0x41
102#define ACTOR_ANIM_USE 0x45
103#define ACTOR_ANIM_USED 0x54
112#define FLIGHT_WALL(n) (n)
113#define FLIGHT_CEILING(n) (24 - (n))
114#define FLIGHT_LEVEL(n) ((n) << 12)
115#define FLIGHT_LANDING 0xC
116#define FLIGHT_Z_MIN 0x1800
117#define FLIGHT_Z_MAX 0x7000
118#define FLIGHT_SPEED_MAX 0x200
119#define FLIGHT_SPEED_MAX_PAL 0x266
125#define TRAIL_STEPS 64
223#define GAUGE_EMPTY_ROW 8
224#define GAUGE_CURSOR_MAX 0x3000
225#define GAUGE_START_DELAY 0x5A
226#define GAUGE_RESULT_DELAY 0x3C
229#define GAUGE_FRAME 0x3C
230#define GAUGE_CURSOR_FRAME 0x3D
231#define GAUGE_ROW_FRAMES 0x3E
234#define GAUGE_RUNNING 0
235#define GAUGE_STOPPING 1
236#define GAUGE_STOPPING_SLOWLY 2
237#define GAUGE_STOPPED 3
281 void *(*start)(void);
377#if VERSION_US || VERSION_JP
378#define FIELD_ANIM_FILE 0x87B
380#define FIELD_ANIM_FILE 0x88C
588#if VERSION_US || VERSION_JP
589#define FIELD_SPRITES_FILE 0x152
591#define FIELD_SPRITES_FILE 0x160
596#if VERSION_US || VERSION_JP
597#define FIELD_ACTION_FILES 0x3B9
599#define FIELD_ACTION_FILES 0x3C9
601#define FIELD_DROP_FILE FIELD_ACTION_FILES
602#define FIELD_GAUGE_FILE (FIELD_ACTION_FILES + 1)
603#define FIELD_SEARCH_FILE (FIELD_ACTION_FILES + 2)
604#define FIELD_CLIMB_FILE (FIELD_ACTION_FILES + 3)
649 struct Task *(*init)(
void *owner);
655#define FIELD_FLAG_TALK_AHEAD 0x12
656#define FIELD_SEARCH_ITEM ITEM(0, 4)
660#define FIELD_VISITED_FLAG(mode) (0x2000 + (mode) - 0x200)
663#define FIELD_MODE_WSTAG415 0x22D
665#define FIELD_MODE_WSTAG815 0x2DE
668#define FIELD_PRIZE_FIGHTERS 0x1C9
669#define FIELD_PRIZE_FIGHTER_COUNT 8
673#define TRANSITION_COLUMNS 5
674#define TRANSITION_ROWS 6
675#define TRANSITION_TILE_WIDTH (SCREEN_WIDTH / TRANSITION_COLUMNS)
676#define TRANSITION_TILE_HEIGHT (SCREEN_HEIGHT / TRANSITION_ROWS)
677#define TRANSITION_IMAGE_X 0x280
678#define TRANSITION_SPEED 40
679#define TRANSITION_GONE 0x200
680#define TRANSITION_WAIT 0x10
681#define TRANSITION_DONE 0x1000
1037#if VERSION_EU || VERSION_JP
#define FLEXIBLE
The length of an array that ends a struct and runs as far as each object of it needs: s32 seps[FLEXIB...
#define TASK_HEADER(Type)
What the stage overlays and the executable use of FIELDSTG (fieldstg.h has the rest): its layers and ...
FieldEvent FIELDSTG_events[]
The story events (FIELDSTG_setupField), up to the first id -1: the scripts are WSTAG260's,...
void FIELDSTG_updateBalloon(Balloon *task)
A balloon's update: it pops open over the player (or another actor), stays while the trigger is on of...
void FIELDSTG_getFlyStep(Vec2 *pos, s32 scale, s32 index, Vec2 *out)
A step of scale in a direction, on the flat (FieldMap.getFlyStep)
void FIELDSTG_runChoice(ChoiceTask *task, ChoiceChildren *children)
choice.c
void FIELDSTG_followLeader(Actor *actor)
A partner's control: records the leader's steps in the trail while it moves, and follows them.
u8 FIELDSTG_spotAnim[][2]
animation of FIELDSTG_updateHiddenSpots: (frame, time) pairs up to 0xFF
Speech * FIELDSTG_createTalk(Actor *actor, s32 entry)
Creates the talk box of an actor's text entry, on the side of the screen away from where it faces and...
void FIELDSTG_runMapStreamer(MapStreamer *task, StreamPool *pool)
The map streamer's update: reads the map's header and creates the 30 stream tasks,...
void * FIELDSTG_askChoice13(void)
s32 FIELDSTG_boxCount
and their number
s32 FIELDSTG_stepEffectAnim(EffectAnim *anim, AnimFrame *frames, s32 depth)
effect.c
void FIELDSTG_warpActor(Actor *actor, SlotDest *dest, s32 kind)
Warps the player (SLOT_WARP0 and SLOT_WARP1): the field task plays the warp's effect and cutscene of ...
s16 FIELDSTG_file5DModes[]
the modes that load the field file 0x5D (FIELDSTG_requestInnNames)
void FIELDSTG_endChoice6Answer1(void)
void FIELDSTG_runGauge(GaugeGame *task)
gauge.c
void FIELDSTG_setMapFile(s32 index, s32 value)
Sets the file of map index (FieldMap.setFile)
s32 FIELDSTG_haltedPartners[]
void FIELDSTG_updateCamera(Camera *task)
The camera's update: it follows its target actor (substate 0) or looks at a spot (1),...
void FIELDSTG_endChoice2Answer1(void)
void FIELDSTG_updateCommandTask(Task *task)
commands.c
void FIELDSTG_resetScriptTimer(void)
script.c
void FIELDSTG_waitScriptTime(s32 time, s32 *pc)
A script's wait: counts time down, then moves the script on.
s32 FIELDSTG_getActorWidth(s32 index)
The width of character index.
s32 FIELDSTG_isTileFree(Vec2 *pos)
Whether nothing stands at pos: no character's box (gathered once a frame) and no object.
void FIELDSTG_controlFlight(Actor *actor)
The player's flight: it rises unless triangle is held (ACTOR_FLY), left and right turn,...
void FIELDSTG_drawActor(void *data, void *drawLayer)
(actor, layer)
void FIELDSTG_endChoice12Answer1(void)
IconOffset FIELDSTG_iconPath[]
up to (0, 0)
s16 FIELDSTG_eventIds[]
the events FIELDSTG_startListedEvent starts
ProgressEvent FIELDSTG_progressEvents[]
void FIELDSTG_endChoice4Answer0(void)
void FIELDSTG_endChoice7Answer1(void)
FieldActorEntry * FIELDSTG_actorList[]
void FIELDSTG_endChoice3Answer1(void)
void FIELDSTG_endChoice5Answer0(void)
void FIELDSTG_updateLift(Lift *task)
lift.c
void FIELDSTG_endChoice14Answer1(void)
void FIELDSTG_loadStreamSprites(StreamTask *task)
Takes a decompressed tile's sprites and loads its image into its slot's VRAM.
s32 FIELDSTG_getFileEntry(s32 index)
state.c
s32 FIELDSTG_isStreamLoaded(StreamTask *task)
Whether a stream task's read is done.
void FIELDSTG_endChoice11Answer1(void)
void FIELDSTG_endChoice2Answer0(void)
void FIELDSTG_updateSpeech(Speech *task, void **box)
A speech's update: opens its message box or talk box, moves the talk box with its actor,...
AnimFrame FIELDSTG_cutsceneLoopAnim2[]
void FIELDSTG_stretchBannerBox(AreaBanner *task, BannerBox *box)
Stretches a box toward from-to along one axis.
void FIELDSTG_updateStream(StreamTask *task)
A stream task's update: takes its tile once decompressed, and notes when its read ends.
Vec2 FIELDSTG_shakeOffsets[]
the camera's shake offsets
StageTile * FIELDSTG_objectCursor
FIELDSTG_findNextObject's search of the map objects.
void FIELDSTG_startActorGauge(Actor *actor, s32 dir, Vec2 offset)
Starts the gauge game at an offset from an actor, turning the partners its way.
void FIELDSTG_setActorPose(Actor *actor, s32 set, s32 dir)
Puts an actor in an event's pose: an animation set and a direction (ACTOR_POSED)
void FIELDSTG_handleScriptCommand(s32 task, s32 id, s32 command, s32 arg)
Hands the task of script command id a command and its argument, through the command's handle.
s32 FIELDSTG_updateTween(PanelAnim *tween)
u8 FIELDSTG_slotOffsets[][2][2]
the slots' offset in tiles: [quadrant][x, y][unflipped, flipped]
u8(*[] FIELDSTG_iconAnims)[2]
FIELDSTG_updateActorIcon's animation of each substate.
void FIELDSTG_toScreenPos(Vec2 *pos)
Turns a map position into a screen one.
void FIELDSTG_startDrop(Actor *actor, s32 dir, Vec2 pos, s32 height)
Starts a drop from a ledge of height.
void FIELDSTG_walkToGoal(Actor *actor)
Walks an actor to its goal tile (FIELDSTG_setActorGoal) as the pad would, then faces it the goal's wa...
void FIELDSTG_playClimbSounds(Actor *actor)
The player's climbing sound, every 16 frames.
s32 FIELDSTG_findTrigger(Triggers *task)
trigger.c
s32 FIELDSTG_getStreamFrame(StreamTask *task)
A stream task's frame, the tile it holds.
void FIELDSTG_endChoice15Answer0(void)
s32 FIELDSTG_followingPartners[]
StageTile FIELDSTG_mapObjects[]
The field's map objects (FieldState.objects), up to the first margin 0.
s32 FIELDSTG_loadFieldFiles(Task *task)
Loads the field's files, a step at a time: 1 once done.
void(* FIELDSTG_initFuncs[])(void)
s32(* FIELDSTG_tweenUpdate)(PanelAnim *tween)
FIELDSTG_updateTween.
void * FIELDSTG_askChoice12(void)
void FIELDSTG_getWalkStep(Vec2 *pos, s32 scale, s32 index, Vec2 *out)
A step of scale in a direction on the map the player is on, along the slope of its cell (FieldMap....
Actor * FIELDSTG_findEventActor(EventTask *task, s32 id)
event.c
s16 FIELDSTG_slideVoice
the voice of the slide's sound (ACTOR_SLIDE, SOUND_TRAP_ICE)
void FIELDSTG_drawCoverBlock(Layer *layer, s32 x, s32 y, s32 level)
Draws a 128-pixel block of the cover at (x, y), at a shade of level (8.8)
void FIELDSTG_scrollCamera(Camera *task)
camera.c
GaugeGame * FIELDSTG_createGauge(Vec2 pos)
Creates the gauge game at a tile.
ScriptCommand FIELDSTG_scriptCommands[]
The script commands (FIELDSTG_findScriptCommand), up to the first id 0.
ScriptCommand * FIELDSTG_findScriptCommand(s32 id)
The script command id of FIELDSTG_scriptCommands, or NULL.
void FIELDSTG_runEvent(EventTask *task, EventChildren *children)
Runs an event: in TASK_INIT it waits for the event's text file and the field (FIELD_TASK_FIELD) and h...
void FIELDSTG_endChoice13Answer0(void)
void * FIELDSTG_askChoice8(void)
void FIELDSTG_followWithCamera(s32 snap, s32 id)
Points the camera at the actor id, at once if snap.
void FIELDSTG_touchStream(StreamTask *task)
stream.c
void FIELDSTG_moveByPad(Actor *actor, s32 pad)
Walks or runs an actor in the direction of the pad's arrows (an index of FIELDSTG_padDirs),...
void FIELDSTG_endChoice13Answer1(void)
void FIELDSTG_resumePartners(void)
Makes the partners follow the player again (FIELDSTG_followLeader)
StreamTask * FIELDSTG_findOldestStream(StreamPool *pool)
map_streamer.c
void FIELDSTG_setOffTrigger(Triggers *task)
Sets off the slot the player pressed cross on.
Actor * FIELDSTG_createActor(s32 key1, s32 kind, s32 image, FieldActorEntry *entry)
Creates a character (FIELD_TASK_ACTOR): key1 is the character, key2 its kind (0 the player,...
void FIELDSTG_endChoice9Answer1(void)
void FIELDSTG_shakeCamera(s32 shaking)
Starts or stops the camera's shake.
void FIELDSTG_runFileLoader(Task *task)
The file loader's update: loads the field's files from its first step on (FIELDSTG_loadFieldFiles)
SpotHint * FIELDSTG_createSpotHint(Vec2 from, Vec2 to)
Creates the hint for a search at to, from the prize at from.
void FIELDSTG_endChoice6Answer0(void)
MapObjects * FIELDSTG_createMapObjects(s32 sprites, StageTile *objects)
Creates the map's objects, with their sprites.
void FIELDSTG_updateRoot(Task *task, Task **children)
start.c
s32 FIELDSTG_boxFrame
the frame FIELDSTG_boxes was filled in
s32 FIELDSTG_battleRates[]
how much each area lowers GAME.battleSteps, the steps to the next battle
void FIELDSTG_runActorAction(Actor *actor, ActorChildren *children)
Runs an actor's action, its substate (ACTOR_STAND...): the walks, the climbs and the drop from ACTOR_...
Vec2 FIELDSTG_mapSize
FIELDSTG_getMapSize's.
StageEntry FIELDSTG_extraStages[]
the extra chapter's, which run on into FIELDSTG_stages
void FIELDSTG_endChoice8Answer1(void)
Vec2 FIELDSTG_slotImages[]
VRAM position of each StreamTask slot's image.
void FIELDSTG_endChoice15Answer1(void)
#define TRAIL_STEPS
The last TRAIL_STEPS steps of the actor that another one follows (Actor.trail), a ring from tail to h...
void FIELDSTG_requestInnNames(Task *task)
file_loader.c
void FIELDSTG_waitWalkDone(s32 id, s32 *pc)
A script's wait for the actor id to reach its goal.
Triggers * FIELDSTG_createTriggers(s32 sheetEntry, StageSlot *slots)
Creates the triggers.
void * FIELDSTG_askChoice10(void)
BannerBox FIELDSTG_bannerBoxes[10]
FIELDSTG_updateBanner's boxes.
ChoiceText FIELDSTG_choices[16]
s32 FIELDSTG_checkFlightProbes(Actor *actor)
Whether a flying actor runs into the map at any of the five probes ahead of it (FIELDSTG_checkFlightP...
void(* FIELDSTG_checkBattle)()
FIELDSTG_countBattleSteps.
s32 FIELDSTG_spriteDepths[]
depth of each layer of a StreamTask's sprites
void FIELDSTG_updateField(FieldTask *task, FieldChildren *children)
The field's update: sets up the stage, creates the characters and the NPCs, then runs the field and o...
s16 FIELDSTG_liftShake[]
FIELDSTG_updateLift's shakes, up to 1000.
void FIELDSTG_drainTrail(Actor *actor)
A follower's update while its trail runs out: it finds the leader (FIELD_TASK_ACTOR) if it has none,...
void FIELDSTG_endChoice5Answer1(void)
void FIELDSTG_launchActor(Actor *actor, SlotDest *dest)
Sends the player flying to the tile at dest from the nearest launcher (FIELDSTG_createLaunch)
void FIELDSTG_endChoice1Answer1(void)
void FIELDSTG_clearScriptFlag(void)
A script helper: clears the script flag of character 1, or else of character 2.
s32 FIELDSTG_turnedPartners[]
the partners' kinds (Actor.key2): the ones FIELDSTG_startActorGauge turns, FIELDSTG_haltPartners stop...
void * FIELDSTG_askChoice3(void)
void * FIELDSTG_askChoice4(void)
void FIELDSTG_setStreamSource(StreamTask *task, s32 slot, Decompressor *source)
Decompresses a stream task's tile into slot.
void FIELDSTG_updateEffect(FieldEffect *task)
An effect's update: draws its animations at its spot until they end.
void * FIELDSTG_askChoice11(void)
void FIELDSTG_startTween(PanelAnim *tween, s32 in)
tween.c
u8 * FIELDSTG_dirAnims[]
FIELDSTG_updateSpotEffect's animation for each direction.
u8 FIELDSTG_probeSteps[][2]
a probe's offset: bit 0 set, bit 7 negative
void * FIELDSTG_askChoice7(void)
void FIELDSTG_updateActor(Actor *actor, ActorChildren *children)
An actor's update: waits for its animation file (and gives the player its icon), then runs its contro...
Box FIELDSTG_boxes[20]
the characters' boxes (FIELDSTG_isTileFree)
StandIn FIELDSTG_standIns[]
up to character 0
void FIELDSTG_pointCamera(s32 snap, s32 x, s32 y)
Points the camera at the spot (x, y), at once if snap.
void FIELDSTG_endChoice7Answer0(void)
StoryEvents * FIELDSTG_createStoryEvents(void *owner)
Creates the story events, and loads the field's sound bank and files.
s32 FIELDSTG_objectId
and the id it looks for
void * FIELDSTG_askChoice9(void)
s32 FIELDSTG_scaleSin(s32 angle, s32 radius)
launch.c
void FIELDSTG_closeField(FieldTask *task, FieldChildren *children)
Closes the field for the next mode: the view shrinks to nothing, the cover fades in,...
Encounter FIELDSTG_encounters[]
FIELDSTG's data (fieldstg.c), in its order.
s32 FIELDSTG_stepBalloonAnim(Balloon *task)
balloon.c
void * FIELDSTG_askChoice15(void)
void FIELDSTG_hidePrize(HiddenSpots *task)
Hides the prize in one of the hidden spots at random (GAME.prizeSpot keeps it)
Task * FIELDSTG_createBanner(s32 show)
Creates the area name banner, which closes at once unless show; the player is frozen until it ends.
AreaName FIELDSTG_areaNames[]
StageEntry FIELDSTG_stages[]
HiddenSpots * FIELDSTG_findHiddenSpot(Vec2 *pos, s32 select)
The hidden spots, when one is within 10 pixels of pos (selecting it if select), or NULL.
void FIELDSTG_showAreaName(AreaBanner *task, AreaNameWindows *windows)
banner.c
void * FIELDSTG_askChoice0(void)
void FIELDSTG_handleFieldCommand(Task *task, s32 command)
Runs a field command (FIELD_COMMAND_*) of an event script: halts the partners through the command tas...
void FIELDSTG_endChoice12Answer0(void)
void FIELDSTG_startWarp(s32 kind, Vec2 *pos, SlotDest *dest)
Starts a warp from pos: the field task plays the effect and the cutscene of kind, then leaves for the...
void FIELDSTG_runStoryEvents(StoryEvents *task, StoryEventsChildren *children)
story.c
s32 FIELDSTG_offerTrigger(Triggers *task, TriggerChildren *children)
Acts at once on a slot that does (SLOT_DEPTH...), or shows the balloon of one that waits for a button...
void FIELDSTG_endChoice11Answer0(void)
void FIELDSTG_playStepSounds(Actor *actor, s32 moving, s32 canBattle)
The player's footsteps, every 8 frames when it moves (every 32 for the characters 0x146 and 0x147) or...
void FIELDSTG_drawSpotEffect(SpotEffect *task, Layer *layer)
The layer's sorted callback that draws a search's effect.
void FIELDSTG_countBattleSteps(void)
Counts down to the next battle at each step by the area's rate (FIELDSTG_battleRates),...
HiddenSpots * FIELDSTG_createHiddenSpots(s32 count)
Creates the hidden spots, the map objects of animation 0xFF, and hides the prize in one (or where it ...
void * FIELDSTG_askChoice5(void)
void FIELDSTG_endChoice14Answer0(void)
Vec2 FIELDSTG_dirVectors[][8]
a direction's vector, scaled by 4096
void FIELDSTG_updateMapObjects(MapObjects *task, HiddenSpots **children)
Animates and draws the map's objects that are in view.
void FIELDSTG_endChoice9Answer0(void)
void FIELDSTG_pickStage(void)
Picks the stage overlay of the mode (FIELDSTG_stages, in the European version's extra chapter FIELDST...
Launch * FIELDSTG_createLaunch(Actor *actor, SlotDest *dest)
Creates the flight of an actor to the tile at dest; two stages' modes (0x26C, 0x2D4) set theirs up.
TileMove FIELDSTG_tileMoves[]
void FIELDSTG_resetActorControl(Actor *actor)
Gives an actor its kind's control back: the pad for the player, none for kind 1, the trail for the pa...
void FIELDSTG_setFirstMap(s32 index)
Puts the player on map index when the mode is new (FieldMap.setFirstMap)
void FIELDSTG_walkActorInDir(Actor *actor, s32 dir)
Walks an actor out through an exit, in a direction (ACTOR_WALK_OUT)
void FIELDSTG_drawMapObject(MapObjects *task, Layer *layer, s32 index)
map_objects.c
void FIELDSTG_requestTiles(MapStreamer *task, StreamPool *pool)
Streams the map's tiles while the CD reader is free: a tile of viewTiles (0xFF for none) that a strea...
void * FIELDSTG_askChoice1(void)
AnimFrame FIELDSTG_cutsceneLoopAnim[]
and kind 1's two
void FIELDSTG_endChoice3Answer0(void)
u8 FIELDSTG_probes[][5]
the probes of each direction (FIELDSTG_checkFlightProbes)
s32 FIELDSTG_fileEntries[]
by character (Actor.key1)
void FIELDSTG_startActorSlide(Actor *actor, s32 dir)
Starts an actor sliding in a direction (SLOT_SLIDE)
s32 FIELDSTG_createScriptCommand(s32 id)
Creates the task of script command id, or returns 0.
void * FIELDSTG_askChoice14(void)
void FIELDSTG_controlClimb(Actor *actor)
The player's control on a wall: up and down climb, nothing held holds on.
FieldImages FIELDSTG_images
the field's own stage (FIELDSTG_setupField)
void FIELDSTG_createPlayerBalloon(s32 id)
The balloon over the player: script commands 803 to 806 (FIELDSTG_scriptCommands)
void FIELDSTG_moveLift(Lift *task, s32 command)
Runs a script command of the lift's: moves it up or down.
void FIELDSTG_setupField(void)
The setup of the field's own stage (FIELDSTG_initFuncs), which fills FIELDSTG_state as the stage over...
StageSlot FIELDSTG_slots[]
What the player can trigger on the field's map (FieldState.slots), up to type 0.
void FIELDSTG_runLaunch(Launch *task)
Sends an actor from the nearest FIELD_TASK_LAUNCHER (y counts twice in the distance) to its dest tile...
void FIELDSTG_endChoice0Answer1(void)
Actor * FIELDSTG_findActor(s32 character)
The actor of a character (Actor.key1), or NULL.
void(* FIELDSTG_tweenStart)(PanelAnim *tween, s32 in)
FIELDSTG_startTween.
StreamTask * FIELDSTG_createStream(s32 size, s32 file)
Creates a stream task of a file, with a buffer of size.
void FIELDSTG_updateActorIcon(ActorIcon *task)
actor_icon.c
void FIELDSTG_drawBannerBox(AreaBanner *task, u_long *ot, DVECTOR pos, DVECTOR size, s32 color)
Draws one of the banner's boxes, a flat quad of a color.
AnimFrame FIELDSTG_cutsceneAnim[]
FIELDSTG_playCutsceneAnim's animations: kind 0's,.
SpotEffect * FIELDSTG_createSpotEffect(s32 forEvent)
Creates a search's effect, over the event's actor 0x11B if forEvent, else over the player.
void FIELDSTG_rollBattleSteps(void)
battle.c
void FIELDSTG_leaveFieldAfter(s32 mode, s32 arg, s32 x, s32 y, s32 dir, s32 delay)
Leaves the field for a mode after a delay: the field task (FIELD_TASK_FIELD) goes to TASK_DONE,...
void FIELDSTG_playCutsceneAnim(CutsceneAnim *task)
cutscene.c
StreamTask * FIELDSTG_findStream(StreamPool *pool, s32 frame)
The stream task that holds a frame (a tile of the map), or NULL.
void FIELDSTG_startEventBattle(s32 index)
Starts battle index of the fourth area, the one events start.
FieldEffect * FIELDSTG_createEffect(s32 x, s32 y, s32 set)
Creates the effect of a set at (x, y)
CutsceneAnim * FIELDSTG_createCutsceneAnim(s32 kind)
Creates a cutscene animation of a kind.
void FIELDSTG_seekStream(StreamTask *task, s32 frame, s32 size)
Reads a frame of the map file, a tile, from the CD, unless it has it already.
s32 FIELDSTG_selectMap(s32 index)
map.c
void FIELDSTG_endChoice10Answer1(void)
void FIELDSTG_getFacingTile(Actor *actor, Vec2 *out)
The tile in front of an actor, one step in its direction.
Task * FIELDSTG_createFileLoader(s32 step)
Creates the file loader, which starts at a step.
s32 FIELDSTG_checkFlightProbe(Actor *actor, s32 x, s32 y, Vec2 offset)
actor_control.c
void FIELDSTG_showSpotHint(SpotHint *task)
hidden_spots.c
s32 FIELDSTG_isActorWalking(Actor *actor)
Whether an actor is still walking to its goal.
Balloon * FIELDSTG_createBalloon(s32 kind, s32 anim, s32 id)
Creates a balloon of a kind (its sprites) with an animation, under a task id.
void FIELDSTG_startClimbDown(Actor *actor, s32 dir, s32 x, s32 y, s32 height)
Starts the climb down a wall of height from its top, at (x, y)
void FIELDSTG_requestSlotFiles(Task *task)
Requests the files of the actions the map's slots offer: climbs, drops and the gauge game.
void FIELDSTG_updateSpotEffect(SpotEffect *task)
A search's effect, over the player or, for an event, its actor 0x11B.
s32 FIELDSTG_keepsFileCache(void)
Whether the mode is FIELD_MODE_WSTAG415 or FIELD_MODE_WSTAG815, whose field keeps the file cache and ...
void FIELDSTG_endChoice0Answer0(void)
field_stage.c
void FIELDSTG_endChoice1Answer0(void)
Vec2 * FIELDSTG_getMapSize(MapStreamer *task)
The map's size in pixels.
void FIELDSTG_playBattleTransition(FieldTask *task, FieldChildren *children)
field.c
void FIELDSTG_balloonCommand(Balloon *task, s32 command, s32 id)
A balloon's script commands: 0x325 and 0x327 put it over the actor id with animation 0 or 1,...
s16 FIELDSTG_heldVoice
the voice of FIELDSTG_handleFieldCommand's held sound
Camera * FIELDSTG_createCamera(void)
Creates the camera.
void FIELDSTG_startActorWalk(Actor *actor)
Starts an actor walking to its goal.
void FIELDSTG_startEncounter(s32 encounter)
Starts encounter FIELDSTG_encounters[encounter]: the field task (FIELD_TASK_FIELD) leaves for the bat...
void FIELDSTG_updateBanner(AreaBanner *task, AreaNameWindows *windows)
The area name banner: in TASK_INIT it copies its ten boxes from FIELDSTG_bannerBoxes and opens the ar...
void FIELDSTG_getSpeechPos(Speech *task, Vec2 *out)
speech.c
void(* FIELDSTG_scriptHelpers[])()
the script helpers (FIELDSTG_toScreenPos...)
void FIELDSTG_searchEventSpot(void)
Searches the hidden spots off the map (x 1000 and up), for an event.
Task * FIELDSTG_createField(void)
Creates the field's main task.
s32 FIELDSTG_getStreamSlot(StreamTask *task)
A stream task's slot, or -1.
Speech * FIELDSTG_createSpeech(Actor *actor, s32 entry, s32 type, s32 isMessage)
Creates the speech of an event's text entry: a message box, or a talk box of a type.
MapStreamer * FIELDSTG_createMapStreamer(s32 file)
Creates the map streamer of a file.
s32 FIELDSTG_getMapCell(s32 index, Vec2 *pos)
The cell of map index at pos, down the tree from the grid to the pixel (FieldMap.getCell); 1 without ...
Vec2 FIELDSTG_dirSteps[]
tile offset of each direction
Vec2 FIELDSTG_tiles[5][6]
FIELDSTG_playBattleTransition's.
u8 FIELDSTG_dirLayouts[][2]
the layout and its flips for each direction
void FIELDSTG_endChoice4Answer1(void)
s32 FIELDSTG_battleFileStep
FIELDSTG_playBattleTransition's: 0 and 1 wait for the CD, 2 the battle's files are asked for.
void FIELDSTG_setActorAnim(Actor *actor, s32 set)
Starts an actor's animation set from its first frame.
void FIELDSTG_drawStream(StreamTask *task, Layer *layer, s32 x, s32 y)
Draws a stream task's tile at (x, y) on a layer: its sprites at the three depths.
void FIELDSTG_clearStreamSlot(StreamTask *task)
Forgets a stream task's slot.
void FIELDSTG_drawMapTiles(MapStreamer *task, StreamPool *pool)
Draws the map's tiles in view, under a cover that fades from the new ones, and while the decompressor...
Vec2 FIELDSTG_probePos[]
a probe's position
void FIELDSTG_startCommandTask(void)
Creates the task of script command 813 (the create of FIELDSTG_scriptCommands)
s32 FIELDSTG_dirDepths[]
and its depth offset
u8 FIELDSTG_actorWidths[]
by character, in pixels (FieldState.getActorWidth)
s32 FIELDSTG_padDirs[]
the direction of each combination of the pad directions
s32 FIELDSTG_iconPathStep
the step in FIELDSTG_iconPath
u8 FIELDSTG_slotLayouts[][4][5][6]
FIELDSTG_pickViewTiles's slot layouts: [layout][quadrant][row][column].
void FIELDSTG_controlPlayer(Actor *actor)
The player's update while it walks (Actor.control) when no menu, event or transition is running: the ...
void * FIELDSTG_askChoice6(void)
void FIELDSTG_pickViewTiles(MapStreamer *task)
Points the slots around the view at the map's tiles: viewTiles gets, for each of the 30 slots,...
s32 FIELDSTG_setEventPose(EventTask *task, s16 *op, EventChildren *children)
An event's pose command (SCRIPT_POSE): puts its actor in a pose, or, for an id of the script commands...
u8 FIELDSTG_triggerAnims[][9]
FIELDSTG_stepBalloonAnim's animations: (frame, time) pairs up to 0xFF.
#define TRANSITION_COLUMNS
FIELDSTG_playBattleTransition's tiles: a copy of the screen at TRANSITION_IMAGE_X in VRAM,...
void FIELDSTG_drawCover(s32 id, s32 level)
Covers the screen on the layer id at a shade of level (8.8)
Actor * FIELDSTG_findActorAt(Vec2 *pos)
The first actor (task id 5) whose box holds the tile pos: halfWidth to each side of it,...
ActorIcon * FIELDSTG_createActorIcon(Actor *actor)
Creates the player's icon, in the modes before MODE_NEW_GAME only.
u8 FIELDSTG_nearDirs[][8]
whether two directions are at most 45 degrees apart
void FIELDSTG_setActorDir(Actor *actor, s32 dir)
Turns an actor to a direction.
FieldBattles * FIELDSTG_findBattles(FieldBattles *list, s32 id)
The battles of the place id in a stage's list, or NULL.
void FIELDSTG_haltPartners(void)
actor.c
void FIELDSTG_animateActor(Actor *actor)
Plays an actor's animation: when its set (animSet) changes, it loads the set's animations for the fiv...
void FIELDSTG_endChoice8Answer0(void)
s32 FIELDSTG_isActorAnimDone(Actor *actor)
Whether an actor's animation has played to its end.
void FIELDSTG_setMap(s32 index)
Puts the player on map index (FieldMap.setMap)
void FIELDSTG_startAreaBattle(void)
Starts one of the eight battles of the player's battle area, at random.
AnimFrame * FIELDSTG_effectAnims[][4]
FIELDSTG_updateEffect's animations of each set.
void FIELDSTG_waitAnimDone(s32 id, s32 *pc)
A script's wait for the animation of the actor id to end.
u8 * FIELDSTG_gaugeRows[]
The rows of FIELDSTG_runGauge's gauges, 2 bits a cell.
void * FIELDSTG_askChoice2(void)
void FIELDSTG_startClimbUp(Actor *actor, s32 dir, s32 x, s32 y, s32 height)
The climbs (SLOT_CLIMB_UP and SLOT_CLIMB_DOWN) and the drop (SLOT_DROP): the actor goes onto the wall...
void FIELDSTG_endChoice10Answer0(void)
void FIELDSTG_updateTriggers(Triggers *task, TriggerChildren *children)
The triggers' update: offers the slot under the player while the field isn't busy,...
s32 FIELDSTG_talkToActorAt(Actor *actor, Vec2 *pos)
Talks to the character standing at pos, or to the one it stands in for (FIELDSTG_standIns): it answer...
static void FIELDSTG_startBattle(AreaBattle *battle)
Starts a battle: its fight stage, its music and its encounter.
Lift * FIELDSTG_createLift(s32 id)
Creates the lift, raised when flag 0x1C3D is set.
void FIELDSTG_updateHiddenSpots(HiddenSpots *task, HiddenSpotsChildren *children)
The hidden spots' update: a search plays its effect, then starts a battle where the prize is (and hid...
void FIELDSTG_drawBalloon(Balloon *task)
Draws a balloon over its actor: its frame, and once open, its animation.
void FIELDSTG_stopActorSlide(Actor *actor)
Stops a sliding actor (SLOT_STOP_SLIDE)
void FIELDSTG_setActorGoal(Actor *actor, s32 x, s32 y, s32 dir)
Sets the tile an actor walks to and the direction it ends facing (FIELDSTG_walkToGoal)
void FIELDSTG_restorePlayerControl(Actor *actor)
Gives the player its pad control back, off any wall.
ScriptTimer FIELDSTG_scriptTimer
The children of an actor (FIELDSTG_updateActor)
struct ActorIcon * icon
FIELDSTG_createActorIcon's.
struct Balloon * balloon
FIELDSTG_createBalloon's.
void * action
a gauge game or a launch
struct Speech * speech
FIELDSTG_createTalk's.
The player's icon (FIELD_TASK_ICON, FIELDSTG_createActorIcon): the field commands FIELD_COMMAND_ICON1...
u8(* anim)[2]
(frame, time) pairs; 0xFF loops to a step
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)
The area name banner (FIELD_TASK_BANNER, FIELDSTG_createBanner)
RECT clip
the layer's, closing in TASK_DONE
A battle of an area's BattleList, which can start on the field (see FIELDSTG_startEncounter); FIGHTST...
s32 encounter
of FIELDSTG_encounters
s32 stage
the fight stage, for BATTLE_SETUP.stage
s32 music
for BATTLE_SETUP.music (MUSIC_); the empty slots, { 0, 0, MUSIC(1, 0) }, keep the bare MUSIC(1,...
The windows of FIELDSTG_showAreaName.
The name of a mode's area (FIELDSTG_showAreaName), up to the first mode 0: the strings of the two win...
A balloon over an actor's head (FIELDSTG_createBalloon): it pops up, plays its FIELDSTG_triggerAnims ...
s32 frame
into its FIELDSTG_triggerAnims row
s32 popEnd
and closes to here
Actor * actor
the player when NULL
s32 popStart
the pop-up's sprites, times 4: it opens from here
s32 pop
the pop-up's sprite, times 4
A rectangle of an AreaBanner, which can stretch to a new range.
s32 stretch
1: horizontally, 2: vertically
s32 pad20
0 in every box; never read: FIELDSTG_bannerBoxes' entries are 0x24 bytes
An enemy of a battle (FIELDSTG's encounter table points to these)
s32 music
the battle's music
s32 stage
the battle's fight stage
A rectangle, edges included.
The camera (FIELD_TASK_CAMERA, FIELDSTG_createCamera): it centers the field's layer on an actor or a ...
s32 shake
the step of the shake, 0-3
s32 snap
goes to center at once instead of panning
Vec2 center
where it looks
s32 unk7C
cleared with each new target; nothing reads it
s16 voice
of the shaking sound, or -1
Vec2 pan
where it looks while it pans to center
Vec2 bounds
the map's size
Actor * target
the actor it follows (substate 0)
s32 spotX
the spot it looks at (substate 1)
s32 targetId
the target's character (Actor.key1)
The children of a yes/no question at the bottom of the screen: FIELDSTG's ChoiceTask and the stages' ...
A yes/no question of the story (FIELDSTG_runChoice); its children are a ChoiceChildren (field_map....
s32 type
FIELDSTG_choices's.
PanelAnim tween
the panel's width
A question of a ChoiceTask.
s32 text
the file counted from TEXT_FILE(1) << 16 | its entry: the question, then the answers
s16 events[2]
FIELDSTG_startEvent's, for each answer.
A cutscene's animation over the field (FIELDSTG_createCutsceneAnim)
s32 frame2
kind 1's second animation
s32 kind
0: file 0x88C (0x87B in the USA), 1: file 0x88D (0x87C)
s32 index
into the animation
Expands "RLEN" data (a run-length encoding: a byte n < 0x80 copies n bytes, n | 0x80 repeats the next...
An animation of an FieldEffect (FIELDSTG_stepEffectAnim)
An encounter of FIELDSTG_encounters, which FIELDSTG_startEncounter starts: its enemies and the bytes ...
u8 kind
copied to BATTLE_SETUP.encounterKind: 1 for nearly all the maps' random battles (some enemies' battle...
u8 blocks[12]
copied to BATTLE_SETUP.blocks
The children of an EventTask.
struct Speech * boxes[3]
the script's message boxes
s32 scripts[10]
FIELDSTG_createScriptCommand's tasks.
struct Task * task
start's
An event (FIELDSTG_runEvent, made by FIELDSTG_startEvent): it runs a script of 16-bit words,...
struct EventTask::@13 entries[30]
the characters, held while the event runs
s32 wait
frames left of a wait command
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 ...
The children of the field's main task (FieldTask, FIELDSTG_updateField)
struct Actor * actors[4]
the player and the partners
struct MapStreamer * mapStreamer
FIELDSTG_createMapStreamer's.
Task * fileLoader
FIELDSTG_createFileLoader's, as the field starts.
FieldMenu * menu
createFieldMenu's
struct Inn * inn
createInn's (FIELDSTG_openInn)
union FieldChildren::@14 awaited
the task the field waits for, until it ends
struct Triggers * triggers
FIELDSTG_createTriggers's.
Task * banner
FIELDSTG_createBanner's.
Task * stage
FieldState.stageInit's.
struct FieldEffect * effect
FIELDSTG_createEffect's.
struct CutsceneAnim * cutscene
FIELDSTG_createCutsceneAnim's.
struct Actor * npcs[15]
FieldState.actors's other characters.
struct MapObjects * mapObjects
FIELDSTG_createMapObjects's.
An effect of up to four animations at a spot (FIELDSTG_createEffect)
s16 set
the row of FIELDSTG_effectAnims
An event of the table FieldState.events, up to the first id -1, which FIELDSTG_startEvent starts.
The image of the field's effects (FieldState.images), then the actors' ActorImages.
The field's own image (FieldState.images) and its actors' after it.
The field's main task (FIELDSTG_updateField, FIELD_TASK_FIELD); its children follow.
s32 centerOnPlayer
the closing clip shrinks onto the player
s32 leaveDelay
the frames left before it closes the field
void * highBuffer
a buffer at the end of the heap
s32 nextMode
the mode it leaves for (FIELDSTG_leaveFieldAfter)
s32 width
of the clip rectangle
Vec2 warpPos
where the warp's effect plays
s32 fade
FIELDSTG_drawCover's level.
SlotDest * warp
where it leads
s32 warpKind
the effect and cutscene of a warp (FIELDSTG_startWarp)
s32 cursor
along the row, 0-GAUGE_CURSOR_MAX
s32 back
the cursor goes back
s32 row
of FIELDSTG_gaugeRows
A hidden spot: a map object with anim 0xFF.
s32 hasPrize
the one picked at random (GAME.prizeSpot)
s32 object
its index in FieldState.objects
The children of an HiddenSpots.
struct SpotEffect * effect
The map's hidden spots (FIELD_TASK_HIDDEN_SPOTS, FIELDSTG_createHiddenSpots): one of them,...
s32 forEvent
an event's search, without the prize or a hint
s32 selected
the spot searched
An offset of the icon from the player's tile along a climb over an edge (FIELDSTG_iconPath),...
The inn: pay INNS[inn].price per party member to restore HP, MP and status, with a fade to black and ...
Launches an actor, spinning, from the nearest launcher (FIELD_TASK_LAUNCHER) to a tile (FIELDSTG_crea...
SlotDest * dest
the tile it lands on
Task * from
the nearest FIELD_TASK_LAUNCHER
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
One of the 12 VRAM slots the map's tiles are loaded into (FIELDSTG_slotImages)
s32 time
when it was last drawn
s32 cover
the level of the cover over a new tile (8.8), 0 for none
s32 frame
the tile it holds, or -1
Animates and draws the map's objects (FIELDSTG_createMapObjects)
struct StageTile * objects
s32 sprites
their sprite file and entry
The task that streams the map's tiles from the CD around the view (FIELDSTG_runMapStreamer,...
s32 viewX
the tile column of the slots' left edge
s32 frameSectors
a tile's sectors on the CD
MapTile * tiles
width * height
s32 pad60
never read or written
MapFileHeader * header
the map file's, while it is read
s32 pad50
never read or written
s32 width
in 128-pixel tiles
s32 file
the map's tiles, read from the CD (FieldState.mapFile)
u8 viewTiles[30]
by the slots around the view, their tiles
A tile of the map that MapStreamer streams.
s32 size
its bytes on the CD, 0 for none
s32 sectors
what it reads (StreamTask.seek)
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
A story event (FIELDSTG_progressEvents): at a progress, while a flag is clear and a condition holds,...
s32 progress
-1 ends the list
Fades the whole screen to black and back with a subtractive rectangle.
An entry of the script command table FIELDSTG_scriptCommands (ids from 0x320)
s32(* create)(s32 id)
creates the command's task; FIELDSTG's own return nothing or a Lift, so the table casts them
void(* handle)()
(task, command, arg): each command's task has its own type
A wait timer for the scripts (FIELDSTG_waitScriptTime)
Where a slot leads: a StageSlot from its arg on, as the warps (FieldTask.warp) and the launches (Laun...
A message box, or a talk box that follows an actor (FIELDSTG_createSpeech, FIELDSTG_createTalk)
s32 isMessage
a message box
s32 type
the talk box's (createTalkBox), its corner
s32 entry
the text's entry
void * text
FILE_CACHE.getEntry's.
The effect of searching a hidden spot, in front of the actor that searches (FIELDSTG_createSpotEffect...
The hint of a hidden spot that held nothing (FIELDSTG_createSpotHint): its sprite and its palette cyc...
s32 speed
frames per palette step
An entry of the stage tables (FIELDSTG_pickStage): the stage overlay of a mode, up to the first mode ...
What the player can trigger on a map (FIELDSTG_updateTriggers): a record of the table at FieldState....
An object of a map, which FIELDSTG draws: a record of the table at FieldState.objects,...
A character that another answers for when the player talks to it (FIELDSTG_talkToActorAt,...
s16 answerer
the key1 of the actor that answers
The story events of the field (FIELDSTG_createStoryEvents)
s32 script
the script to run next, or 0
void * owner
the field's task, as a stage's init gets it
The StreamTasks of a task's children (FIELDSTG_requestTiles)
Decompressor * decompressor
A sprite of a StreamTask's frame.
A task that reads the frames of a file from the disc (FIELDSTG_createStream)
s32 * data
the decompressed tile: its sprites, then its image
s32(* getFrame)(struct StreamTask *task)
s32(* getSlot)(struct StreamTask *task)
void(* seek)(struct StreamTask *task, s32 frame, s32 size)
void(* setSource)(struct StreamTask *task, s32 slot, Decompressor *source)
void(* clearSlot)(struct StreamTask *task)
void(* updateTime)(struct StreamTask *task)
void(* draw)(struct StreamTask *task, Layer *layer, s32 x, s32 y)
StreamSprite sprites[3][5]
Decompressor * source
what it reads its sprites from (FIELDSTG_setStreamSource)
s32(* isLoaded)(struct StreamTask *task)
s32 loadedTime
when its read ended, 0 while reading
s32 loadedSlot
the slot its image is loaded into, or -1
Any task, seen through its header.
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
A step of FIELDSTG_playBattleTransition's spiral: one coordinate of a tile moves by dir until it pass...
s32 dir
1, -1, or 0 at the end
The children of an Triggers.
The map's triggers (FIELDSTG_createTriggers): on a trigger's cell (layer 7: index and direction) the ...
s32 dir
the trigger's direction
s32 sheetEntry
the stage's sprite sheet (FieldState.sheetEntry); nothing reads it
StageSlot * entries
FieldState.slots.
s32 index
the trigger under it