Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
field_mode.h File Reference

FIELDSTG.PRO: the field mode, where the player walks around the map. More...

#include "engine/game.h"
#include "field/field_map.h"
Include dependency graph for field_mode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TrailStep
 
struct  Trail
 
struct  ActorChildren
 The children of an actor (FIELDSTG_updateActor) More...
 
struct  IconOffset
 An offset of the icon from the player's tile along a climb over an edge (FIELDSTG_iconPath), x away from the climb's side. More...
 
struct  ActorIcon
 The player's icon (FIELD_TASK_ICON, FIELDSTG_createActorIcon): the field commands FIELD_COMMAND_ICON1 to 3 and a special condition set its substate, the animation it plays. More...
 
struct  Balloon
 A balloon over an actor's head (FIELDSTG_createBalloon): it pops up, plays its FIELDSTG_triggerAnims row (key2) and pops down when closed. More...
 
struct  StandIn
 A character that another answers for when the player talks to it (FIELDSTG_talkToActorAt, FIELDSTG_standIns) More...
 
struct  Speech
 A message box, or a talk box that follows an actor (FIELDSTG_createSpeech, FIELDSTG_createTalk) More...
 
struct  Launch
 Launches an actor, spinning, from the nearest launcher (FIELD_TASK_LAUNCHER) to a tile (FIELDSTG_createLaunch, Actor.launch) More...
 
struct  GaugeGame
 
struct  Camera
 The camera (FIELD_TASK_CAMERA, FIELDSTG_createCamera): it centers the field's layer on an actor or a spot, panning there unless it snaps, and shakes. More...
 
struct  EventTask
 An event (FIELDSTG_runEvent, made by FIELDSTG_startEvent): it runs a script of 16-bit words, each command a word of its kind << 8 | its variant followed by its arguments, until a command waits; or, without a script, a task of its own (start) until it ends. More...
 
struct  EventChildren
 The children of an EventTask. More...
 
struct  ScriptCommand
 An entry of the script command table FIELDSTG_scriptCommands (ids from 0x320) More...
 
struct  ScriptTimer
 A wait timer for the scripts (FIELDSTG_waitScriptTime) More...
 
struct  StoryEvents
 The story events of the field (FIELDSTG_createStoryEvents) More...
 
struct  StoryEventsChildren
 
struct  ProgressEvent
 A story event (FIELDSTG_progressEvents): at a progress, while a flag is clear and a condition holds, a script runs, and then another one. More...
 
struct  ChoiceTask
 A yes/no question of the story (FIELDSTG_runChoice); its children are a ChoiceChildren (field_map.h) More...
 
struct  ChoiceText
 A question of a ChoiceTask. More...
 
struct  CutsceneAnim
 A cutscene's animation over the field (FIELDSTG_createCutsceneAnim) More...
 
struct  EffectAnim
 An animation of an FieldEffect (FIELDSTG_stepEffectAnim) More...
 
struct  FieldEffect
 An effect of up to four animations at a spot (FIELDSTG_createEffect) More...
 
struct  Box
 A rectangle, edges included. More...
 
struct  StreamSprite
 A sprite of a StreamTask's frame. More...
 
struct  StreamTask
 A task that reads the frames of a file from the disc (FIELDSTG_createStream) More...
 
struct  StreamPool
 The StreamTasks of a task's children (FIELDSTG_requestTiles) More...
 
struct  MapFileHeader
 The first sector of a map's tile file (MapStreamer.header) More...
 
struct  MapTile
 A tile of the map that MapStreamer streams. More...
 
struct  MapImage
 One of the 12 VRAM slots the map's tiles are loaded into (FIELDSTG_slotImages) More...
 
struct  MapStreamer
 The task that streams the map's tiles from the CD around the view (FIELDSTG_runMapStreamer, id 4, created by FIELDSTG_createMapStreamer) More...
 
struct  MapObjects
 Animates and draws the map's objects (FIELDSTG_createMapObjects) More...
 
struct  Triggers
 The map's triggers (FIELDSTG_createTriggers): on a trigger's cell (layer 7: index and direction) the player sets it off at once or, with a balloon, on the action button. More...
 
struct  TriggerChildren
 The children of an Triggers. More...
 
struct  SpotHint
 The hint of a hidden spot that held nothing (FIELDSTG_createSpotHint): its sprite and its palette cycle tell how far the prize is. More...
 
struct  HiddenSpot
 A hidden spot: a map object with anim 0xFF. More...
 
struct  HiddenSpots
 The map's hidden spots (FIELD_TASK_HIDDEN_SPOTS, FIELDSTG_createHiddenSpots): one of them, picked at random, holds the prize. More...
 
struct  HiddenSpotsChildren
 The children of an HiddenSpots. More...
 
struct  SpotEffect
 The effect of searching a hidden spot, in front of the actor that searches (FIELDSTG_createSpotEffect) More...
 
struct  AreaName
 The name of a mode's area (FIELDSTG_showAreaName), up to the first mode 0: the strings of the two windows, from text files 0xAA and 0xB8. More...
 
struct  AreaNameWindows
 The windows of FIELDSTG_showAreaName. More...
 
struct  BannerBox
 A rectangle of an AreaBanner, which can stretch to a new range. More...
 
struct  AreaBanner
 The area name banner (FIELD_TASK_BANNER, FIELDSTG_createBanner) More...
 
struct  StageEntry
 An entry of the stage tables (FIELDSTG_pickStage): the stage overlay of a mode, up to the first mode 0. More...
 
struct  TileMove
 A step of FIELDSTG_playBattleTransition's spiral: one coordinate of a tile moves by dir until it passes limit. More...
 
struct  FieldImages
 The field's own image (FieldState.images) and its actors' after it. More...
 
struct  FieldTask
 The field's main task (FIELDSTG_updateField, FIELD_TASK_FIELD); its children follow. More...
 
struct  FieldChildren
 The children of the field's main task (FieldTask, FIELDSTG_updateField) More...
 
struct  Encounter
 An encounter of FIELDSTG_encounters, which FIELDSTG_startEncounter starts: its enemies and the bytes it copies to BATTLE_SETUP.ambushChance on. More...
 

Macros

#define OVL_NAME(name)   FIELDSTG_##name
 Names the functions of the src/shared files it shares.
 
#define FIELD_SPRITES_X   0x200
 Where the field keeps its textures in VRAM: the two images of FIELD_SPRITES_FILE (its entries 2 and 3, for the sprite sheets of its entries 0 and 1), the stage's map objects (FIELDSTG_loadFieldFiles) and a cutscene's frames (FIELDSTG_playCutsceneAnim)
 
#define FIELD_SPRITES2_X   0x240
 
#define FIELD_SPRITES_Y   0x100
 
#define FIELD_OBJECTS_X   0x140
 
#define FIELD_OBJECTS_Y   0x100
 
#define FIELD_OBJECTS_CLUT_Y   0x1F0
 
#define FIELD_CUTSCENE_X   0x280
 
#define FIELD_CUTSCENE_CLUT_Y   0xF0
 
#define FIELD_MENU_SPRITES_X   0x140
 the executable's FILE_MENU_SPRITES
 
#define SOUND_DIG_DEMO   0x40003
 The sounds only FIELDSTG plays (SOUND.playSound), by their SOUNDTST names.
 
#define SOUND_DIGIMENT   0x40004
 a warp's effect
 
#define SOUND_ENCOUNTS   0x40005
 the transition to a battle
 
#define SOUND_FUKIDASH   0x40007
 a balloon
 
#define SOUND_ITEM_GET   0x40009
 
#define SOUND_PIYOPIYO   0x40013
 
#define SOUND_SAVEDEMO   0x40015
 
#define SOUND_SUB_DEMO   0x40018
 
#define SOUND_BULB_003   0x440001
 
#define SOUND_TRAP_OFF   0x700001
 
#define SOUND_INFO_SIG   0xB80001
 
#define SOUND_BM_ERASE   0x1100000
 
#define SOUND_LD_ERASE   0x1100002
 
#define SOUND_DEMO_BGM   0x60040002
 
#define SOUND_COMCD111   0x80042DC7
 
#define SOUND_COMCD201   0x800430BD
 
#define SOUND_PLAYER00   0x8004583C
 
#define SOUND_PLAYER01   0x800458BD
 
#define SOUND_PLAYER02   0x8004593E
 
#define SOUND_PLAYER08   0x80045C44
 
#define SOUND_PLAYER09   0x80045CC5
 
#define SOUND_PLAYER10   0x80045D46
 
#define SOUND_TRESUREB   0x80045DC7
 
#define SOUND_DIG_MOVE   0x80045FCB
 
#define SOUND_MASK_SET   0x803C503C
 
#define SOUND_BEAM_SHT   0x805458BD
 
#define SOUND_WEAR_OFF   0x80E8383C
 
#define SOUND_SN_ENTRY   0x8110303C
 
#define SOUND_SN_ERASE   0x81103240
 
#define SOUND_COMCD203   0xA00431BF
 held while the camera shakes
 
#define SOUND_SUB_MOVE   0xA0045F4A
 held
 
#define SOUND_BEAM_HIT   0xA054583C
 held
 
#define SOUND_TRAP_ICE   0xA064683C
 held
 
#define SOUND_GAYALOOP   0xA10C703C
 held
 
#define ACTOR_ANIM_STAND   1
 The animation sets that the actions play (FIELDSTG_setActorAnim), by the substate that plays them.
 
#define ACTOR_ANIM_WALK   4
 
#define ACTOR_ANIM_RUN   5
 
#define ACTOR_ANIM_STOP   6
 
#define ACTOR_ANIM_SEARCH   8
 
#define ACTOR_ANIM_GAUGE_START   0x11
 
#define ACTOR_ANIM_GAUGE_RESULT   0x12
 after the game, with a balloon
 
#define ACTOR_ANIM_GAUGE_PLAY   0x13
 with PLAYER09
 
#define ACTOR_ANIM_GAUGE_WAIT   0x14
 with PLAYER10, until the game ends
 
#define ACTOR_ANIM_GAUGE_END   0x15
 
#define ACTOR_ANIM_DROP_OFF   0x16
 
#define ACTOR_ANIM_FALL   0x17
 
#define ACTOR_ANIM_FALL_FAR   0x18
 once the fall is more than 0x1800
 
#define ACTOR_ANIM_LAND   0x19
 
#define ACTOR_ANIM_CLIMB_UP   0x1A
 
#define ACTOR_ANIM_CLIMB_DOWN   0x1B
 
#define ACTOR_ANIM_GET_ON_WALL   0x1C
 
#define ACTOR_ANIM_CLIMB_OFF_TOP   0x1D
 
#define ACTOR_ANIM_GET_OVER_EDGE   0x1E
 
#define ACTOR_ANIM_CLIMB_OFF_BOTTOM   0x1F
 
#define ACTOR_ANIM_CLIMB   0x20
 
#define ACTOR_ANIM_OPEN   0x41
 a treasure's, when it is talked to
 
#define ACTOR_ANIM_USE   0x45
 
#define ACTOR_ANIM_USED   0x54
 the object's
 
#define FLIGHT_OPEN   1
 Flight (FIELDSTG_controlFlight, FIELDSTG_checkFlightProbe): an actor's z against the floor map's cells.
 
#define FLIGHT_WALL(n)   (n)
 
#define FLIGHT_CEILING(n)   (24 - (n))
 
#define FLIGHT_LEVEL(n)   ((n) << 12)
 n * 16 pixels, in z's 1/256 pixels
 
#define FLIGHT_LANDING   0xC
 how far above a wall's top a descent stops
 
#define FLIGHT_Z_MIN   0x1800
 
#define FLIGHT_Z_MAX   0x7000
 
#define FLIGHT_SPEED_MAX   0x200
 
#define FLIGHT_SPEED_MAX_PAL   0x266
 FLIGHT_SPEED_MAX * 6 / 5, for 50 frames a second.
 
#define TRAIL_STEPS   64
 The last TRAIL_STEPS steps of the actor that another one follows (Actor.trail), a ring from tail to head.
 
#define GAUGE_ROWS   8
 A gauge game (FIELDSTG_createGauge, FIELDSTG_runGauge)
 
#define GAUGE_EMPTY_ROW   8
 the European version's, all zeros
 
#define GAUGE_CURSOR_MAX   0x3000
 the row's 48 pixels, in 1/256 pixels
 
#define GAUGE_START_DELAY   0x5A
 frames before the cursor runs
 
#define GAUGE_RESULT_DELAY   0x3C
 frames on the stopped cursor
 
#define GAUGE_X   0x18
 where it is drawn, on the screen
 
#define GAUGE_Y   0xC0
 
#define GAUGE_FRAME   0x3C
 its sprites, of FIELD_SPRITES_FILE's sheet 1
 
#define GAUGE_CURSOR_FRAME   0x3D
 
#define GAUGE_ROW_FRAMES   0x3E
 
#define GAUGE_RUNNING   0
 The steps of a running gauge.
 
#define GAUGE_STOPPING   1
 
#define GAUGE_STOPPING_SLOWLY   2
 one time in four
 
#define GAUGE_STOPPED   3
 
#define FIELD_ANIM_FILE   0x88C
 The two animations of FIELDSTG_playCutsceneAnim, kind 0's file and kind 1's after it: the discs number their files differently.
 
#define FIELD_SPRITES_FILE   0x160
 The field's effect sprites (FIELDSTG_drawSpotEffect): the discs number their files differently.
 
#define FIELD_ACTION_FILES   0x3C9
 The files of the player's actions, which FIELDSTG_requestSlotFiles loads when the map has slots for them: the discs number their files differently.
 
#define FIELD_DROP_FILE   FIELD_ACTION_FILES
 
#define FIELD_GAUGE_FILE   (FIELD_ACTION_FILES + 1)
 
#define FIELD_SEARCH_FILE   (FIELD_ACTION_FILES + 2)
 the hidden spots'
 
#define FIELD_CLIMB_FILE   (FIELD_ACTION_FILES + 3)
 
#define FIELD_FLAG_TALK_AHEAD   0x12
 The player's FLAGS_00 codes (FIELDSTG_controlPlayer)
 
#define FIELD_SEARCH_ITEM   ITEM(0, 4)
 item 4, which the player needs to search the hidden spots
 
#define FIELD_VISITED_FLAG(mode)   (0x2000 + (mode) - 0x200)
 The flag set when the field of a mode is entered: FLAGS_00's group 0x20, flag mode - 0x200.
 
#define FIELD_MODE_WSTAG415   0x22D
 The modes of two fields that keep the file cache (FIELDSTG_keepsFileCache)
 
#define FIELD_MODE_WSTAG815   0x2DE
 
#define FIELD_PRIZE_FIGHTERS   0x1C9
 The fighters whose battles always give an item (FIELDSTG_startEncounter)
 
#define FIELD_PRIZE_FIGHTER_COUNT   8
 
#define TRANSITION_COLUMNS   5
 FIELDSTG_playBattleTransition's tiles: a copy of the screen at TRANSITION_IMAGE_X in VRAM, cut into columns and rows.
 
#define TRANSITION_ROWS   6
 
#define TRANSITION_TILE_WIDTH   (SCREEN_WIDTH / TRANSITION_COLUMNS)
 
#define TRANSITION_TILE_HEIGHT   (SCREEN_HEIGHT / TRANSITION_ROWS)
 
#define TRANSITION_IMAGE_X   0x280
 
#define TRANSITION_SPEED   40
 pixels a frame
 
#define TRANSITION_GONE   0x200
 a tile's coordinate once it has slid off
 
#define TRANSITION_WAIT   0x10
 the steps after the last tile, before the mode
 
#define TRANSITION_DONE   0x1000
 the step once the mode is requested
 

Functions

void FIELDSTG_updateCommandTask (Task *task)
 commands.c
 
void FIELDSTG_handleFieldCommand (Task *task, s32 command)
 Runs a field command (FIELD_COMMAND_*) of an event script: halts the partners through the command task, sets the player icon's substate, hides or shows a group of map objects, shakes the camera, searches the event spot, or plays a sound; four sounds are held, to be keyed off by a later command.
 
void FIELDSTG_startCommandTask (void)
 Creates the task of script command 813 (the create of FIELDSTG_scriptCommands)
 
void FIELDSTG_updateLift (Lift *task)
 lift.c
 
void FIELDSTG_moveLift (Lift *task, s32 command)
 Runs a script command of the lift's: moves it up or down.
 
Lift * FIELDSTG_createLift (s32 id)
 Creates the lift, raised when flag 0x1C3D is set.
 
void FIELDSTG_runChoice (ChoiceTask *task, ChoiceChildren *children)
 choice.c
 
void * FIELDSTG_askChoice0 (void)
 
void * FIELDSTG_askChoice1 (void)
 
void * FIELDSTG_askChoice2 (void)
 
void * FIELDSTG_askChoice3 (void)
 
void * FIELDSTG_askChoice4 (void)
 
void * FIELDSTG_askChoice5 (void)
 
void * FIELDSTG_askChoice6 (void)
 
void * FIELDSTG_askChoice7 (void)
 
void * FIELDSTG_askChoice8 (void)
 
void * FIELDSTG_askChoice9 (void)
 
void * FIELDSTG_askChoice10 (void)
 
void * FIELDSTG_askChoice11 (void)
 
void * FIELDSTG_askChoice12 (void)
 
void * FIELDSTG_askChoice13 (void)
 
void * FIELDSTG_askChoice14 (void)
 
void * FIELDSTG_askChoice15 (void)
 
void FIELDSTG_runStoryEvents (StoryEvents *task, StoryEventsChildren *children)
 story.c
 
StoryEvents * FIELDSTG_createStoryEvents (void *owner)
 Creates the story events, and loads the field's sound bank and files.
 
Actor * FIELDSTG_findEventActor (EventTask *task, s32 id)
 event.c
 
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 (SCRIPT_COMMAND), creates the command's task if needed and hands it the other two words, a command and its argument.
 
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 holds the characters; in TASK_RUN it runs the script until a command waits (kind 0 ends it, 1 moves or turns a character, 2 opens a message box, 3 waits, 6 runs FIELDSTG_followWithCamera or FIELDSTG_pointCamera), or without a script runs start's task until it ends; TASK_KILL releases the characters and calls end.
 
void FIELDSTG_playCutsceneAnim (CutsceneAnim *task)
 cutscene.c
 
CutsceneAnim * FIELDSTG_createCutsceneAnim (s32 kind)
 Creates a cutscene animation of a kind.
 
s32 FIELDSTG_stepEffectAnim (EffectAnim *anim, AnimFrame *frames, s32 depth)
 effect.c
 
void FIELDSTG_updateEffect (FieldEffect *task)
 An effect's update: draws its animations at its spot until they end.
 
FieldEffect * FIELDSTG_createEffect (s32 x, s32 y, s32 set)
 Creates the effect of a set at (x, y)
 
StreamTask * FIELDSTG_findOldestStream (StreamPool *pool)
 map_streamer.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 stream task has loaded is done, and each tile still waiting goes to the oldest task (FIELDSTG_findOldestStream), until the reader is busy.
 
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)
 
StreamTask * FIELDSTG_findStream (StreamPool *pool, s32 frame)
 The stream task that holds a frame (a tile of the map), or NULL.
 
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 is free, gives the first loaded tile without an entry the oldest of the 12.
 
void FIELDSTG_pickViewTiles (MapStreamer *task)
 Points the slots around the view at the map's tiles: viewTiles gets, for each of the 30 slots, the index of the tile it shows (0xFF off the map), and viewX/viewY the tile of the slots' top left corner.
 
void FIELDSTG_runMapStreamer (MapStreamer *task, StreamPool *pool)
 The map streamer's update: reads the map's header and creates the 30 stream tasks, then each frame points the slots at the tiles in view, draws them and streams the missing ones.
 
Vec2 * FIELDSTG_getMapSize (MapStreamer *task)
 The map's size in pixels.
 
MapStreamer * FIELDSTG_createMapStreamer (s32 file)
 Creates the map streamer of a file.
 
void FIELDSTG_drawCover (s32 id, s32 level)
 Covers the screen on the layer id at a shade of level (8.8)
 
void FIELDSTG_touchStream (StreamTask *task)
 stream.c
 
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_isStreamLoaded (StreamTask *task)
 Whether a stream task's read is done.
 
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_setStreamSource (StreamTask *task, s32 slot, Decompressor *source)
 Decompresses a stream task's tile into slot.
 
void FIELDSTG_loadStreamSprites (StreamTask *task)
 Takes a decompressed tile's sprites and loads its image into its slot's VRAM.
 
void FIELDSTG_clearStreamSlot (StreamTask *task)
 Forgets a stream task's slot.
 
s32 FIELDSTG_getStreamSlot (StreamTask *task)
 A stream task's slot, or -1.
 
s32 FIELDSTG_getStreamFrame (StreamTask *task)
 A stream task's frame, the tile it holds.
 
void FIELDSTG_updateStream (StreamTask *task)
 A stream task's update: takes its tile once decompressed, and notes when its read ends.
 
StreamTask * FIELDSTG_createStream (s32 size, s32 file)
 Creates a stream task of a file, with a buffer of size.
 
void FIELDSTG_updateRoot (Task *task, Task **children)
 start.c
 
void FIELDSTG_showAreaName (AreaBanner *task, AreaNameWindows *windows)
 banner.c
 
void FIELDSTG_stretchBannerBox (AreaBanner *task, BannerBox *box)
 Stretches a box toward from-to along one axis.
 
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.
 
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 area and place windows (FIELDSTG_showAreaName); in TASK_RUN the boxes appear and stretch in turn until both windows have finished; in TASK_DONE it closes the layer's clip from the top and the bottom.
 
Task * FIELDSTG_createBanner (s32 show)
 Creates the area name banner, which closes at once unless show; the player is frozen until it ends.
 
s32 FIELDSTG_stepBalloonAnim (Balloon *task)
 balloon.c
 
void FIELDSTG_drawBalloon (Balloon *task)
 Draws a balloon over its actor: its frame, and once open, its animation.
 
void FIELDSTG_updateBalloon (Balloon *task)
 A balloon's update: it pops open over the player (or another actor), stays while the trigger is on offer and pops shut in TASK_DONE.
 
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_createPlayerBalloon (s32 id)
 The balloon over the player: script commands 803 to 806 (FIELDSTG_scriptCommands)
 
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, 0x326 pops it shut.
 
s32 FIELDSTG_findTrigger (Triggers *task)
 trigger.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 and returns 1; returns 0 when its conditions don't hold.
 
void FIELDSTG_setOffTrigger (Triggers *task)
 Sets off the slot the player pressed cross on.
 
void FIELDSTG_updateTriggers (Triggers *task, TriggerChildren *children)
 The triggers' update: offers the slot under the player while the field isn't busy, and sets it off on cross.
 
Triggers * FIELDSTG_createTriggers (s32 sheetEntry, StageSlot *slots)
 Creates the triggers.
 
void FIELDSTG_getSpeechPos (Speech *task, Vec2 *out)
 speech.c
 
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, and ends with it.
 
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.
 
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 the edges.
 
void FIELDSTG_drawMapObject (MapObjects *task, Layer *layer, s32 index)
 map_objects.c
 
void FIELDSTG_updateMapObjects (MapObjects *task, HiddenSpots **children)
 Animates and draws the map's objects that are in view.
 
MapObjects * FIELDSTG_createMapObjects (s32 sprites, StageTile *objects)
 Creates the map's objects, with their sprites.
 
void FIELDSTG_requestInnNames (Task *task)
 file_loader.c
 
void FIELDSTG_requestSlotFiles (Task *task)
 Requests the files of the actions the map's slots offer: climbs, drops and the gauge game.
 
s32 FIELDSTG_loadFieldFiles (Task *task)
 Loads the field's files, a step at a time: 1 once done.
 
void FIELDSTG_runFileLoader (Task *task)
 The file loader's update: loads the field's files from its first step on (FIELDSTG_loadFieldFiles)
 
Task * FIELDSTG_createFileLoader (s32 step)
 Creates the file loader, which starts at a step.
 
void FIELDSTG_updateActorIcon (ActorIcon *task)
 actor_icon.c
 
ActorIcon * FIELDSTG_createActorIcon (Actor *actor)
 Creates the player's icon, in the modes before MODE_NEW_GAME only.
 
void FIELDSTG_playBattleTransition (FieldTask *task, FieldChildren *children)
 field.c
 
void FIELDSTG_closeField (FieldTask *task, FieldChildren *children)
 Closes the field for the next mode: the view shrinks to nothing, the cover fades in, and the mode is requested with where the player stands.
 
s32 FIELDSTG_keepsFileCache (void)
 Whether the mode is FIELD_MODE_WSTAG415 or FIELD_MODE_WSTAG815, whose field keeps the file cache and doesn't take the high buffer.
 
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 opens its menu.
 
Task * FIELDSTG_createField (void)
 Creates the field's main task.
 
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, which closes the field (FIELDSTG_closeField) and requests the mode with its argument.
 
void FIELDSTG_startEncounter (s32 encounter)
 Starts encounter FIELDSTG_encounters[encounter]: the field task (FIELD_TASK_FIELD) leaves for the battle (MODE_BATTLE, after a movie in the chapter STORY_MOVIE_BATTLES), and BATTLE_SETUP takes the encounter's enemies and bytes.
 
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 warp's mode.
 
s32 FIELDSTG_scaleSin (s32 angle, s32 radius)
 launch.c
 
void FIELDSTG_runLaunch (Launch *task)
 Sends an actor from the nearest FIELD_TASK_LAUNCHER (y counts twice in the distance) to its dest tile: the actor walks to the task, sets it to TASK_DONE, waits for it to leave that state, then moves along a quarter sine, spinning, until it lands; without such a task it ends at once.
 
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.
 
void FIELDSTG_showSpotHint (SpotHint *task)
 hidden_spots.c
 
SpotHint * FIELDSTG_createSpotHint (Vec2 from, Vec2 to)
 Creates the hint for a search at to, from the prize at from.
 
void FIELDSTG_hidePrize (HiddenSpots *task)
 Hides the prize in one of the hidden spots at random (GAME.prizeSpot keeps it)
 
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 hides it again) or shows a hint, and animates the searched spot's object.
 
HiddenSpots * FIELDSTG_createHiddenSpots (s32 count)
 Creates the hidden spots, the map objects of animation 0xFF, and hides the prize in one (or where it was, in the same mode)
 
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_searchEventSpot (void)
 Searches the hidden spots off the map (x 1000 and up), for an event.
 
void FIELDSTG_drawSpotEffect (SpotEffect *task, Layer *layer)
 The layer's sorted callback that draws a search's effect.
 
void FIELDSTG_updateSpotEffect (SpotEffect *task)
 A search's effect, over the player or, for an event, its actor 0x11B.
 
SpotEffect * FIELDSTG_createSpotEffect (s32 forEvent)
 Creates a search's effect, over the event's actor 0x11B if forEvent, else over the player.
 
void FIELDSTG_runGauge (GaugeGame *task)
 gauge.c
 
GaugeGame * FIELDSTG_createGauge (Vec2 pos)
 Creates the gauge game at a tile.
 
void FIELDSTG_scrollCamera (Camera *task)
 camera.c
 
void FIELDSTG_updateCamera (Camera *task)
 The camera's update: it follows its target actor (substate 0) or looks at a spot (1), panning there unless it snaps.
 
Camera * FIELDSTG_createCamera (void)
 Creates the camera.
 
void FIELDSTG_followWithCamera (s32 snap, s32 id)
 Points the camera at the actor id, at once if snap.
 
void FIELDSTG_pointCamera (s32 snap, s32 x, s32 y)
 Points the camera at the spot (x, y), at once if snap.
 
void FIELDSTG_shakeCamera (s32 shaking)
 Starts or stops the camera's shake.
 
s32 FIELDSTG_checkFlightProbe (Actor *actor, s32 x, s32 y, Vec2 offset)
 actor_control.c
 
s32 FIELDSTG_checkFlightProbes (Actor *actor)
 Whether a flying actor runs into the map at any of the five probes ahead of it (FIELDSTG_checkFlightProbe)
 
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), or stops it when none is held.
 
Actor * FIELDSTG_findActorAt (Vec2 *pos)
 The first actor (task id 5) whose box holds the tile pos: halfWidth to each side of it, half that above and below.
 
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 answers (ACTOR_TALK), or, for the objects 0x148, 0x15F and 0x160, the player works it (ACTOR_USE).
 
void FIELDSTG_controlFlight (Actor *actor)
 The player's flight: it rises unless triangle is held (ACTOR_FLY), left and right turn, and cross, low enough, acts on what the player faces; the map's cells hold floors (2 to 6) and ceilings (18 to 22).
 
void FIELDSTG_controlPlayer (Actor *actor)
 The player's update while it walks (Actor.control) when no menu, event or transition is running: the action button or a forced action (condition 0x12) checks the tile it faces, for an object to act on or, failing that, an event; otherwise the pad moves it.
 
void FIELDSTG_controlClimb (Actor *actor)
 The player's control on a wall: up and down climb, nothing held holds on.
 
void FIELDSTG_followLeader (Actor *actor)
 A partner's control: records the leader's steps in the trail while it moves, and follows them.
 
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, then each frame pushes two empty steps at the trail's head and walks two steps from its tail.
 
void FIELDSTG_walkToGoal (Actor *actor)
 Walks an actor to its goal tile (FIELDSTG_setActorGoal) as the pad would, then faces it the goal's way.
 
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)
 
s32 FIELDSTG_isActorWalking (Actor *actor)
 Whether an actor is still walking to its goal.
 
void FIELDSTG_startActorWalk (Actor *actor)
 Starts an actor walking to its goal.
 
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 partners.
 
void FIELDSTG_walkActorInDir (Actor *actor, s32 dir)
 Walks an actor out through an exit, in a direction (ACTOR_WALK_OUT)
 
void FIELDSTG_startActorSlide (Actor *actor, s32 dir)
 Starts an actor sliding in a direction (SLOT_SLIDE)
 
void FIELDSTG_stopActorSlide (Actor *actor)
 Stops a sliding actor (SLOT_STOP_SLIDE)
 
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 at its foot (ACTOR_GET_ON_WALL) or its top (ACTOR_GET_OVER_EDGE), climbs it with the pad (FIELDSTG_controlClimb) and leaves it at the top or the foot; a drop (ACTOR_DROP) falls from height.
 
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_startDrop (Actor *actor, s32 dir, Vec2 pos, s32 height)
 Starts a drop from a ledge of height.
 
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_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 kind, then leaves for its mode (FIELDSTG_startWarp)
 
void FIELDSTG_launchActor (Actor *actor, SlotDest *dest)
 Sends the player flying to the tile at dest from the nearest launcher (FIELDSTG_createLaunch)
 
void FIELDSTG_setActorAnim (Actor *actor, s32 set)
 Starts an actor's animation set from its first frame.
 
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)
 
s32 FIELDSTG_isActorAnimDone (Actor *actor)
 Whether an actor's animation has played to its end.
 
void FIELDSTG_drawActor (void *data, void *drawLayer)
 (actor, layer)
 
void FIELDSTG_setActorDir (Actor *actor, s32 dir)
 Turns an actor to a direction.
 
void FIELDSTG_animateActor (Actor *actor)
 Plays an actor's animation: when its set (animSet) changes, it loads the set's animations for the five directions (character 2 picks the file by the set first), then steps the frames of the current direction's and loads a new frame's image into VRAM.
 
void FIELDSTG_restorePlayerControl (Actor *actor)
 Gives the player its pad control back, off any wall.
 
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 32 when not; with canBattle each step can start a battle (FIELDSTG_checkBattle)
 
void FIELDSTG_playClimbSounds (Actor *actor)
 The player's climbing sound, every 16 frames.
 
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_GET_OVER_EDGE to ACTOR_DROP (which shift it by a tile, left or right by climbSide), the talk of ACTOR_TALK (the first of the character's talks whose conditions hold) and the others up to ACTOR_STOP_SLIDE.
 
void FIELDSTG_haltPartners (void)
 actor.c
 
void FIELDSTG_resumePartners (void)
 Makes the partners follow the player again (FIELDSTG_followLeader)
 
void FIELDSTG_getFacingTile (Actor *actor, Vec2 *out)
 The tile in front of an actor, one step in its direction.
 
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 control and its action, moves its tile and draws it sorted by y; in TASK_KILL, frees its trail.
 
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, 2 to 8 a follower, the others the map's characters).
 
void FIELDSTG_endChoice0Answer0 (void)
 field_stage.c
 
void FIELDSTG_endChoice0Answer1 (void)
 
void FIELDSTG_endChoice1Answer0 (void)
 
void FIELDSTG_endChoice1Answer1 (void)
 
void FIELDSTG_endChoice2Answer0 (void)
 
void FIELDSTG_endChoice2Answer1 (void)
 
void FIELDSTG_endChoice3Answer0 (void)
 
void FIELDSTG_endChoice3Answer1 (void)
 
void FIELDSTG_endChoice4Answer0 (void)
 
void FIELDSTG_endChoice4Answer1 (void)
 
void FIELDSTG_endChoice5Answer0 (void)
 
void FIELDSTG_endChoice5Answer1 (void)
 
void FIELDSTG_endChoice6Answer0 (void)
 
void FIELDSTG_endChoice6Answer1 (void)
 
void FIELDSTG_endChoice7Answer0 (void)
 
void FIELDSTG_endChoice7Answer1 (void)
 
void FIELDSTG_endChoice8Answer0 (void)
 
void FIELDSTG_endChoice8Answer1 (void)
 
void FIELDSTG_endChoice9Answer0 (void)
 
void FIELDSTG_endChoice9Answer1 (void)
 
void FIELDSTG_endChoice10Answer0 (void)
 
void FIELDSTG_endChoice10Answer1 (void)
 
void FIELDSTG_endChoice11Answer0 (void)
 
void FIELDSTG_endChoice11Answer1 (void)
 
void FIELDSTG_endChoice12Answer0 (void)
 
void FIELDSTG_endChoice12Answer1 (void)
 
void FIELDSTG_endChoice13Answer0 (void)
 
void FIELDSTG_endChoice13Answer1 (void)
 
void FIELDSTG_endChoice14Answer0 (void)
 
void FIELDSTG_endChoice14Answer1 (void)
 
void FIELDSTG_endChoice15Answer0 (void)
 
void FIELDSTG_endChoice15Answer1 (void)
 
void FIELDSTG_setupField (void)
 The setup of the field's own stage (FIELDSTG_initFuncs), which fills FIELDSTG_state as the stage overlays' setup functions do; some points of the story change its soundBank and music.
 
void FIELDSTG_startTween (PanelAnim *tween, s32 in)
 tween.c
 
s32 FIELDSTG_updateTween (PanelAnim *tween)
 
s32 FIELDSTG_getFileEntry (s32 index)
 state.c
 
s32 FIELDSTG_getActorWidth (s32 index)
 The width of character index.
 
void FIELDSTG_pickStage (void)
 Picks the stage overlay of the mode (FIELDSTG_stages, in the European version's extra chapter FIELDSTG_extraStages and then those): its file and its setup; hangs if there is none.
 
FieldBattles * FIELDSTG_findBattles (FieldBattles *list, s32 id)
 The battles of the place id in a stage's list, or NULL.
 
void FIELDSTG_resetScriptTimer (void)
 script.c
 
Actor * FIELDSTG_findActor (s32 character)
 The actor of a character (Actor.key1), or NULL.
 
void FIELDSTG_waitScriptTime (s32 time, s32 *pc)
 A script's wait: counts time down, then moves the script on.
 
void FIELDSTG_waitAnimDone (s32 id, s32 *pc)
 A script's wait for the animation of the actor id to end.
 
void FIELDSTG_waitWalkDone (s32 id, s32 *pc)
 A script's wait for the actor id to reach its goal.
 
void FIELDSTG_toScreenPos (Vec2 *pos)
 Turns a map position into a screen one.
 
void FIELDSTG_clearScriptFlag (void)
 A script helper: clears the script flag of character 1, or else of character 2.
 
ScriptCommand * FIELDSTG_findScriptCommand (s32 id)
 The script command id of FIELDSTG_scriptCommands, or NULL.
 
s32 FIELDSTG_createScriptCommand (s32 id)
 Creates the task of script command id, or returns 0.
 
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.
 
void FIELDSTG_rollBattleSteps (void)
 battle.c
 
void FIELDSTG_startAreaBattle (void)
 Starts one of the eight battles of the player's battle area, at random.
 
void FIELDSTG_countBattleSteps (void)
 Counts down to the next battle at each step by the area's rate (FIELDSTG_battleRates), unless the field is busy, and starts it when they run out.
 
void FIELDSTG_startEventBattle (s32 index)
 Starts battle index of the fourth area, the one events start.
 
s32 FIELDSTG_selectMap (s32 index)
 map.c
 
void FIELDSTG_setMapFile (s32 index, s32 value)
 Sets the file of map index (FieldMap.setFile)
 
void FIELDSTG_setFirstMap (s32 index)
 Puts the player on map index when the mode is new (FieldMap.setFirstMap)
 
void FIELDSTG_setMap (s32 index)
 Puts the player on map index (FieldMap.setMap)
 
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 a file.
 
s32 FIELDSTG_isTileFree (Vec2 *pos)
 Whether nothing stands at pos: no character's box (gathered once a frame) and no object.
 
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.getWalkStep)
 
void FIELDSTG_getFlyStep (Vec2 *pos, s32 scale, s32 index, Vec2 *out)
 A step of scale in a direction, on the flat (FieldMap.getFlyStep)
 
static void FIELDSTG_startBattle (AreaBattle *battle)
 Starts a battle: its fight stage, its music and its encounter.
 

Variables

Encounter FIELDSTG_encounters []
 FIELDSTG's data (fieldstg.c), in its order.
 
s16 FIELDSTG_liftShake []
 FIELDSTG_updateLift's shakes, up to 1000.
 
ChoiceText FIELDSTG_choices [16]
 
ProgressEvent FIELDSTG_progressEvents []
 
AnimFrame FIELDSTG_cutsceneAnim []
 FIELDSTG_playCutsceneAnim's animations: kind 0's,.
 
AnimFrame FIELDSTG_cutsceneLoopAnim []
 and kind 1's two
 
AnimFrame FIELDSTG_cutsceneLoopAnim2 []
 
AnimFrame * FIELDSTG_effectAnims [][4]
 FIELDSTG_updateEffect's animations of each set.
 
u8 FIELDSTG_slotLayouts [][4][5][6]
 FIELDSTG_pickViewTiles's slot layouts: [layout][quadrant][row][column].
 
u8 FIELDSTG_dirLayouts [][2]
 the layout and its flips for each direction
 
u8 FIELDSTG_slotOffsets [][2][2]
 the slots' offset in tiles: [quadrant][x, y][unflipped, flipped]
 
s32 FIELDSTG_spriteDepths []
 depth of each layer of a StreamTask's sprites
 
Vec2 FIELDSTG_slotImages []
 VRAM position of each StreamTask slot's image.
 
AreaName FIELDSTG_areaNames []
 
BannerBox FIELDSTG_bannerBoxes [10]
 FIELDSTG_updateBanner's boxes.
 
u8 FIELDSTG_triggerAnims [][9]
 FIELDSTG_stepBalloonAnim's animations: (frame, time) pairs up to 0xFF.
 
u8 FIELDSTG_nearDirs [][8]
 whether two directions are at most 45 degrees apart
 
s16 FIELDSTG_file5DModes []
 the modes that load the field file 0x5D (FIELDSTG_requestInnNames)
 
u8(*[] FIELDSTG_iconAnims )[2]
 FIELDSTG_updateActorIcon's animation of each substate.
 
IconOffset FIELDSTG_iconPath []
 up to (0, 0)
 
s32 FIELDSTG_iconPathStep
 the step in FIELDSTG_iconPath
 
TileMove FIELDSTG_tileMoves []
 
s16 FIELDSTG_eventIds []
 the events FIELDSTG_startListedEvent starts
 
u8 FIELDSTG_spotAnim [][2]
 animation of FIELDSTG_updateHiddenSpots: (frame, time) pairs up to 0xFF
 
u8 * FIELDSTG_dirAnims []
 FIELDSTG_updateSpotEffect's animation for each direction.
 
s32 FIELDSTG_dirDepths []
 and its depth offset
 
u8 * FIELDSTG_gaugeRows []
 The rows of FIELDSTG_runGauge's gauges, 2 bits a cell.
 
Vec2 FIELDSTG_shakeOffsets []
 the camera's shake offsets
 
u8 FIELDSTG_probes [][5]
 the probes of each direction (FIELDSTG_checkFlightProbes)
 
Vec2 FIELDSTG_probePos []
 a probe's position
 
u8 FIELDSTG_probeSteps [][2]
 a probe's offset: bit 0 set, bit 7 negative
 
s32 FIELDSTG_padDirs []
 the direction of each combination of the pad directions
 
StandIn FIELDSTG_standIns []
 up to character 0
 
s32 FIELDSTG_turnedPartners []
 the partners' kinds (Actor.key2): the ones FIELDSTG_startActorGauge turns, FIELDSTG_haltPartners stops and FIELDSTG_resumePartners makes follow again
 
s32 FIELDSTG_haltedPartners []
 
s32 FIELDSTG_followingPartners []
 
Vec2 FIELDSTG_dirSteps []
 tile offset of each direction
 
FieldImages FIELDSTG_images
 the field's own stage (FIELDSTG_setupField)
 
FieldActorEntry * FIELDSTG_actorList []
 
StageTile FIELDSTG_mapObjects []
 The field's map objects (FieldState.objects), up to the first margin 0.
 
StageSlot FIELDSTG_slots []
 What the player can trigger on the field's map (FieldState.slots), up to type 0.
 
void(* FIELDSTG_initFuncs [])(void)
 
void(* FIELDSTG_tweenStart )(PanelAnim *tween, s32 in)
 FIELDSTG_startTween.
 
s32(* FIELDSTG_tweenUpdate )(PanelAnim *tween)
 FIELDSTG_updateTween.
 
FieldEvent FIELDSTG_events []
 The story events (FIELDSTG_setupField), up to the first id -1: the scripts are WSTAG260's, the stage that FIELDSTG_stages starts with FIELDSTG_createStoryEvents.
 
s32 FIELDSTG_fileEntries []
 by character (Actor.key1)
 
u8 FIELDSTG_actorWidths []
 by character, in pixels (FieldState.getActorWidth)
 
StageEntry FIELDSTG_extraStages []
 the extra chapter's, which run on into FIELDSTG_stages
 
StageEntry FIELDSTG_stages []
 
ScriptTimer FIELDSTG_scriptTimer
 
void(* FIELDSTG_scriptHelpers [])()
 the script helpers (FIELDSTG_toScreenPos...)
 
ScriptCommand FIELDSTG_scriptCommands []
 The script commands (FIELDSTG_findScriptCommand), up to the first id 0.
 
void(* FIELDSTG_checkBattle )()
 FIELDSTG_countBattleSteps.
 
s32 FIELDSTG_battleRates []
 how much each area lowers GAME.battleSteps, the steps to the next battle
 
s32 FIELDSTG_boxFrame
 the frame FIELDSTG_boxes was filled in
 
Vec2 FIELDSTG_dirVectors [][8]
 a direction's vector, scaled by 4096
 
u8 FIELDSTG_mirrorDirs []
 
s16 FIELDSTG_slideVoice
 the voice of the slide's sound (ACTOR_SLIDE, SOUND_TRAP_ICE)
 
s16 FIELDSTG_heldVoice
 the voice of FIELDSTG_handleFieldCommand's held sound
 
Vec2 FIELDSTG_mapSize
 FIELDSTG_getMapSize's.
 
StageTile * FIELDSTG_objectCursor
 FIELDSTG_findNextObject's search of the map objects.
 
s32 FIELDSTG_objectId
 and the id it looks for
 
Vec2 FIELDSTG_tiles [5][6]
 FIELDSTG_playBattleTransition's.
 
s32 FIELDSTG_battleFileStep
 FIELDSTG_playBattleTransition's: 0 and 1 wait for the CD, 2 the battle's files are asked for.
 
RECT FIELDSTG_screenRect
 
Box FIELDSTG_boxes [20]
 the characters' boxes (FIELDSTG_isTileFree)
 
s32 FIELDSTG_boxCount
 and their number
 

Detailed Description

FIELDSTG.PRO: the field mode, where the player walks around the map.

The stage overlays (AAA/PRO/WSTAG###.PRO, see stage.h) load on top of it at 0x800A4CA4 and call into it; what they and the executable use of it is in field_map.h. This header has the rest: the types, by the module (in src/field/field_mode) that owns them, in an order that defines each before its use; the functions, by module in the order they link; and the data (data/fieldstg.c) in its order.

Definition in file field_mode.h.

Macro Definition Documentation

◆ OVL_NAME

#define OVL_NAME (   name)    FIELDSTG_##name

Names the functions of the src/shared files it shares.

Definition at line 19 of file field_mode.h.

◆ FIELD_SPRITES_X

#define FIELD_SPRITES_X   0x200

Where the field keeps its textures in VRAM: the two images of FIELD_SPRITES_FILE (its entries 2 and 3, for the sprite sheets of its entries 0 and 1), the stage's map objects (FIELDSTG_loadFieldFiles) and a cutscene's frames (FIELDSTG_playCutsceneAnim)

Definition at line 27 of file field_mode.h.

◆ FIELD_SPRITES2_X

#define FIELD_SPRITES2_X   0x240

Definition at line 28 of file field_mode.h.

◆ FIELD_SPRITES_Y

#define FIELD_SPRITES_Y   0x100

Definition at line 29 of file field_mode.h.

◆ FIELD_OBJECTS_X

#define FIELD_OBJECTS_X   0x140

Definition at line 30 of file field_mode.h.

◆ FIELD_OBJECTS_Y

#define FIELD_OBJECTS_Y   0x100

Definition at line 31 of file field_mode.h.

◆ FIELD_OBJECTS_CLUT_Y

#define FIELD_OBJECTS_CLUT_Y   0x1F0

Definition at line 32 of file field_mode.h.

◆ FIELD_CUTSCENE_X

#define FIELD_CUTSCENE_X   0x280

Definition at line 33 of file field_mode.h.

◆ FIELD_CUTSCENE_CLUT_Y

#define FIELD_CUTSCENE_CLUT_Y   0xF0

Definition at line 34 of file field_mode.h.

◆ FIELD_MENU_SPRITES_X

#define FIELD_MENU_SPRITES_X   0x140

the executable's FILE_MENU_SPRITES

Definition at line 35 of file field_mode.h.

◆ SOUND_DIG_DEMO

#define SOUND_DIG_DEMO   0x40003

The sounds only FIELDSTG plays (SOUND.playSound), by their SOUNDTST names.

Those that other overlays play too are in engine/sound.h.

Definition at line 41 of file field_mode.h.

◆ SOUND_DIGIMENT

#define SOUND_DIGIMENT   0x40004

a warp's effect

Definition at line 42 of file field_mode.h.

◆ SOUND_ENCOUNTS

#define SOUND_ENCOUNTS   0x40005

the transition to a battle

Definition at line 43 of file field_mode.h.

◆ SOUND_FUKIDASH

#define SOUND_FUKIDASH   0x40007

a balloon

Definition at line 44 of file field_mode.h.

◆ SOUND_ITEM_GET

#define SOUND_ITEM_GET   0x40009

Definition at line 45 of file field_mode.h.

◆ SOUND_PIYOPIYO

#define SOUND_PIYOPIYO   0x40013

Definition at line 46 of file field_mode.h.

◆ SOUND_SAVEDEMO

#define SOUND_SAVEDEMO   0x40015

Definition at line 47 of file field_mode.h.

◆ SOUND_SUB_DEMO

#define SOUND_SUB_DEMO   0x40018

Definition at line 48 of file field_mode.h.

◆ SOUND_BULB_003

#define SOUND_BULB_003   0x440001

Definition at line 49 of file field_mode.h.

◆ SOUND_TRAP_OFF

#define SOUND_TRAP_OFF   0x700001

Definition at line 50 of file field_mode.h.

◆ SOUND_INFO_SIG

#define SOUND_INFO_SIG   0xB80001

Definition at line 51 of file field_mode.h.

◆ SOUND_BM_ERASE

#define SOUND_BM_ERASE   0x1100000

Definition at line 52 of file field_mode.h.

◆ SOUND_LD_ERASE

#define SOUND_LD_ERASE   0x1100002

Definition at line 53 of file field_mode.h.

◆ SOUND_DEMO_BGM

#define SOUND_DEMO_BGM   0x60040002

Definition at line 54 of file field_mode.h.

◆ SOUND_COMCD111

#define SOUND_COMCD111   0x80042DC7

Definition at line 55 of file field_mode.h.

◆ SOUND_COMCD201

#define SOUND_COMCD201   0x800430BD

Definition at line 56 of file field_mode.h.

◆ SOUND_PLAYER00

#define SOUND_PLAYER00   0x8004583C

Definition at line 57 of file field_mode.h.

◆ SOUND_PLAYER01

#define SOUND_PLAYER01   0x800458BD

Definition at line 58 of file field_mode.h.

◆ SOUND_PLAYER02

#define SOUND_PLAYER02   0x8004593E

Definition at line 59 of file field_mode.h.

◆ SOUND_PLAYER08

#define SOUND_PLAYER08   0x80045C44

Definition at line 60 of file field_mode.h.

◆ SOUND_PLAYER09

#define SOUND_PLAYER09   0x80045CC5

Definition at line 61 of file field_mode.h.

◆ SOUND_PLAYER10

#define SOUND_PLAYER10   0x80045D46

Definition at line 62 of file field_mode.h.

◆ SOUND_TRESUREB

#define SOUND_TRESUREB   0x80045DC7

Definition at line 63 of file field_mode.h.

◆ SOUND_DIG_MOVE

#define SOUND_DIG_MOVE   0x80045FCB

Definition at line 64 of file field_mode.h.

◆ SOUND_MASK_SET

#define SOUND_MASK_SET   0x803C503C

Definition at line 65 of file field_mode.h.

◆ SOUND_BEAM_SHT

#define SOUND_BEAM_SHT   0x805458BD

Definition at line 66 of file field_mode.h.

◆ SOUND_WEAR_OFF

#define SOUND_WEAR_OFF   0x80E8383C

Definition at line 67 of file field_mode.h.

◆ SOUND_SN_ENTRY

#define SOUND_SN_ENTRY   0x8110303C

Definition at line 68 of file field_mode.h.

◆ SOUND_SN_ERASE

#define SOUND_SN_ERASE   0x81103240

Definition at line 69 of file field_mode.h.

◆ SOUND_COMCD203

#define SOUND_COMCD203   0xA00431BF

held while the camera shakes

Definition at line 70 of file field_mode.h.

◆ SOUND_SUB_MOVE

#define SOUND_SUB_MOVE   0xA0045F4A

held

Definition at line 71 of file field_mode.h.

◆ SOUND_BEAM_HIT

#define SOUND_BEAM_HIT   0xA054583C

held

Definition at line 72 of file field_mode.h.

◆ SOUND_TRAP_ICE

#define SOUND_TRAP_ICE   0xA064683C

held

Definition at line 73 of file field_mode.h.

◆ SOUND_GAYALOOP

#define SOUND_GAYALOOP   0xA10C703C

held

Definition at line 74 of file field_mode.h.

◆ ACTOR_ANIM_STAND

#define ACTOR_ANIM_STAND   1

The animation sets that the actions play (FIELDSTG_setActorAnim), by the substate that plays them.

Definition at line 80 of file field_mode.h.

◆ ACTOR_ANIM_WALK

#define ACTOR_ANIM_WALK   4

Definition at line 81 of file field_mode.h.

◆ ACTOR_ANIM_RUN

#define ACTOR_ANIM_RUN   5

Definition at line 82 of file field_mode.h.

◆ ACTOR_ANIM_STOP

#define ACTOR_ANIM_STOP   6

Definition at line 83 of file field_mode.h.

◆ ACTOR_ANIM_SEARCH

#define ACTOR_ANIM_SEARCH   8

Definition at line 84 of file field_mode.h.

◆ ACTOR_ANIM_GAUGE_START

#define ACTOR_ANIM_GAUGE_START   0x11

Definition at line 85 of file field_mode.h.

◆ ACTOR_ANIM_GAUGE_RESULT

#define ACTOR_ANIM_GAUGE_RESULT   0x12

after the game, with a balloon

Definition at line 86 of file field_mode.h.

◆ ACTOR_ANIM_GAUGE_PLAY

#define ACTOR_ANIM_GAUGE_PLAY   0x13

with PLAYER09

Definition at line 87 of file field_mode.h.

◆ ACTOR_ANIM_GAUGE_WAIT

#define ACTOR_ANIM_GAUGE_WAIT   0x14

with PLAYER10, until the game ends

Definition at line 88 of file field_mode.h.

◆ ACTOR_ANIM_GAUGE_END

#define ACTOR_ANIM_GAUGE_END   0x15

Definition at line 89 of file field_mode.h.

◆ ACTOR_ANIM_DROP_OFF

#define ACTOR_ANIM_DROP_OFF   0x16

Definition at line 90 of file field_mode.h.

◆ ACTOR_ANIM_FALL

#define ACTOR_ANIM_FALL   0x17

Definition at line 91 of file field_mode.h.

◆ ACTOR_ANIM_FALL_FAR

#define ACTOR_ANIM_FALL_FAR   0x18

once the fall is more than 0x1800

Definition at line 92 of file field_mode.h.

◆ ACTOR_ANIM_LAND

#define ACTOR_ANIM_LAND   0x19

Definition at line 93 of file field_mode.h.

◆ ACTOR_ANIM_CLIMB_UP

#define ACTOR_ANIM_CLIMB_UP   0x1A

Definition at line 94 of file field_mode.h.

◆ ACTOR_ANIM_CLIMB_DOWN

#define ACTOR_ANIM_CLIMB_DOWN   0x1B

Definition at line 95 of file field_mode.h.

◆ ACTOR_ANIM_GET_ON_WALL

#define ACTOR_ANIM_GET_ON_WALL   0x1C

Definition at line 96 of file field_mode.h.

◆ ACTOR_ANIM_CLIMB_OFF_TOP

#define ACTOR_ANIM_CLIMB_OFF_TOP   0x1D

Definition at line 97 of file field_mode.h.

◆ ACTOR_ANIM_GET_OVER_EDGE

#define ACTOR_ANIM_GET_OVER_EDGE   0x1E

Definition at line 98 of file field_mode.h.

◆ ACTOR_ANIM_CLIMB_OFF_BOTTOM

#define ACTOR_ANIM_CLIMB_OFF_BOTTOM   0x1F

Definition at line 99 of file field_mode.h.

◆ ACTOR_ANIM_CLIMB

#define ACTOR_ANIM_CLIMB   0x20

Definition at line 100 of file field_mode.h.

◆ ACTOR_ANIM_OPEN

#define ACTOR_ANIM_OPEN   0x41

a treasure's, when it is talked to

Definition at line 101 of file field_mode.h.

◆ ACTOR_ANIM_USE

#define ACTOR_ANIM_USE   0x45

Definition at line 102 of file field_mode.h.

◆ ACTOR_ANIM_USED

#define ACTOR_ANIM_USED   0x54

the object's

Definition at line 103 of file field_mode.h.

◆ FLIGHT_OPEN

#define FLIGHT_OPEN   1

Flight (FIELDSTG_controlFlight, FIELDSTG_checkFlightProbe): an actor's z against the floor map's cells.

Cell 1 is open; a wall, cell n from 2 to 6, stands up to FLIGHT_LEVEL(n); a ceiling, cell 24 - n from 18 to 22, hangs from FLIGHT_LEVEL(n) up.

Definition at line 111 of file field_mode.h.

◆ FLIGHT_WALL

#define FLIGHT_WALL (   n)    (n)

Definition at line 112 of file field_mode.h.

◆ FLIGHT_CEILING

#define FLIGHT_CEILING (   n)    (24 - (n))

Definition at line 113 of file field_mode.h.

◆ FLIGHT_LEVEL

#define FLIGHT_LEVEL (   n)    ((n) << 12)

n * 16 pixels, in z's 1/256 pixels

Definition at line 114 of file field_mode.h.

◆ FLIGHT_LANDING

#define FLIGHT_LANDING   0xC

how far above a wall's top a descent stops

Definition at line 115 of file field_mode.h.

◆ FLIGHT_Z_MIN

#define FLIGHT_Z_MIN   0x1800

Definition at line 116 of file field_mode.h.

◆ FLIGHT_Z_MAX

#define FLIGHT_Z_MAX   0x7000

Definition at line 117 of file field_mode.h.

◆ FLIGHT_SPEED_MAX

#define FLIGHT_SPEED_MAX   0x200

Definition at line 118 of file field_mode.h.

◆ FLIGHT_SPEED_MAX_PAL

#define FLIGHT_SPEED_MAX_PAL   0x266

FLIGHT_SPEED_MAX * 6 / 5, for 50 frames a second.

Definition at line 119 of file field_mode.h.

◆ TRAIL_STEPS

#define TRAIL_STEPS   64

The last TRAIL_STEPS steps of the actor that another one follows (Actor.trail), a ring from tail to head.

a power of two

Definition at line 125 of file field_mode.h.

◆ GAUGE_ROWS

#define GAUGE_ROWS   8

A gauge game (FIELDSTG_createGauge, FIELDSTG_runGauge)

the random rows of FIELDSTG_gaugeRows

Definition at line 222 of file field_mode.h.

◆ GAUGE_EMPTY_ROW

#define GAUGE_EMPTY_ROW   8

the European version's, all zeros

Definition at line 223 of file field_mode.h.

◆ GAUGE_CURSOR_MAX

#define GAUGE_CURSOR_MAX   0x3000

the row's 48 pixels, in 1/256 pixels

Definition at line 224 of file field_mode.h.

◆ GAUGE_START_DELAY

#define GAUGE_START_DELAY   0x5A

frames before the cursor runs

Definition at line 225 of file field_mode.h.

◆ GAUGE_RESULT_DELAY

#define GAUGE_RESULT_DELAY   0x3C

frames on the stopped cursor

Definition at line 226 of file field_mode.h.

◆ GAUGE_X

#define GAUGE_X   0x18

where it is drawn, on the screen

Definition at line 227 of file field_mode.h.

◆ GAUGE_Y

#define GAUGE_Y   0xC0

Definition at line 228 of file field_mode.h.

◆ GAUGE_FRAME

#define GAUGE_FRAME   0x3C

its sprites, of FIELD_SPRITES_FILE's sheet 1

Definition at line 229 of file field_mode.h.

◆ GAUGE_CURSOR_FRAME

#define GAUGE_CURSOR_FRAME   0x3D

Definition at line 230 of file field_mode.h.

◆ GAUGE_ROW_FRAMES

#define GAUGE_ROW_FRAMES   0x3E
  • the row

Definition at line 231 of file field_mode.h.

◆ GAUGE_RUNNING

#define GAUGE_RUNNING   0

The steps of a running gauge.

until cross is pressed

Definition at line 234 of file field_mode.h.

◆ GAUGE_STOPPING

#define GAUGE_STOPPING   1

Definition at line 235 of file field_mode.h.

◆ GAUGE_STOPPING_SLOWLY

#define GAUGE_STOPPING_SLOWLY   2

one time in four

Definition at line 236 of file field_mode.h.

◆ GAUGE_STOPPED

#define GAUGE_STOPPED   3

Definition at line 237 of file field_mode.h.

◆ FIELD_ANIM_FILE

#define FIELD_ANIM_FILE   0x88C

The two animations of FIELDSTG_playCutsceneAnim, kind 0's file and kind 1's after it: the discs number their files differently.

Definition at line 380 of file field_mode.h.

◆ FIELD_SPRITES_FILE

#define FIELD_SPRITES_FILE   0x160

The field's effect sprites (FIELDSTG_drawSpotEffect): the discs number their files differently.

Definition at line 591 of file field_mode.h.

◆ FIELD_ACTION_FILES

#define FIELD_ACTION_FILES   0x3C9

The files of the player's actions, which FIELDSTG_requestSlotFiles loads when the map has slots for them: the discs number their files differently.

Definition at line 599 of file field_mode.h.

◆ FIELD_DROP_FILE

#define FIELD_DROP_FILE   FIELD_ACTION_FILES

Definition at line 601 of file field_mode.h.

◆ FIELD_GAUGE_FILE

#define FIELD_GAUGE_FILE   (FIELD_ACTION_FILES + 1)

Definition at line 602 of file field_mode.h.

◆ FIELD_SEARCH_FILE

#define FIELD_SEARCH_FILE   (FIELD_ACTION_FILES + 2)

the hidden spots'

Definition at line 603 of file field_mode.h.

◆ FIELD_CLIMB_FILE

#define FIELD_CLIMB_FILE   (FIELD_ACTION_FILES + 3)

Definition at line 604 of file field_mode.h.

◆ FIELD_FLAG_TALK_AHEAD

#define FIELD_FLAG_TALK_AHEAD   0x12

The player's FLAGS_00 codes (FIELDSTG_controlPlayer)

the player talks to what it faces, and clears it

Definition at line 655 of file field_mode.h.

◆ FIELD_SEARCH_ITEM

#define FIELD_SEARCH_ITEM   ITEM(0, 4)

item 4, which the player needs to search the hidden spots

Definition at line 656 of file field_mode.h.

◆ FIELD_VISITED_FLAG

#define FIELD_VISITED_FLAG (   mode)    (0x2000 + (mode) - 0x200)

The flag set when the field of a mode is entered: FLAGS_00's group 0x20, flag mode - 0x200.

Definition at line 660 of file field_mode.h.

◆ FIELD_MODE_WSTAG415

#define FIELD_MODE_WSTAG415   0x22D

The modes of two fields that keep the file cache (FIELDSTG_keepsFileCache)

where the player's run doesn't check the probes ahead (FIELDSTG_checkFlightProbes)

Definition at line 664 of file field_mode.h.

◆ FIELD_MODE_WSTAG815

#define FIELD_MODE_WSTAG815   0x2DE

Definition at line 665 of file field_mode.h.

◆ FIELD_PRIZE_FIGHTERS

#define FIELD_PRIZE_FIGHTERS   0x1C9

The fighters whose battles always give an item (FIELDSTG_startEncounter)

Definition at line 668 of file field_mode.h.

◆ FIELD_PRIZE_FIGHTER_COUNT

#define FIELD_PRIZE_FIGHTER_COUNT   8

Definition at line 669 of file field_mode.h.

◆ TRANSITION_COLUMNS

#define TRANSITION_COLUMNS   5

FIELDSTG_playBattleTransition's tiles: a copy of the screen at TRANSITION_IMAGE_X in VRAM, cut into columns and rows.

Definition at line 673 of file field_mode.h.

◆ TRANSITION_ROWS

#define TRANSITION_ROWS   6

Definition at line 674 of file field_mode.h.

◆ TRANSITION_TILE_WIDTH

#define TRANSITION_TILE_WIDTH   (SCREEN_WIDTH / TRANSITION_COLUMNS)

Definition at line 675 of file field_mode.h.

◆ TRANSITION_TILE_HEIGHT

#define TRANSITION_TILE_HEIGHT   (SCREEN_HEIGHT / TRANSITION_ROWS)

Definition at line 676 of file field_mode.h.

◆ TRANSITION_IMAGE_X

#define TRANSITION_IMAGE_X   0x280

Definition at line 677 of file field_mode.h.

◆ TRANSITION_SPEED

#define TRANSITION_SPEED   40

pixels a frame

Definition at line 678 of file field_mode.h.

◆ TRANSITION_GONE

#define TRANSITION_GONE   0x200

a tile's coordinate once it has slid off

Definition at line 679 of file field_mode.h.

◆ TRANSITION_WAIT

#define TRANSITION_WAIT   0x10

the steps after the last tile, before the mode

Definition at line 680 of file field_mode.h.

◆ TRANSITION_DONE

#define TRANSITION_DONE   0x1000

the step once the mode is requested

Definition at line 681 of file field_mode.h.

Function Documentation

◆ FIELDSTG_updateCommandTask()

void FIELDSTG_updateCommandTask ( Task *  task)

commands.c

commands.c

Definition at line 10 of file commands.c.

Referenced by FIELDSTG_startCommandTask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_handleFieldCommand()

void FIELDSTG_handleFieldCommand ( Task *  task,
s32  command 
)

Runs a field command (FIELD_COMMAND_*) of an event script: halts the partners through the command task, sets the player icon's substate, hides or shows a group of map objects, shakes the camera, searches the event spot, or plays a sound; four sounds are held, to be keyed off by a later command.

< the partners stop following

< its substate 3, with ITEM_GET

< its substate 2

< the player icon's substate 1, with ITEM_GET

< the icon over the player's head

< FIELDSTG_searchEventSpot

Definition at line 164 of file commands.c.

Here is the call graph for this function:

◆ FIELDSTG_startCommandTask()

void FIELDSTG_startCommandTask ( void  )

Creates the task of script command 813 (the create of FIELDSTG_scriptCommands)

< script command 813 (FIELDSTG_startCommandTask): the field commands

Definition at line 207 of file commands.c.

Here is the call graph for this function:

◆ FIELDSTG_updateLift()

void FIELDSTG_updateLift ( Lift *  task)

lift.c

lift.c

WSTAG261 and WSTAG934 have a copy of it (common/update_tile_lift.inc.c).

< every character (FIELDSTG_createActor)

Definition at line 12 of file lift.c.

Referenced by FIELDSTG_createLift().

Here is the caller graph for this function:

◆ FIELDSTG_moveLift()

void FIELDSTG_moveLift ( Lift *  task,
s32  command 
)

Runs a script command of the lift's: moves it up or down.

< the lift's script commands: up the screen,

< and back down to the objects' place on the map

Definition at line 125 of file lift.c.

◆ FIELDSTG_createLift()

Lift * FIELDSTG_createLift ( s32  id)

Creates the lift, raised when flag 0x1C3D is set.

< 0x1C 0x00-0x40: FLAGS_00, GAME.flags02-flags40

Definition at line 141 of file lift.c.

Referenced by FIELDSTG_runStoryEvents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_runChoice()

void FIELDSTG_runChoice ( ChoiceTask *  task,
ChoiceChildren *  children 
)

choice.c

choice.c

< the map, its objects and characters, and the menus

< the map, its objects and characters, and the menus

< the map, its objects and characters, and the menus

< SYSTEM02: a cursor moves

< SYSTEM00: a choice is taken

< the map, its objects and characters, and the menus

< the executable's FILE_MENU_SPRITES

Definition at line 10 of file choice.c.

Here is the call graph for this function:

◆ FIELDSTG_askChoice0()

void * FIELDSTG_askChoice0 ( void  )

◆ FIELDSTG_askChoice1()

void * FIELDSTG_askChoice1 ( void  )

◆ FIELDSTG_askChoice2()

void * FIELDSTG_askChoice2 ( void  )

◆ FIELDSTG_askChoice3()

void * FIELDSTG_askChoice3 ( void  )

Definition at line 123 of file choice.c.

◆ FIELDSTG_askChoice4()

void * FIELDSTG_askChoice4 ( void  )

◆ FIELDSTG_askChoice5()

void * FIELDSTG_askChoice5 ( void  )

◆ FIELDSTG_askChoice6()

void * FIELDSTG_askChoice6 ( void  )

◆ FIELDSTG_askChoice7()

void * FIELDSTG_askChoice7 ( void  )

Definition at line 127 of file choice.c.

◆ FIELDSTG_askChoice8()

void * FIELDSTG_askChoice8 ( void  )

◆ FIELDSTG_askChoice9()

void * FIELDSTG_askChoice9 ( void  )

◆ FIELDSTG_askChoice10()

void * FIELDSTG_askChoice10 ( void  )

◆ FIELDSTG_askChoice11()

void * FIELDSTG_askChoice11 ( void  )

Definition at line 131 of file choice.c.

◆ FIELDSTG_askChoice12()

void * FIELDSTG_askChoice12 ( void  )

◆ FIELDSTG_askChoice13()

void * FIELDSTG_askChoice13 ( void  )

◆ FIELDSTG_askChoice14()

void * FIELDSTG_askChoice14 ( void  )

◆ FIELDSTG_askChoice15()

void * FIELDSTG_askChoice15 ( void  )

Definition at line 135 of file choice.c.

◆ FIELDSTG_runStoryEvents()

void FIELDSTG_runStoryEvents ( StoryEvents *  task,
StoryEventsChildren *  children 
)

story.c

story.c

Definition at line 10 of file story.c.

Referenced by FIELDSTG_createStoryEvents().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createStoryEvents()

StoryEvents * FIELDSTG_createStoryEvents ( void *  owner)

Creates the story events, and loads the field's sound bank and files.

Definition at line 72 of file story.c.

Here is the call graph for this function:

◆ FIELDSTG_findEventActor()

Actor * FIELDSTG_findEventActor ( EventTask *  task,
s32  id 
)

event.c

event.c

Definition at line 9 of file event.c.

Referenced by FIELDSTG_runEvent(), and FIELDSTG_setEventPose().

Here is the caller graph for this function:

◆ FIELDSTG_setEventPose()

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 (SCRIPT_COMMAND), creates the command's task if needed and hands it the other two words, a command and its argument.

Definition at line 28 of file event.c.

Referenced by FIELDSTG_runEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_runEvent()

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 holds the characters; in TASK_RUN it runs the script until a command waits (kind 0 ends it, 1 moves or turns a character, 2 opens a message box, 3 waits, 6 runs FIELDSTG_followWithCamera or FIELDSTG_pointCamera), or without a script runs start's task until it ends; TASK_KILL releases the characters and calls end.

The match depends on next and actor being two variables, and sub an s16.

< the field's main task (FIELDSTG_createField)

< every character (FIELDSTG_createActor)

Definition at line 82 of file event.c.

Referenced by FIELDSTG_startEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_playCutsceneAnim()

void FIELDSTG_playCutsceneAnim ( CutsceneAnim *  task)

cutscene.c

cutscene.c

The match depends on the if/else around the file calls (not a ?: in their argument).

< the map, its objects and characters, and the menus

Definition at line 8 of file cutscene.c.

Referenced by FIELDSTG_createCutsceneAnim().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createCutsceneAnim()

CutsceneAnim * FIELDSTG_createCutsceneAnim ( s32  kind)

Creates a cutscene animation of a kind.

Definition at line 124 of file cutscene.c.

Referenced by warpAway().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_stepEffectAnim()

s32 FIELDSTG_stepEffectAnim ( EffectAnim *  anim,
AnimFrame *  frames,
s32  depth 
)

effect.c

effect.c

Definition at line 7 of file effect.c.

Referenced by FIELDSTG_stepEffectAnim(), and FIELDSTG_updateEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateEffect()

void FIELDSTG_updateEffect ( FieldEffect *  task)

An effect's update: draws its animations at its spot until they end.

< the map, its objects and characters, and the menus

Definition at line 30 of file effect.c.

Referenced by FIELDSTG_createEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createEffect()

FieldEffect * FIELDSTG_createEffect ( s32  x,
s32  y,
s32  set 
)

Creates the effect of a set at (x, y)

Definition at line 79 of file effect.c.

Referenced by warpAway().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_findOldestStream()

StreamTask * FIELDSTG_findOldestStream ( StreamPool *  pool)

map_streamer.c

map_streamer.c

Definition at line 7 of file map_streamer.c.

Referenced by FIELDSTG_requestTiles().

Here is the caller graph for this function:

◆ FIELDSTG_requestTiles()

void FIELDSTG_requestTiles ( MapStreamer *  map,
StreamPool *  pool 
)

Streams the map's tiles while the CD reader is free: a tile of viewTiles (0xFF for none) that a stream task has loaded is done, and each tile still waiting goes to the oldest task (FIELDSTG_findOldestStream), until the reader is busy.

The match depends on each loop having a counter of its own.

Definition at line 27 of file map_streamer.c.

Referenced by FIELDSTG_runMapStreamer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_drawCoverBlock()

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)

Definition at line 65 of file map_streamer.c.

Referenced by FIELDSTG_drawCover(), and FIELDSTG_drawMapTiles().

Here is the caller graph for this function:

◆ FIELDSTG_findStream()

StreamTask * FIELDSTG_findStream ( StreamPool *  pool,
s32  frame 
)

The stream task that holds a frame (a tile of the map), or NULL.

Definition at line 99 of file map_streamer.c.

Referenced by FIELDSTG_drawMapTiles().

Here is the caller graph for this function:

◆ FIELDSTG_drawMapTiles()

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 is free, gives the first loaded tile without an entry the oldest of the 12.

< the map, its objects and characters, and the menus

Definition at line 126 of file map_streamer.c.

Referenced by FIELDSTG_runMapStreamer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_pickViewTiles()

void FIELDSTG_pickViewTiles ( MapStreamer *  task)

Points the slots around the view at the map's tiles: viewTiles gets, for each of the 30 slots, the index of the tile it shows (0xFF off the map), and viewX/viewY the tile of the slots' top left corner.

The slots come from the layout for the leader's direction, flipped as that direction says, and for the quadrant of its tile the view is in. The match depends on the y offset being written as scrollY less its tile's start: its two reads of scrollY rank that load ahead of the x test in local-alloc. It also depends on x holding the horizontal flip before it becomes the tile column, and on col counting the slots the first loop clears.

< every character (FIELDSTG_createActor)

Definition at line 228 of file map_streamer.c.

Referenced by FIELDSTG_runMapStreamer().

Here is the caller graph for this function:

◆ FIELDSTG_runMapStreamer()

void FIELDSTG_runMapStreamer ( MapStreamer *  task,
StreamPool *  pool 
)

The map streamer's update: reads the map's header and creates the 30 stream tasks, then each frame points the slots at the tiles in view, draws them and streams the missing ones.

< the map, its objects and characters, and the menus

Definition at line 293 of file map_streamer.c.

Referenced by FIELDSTG_createMapStreamer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_getMapSize()

Vec2 * FIELDSTG_getMapSize ( MapStreamer *  task)

The map's size in pixels.

Definition at line 360 of file map_streamer.c.

Referenced by FIELDSTG_createMapStreamer().

Here is the caller graph for this function:

◆ FIELDSTG_createMapStreamer()

MapStreamer * FIELDSTG_createMapStreamer ( s32  file)

Creates the map streamer of a file.

< FIELDSTG_createMapStreamer's

Definition at line 367 of file map_streamer.c.

Referenced by showField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_drawCover()

void FIELDSTG_drawCover ( s32  id,
s32  level 
)

Covers the screen on the layer id at a shade of level (8.8)

Definition at line 376 of file map_streamer.c.

Referenced by FIELDSTG_closeField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_touchStream()

void FIELDSTG_touchStream ( StreamTask *  task)

stream.c

stream.c

Definition at line 6 of file stream.c.

Referenced by FIELDSTG_createStream(), FIELDSTG_drawStream(), FIELDSTG_loadStreamSprites(), and FIELDSTG_seekStream().

Here is the caller graph for this function:

◆ FIELDSTG_seekStream()

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.

Definition at line 12 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_isStreamLoaded()

s32 FIELDSTG_isStreamLoaded ( StreamTask *  task)

Whether a stream task's read is done.

Definition at line 25 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the caller graph for this function:

◆ FIELDSTG_drawStream()

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.

Definition at line 31 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_setStreamSource()

void FIELDSTG_setStreamSource ( StreamTask *  task,
s32  slot,
Decompressor *  source 
)

Decompresses a stream task's tile into slot.

Definition at line 74 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the caller graph for this function:

◆ FIELDSTG_loadStreamSprites()

void FIELDSTG_loadStreamSprites ( StreamTask *  task)

Takes a decompressed tile's sprites and loads its image into its slot's VRAM.

Definition at line 83 of file stream.c.

Referenced by FIELDSTG_updateStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_clearStreamSlot()

void FIELDSTG_clearStreamSlot ( StreamTask *  task)

Forgets a stream task's slot.

Definition at line 121 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the caller graph for this function:

◆ FIELDSTG_getStreamSlot()

s32 FIELDSTG_getStreamSlot ( StreamTask *  task)

A stream task's slot, or -1.

Definition at line 126 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the caller graph for this function:

◆ FIELDSTG_getStreamFrame()

s32 FIELDSTG_getStreamFrame ( StreamTask *  task)

A stream task's frame, the tile it holds.

Definition at line 131 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the caller graph for this function:

◆ FIELDSTG_updateStream()

void FIELDSTG_updateStream ( StreamTask *  task)

A stream task's update: takes its tile once decompressed, and notes when its read ends.

Definition at line 137 of file stream.c.

Referenced by FIELDSTG_createStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createStream()

StreamTask * FIELDSTG_createStream ( s32  size,
s32  file 
)

Creates a stream task of a file, with a buffer of size.

Definition at line 168 of file stream.c.

Referenced by FIELDSTG_runMapStreamer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateRoot()

void FIELDSTG_updateRoot ( Task *  task,
Task **  children 
)

start.c

start.c

Definition at line 7 of file start.c.

Referenced by FIELDSTG_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_showAreaName()

void FIELDSTG_showAreaName ( AreaBanner *  task,
AreaNameWindows *  windows 
)

banner.c

banner.c

< the area name banner

< STAREA

< the area name banner

< STNAME

Definition at line 9 of file banner.c.

Referenced by FIELDSTG_updateBanner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_stretchBannerBox()

void FIELDSTG_stretchBannerBox ( AreaBanner *  task,
BannerBox *  box 
)

Stretches a box toward from-to along one axis.

The match depends on each case having its own variables.

Definition at line 28 of file banner.c.

Referenced by FIELDSTG_updateBanner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_drawBannerBox()

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.

Definition at line 106 of file banner.c.

Referenced by FIELDSTG_updateBanner().

Here is the caller graph for this function:

◆ FIELDSTG_updateBanner()

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 area and place windows (FIELDSTG_showAreaName); in TASK_RUN the boxes appear and stretch in turn until both windows have finished; in TASK_DONE it closes the layer's clip from the top and the bottom.

< the area name banner

< the area name banner

Definition at line 131 of file banner.c.

Referenced by FIELDSTG_createBanner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createBanner()

Task * FIELDSTG_createBanner ( s32  show)

Creates the area name banner, which closes at once unless show; the player is frozen until it ends.

< the area name banner

Definition at line 241 of file banner.c.

Referenced by startField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_stepBalloonAnim()

s32 FIELDSTG_stepBalloonAnim ( Balloon *  task)

balloon.c

balloon.c

Definition at line 6 of file balloon.c.

Referenced by FIELDSTG_drawBalloon().

Here is the caller graph for this function:

◆ FIELDSTG_drawBalloon()

void FIELDSTG_drawBalloon ( Balloon *  task)

Draws a balloon over its actor: its frame, and once open, its animation.

< the map, its objects and characters, and the menus

Definition at line 19 of file balloon.c.

Referenced by FIELDSTG_updateBalloon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateBalloon()

void FIELDSTG_updateBalloon ( Balloon *  task)

A balloon's update: it pops open over the player (or another actor), stays while the trigger is on offer and pops shut in TASK_DONE.

< every character (FIELDSTG_createActor)

< a balloon

Definition at line 38 of file balloon.c.

Referenced by FIELDSTG_createBalloon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createBalloon()

Balloon * FIELDSTG_createBalloon ( s32  kind,
s32  anim,
s32  id 
)

Creates a balloon of a kind (its sprites) with an animation, under a task id.

Definition at line 99 of file balloon.c.

Referenced by FIELDSTG_createPlayerBalloon(), FIELDSTG_offerTrigger(), and runGauge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createPlayerBalloon()

void FIELDSTG_createPlayerBalloon ( s32  id)

The balloon over the player: script commands 803 to 806 (FIELDSTG_scriptCommands)

Definition at line 108 of file balloon.c.

Here is the call graph for this function:

◆ FIELDSTG_balloonCommand()

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, 0x326 pops it shut.

< every character (FIELDSTG_createActor)

Definition at line 114 of file balloon.c.

◆ FIELDSTG_findTrigger()

s32 FIELDSTG_findTrigger ( Triggers *  task)

trigger.c

trigger.c

< a cell's value: a direction (3 bits) and a StageSlot (5)

< the player's depth, arg

< the map the player is on, arg (FieldMap.setMap)

< starts the event arg

< a warp (FieldWarp at arg) with effect and cutscene 1

< the same with effect and cutscene 0

< sends the player flying (FIELDSTG_launchActor)

< the same, then leaves for mode arg

Definition at line 9 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the caller graph for this function:

◆ FIELDSTG_offerTrigger()

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 and returns 1; returns 0 when its conditions don't hold.

< the player's depth, arg

< the map the player is on, arg (FieldMap.setMap)

< starts the event arg

< sends the player flying (FIELDSTG_launchActor)

< the gauge game

< leaves for mode arg at (x, y), facing dir

Definition at line 42 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_setOffTrigger()

void FIELDSTG_setOffTrigger ( Triggers *  task)

Sets off the slot the player pressed cross on.

< leaves for mode arg at (x, y), facing dir

< the same, then leaves for mode arg

< the gauge game

< the same with effect and cutscene 0

< a warp (FieldWarp at arg) with effect and cutscene 1

Definition at line 144 of file trigger.c.

Referenced by FIELDSTG_updateTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateTriggers()

void FIELDSTG_updateTriggers ( Triggers *  task,
TriggerChildren *  children 
)

The triggers' update: offers the slot under the player while the field isn't busy, and sets it off on cross.

< every character (FIELDSTG_createActor)

< walks off through an exit (FIELDSTG_walkActorInDir)

Definition at line 194 of file trigger.c.

Referenced by FIELDSTG_createTriggers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createTriggers()

Triggers * FIELDSTG_createTriggers ( s32  sheetEntry,
StageSlot *  slots 
)

Creates the triggers.

Definition at line 239 of file trigger.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_getSpeechPos()

void FIELDSTG_getSpeechPos ( Speech *  task,
Vec2 *  out 
)

speech.c

speech.c

Definition at line 7 of file speech.c.

Referenced by FIELDSTG_updateSpeech().

Here is the caller graph for this function:

◆ FIELDSTG_updateSpeech()

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, and ends with it.

< the message and talk boxes

< the message and talk boxes

Definition at line 31 of file speech.c.

Referenced by FIELDSTG_createSpeech(), and FIELDSTG_createTalk().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createSpeech()

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.

Definition at line 64 of file speech.c.

Referenced by FIELDSTG_runEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createTalk()

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 the edges.

Definition at line 77 of file speech.c.

Referenced by runTalk().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_drawMapObject()

void FIELDSTG_drawMapObject ( MapObjects *  task,
Layer *  layer,
s32  index 
)

map_objects.c

map_objects.c

Definition at line 6 of file map_objects.c.

Referenced by FIELDSTG_updateMapObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateMapObjects()

void FIELDSTG_updateMapObjects ( MapObjects *  task,
HiddenSpots **  children 
)

Animates and draws the map's objects that are in view.

< the map, its objects and characters, and the menus

< the map, its objects and characters, and the menus

Definition at line 30 of file map_objects.c.

Referenced by FIELDSTG_createMapObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createMapObjects()

MapObjects * FIELDSTG_createMapObjects ( s32  sprites,
StageTile *  objects 
)

Creates the map's objects, with their sprites.

Definition at line 142 of file map_objects.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_requestInnNames()

void FIELDSTG_requestInnNames ( Task *  task)

file_loader.c

file_loader.c

< HTLNAM

Definition at line 6 of file file_loader.c.

Referenced by FIELDSTG_loadFieldFiles().

Here is the caller graph for this function:

◆ FIELDSTG_requestSlotFiles()

void FIELDSTG_requestSlotFiles ( Task *  task)

Requests the files of the actions the map's slots offer: climbs, drops and the gauge game.

The task (FIELDSTG_loadFieldFiles's) goes unused.

< the gauge game

Definition at line 24 of file file_loader.c.

Referenced by FIELDSTG_loadFieldFiles().

Here is the caller graph for this function:

◆ FIELDSTG_loadFieldFiles()

s32 FIELDSTG_loadFieldFiles ( Task *  task)

Loads the field's files, a step at a time: 1 once done.

< STATUS: the field menu's and STSTATUS's

Definition at line 56 of file file_loader.c.

Referenced by FIELDSTG_runFileLoader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_runFileLoader()

void FIELDSTG_runFileLoader ( Task *  task)

The file loader's update: loads the field's files from its first step on (FIELDSTG_loadFieldFiles)

Definition at line 154 of file file_loader.c.

Referenced by FIELDSTG_createFileLoader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createFileLoader()

Task * FIELDSTG_createFileLoader ( s32  step)

Creates the file loader, which starts at a step.

Definition at line 173 of file file_loader.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateActorIcon()

void FIELDSTG_updateActorIcon ( ActorIcon *  task)

actor_icon.c

actor_icon.c

< onto the wall from above (FIELDSTG_startClimbDown)

< the map, its objects and characters, and the menus

Definition at line 7 of file actor_icon.c.

Referenced by FIELDSTG_createActorIcon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createActorIcon()

ActorIcon * FIELDSTG_createActorIcon ( Actor *  actor)

Creates the player's icon, in the modes before MODE_NEW_GAME only.

< FIELDSTG, where a new game starts

< the icon over the player's head

Definition at line 94 of file actor_icon.c.

Referenced by FIELDSTG_updateActor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_playBattleTransition()

void FIELDSTG_playBattleTransition ( FieldTask *  task,
FieldChildren *  fieldChildren 
)

field.c

field.c

The match depends on the move being an early exit, a do-while (0) that breaks while the buffer is busy, with move declared in it: the block's note stops stmt.c from rolling the exit test to the loop's end, and the loop notes make the GFX.buffer load wait for the counter's in the second scheduler.

< the background's color

< the map, its objects and characters, and the menus

< the transition to a battle

< the map, its objects and characters, and the menus

< pixels a frame

< the step once the mode is requested

< a tile's coordinate once it has slid off

< a tile's coordinate once it has slid off

Definition at line 102 of file field.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_closeField()

void FIELDSTG_closeField ( FieldTask *  task,
FieldChildren *  children 
)

Closes the field for the next mode: the view shrinks to nothing, the cover fades in, and the mode is requested with where the player stands.

< every character (FIELDSTG_createActor)

< the map, its objects and characters, and the menus

< every character (FIELDSTG_createActor)

< the cover that fades the screen (FIELDSTG_drawCover)

< the cover that fades the screen (FIELDSTG_drawCover)

< the cover that fades the screen (FIELDSTG_drawCover)

Definition at line 200 of file field.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_keepsFileCache()

s32 FIELDSTG_keepsFileCache ( void  )

Whether the mode is FIELD_MODE_WSTAG415 or FIELD_MODE_WSTAG815, whose field keeps the file cache and doesn't take the high buffer.

< where the player's run doesn't check the probes ahead (FIELDSTG_checkFlightProbes)

Definition at line 296 of file field.c.

Referenced by showField(), and startField().

Here is the caller graph for this function:

◆ FIELDSTG_updateField()

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 opens its menu.

The match depends on two early exits written as do-while (0)s with breaks: one around the leader's search and the actors it creates (createParty), one around the menu's opening. flow weighs the references inside a loop's notes one level more, which is what ranks the list pointer above the entry it loads, the search's hoisted 1 above task, and the menu's GAME base above the other saved registers; written as plain ifs, task takes s3 for s4.

Definition at line 573 of file field.c.

Referenced by FIELDSTG_createField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createField()

Task * FIELDSTG_createField ( void  )

Creates the field's main task.

< the field's main task (FIELDSTG_createField)

Definition at line 677 of file field.c.

Referenced by FIELDSTG_updateRoot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_leaveFieldAfter()

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, which closes the field (FIELDSTG_closeField) and requests the mode with its argument.

The player comes back to the field at (x, y), facing dir.

< the field's main task (FIELDSTG_createField)

Definition at line 687 of file field.c.

Referenced by FIELDSTG_leaveField(), and FIELDSTG_setOffTrigger().

Here is the caller graph for this function:

◆ FIELDSTG_startEncounter()

void FIELDSTG_startEncounter ( s32  encounter)

Starts encounter FIELDSTG_encounters[encounter]: the field task (FIELD_TASK_FIELD) leaves for the battle (MODE_BATTLE, after a movie in the chapter STORY_MOVIE_BATTLES), and BATTLE_SETUP takes the encounter's enemies and bytes.

A battle led by one of the prize fighters always gives an item, which the field's stage (named in each case by the stage its mode loads, FIELDSTG_stages) and a roll pick: the rare item comes 1 in 32 times for the odd fighters and 1 in 16 for the even ones. In the European version's extra chapter some stages give other items.

< the field's main task (FIELDSTG_createField)

< FIGHTSTG

Definition at line 968 of file field.c.

Referenced by FIELDSTG_startBattle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_startWarp()

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 warp's mode.

< the field's main task (FIELDSTG_createField)

Definition at line 1039 of file field.c.

Referenced by FIELDSTG_warpActor().

Here is the caller graph for this function:

◆ FIELDSTG_scaleSin()

s32 FIELDSTG_scaleSin ( s32  angle,
s32  radius 
)

launch.c

launch.c

Definition at line 7 of file launch.c.

Referenced by flyToDest().

Here is the caller graph for this function:

◆ FIELDSTG_runLaunch()

void FIELDSTG_runLaunch ( Launch *  task)

Sends an actor from the nearest FIELD_TASK_LAUNCHER (y counts twice in the distance) to its dest tile: the actor walks to the task, sets it to TASK_DONE, waits for it to leave that state, then moves along a quarter sine, spinning, until it lands; without such a task it ends at once.

The match depends on the distance written twice.

< a stage's launchers (FIELDSTG_runLaunch)

< TELEPORT

Definition at line 72 of file launch.c.

Referenced by FIELDSTG_createLaunch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createLaunch()

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.

Definition at line 166 of file launch.c.

Referenced by FIELDSTG_launchActor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_showSpotHint()

void FIELDSTG_showSpotHint ( SpotHint *  task)

hidden_spots.c

hidden_spots.c

< the map, its objects and characters, and the menus

Definition at line 7 of file hidden_spots.c.

Referenced by FIELDSTG_createSpotHint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createSpotHint()

SpotHint * FIELDSTG_createSpotHint ( Vec2  from,
Vec2  to 
)

Creates the hint for a search at to, from the prize at from.

Definition at line 57 of file hidden_spots.c.

Referenced by FIELDSTG_updateHiddenSpots().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_hidePrize()

void FIELDSTG_hidePrize ( HiddenSpots *  task)

Hides the prize in one of the hidden spots at random (GAME.prizeSpot keeps it)

Definition at line 67 of file hidden_spots.c.

Referenced by FIELDSTG_createHiddenSpots(), and FIELDSTG_updateHiddenSpots().

Here is the caller graph for this function:

◆ FIELDSTG_updateHiddenSpots()

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 hides it again) or shows a hint, and animates the searched spot's object.

< the hidden spots'

Definition at line 78 of file hidden_spots.c.

Referenced by FIELDSTG_createHiddenSpots().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createHiddenSpots()

HiddenSpots * FIELDSTG_createHiddenSpots ( s32  count)

Creates the hidden spots, the map objects of animation 0xFF, and hides the prize in one (or where it was, in the same mode)

Definition at line 153 of file hidden_spots.c.

Referenced by FIELDSTG_updateMapObjects().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_findHiddenSpot()

HiddenSpots * FIELDSTG_findHiddenSpot ( Vec2 *  pos,
s32  select 
)

The hidden spots, when one is within 10 pixels of pos (selecting it if select), or NULL.

Definition at line 189 of file hidden_spots.c.

Referenced by FIELDSTG_controlPlayer(), and FIELDSTG_isTileFree().

Here is the caller graph for this function:

◆ FIELDSTG_searchEventSpot()

void FIELDSTG_searchEventSpot ( void  )

Searches the hidden spots off the map (x 1000 and up), for an event.

Definition at line 209 of file hidden_spots.c.

Referenced by FIELDSTG_handleFieldCommand().

Here is the caller graph for this function:

◆ FIELDSTG_drawSpotEffect()

void FIELDSTG_drawSpotEffect ( SpotEffect *  task,
Layer *  layer 
)

The layer's sorted callback that draws a search's effect.

Definition at line 225 of file hidden_spots.c.

Referenced by FIELDSTG_updateSpotEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_updateSpotEffect()

void FIELDSTG_updateSpotEffect ( SpotEffect *  task)

A search's effect, over the player or, for an event, its actor 0x11B.

< the map, its objects and characters, and the menus

< every character (FIELDSTG_createActor)

< every character (FIELDSTG_createActor)

Definition at line 237 of file hidden_spots.c.

Referenced by FIELDSTG_createSpotEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createSpotEffect()

SpotEffect * FIELDSTG_createSpotEffect ( s32  forEvent)

Creates a search's effect, over the event's actor 0x11B if forEvent, else over the player.

Definition at line 290 of file hidden_spots.c.

Referenced by FIELDSTG_updateHiddenSpots().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_runGauge()

void FIELDSTG_runGauge ( GaugeGame *  task)

gauge.c

gauge.c

In Europe the rows are random only while GAME.randomGauges lasts, then it is GAUGE_EMPTY_ROW. The match depends on the cell read and shifted as two statements.

< the random rows of FIELDSTG_gaugeRows

< the European version's, all zeros

< frames before the cursor runs

< until cross is pressed

< one time in four

< SYSTEM06

< one time in four

< frames on the stopped cursor

Definition at line 52 of file gauge.c.

Referenced by FIELDSTG_createGauge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createGauge()

GaugeGame * FIELDSTG_createGauge ( Vec2  pos)

Creates the gauge game at a tile.

Definition at line 158 of file gauge.c.

Referenced by FIELDSTG_startActorGauge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_scrollCamera()

void FIELDSTG_scrollCamera ( Camera *  task)

camera.c

camera.c

< the map, its objects and characters, and the menus

< FIELDSTG_createMapStreamer's

< held while the camera shakes

< held while the camera shakes

Definition at line 7 of file camera.c.

Referenced by FIELDSTG_updateCamera().

Here is the caller graph for this function:

◆ FIELDSTG_updateCamera()

void FIELDSTG_updateCamera ( Camera *  task)

The camera's update: it follows its target actor (substate 0) or looks at a spot (1), panning there unless it snaps.

< every character (FIELDSTG_createActor)

< held while the camera shakes

Definition at line 61 of file camera.c.

Referenced by FIELDSTG_createCamera().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createCamera()

Camera * FIELDSTG_createCamera ( void  )

Creates the camera.

Definition at line 139 of file camera.c.

Referenced by FIELDSTG_updateField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_followWithCamera()

void FIELDSTG_followWithCamera ( s32  snap,
s32  id 
)

Points the camera at the actor id, at once if snap.

< every character (FIELDSTG_createActor)

Definition at line 147 of file camera.c.

Referenced by FIELDSTG_runActorAction(), FIELDSTG_runEvent(), and runClimbOffTop().

Here is the caller graph for this function:

◆ FIELDSTG_pointCamera()

void FIELDSTG_pointCamera ( s32  snap,
s32  x,
s32  y 
)

Points the camera at the spot (x, y), at once if snap.

Definition at line 161 of file camera.c.

Referenced by FIELDSTG_runEvent().

Here is the caller graph for this function:

◆ FIELDSTG_shakeCamera()

void FIELDSTG_shakeCamera ( s32  shaking)

Starts or stops the camera's shake.

Definition at line 175 of file camera.c.

Referenced by FIELDSTG_handleFieldCommand().

Here is the caller graph for this function:

◆ FIELDSTG_checkFlightProbe()

s32 FIELDSTG_checkFlightProbe ( Actor *  actor,
s32  x,
s32  y,
Vec2  offset 
)

actor_control.c

actor_control.c

< 2 * 16 pixels, in z's 1/256 pixels

< 3 * 16 pixels, in z's 1/256 pixels

< 4 * 16 pixels, in z's 1/256 pixels

< 5 * 16 pixels, in z's 1/256 pixels

< 6 * 16 pixels, in z's 1/256 pixels

< 6 * 16 pixels, in z's 1/256 pixels

< 5 * 16 pixels, in z's 1/256 pixels

< 4 * 16 pixels, in z's 1/256 pixels

< 3 * 16 pixels, in z's 1/256 pixels

< 2 * 16 pixels, in z's 1/256 pixels

Definition at line 11 of file actor_control.c.

Referenced by FIELDSTG_checkFlightProbes().

Here is the caller graph for this function:

◆ FIELDSTG_checkFlightProbes()

s32 FIELDSTG_checkFlightProbes ( Actor *  actor)

Whether a flying actor runs into the map at any of the five probes ahead of it (FIELDSTG_checkFlightProbe)

Definition at line 90 of file actor_control.c.

Referenced by FIELDSTG_runActorAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_moveByPad()

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), or stops it when none is held.

< stops after a run

Definition at line 117 of file actor_control.c.

Referenced by FIELDSTG_controlPlayer(), and FIELDSTG_walkToGoal().

Here is the caller graph for this function:

◆ FIELDSTG_findActorAt()

Actor * FIELDSTG_findActorAt ( Vec2 *  pos)

The first actor (task id 5) whose box holds the tile pos: halfWidth to each side of it, half that above and below.

The match depends on the registry being held in a variable.

< every character (FIELDSTG_createActor)

Definition at line 142 of file actor_control.c.

Referenced by FIELDSTG_talkToActorAt().

Here is the caller graph for this function:

◆ FIELDSTG_talkToActorAt()

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 answers (ACTOR_TALK), or, for the objects 0x148, 0x15F and 0x160, the player works it (ACTOR_USE).

Returns 1 when the player acts

< every character (FIELDSTG_createActor)

< that object

< that object

< works one of the objects 0x148, 0x15F and 0x160

< answers the actor that talks to it (talkPartner)

< slows down in the air

Definition at line 164 of file actor_control.c.

Referenced by FIELDSTG_controlFlight(), and FIELDSTG_controlPlayer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_controlFlight()

void FIELDSTG_controlFlight ( Actor *  actor)

The player's flight: it rises unless triangle is held (ACTOR_FLY), left and right turn, and cross, low enough, acts on what the player faces; the map's cells hold floors (2 to 6) and ceilings (18 to 22).

The match depends on the button's shift and mask as two statements.

< 2 * 16 pixels, in z's 1/256 pixels

< 6 * 16 pixels, in z's 1/256 pixels

< 5 * 16 pixels, in z's 1/256 pixels

< 4 * 16 pixels, in z's 1/256 pixels

< 3 * 16 pixels, in z's 1/256 pixels

< 2 * 16 pixels, in z's 1/256 pixels

< 2 * 16 pixels, in z's 1/256 pixels

< 2 * 16 pixels, in z's 1/256 pixels

< how far above a wall's top a descent stops

< 3 * 16 pixels, in z's 1/256 pixels

< 3 * 16 pixels, in z's 1/256 pixels

< how far above a wall's top a descent stops

< 4 * 16 pixels, in z's 1/256 pixels

< 4 * 16 pixels, in z's 1/256 pixels

< how far above a wall's top a descent stops

< 5 * 16 pixels, in z's 1/256 pixels

< 5 * 16 pixels, in z's 1/256 pixels

< how far above a wall's top a descent stops

< 6 * 16 pixels, in z's 1/256 pixels

< 6 * 16 pixels, in z's 1/256 pixels

< how far above a wall's top a descent stops

Definition at line 271 of file actor_control.c.

Referenced by FIELDSTG_createActor(), and giveControlBack().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_controlPlayer()

void FIELDSTG_controlPlayer ( Actor *  actor)

The player's update while it walks (Actor.control) when no menu, event or transition is running: the action button or a forced action (condition 0x12) checks the tile it faces, for an object to act on or, failing that, an event; otherwise the pad moves it.

The match depends on the object's case being an early exit, a do-while (0) with a break, after which the event's check is the rest of the block.

< the player talks to what it faces, and clears it

< item 4, which the player needs to search the hidden spots

< searches a hidden spot

< the player talks to what it faces, and clears it

Definition at line 388 of file actor_control.c.

Referenced by FIELDSTG_createActor(), FIELDSTG_resetActorControl(), and FIELDSTG_restorePlayerControl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_controlClimb()

void FIELDSTG_controlClimb ( Actor *  actor)

The player's control on a wall: up and down climb, nothing held holds on.

< holds on to a wall (FIELDSTG_controlClimb)

< holds on to a wall (FIELDSTG_controlClimb)

Definition at line 419 of file actor_control.c.

Referenced by FIELDSTG_runActorAction(), and runGetOnWall().

Here is the caller graph for this function:

◆ FIELDSTG_followLeader()

void FIELDSTG_followLeader ( Actor *  actor)

A partner's control: records the leader's steps in the trail while it moves, and follows them.

< every character (FIELDSTG_createActor)

< walks off through an exit (FIELDSTG_walkActorInDir)

< FIELDSTG_startActorSlide

< a power of two

< a power of two

< walks off through an exit (FIELDSTG_walkActorInDir)

< FIELDSTG_startActorSlide

< stops after a run

Definition at line 437 of file actor_control.c.

Referenced by FIELDSTG_createActor(), FIELDSTG_resetActorControl(), and FIELDSTG_resumePartners().

Here is the caller graph for this function:

◆ FIELDSTG_drainTrail()

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, then each frame pushes two empty steps at the trail's head and walks two steps from its tail.

At x 0 it clears the trail and drops this update. The match depends on the leader being read into a variable before trail is set, which makes trail a copy of the pointer the leader was loaded through.

< every character (FIELDSTG_createActor)

< a power of two

< a power of two

< a power of two

Definition at line 492 of file actor_control.c.

Referenced by FIELDSTG_haltPartners().

Here is the caller graph for this function:

◆ FIELDSTG_walkToGoal()

void FIELDSTG_walkToGoal ( Actor *  actor)

Walks an actor to its goal tile (FIELDSTG_setActorGoal) as the pad would, then faces it the goal's way.

Definition at line 529 of file actor_control.c.

Referenced by FIELDSTG_launchActor(), and FIELDSTG_startActorWalk().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_setActorGoal()

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)

Definition at line 567 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_isActorWalking()

s32 FIELDSTG_isActorWalking ( Actor *  actor)

Whether an actor is still walking to its goal.

Definition at line 575 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_startActorWalk()

void FIELDSTG_startActorWalk ( Actor *  actor)

Starts an actor walking to its goal.

Definition at line 580 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_resetActorControl()

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 partners.

Definition at line 586 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_walkActorInDir()

void FIELDSTG_walkActorInDir ( Actor *  actor,
s32  dir 
)

Walks an actor out through an exit, in a direction (ACTOR_WALK_OUT)

< walks off through an exit (FIELDSTG_walkActorInDir)

Definition at line 604 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_startActorSlide()

void FIELDSTG_startActorSlide ( Actor *  actor,
s32  dir 
)

Starts an actor sliding in a direction (SLOT_SLIDE)

< FIELDSTG_startActorSlide

< FIELDSTG_startActorSlide

Definition at line 611 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_stopActorSlide()

void FIELDSTG_stopActorSlide ( Actor *  actor)

Stops a sliding actor (SLOT_STOP_SLIDE)

< FIELDSTG_startActorSlide

Definition at line 620 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_startClimbUp()

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 at its foot (ACTOR_GET_ON_WALL) or its top (ACTOR_GET_OVER_EDGE), climbs it with the pad (FIELDSTG_controlClimb) and leaves it at the top or the foot; a drop (ACTOR_DROP) falls from height.

< from below (FIELDSTG_startClimbUp)

Definition at line 630 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_startClimbDown()

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)

< onto the wall from above (FIELDSTG_startClimbDown)

Definition at line 648 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_startDrop()

void FIELDSTG_startDrop ( Actor *  actor,
s32  dir,
Vec2  pos,
s32  height 
)

Starts a drop from a ledge of height.

< FIELDSTG_startDrop

Definition at line 666 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_startActorGauge()

void FIELDSTG_startActorGauge ( Actor *  actor,
s32  dir,
Vec2  offset 
)

Starts the gauge game at an offset from an actor, turning the partners its way.

< plays the gauge game (FIELDSTG_startActorGauge)

< every character (FIELDSTG_createActor)

Definition at line 687 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_warpActor()

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 kind, then leaves for its mode (FIELDSTG_startWarp)

Definition at line 712 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_launchActor()

void FIELDSTG_launchActor ( Actor *  actor,
SlotDest *  dest 
)

Sends the player flying to the tile at dest from the nearest launcher (FIELDSTG_createLaunch)

Definition at line 722 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_setActorAnim()

void FIELDSTG_setActorAnim ( Actor *  actor,
s32  set 
)

Starts an actor's animation set from its first frame.

Definition at line 734 of file actor_control.c.

Referenced by beginActorAnim(), FIELDSTG_runActorAction(), FIELDSTG_setActorPose(), runClimbDown(), runClimbOffBottom(), runClimbOffTop(), runClimbUp(), runDrop(), runGauge(), runGetOnWall(), runSearch(), runSlide(), runStop(), runTalk(), runUse(), runUsed(), setActorMethods(), and standAgain().

Here is the caller graph for this function:

◆ FIELDSTG_setActorPose()

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)

< in the pose an event set (FIELDSTG_setActorPose)

Definition at line 743 of file actor_control.c.

Referenced by setActorMethods().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_isActorAnimDone()

s32 FIELDSTG_isActorAnimDone ( Actor *  actor)

Whether an actor's animation has played to its end.

Definition at line 751 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_drawActor()

void FIELDSTG_drawActor ( void *  data,
void *  drawLayer 
)

(actor, layer)

(actor, layer)

The match depends on the shadow's y offset cast to s16, and on the untyped parameters copied to typed locals.

Definition at line 759 of file actor_control.c.

Referenced by FIELDSTG_updateActor().

Here is the caller graph for this function:

◆ FIELDSTG_setActorDir()

void FIELDSTG_setActorDir ( Actor *  actor,
s32  dir 
)

Turns an actor to a direction.

Definition at line 837 of file actor_control.c.

Referenced by setActorMethods().

Here is the caller graph for this function:

◆ FIELDSTG_animateActor()

void FIELDSTG_animateActor ( Actor *  actor)

Plays an actor's animation: when its set (animSet) changes, it loads the set's animations for the five directions (character 2 picks the file by the set first), then steps the frames of the current direction's and loads a new frame's image into VRAM.

The match depends on two early exits written as a do-while (0) with breaks, the pick of the file and the step of the frames: loop.c moves the end of the animation (-1) out of the second one, after the direction's barrier, and reorg fills the first one's < 0x16 branch from its fallthrough, as only a branch out of a loop is. It also depends on reloadImage being read twice, on the width cast to s16 and on reloadImage being cleared last.

Definition at line 867 of file actor_control.c.

Referenced by FIELDSTG_updateActor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_restorePlayerControl()

void FIELDSTG_restorePlayerControl ( Actor *  actor)

Gives the player its pad control back, off any wall.

Definition at line 964 of file actor_control.c.

Referenced by giveControlBack(), runClimbOffBottom(), runClimbOffTop(), runStopSlide(), and standAgain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_playStepSounds()

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 32 when not; with canBattle each step can start a battle (FIELDSTG_checkBattle)

Definition at line 972 of file actor_control.c.

Referenced by FIELDSTG_runActorAction().

Here is the caller graph for this function:

◆ FIELDSTG_playClimbSounds()

void FIELDSTG_playClimbSounds ( Actor *  actor)

The player's climbing sound, every 16 frames.

Definition at line 995 of file actor_control.c.

Referenced by runClimbDown(), and runClimbUp().

Here is the caller graph for this function:

