Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
FieldState Struct Reference

The field's state (FIELDSTG_state): what a stage tells FIELDSTG about itself, filled by its setup function (stageFuncs[0], FIELDSTG_setupField for the field's own), then what FIELDSTG keeps of the field. More...

#include <field/field_map.h>

Collaboration diagram for FieldState:
[legend]

Data Fields

s32 stageFile
 the stage overlay's file
 
struct Task *(* stageInit )(void *owner)
 starts the stage's task
 
s32 mapFile
 the file of the map's tiles (FIELDSTG_createMapStreamer)
 
s32 sheetEntry
 the stage's sprite sheet, loaded before the field starts, or 0
 
StageTile * objects
 the map objects, up to the first margin 0
 
StageSlot * slots
 up to the first type 0
 
s32 imageEntry
 an image archive's file entry, loaded at (0x140, 0x100), or 0
 
s32 imageFile
 or an image archive file, or 0
 
FieldBattles * battles
 
FieldEvent * events
 up to the first id -1
 
union { 
 
   FieldImage *   field 
 the field's image (the first two ActorImages) More...
 
   ActorImage *   actors 
 then the actors', from actors[2] More...
 
} images 
 
Vec2 start
 where the player starts
 
s32 startDir
 and its direction
 
CVECTOR spriteColor
 the field's sprites' color, unless cd is 0
 
s32 soundBank
 SOUND.loadBank's, or 0.
 
s32 music
 SOUND.playSound's, or 0.
 
s32 textFile
 the stage's text file, for the talks
 
s32 eventText
 the running event's text file and entry
 
FieldActorEntry ** actors
 the characters, up to the first NULL
 
s32 menuOpen
 the field menu (START) or the inn (FIELDSTG_openInn) is open: the pad doesn't move the player
 
s32 frozen
 no control, triggers or encounters for the player: while the area name banner shows (FIELDSTG_createBanner) and as the field closes
 
s32 busy
 an event, a warp, a launch or a battle has the player
 
s32 battleStarting
 an encounter started (FIELDSTG_startEncounter)
 
s32 acting
 the player talks, climbs, slides or searches
 
Vec2 defaultStart
 where the player starts without a mode argument
 
s32 defaultStartDir
 and its direction
 
void(* init )(void)
 FIELDSTG_pickStage.
 
s32(* getFileEntry )(s32 character)
 FIELDSTG_fileEntries's.
 
s32(* getActorWidth )(s32 character)
 FIELDSTG_actorWidths's.
 
FieldBattles *(* findBattles )(FieldBattles *list, s32 id)
 the place of the list with that id
 

Detailed Description

The field's state (FIELDSTG_state): what a stage tells FIELDSTG about itself, filled by its setup function (stageFuncs[0], FIELDSTG_setupField for the field's own), then what FIELDSTG keeps of the field.

The first 0x64 bytes are cleared by FIELDSTG_pickStage, which also picks the stage overlay for the current mode.

The setup functions set start with a constructor, (Vec2){x, y}: GCC clobbers the whole field before its two stores, which keeps the stores to FIELDSTG_state on either side of it but lets the constants rise above it. The match depends on that form: two stores of their own schedule otherwise.

Definition at line 441 of file field_map.h.

Field Documentation

◆ stageFile

s32 FieldState::stageFile

the stage overlay's file

Definition at line 442 of file field_map.h.

Referenced by FIELDSTG_pickStage(), and startField().

◆ stageInit

struct Task *(* FieldState::stageInit) (void *owner)

starts the stage's task

Definition at line 442 of file field_map.h.

Referenced by FIELDSTG_pickStage(), and startField().

◆ mapFile

s32 FieldState::mapFile

the file of the map's tiles (FIELDSTG_createMapStreamer)

Definition at line 444 of file field_map.h.

Referenced by FIELDSTG_setupField(), setupStage(), and showField().

◆ sheetEntry

s32 FieldState::sheetEntry

the stage's sprite sheet, loaded before the field starts, or 0

Definition at line 445 of file field_map.h.

Referenced by drawEffect(), drawEffect(), drawFaller(), drawFloaterPart(), drawPairSprite(), drawStageEffect(), FIELDSTG_loadFieldFiles(), FIELDSTG_setupField(), FIELDSTG_updateField(), and setupStage().

◆ objects

◆ slots

◆ imageEntry

s32 FieldState::imageEntry

an image archive's file entry, loaded at (0x140, 0x100), or 0

Definition at line 448 of file field_map.h.

Referenced by FIELDSTG_loadFieldFiles().

◆ imageFile

s32 FieldState::imageFile

or an image archive file, or 0

Definition at line 449 of file field_map.h.

Referenced by FIELDSTG_loadFieldFiles(), FIELDSTG_setupField(), and setupStage().

◆ battles

◆ events

FieldEvent* FieldState::events

up to the first id -1

Definition at line 451 of file field_map.h.

Referenced by FIELDSTG_setupField(), FIELDSTG_startEvent(), and setupStage().