◆ FIELDSTG_runActorAction()

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_GET_OVER_EDGE to ACTOR_DROP (which shift it by a tile, left or right by climbSide), the talk of ACTOR_TALK (the first of the character's talks whose conditions hold) and the others up to ACTOR_STOP_SLIDE.

A treasure (characters 0x21, 0x4D to 0x57, 0x154 to 0x158 and 0x15B, whose talks give an item) doesn't turn to its talker: it opens with TRESUREB, and goes away when the talk ends. The match depends on the talks' loop testing both of its ends with a break at its top, and on the moves of a tile adding a choice of two steps.

< where the player's run doesn't check the probes ahead (FIELDSTG_checkFlightProbes)

< slows down in the air

< flies on, triangle held (FIELDSTG_controlFlight)

< FLIGHT_SPEED_MAX * 6 / 5, for 50 frames a second

< FLIGHT_SPEED_MAX * 6 / 5, for 50 frames a second

< stops after a run

< walks off through an exit (FIELDSTG_walkActorInDir)

< FIELDSTG_startActorSlide

< holds on to a wall (FIELDSTG_controlClimb)

< from below (FIELDSTG_startClimbUp)

< onto the wall from above (FIELDSTG_startClimbDown)

< holds on to a wall (FIELDSTG_controlClimb)

< in the pose an event set (FIELDSTG_setActorPose)

< FIELDSTG_startDrop

< plays the gauge game (FIELDSTG_startActorGauge)

< searches a hidden spot

< answers the actor that talks to it (talkPartner)

< works one of the objects 0x148, 0x15F and 0x160

< that object

Definition at line 1419 of file actor_control.c.

Referenced by FIELDSTG_updateActor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_haltPartners()

void FIELDSTG_haltPartners ( void  )

actor.c

actor.c

< every character (FIELDSTG_createActor)

Definition at line 7 of file actor.c.

Referenced by FIELDSTG_runLaunch(), FIELDSTG_startClimbDown(), FIELDSTG_startClimbUp(), FIELDSTG_startDrop(), and FIELDSTG_updateCommandTask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_resumePartners()

void FIELDSTG_resumePartners ( void  )

Makes the partners follow the player again (FIELDSTG_followLeader)

< every character (FIELDSTG_createActor)

Definition at line 20 of file actor.c.

Referenced by FIELDSTG_runLaunch(), runClimbOffBottom(), runClimbOffTop(), and runDrop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_getFacingTile()

void FIELDSTG_getFacingTile ( Actor *  actor,
Vec2 *  out 
)

The tile in front of an actor, one step in its direction.

Definition at line 33 of file actor.c.

Referenced by FIELDSTG_createActor().

Here is the caller graph for this function:

◆ FIELDSTG_updateActor()

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 control and its action, moves its tile and draws it sorted by y; in TASK_KILL, frees its trail.

< the map, its objects and characters, and the menus

< held

Definition at line 43 of file actor.c.

Referenced by FIELDSTG_createActor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_createActor()

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, 2 to 8 a follower, the others the map's characters).

The match depends on kind holding getModeArg's result in the player's branch, where kind is no longer needed: its second set keeps local-alloc from doubling its live length, which puts it before the constant 1 in the global allocator (the European version matches either way).

< every character (FIELDSTG_createActor)

Definition at line 128 of file actor.c.

Referenced by createCharacters(), and createParty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_endChoice0Answer0()

void FIELDSTG_endChoice0Answer0 ( void  )

◆ FIELDSTG_endChoice0Answer1()

void FIELDSTG_endChoice0Answer1 ( void  )

◆ FIELDSTG_endChoice1Answer0()

void FIELDSTG_endChoice1Answer0 ( void  )

◆ FIELDSTG_endChoice1Answer1()

void FIELDSTG_endChoice1Answer1 ( void  )

Definition at line 20 of file field_stage.c.

◆ FIELDSTG_endChoice2Answer0()

void FIELDSTG_endChoice2Answer0 ( void  )

◆ FIELDSTG_endChoice2Answer1()

void FIELDSTG_endChoice2Answer1 ( void  )

◆ FIELDSTG_endChoice3Answer0()

void FIELDSTG_endChoice3Answer0 ( void  )

◆ FIELDSTG_endChoice3Answer1()

void FIELDSTG_endChoice3Answer1 ( void  )

Definition at line 22 of file field_stage.c.

◆ FIELDSTG_endChoice4Answer0()

void FIELDSTG_endChoice4Answer0 ( void  )

◆ FIELDSTG_endChoice4Answer1()

void FIELDSTG_endChoice4Answer1 ( void  )

◆ FIELDSTG_endChoice5Answer0()

void FIELDSTG_endChoice5Answer0 ( void  )

◆ FIELDSTG_endChoice5Answer1()

void FIELDSTG_endChoice5Answer1 ( void  )

Definition at line 24 of file field_stage.c.

◆ FIELDSTG_endChoice6Answer0()

void FIELDSTG_endChoice6Answer0 ( void  )

◆ FIELDSTG_endChoice6Answer1()

void FIELDSTG_endChoice6Answer1 ( void  )

◆ FIELDSTG_endChoice7Answer0()

void FIELDSTG_endChoice7Answer0 ( void  )

◆ FIELDSTG_endChoice7Answer1()

void FIELDSTG_endChoice7Answer1 ( void  )

Definition at line 26 of file field_stage.c.

◆ FIELDSTG_endChoice8Answer0()

void FIELDSTG_endChoice8Answer0 ( void  )

◆ FIELDSTG_endChoice8Answer1()

void FIELDSTG_endChoice8Answer1 ( void  )

◆ FIELDSTG_endChoice9Answer0()

void FIELDSTG_endChoice9Answer0 ( void  )

◆ FIELDSTG_endChoice9Answer1()

void FIELDSTG_endChoice9Answer1 ( void  )

Definition at line 28 of file field_stage.c.

◆ FIELDSTG_endChoice10Answer0()

void FIELDSTG_endChoice10Answer0 ( void  )

◆ FIELDSTG_endChoice10Answer1()

void FIELDSTG_endChoice10Answer1 ( void  )

◆ FIELDSTG_endChoice11Answer0()

void FIELDSTG_endChoice11Answer0 ( void  )

◆ FIELDSTG_endChoice11Answer1()

void FIELDSTG_endChoice11Answer1 ( void  )

Definition at line 30 of file field_stage.c.

◆ FIELDSTG_endChoice12Answer0()

void FIELDSTG_endChoice12Answer0 ( void  )

◆ FIELDSTG_endChoice12Answer1()

void FIELDSTG_endChoice12Answer1 ( void  )

◆ FIELDSTG_endChoice13Answer0()

void FIELDSTG_endChoice13Answer0 ( void  )

◆ FIELDSTG_endChoice13Answer1()

void FIELDSTG_endChoice13Answer1 ( void  )

Definition at line 32 of file field_stage.c.

◆ FIELDSTG_endChoice14Answer0()

void FIELDSTG_endChoice14Answer0 ( void  )

◆ FIELDSTG_endChoice14Answer1()

void FIELDSTG_endChoice14Answer1 ( void  )

◆ FIELDSTG_endChoice15Answer0()

void FIELDSTG_endChoice15Answer0 ( void  )

◆ FIELDSTG_endChoice15Answer1()

void FIELDSTG_endChoice15Answer1 ( void  )

Definition at line 34 of file field_stage.c.

◆ FIELDSTG_setupField()

void FIELDSTG_setupField ( void  )

The setup of the field's own stage (FIELDSTG_initFuncs), which fills FIELDSTG_state as the stage overlays' setup functions do; some points of the story change its soundBank and music.

As theirs, the match depends on the start position being set with a constructor, (Vec2){x, y}.

< ENV_0204: the Cargo Tower

< ENV_0204: the Cargo Tower

< a cell's value: a direction (3 bits) and a StageSlot (5)

< EAUCTION: the Cargo Tower at some points of the story (FIELDSTG_setupField)

< EAUCTION: the Cargo Tower at some points of the story (FIELDSTG_setupField)

Definition at line 51 of file field_stage.c.

◆ FIELDSTG_startTween()

void FIELDSTG_startTween ( PanelAnim *  tween,
s32  in 
)

◆ FIELDSTG_updateTween()

s32 FIELDSTG_updateTween ( PanelAnim *  tween)

◆ FIELDSTG_getFileEntry()

s32 FIELDSTG_getFileEntry ( s32  index)

state.c

state.c

Definition at line 7 of file state.c.

◆ FIELDSTG_getActorWidth()

s32 FIELDSTG_getActorWidth ( s32  index)

The width of character index.

Definition at line 12 of file state.c.

◆ FIELDSTG_pickStage()

void FIELDSTG_pickStage ( void  )

Picks the stage overlay of the mode (FIELDSTG_stages, in the European version's extra chapter FIELDSTG_extraStages and then those): its file and its setup; hangs if there is none.

Definition at line 19 of file state.c.

◆ FIELDSTG_findBattles()

FieldBattles * FIELDSTG_findBattles ( FieldBattles *  list,
s32  id 
)

The battles of the place id in a stage's list, or NULL.

Definition at line 51 of file state.c.

◆ FIELDSTG_resetScriptTimer()

void FIELDSTG_resetScriptTimer ( void  )

script.c

script.c

Definition at line 6 of file script.c.

◆ FIELDSTG_findActor()

Actor * FIELDSTG_findActor ( s32  character)

The actor of a character (Actor.key1), or NULL.

< every character (FIELDSTG_createActor)

Definition at line 11 of file script.c.

Referenced by FIELDSTG_clearScriptFlag(), FIELDSTG_waitAnimDone(), and FIELDSTG_waitWalkDone().

Here is the caller graph for this function:

◆ FIELDSTG_waitScriptTime()

void FIELDSTG_waitScriptTime ( s32  time,
s32 *  pc 
)

A script's wait: counts time down, then moves the script on.

Definition at line 16 of file script.c.

◆ FIELDSTG_waitAnimDone()

void FIELDSTG_waitAnimDone ( s32  id,
s32 *  pc 
)

A script's wait for the animation of the actor id to end.

Definition at line 30 of file script.c.

Here is the call graph for this function:

◆ FIELDSTG_waitWalkDone()

void FIELDSTG_waitWalkDone ( s32  id,
s32 *  pc 
)

A script's wait for the actor id to reach its goal.

Definition at line 39 of file script.c.

Here is the call graph for this function:

◆ FIELDSTG_toScreenPos()

void FIELDSTG_toScreenPos ( Vec2 *  pos)

Turns a map position into a screen one.

< the map, its objects and characters, and the menus

Definition at line 48 of file script.c.

◆ FIELDSTG_clearScriptFlag()

void FIELDSTG_clearScriptFlag ( void  )

A script helper: clears the script flag of character 1, or else of character 2.

Definition at line 59 of file script.c.

Here is the call graph for this function:

◆ FIELDSTG_findScriptCommand()

ScriptCommand * FIELDSTG_findScriptCommand ( s32  id)

The script command id of FIELDSTG_scriptCommands, or NULL.

Definition at line 69 of file script.c.

Referenced by FIELDSTG_createScriptCommand(), and FIELDSTG_handleScriptCommand().

Here is the caller graph for this function:

◆ FIELDSTG_createScriptCommand()

s32 FIELDSTG_createScriptCommand ( s32  id)

Creates the task of script command id, or returns 0.

Definition at line 81 of file script.c.

Referenced by FIELDSTG_setEventPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_handleScriptCommand()

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.

Definition at line 93 of file script.c.

Referenced by FIELDSTG_setEventPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_rollBattleSteps()

void FIELDSTG_rollBattleSteps ( void  )

battle.c

battle.c

Definition at line 7 of file battle.c.

Referenced by FIELDSTG_countBattleSteps().

Here is the caller graph for this function:

◆ FIELDSTG_startAreaBattle()

void FIELDSTG_startAreaBattle ( void  )

Starts one of the eight battles of the player's battle area, at random.

< every character (FIELDSTG_createActor)

< a cell's value: its battle area (FieldBattles), or 0

Definition at line 18 of file battle.c.

Referenced by FIELDSTG_countBattleSteps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_countBattleSteps()

void FIELDSTG_countBattleSteps ( void  )

Counts down to the next battle at each step by the area's rate (FIELDSTG_battleRates), unless the field is busy, and starts it when they run out.

< a cell's value: its battle area (FieldBattles), or 0

< every character (FIELDSTG_createActor)

< a cell's value: its battle area (FieldBattles), or 0

Definition at line 35 of file battle.c.

Here is the call graph for this function:

◆ FIELDSTG_startEventBattle()

void FIELDSTG_startEventBattle ( s32  index)

Starts battle index of the fourth area, the one events start.

Definition at line 61 of file battle.c.

Here is the call graph for this function:

◆ FIELDSTG_selectMap()

s32 FIELDSTG_selectMap ( s32  index)

map.c

map.c

Returns 0 when no file is set. The match depends on the file's check being an early exit, a do-while (0) that breaks once the file is set, with file declared in it: the block's note stops stmt.c from rolling the exit test to the loop's end, and the loop notes keep the prologue's stores of ra and s0 ahead of the load in the second scheduler.

Definition at line 19 of file map.c.

Referenced by FIELDSTG_getMapCell().

Here is the caller graph for this function:

◆ FIELDSTG_setMapFile()

void FIELDSTG_setMapFile ( s32  index,
s32  value 
)

Sets the file of map index (FieldMap.setFile)

Definition at line 46 of file map.c.

◆ FIELDSTG_setFirstMap()

void FIELDSTG_setFirstMap ( s32  index)

Puts the player on map index when the mode is new (FieldMap.setFirstMap)

Definition at line 51 of file map.c.

◆ FIELDSTG_setMap()

void FIELDSTG_setMap ( s32  index)

Puts the player on map index (FieldMap.setMap)

Definition at line 58 of file map.c.

◆ FIELDSTG_getMapCell()

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 a file.

Definition at line 64 of file map.c.

Referenced by FIELDSTG_getWalkStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIELDSTG_isTileFree()

s32 FIELDSTG_isTileFree ( Vec2 *  pos)

Whether nothing stands at pos: no character's box (gathered once a frame) and no object.

The match depends on the two widths, the gathered box's and the tested one's, being variables of their own: one width for both blocks gives GCC 2.8.1 other registers.

< every character (FIELDSTG_createActor)

Definition at line 103 of file map.c.

Here is the call graph for this function:

◆ FIELDSTG_getWalkStep()

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.getWalkStep)

Definition at line 150 of file map.c.

Here is the call graph for this function:

◆ FIELDSTG_getFlyStep()

void FIELDSTG_getFlyStep ( Vec2 *  pos,
s32  scale,
s32  index,
Vec2 *  out 
)

A step of scale in a direction, on the flat (FieldMap.getFlyStep)

Definition at line 164 of file map.c.

◆ FIELDSTG_startBattle()

static void FIELDSTG_startBattle ( AreaBattle *  battle)
inlinestatic

Starts a battle: its fight stage, its music and its encounter.

Definition at line 1061 of file field_mode.h.

Referenced by FIELDSTG_startAreaBattle(), FIELDSTG_startEventBattle(), and FIELDSTG_startEventBattle5().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FIELDSTG_encounters

Encounter FIELDSTG_encounters[]
extern

FIELDSTG's data (fieldstg.c), in its order.

FIELDSTG's data (fieldstg.c), in its order.

Definition at line 948 of file fieldstg.c.

Referenced by FIELDSTG_startEncounter().

◆ FIELDSTG_liftShake

s16 FIELDSTG_liftShake[]
extern

FIELDSTG_updateLift's shakes, up to 1000.

Definition at line 1286 of file fieldstg.c.

Referenced by FIELDSTG_updateLift().

◆ FIELDSTG_choices

ChoiceText FIELDSTG_choices[16]
extern

Definition at line 1309 of file fieldstg.c.

Referenced by FIELDSTG_runChoice().

◆ FIELDSTG_progressEvents

ProgressEvent FIELDSTG_progressEvents[]
extern

Definition at line 1328 of file fieldstg.c.

Referenced by FIELDSTG_runStoryEvents().

◆ FIELDSTG_cutsceneAnim

AnimFrame FIELDSTG_cutsceneAnim[]
extern

FIELDSTG_playCutsceneAnim's animations: kind 0's,.

Definition at line 1347 of file fieldstg.c.

Referenced by FIELDSTG_playCutsceneAnim().

◆ FIELDSTG_cutsceneLoopAnim

AnimFrame FIELDSTG_cutsceneLoopAnim[]
extern

and kind 1's two

Definition at line 1354 of file fieldstg.c.

Referenced by FIELDSTG_playCutsceneAnim().

◆ FIELDSTG_cutsceneLoopAnim2

AnimFrame FIELDSTG_cutsceneLoopAnim2[]
extern

Definition at line 1359 of file fieldstg.c.

Referenced by FIELDSTG_playCutsceneAnim().

◆ FIELDSTG_effectAnims

AnimFrame* FIELDSTG_effectAnims[][4]
extern

FIELDSTG_updateEffect's animations of each set.

Definition at line 1396 of file fieldstg.c.

Referenced by FIELDSTG_updateEffect().

◆ FIELDSTG_slotLayouts

u8 FIELDSTG_slotLayouts[][4][5][6]
extern

FIELDSTG_pickViewTiles's slot layouts: [layout][quadrant][row][column].

Definition at line 1400 of file fieldstg.c.

Referenced by FIELDSTG_pickViewTiles().

◆ FIELDSTG_dirLayouts

u8 FIELDSTG_dirLayouts[][2]
extern

the layout and its flips for each direction

Definition at line 1492 of file fieldstg.c.

Referenced by FIELDSTG_pickViewTiles().

◆ FIELDSTG_slotOffsets

u8 FIELDSTG_slotOffsets[][2][2]
extern

the slots' offset in tiles: [quadrant][x, y][unflipped, flipped]

Definition at line 1496 of file fieldstg.c.

Referenced by FIELDSTG_pickViewTiles().

◆ FIELDSTG_spriteDepths

s32 FIELDSTG_spriteDepths[]
extern

depth of each layer of a StreamTask's sprites

Definition at line 1502 of file fieldstg.c.

Referenced by FIELDSTG_drawStream().

◆ FIELDSTG_slotImages

Vec2 FIELDSTG_slotImages[]
extern

VRAM position of each StreamTask slot's image.

Definition at line 1505 of file fieldstg.c.

Referenced by FIELDSTG_loadStreamSprites().

◆ FIELDSTG_areaNames

AreaName FIELDSTG_areaNames[]
extern

Definition at line 1519 of file fieldstg.c.

Referenced by FIELDSTG_showAreaName().

◆ FIELDSTG_bannerBoxes

BannerBox FIELDSTG_bannerBoxes[10]
extern

FIELDSTG_updateBanner's boxes.

Definition at line 1761 of file fieldstg.c.

Referenced by FIELDSTG_updateBanner().

◆ FIELDSTG_triggerAnims

u8 FIELDSTG_triggerAnims[][9]
extern

FIELDSTG_stepBalloonAnim's animations: (frame, time) pairs up to 0xFF.

Definition at line 1773 of file fieldstg.c.

Referenced by FIELDSTG_stepBalloonAnim().

◆ FIELDSTG_nearDirs

u8 FIELDSTG_nearDirs[][8]
extern

whether two directions are at most 45 degrees apart

Definition at line 1794 of file fieldstg.c.

Referenced by FIELDSTG_findTrigger().

◆ FIELDSTG_file5DModes

s16 FIELDSTG_file5DModes[]
extern

the modes that load the field file 0x5D (FIELDSTG_requestInnNames)

Definition at line 1804 of file fieldstg.c.

Referenced by FIELDSTG_requestInnNames().

◆ FIELDSTG_iconAnims

u8(*[] FIELDSTG_iconAnims)[2]
extern

FIELDSTG_updateActorIcon's animation of each substate.

Definition at line 1836 of file fieldstg.c.

Referenced by FIELDSTG_updateActorIcon().

◆ FIELDSTG_iconPath

IconOffset FIELDSTG_iconPath[]
extern

up to (0, 0)

Definition at line 1839 of file fieldstg.c.

Referenced by FIELDSTG_updateActorIcon().

◆ FIELDSTG_iconPathStep

s32 FIELDSTG_iconPathStep
extern

the step in FIELDSTG_iconPath

Definition at line 1845 of file fieldstg.c.

Referenced by FIELDSTG_updateActorIcon().

◆ FIELDSTG_tileMoves

TileMove FIELDSTG_tileMoves[]
extern

Definition at line 1846 of file fieldstg.c.

Referenced by moveTransitionTile().

◆ FIELDSTG_eventIds

s16 FIELDSTG_eventIds[]
extern

the events FIELDSTG_startListedEvent starts

Definition at line 1910 of file fieldstg.c.

Referenced by FIELDSTG_startListedEvent().

◆ FIELDSTG_spotAnim

u8 FIELDSTG_spotAnim[][2]
extern

animation of FIELDSTG_updateHiddenSpots: (frame, time) pairs up to 0xFF

Definition at line 1931 of file fieldstg.c.

Referenced by FIELDSTG_updateHiddenSpots().

◆ FIELDSTG_dirAnims

u8* FIELDSTG_dirAnims[]
extern

FIELDSTG_updateSpotEffect's animation for each direction.

Definition at line 1980 of file fieldstg.c.

Referenced by FIELDSTG_updateSpotEffect().

◆ FIELDSTG_dirDepths

s32 FIELDSTG_dirDepths[]
extern

and its depth offset

Definition at line 1984 of file fieldstg.c.

Referenced by FIELDSTG_updateSpotEffect().

◆ FIELDSTG_gaugeRows

u8* FIELDSTG_gaugeRows[]
extern

The rows of FIELDSTG_runGauge's gauges, 2 bits a cell.

The USA version has no row 8 (for GAME.randomGauges used up) and reads past the table, a null pointer

Definition at line 2020 of file fieldstg.c.

Referenced by FIELDSTG_runGauge().

◆ FIELDSTG_shakeOffsets

Vec2 FIELDSTG_shakeOffsets[]
extern

the camera's shake offsets

Definition at line 2027 of file fieldstg.c.

Referenced by FIELDSTG_scrollCamera().

◆ FIELDSTG_probes

u8 FIELDSTG_probes[][5]
extern

the probes of each direction (FIELDSTG_checkFlightProbes)

Definition at line 2034 of file fieldstg.c.

Referenced by FIELDSTG_checkFlightProbes().

◆ FIELDSTG_probePos

Vec2 FIELDSTG_probePos[]
extern

a probe's position

Definition at line 2044 of file fieldstg.c.

Referenced by FIELDSTG_checkFlightProbes().

◆ FIELDSTG_probeSteps

u8 FIELDSTG_probeSteps[][2]
extern

a probe's offset: bit 0 set, bit 7 negative

Definition at line 2062 of file fieldstg.c.

Referenced by FIELDSTG_checkFlightProbes().

◆ FIELDSTG_padDirs

s32 FIELDSTG_padDirs[]
extern

the direction of each combination of the pad directions

Definition at line 2080 of file fieldstg.c.

Referenced by FIELDSTG_moveByPad().

◆ FIELDSTG_standIns

StandIn FIELDSTG_standIns[]
extern

up to character 0

Definition at line 2086 of file fieldstg.c.

Referenced by FIELDSTG_talkToActorAt().

◆ FIELDSTG_turnedPartners

s32 FIELDSTG_turnedPartners[]
extern

the partners' kinds (Actor.key2): the ones FIELDSTG_startActorGauge turns, FIELDSTG_haltPartners stops and FIELDSTG_resumePartners makes follow again

Definition at line 2104 of file fieldstg.c.

Referenced by FIELDSTG_startActorGauge().

◆ FIELDSTG_haltedPartners

s32 FIELDSTG_haltedPartners[]
extern

Definition at line 2107 of file fieldstg.c.

Referenced by FIELDSTG_haltPartners().

◆ FIELDSTG_followingPartners

s32 FIELDSTG_followingPartners[]
extern

Definition at line 2110 of file fieldstg.c.

Referenced by FIELDSTG_resumePartners().

◆ FIELDSTG_dirSteps

Vec2 FIELDSTG_dirSteps[]
extern

tile offset of each direction

Definition at line 2113 of file fieldstg.c.

Referenced by FIELDSTG_getFacingTile().

◆ FIELDSTG_images

FieldImages FIELDSTG_images
extern

the field's own stage (FIELDSTG_setupField)

the field's own stage (FIELDSTG_setupField)

Definition at line 2124 of file fieldstg.c.

Referenced by FIELDSTG_setupField().

◆ FIELDSTG_actorList

FieldActorEntry* FIELDSTG_actorList[]
extern

Definition at line 2501 of file fieldstg.c.

Referenced by FIELDSTG_setupField().

◆ FIELDSTG_mapObjects

StageTile FIELDSTG_mapObjects[]
extern

The field's map objects (FieldState.objects), up to the first margin 0.

Definition at line 2534 of file fieldstg.c.

Referenced by FIELDSTG_setupField().

◆ FIELDSTG_slots

StageSlot FIELDSTG_slots[]
extern

What the player can trigger on the field's map (FieldState.slots), up to type 0.

Definition at line 2552 of file fieldstg.c.

Referenced by FIELDSTG_setupField().

◆ FIELDSTG_initFuncs

void(* FIELDSTG_initFuncs[])(void) ( void  )
extern

Definition at line 2559 of file fieldstg.c.

Referenced by FIELDSTG_createStoryEvents().

◆ FIELDSTG_tweenStart

void(* FIELDSTG_tweenStart) (PanelAnim *tween, s32 in) ( PanelAnim *  tween,
s32  in 
)
extern

FIELDSTG_startTween.

Definition at line 2560 of file fieldstg.c.

Referenced by FIELDSTG_runChoice().

◆ FIELDSTG_tweenUpdate

s32(* FIELDSTG_tweenUpdate) (PanelAnim *tween) ( PanelAnim *  tween)
extern

FIELDSTG_updateTween.

Definition at line 2561 of file fieldstg.c.

Referenced by FIELDSTG_runChoice().

◆ FIELDSTG_events

FieldEvent FIELDSTG_events[]
extern

The story events (FIELDSTG_setupField), up to the first id -1: the scripts are WSTAG260's, the stage that FIELDSTG_stages starts with FIELDSTG_createStoryEvents.

Definition at line 2572 of file fieldstg.c.

Referenced by FIELDSTG_setupField().

◆ FIELDSTG_fileEntries

s32 FIELDSTG_fileEntries[]
extern

by character (Actor.key1)

Definition at line 2761 of file fieldstg.c.

Referenced by FIELDSTG_getFileEntry().

◆ FIELDSTG_actorWidths

u8 FIELDSTG_actorWidths[]
extern

by character, in pixels (FieldState.getActorWidth)

Definition at line 2920 of file fieldstg.c.

Referenced by FIELDSTG_getActorWidth().

◆ FIELDSTG_extraStages

StageEntry FIELDSTG_extraStages[]
extern

the extra chapter's, which run on into FIELDSTG_stages

the extra chapter's, which run on into FIELDSTG_stages

Definition at line 2977 of file fieldstg.c.

Referenced by FIELDSTG_pickStage().

◆ FIELDSTG_stages

StageEntry FIELDSTG_stages[]
extern

Definition at line 3337 of file fieldstg.c.

Referenced by FIELDSTG_pickStage().

◆ FIELDSTG_scriptTimer

ScriptTimer FIELDSTG_scriptTimer
extern

Definition at line 3580 of file fieldstg.c.

Referenced by FIELDSTG_resetScriptTimer(), and FIELDSTG_waitScriptTime().

◆ FIELDSTG_scriptHelpers

void(* FIELDSTG_scriptHelpers[])() ( )
extern

the script helpers (FIELDSTG_toScreenPos...)

Definition at line 3581 of file fieldstg.c.

Referenced by FIELDSTG_createTalk(), and FIELDSTG_getSpeechPos().

◆ FIELDSTG_scriptCommands

ScriptCommand FIELDSTG_scriptCommands[]
extern

The script commands (FIELDSTG_findScriptCommand), up to the first id 0.

Most of their functions are those of the stage whose event scripts run the command (include/field/stages.h), and they take different arguments. FIELDSTG's own creates are cast: they return their task, or nothing, where the stages' return it as an s32

Definition at line 3590 of file fieldstg.c.

Referenced by FIELDSTG_findScriptCommand().

◆ FIELDSTG_checkBattle

void(* FIELDSTG_checkBattle) () ( )
extern

FIELDSTG_countBattleSteps.

Definition at line 3652 of file fieldstg.c.

Referenced by FIELDSTG_playStepSounds().

◆ FIELDSTG_battleRates

s32 FIELDSTG_battleRates[]
extern

how much each area lowers GAME.battleSteps, the steps to the next battle

Definition at line 3656 of file fieldstg.c.

Referenced by FIELDSTG_countBattleSteps().

◆ FIELDSTG_boxFrame

s32 FIELDSTG_boxFrame
extern

the frame FIELDSTG_boxes was filled in

Definition at line 3678 of file fieldstg.c.

Referenced by FIELDSTG_isTileFree().

◆ FIELDSTG_dirVectors

Vec2 FIELDSTG_dirVectors[][8]
extern

a direction's vector, scaled by 4096

Definition at line 3679 of file fieldstg.c.

Referenced by FIELDSTG_getFlyStep(), and FIELDSTG_getWalkStep().

◆ FIELDSTG_mirrorDirs

u8 FIELDSTG_mirrorDirs[]
extern

Definition at line 3751 of file fieldstg.c.

Referenced by FIELDSTG_getWalkStep().

◆ FIELDSTG_slideVoice

s16 FIELDSTG_slideVoice
extern

the voice of the slide's sound (ACTOR_SLIDE, SOUND_TRAP_ICE)

Definition at line 3762 of file fieldstg.c.

Referenced by runSlide(), and runStopSlide().

◆ FIELDSTG_heldVoice

s16 FIELDSTG_heldVoice
extern

the voice of FIELDSTG_handleFieldCommand's held sound

Definition at line 3754 of file fieldstg.c.

Referenced by playHeldSound(), and stopHeldSound().

◆ FIELDSTG_mapSize

Vec2 FIELDSTG_mapSize
extern

FIELDSTG_getMapSize's.

Definition at line 3755 of file fieldstg.c.

Referenced by FIELDSTG_getMapSize().

◆ FIELDSTG_objectCursor

StageTile* FIELDSTG_objectCursor
extern

FIELDSTG_findNextObject's search of the map objects.

Definition at line 3756 of file fieldstg.c.

Referenced by FIELDSTG_findNextObject(), and FIELDSTG_findObject().

◆ FIELDSTG_objectId

s32 FIELDSTG_objectId
extern

and the id it looks for

Definition at line 3757 of file fieldstg.c.

Referenced by FIELDSTG_findNextObject(), and FIELDSTG_findObject().

◆ FIELDSTG_tiles

Vec2 FIELDSTG_tiles[5][6]
extern

FIELDSTG_playBattleTransition's.

Definition at line 3758 of file fieldstg.c.

Referenced by FIELDSTG_playBattleTransition(), moveTransitionTile(), and placeTransitionTiles().

◆ FIELDSTG_battleFileStep

s32 FIELDSTG_battleFileStep
extern

FIELDSTG_playBattleTransition's: 0 and 1 wait for the CD, 2 the battle's files are asked for.

Definition at line 3759 of file fieldstg.c.

Referenced by FIELDSTG_playBattleTransition(), and waitToRequestBattleFiles().

◆ FIELDSTG_screenRect

RECT FIELDSTG_screenRect
extern

Definition at line 3761 of file fieldstg.c.

Referenced by FIELDSTG_playBattleTransition().

◆ FIELDSTG_boxes

Box FIELDSTG_boxes[20]
extern

the characters' boxes (FIELDSTG_isTileFree)

Definition at line 3770 of file fieldstg.c.

Referenced by FIELDSTG_isTileFree().

◆ FIELDSTG_boxCount

s32 FIELDSTG_boxCount
extern

and their number

Definition at line 3771 of file fieldstg.c.

Referenced by FIELDSTG_isTileFree().