◆ field

FieldImage* FieldState::field

the field's image (the first two ActorImages)

Definition at line 453 of file field_map.h.

Referenced by FIELDSTG_createActor(), FIELDSTG_drawCoverBlock(), and FIELDSTG_setupField().

◆ actors [1/2]

ActorImage* FieldState::actors

then the actors', from actors[2]

Definition at line 454 of file field_map.h.

Referenced by createCharacters(), createParty(), FIELDSTG_createActor(), FIELDSTG_setupField(), and setupStage().

◆ [union]

union { ... } FieldState::images

◆ start

Vec2 FieldState::start

where the player starts

Definition at line 456 of file field_map.h.

Referenced by FIELDSTG_createActor(), FIELDSTG_setupField(), and setupStage().

◆ startDir

s32 FieldState::startDir

and its direction

Definition at line 457 of file field_map.h.

Referenced by FIELDSTG_createActor(), FIELDSTG_setupField(), and setupStage().

◆ spriteColor

CVECTOR FieldState::spriteColor

the field's sprites' color, unless cd is 0

Definition at line 458 of file field_map.h.

Referenced by FIELDSTG_drawMapObject(), FIELDSTG_drawStream(), FIELDSTG_setupField(), FIELDSTG_updateMapObjects(), and setupStage().

◆ soundBank

s32 FieldState::soundBank

SOUND.loadBank's, or 0.

Definition at line 459 of file field_map.h.

Referenced by FIELDSTG_setupField(), FIELDSTG_updateField(), and setupStage().

◆ music

s32 FieldState::music

SOUND.playSound's, or 0.

Definition at line 460 of file field_map.h.

Referenced by FIELDSTG_setupField(), FIELDSTG_updateField(), and setupStage().

◆ textFile

s32 FieldState::textFile

the stage's text file, for the talks

Definition at line 461 of file field_map.h.

Referenced by FIELDSTG_createTalk(), FIELDSTG_loadFieldFiles(), FIELDSTG_setupField(), and setupStage().

◆ eventText

s32 FieldState::eventText

the running event's text file and entry

Definition at line 462 of file field_map.h.

Referenced by FIELDSTG_createSpeech(), FIELDSTG_runEvent(), and FIELDSTG_startEvent().

◆ actors [2/2]

FieldActorEntry** FieldState::actors

the characters, up to the first NULL

Definition at line 463 of file field_map.h.

◆ menuOpen

s32 FieldState::menuOpen

the field menu (START) or the inn (FIELDSTG_openInn) is open: the pad doesn't move the player

Definition at line 464 of file field_map.h.

Referenced by FIELDSTG_controlFlight(), FIELDSTG_controlPlayer(), FIELDSTG_moveByPad(), FIELDSTG_openInn(), FIELDSTG_updateBalloon(), FIELDSTG_updateField(), openFieldMenu(), and updateTimer().

◆ frozen

s32 FieldState::frozen

no control, triggers or encounters for the player: while the area name banner shows (FIELDSTG_createBanner) and as the field closes

Definition at line 466 of file field_map.h.

Referenced by FIELDSTG_countBattleSteps(), FIELDSTG_createBanner(), FIELDSTG_updateActor(), FIELDSTG_updateBanner(), FIELDSTG_updateField(), FIELDSTG_updateTriggers(), and updateTimer().

◆ busy

◆ battleStarting

s32 FieldState::battleStarting

an encounter started (FIELDSTG_startEncounter)

Definition at line 469 of file field_map.h.

Referenced by FIELDSTG_controlFlight(), FIELDSTG_controlPlayer(), FIELDSTG_countBattleSteps(), FIELDSTG_startEncounter(), FIELDSTG_updateField(), and updateTimer().

◆ acting

◆ defaultStart

Vec2 FieldState::defaultStart

where the player starts without a mode argument

Definition at line 471 of file field_map.h.

Referenced by FIELDSTG_createActor(), FIELDSTG_leaveFieldAfter(), and startField().

◆ defaultStartDir

s32 FieldState::defaultStartDir

and its direction

Definition at line 472 of file field_map.h.

Referenced by FIELDSTG_createActor(), FIELDSTG_leaveFieldAfter(), and startField().

◆ init

void(* FieldState::init) (void)

FIELDSTG_pickStage.

Definition at line 473 of file field_map.h.

Referenced by startField().

◆ getFileEntry

s32(* FieldState::getFileEntry) (s32 character)

FIELDSTG_fileEntries's.

Definition at line 474 of file field_map.h.

Referenced by FIELDSTG_createActor().

◆ getActorWidth

s32(* FieldState::getActorWidth) (s32 character)

FIELDSTG_actorWidths's.

Definition at line 475 of file field_map.h.

Referenced by FIELDSTG_createActor().

◆ findBattles

FieldBattles *(* FieldState::findBattles) (FieldBattles *list, s32 id)

the place of the list with that id

Definition at line 476 of file field_map.h.

Referenced by setupStage().


The documentation for this struct was generated from the following file: