Full event work allocated by Field_RunScene (heap slot 27). More...
#include <field_runtime.h>
Data Fields | |
| struct ScenePlacement * | tables [4] |
| The placement tables placed so far, recorded by Event_SpawnObjectTable. | |
| const struct SceneEvent * | events |
| the scene's event table | |
| struct FieldActor * | actors [66] |
| The actors by id: 0 to 7 the party's characters, 8 on the placed actors. | |
| struct MarkerSlot | markers [10] |
| the map's markers (MARKER_MAX) | |
| s16 | fallenCount |
| the characters who fell this step | |
| s16 | survivorCount |
| 0 when the whole party fell | |
| s16 | fallenOwners [9] |
| the characters who fell, from the active party | |
| s16 | itemArgument |
| the inventory slot Field_UseItem receives | |
| s16 | blockedSteps |
| Frames the leader has pushed against something, counted by the player controls; touch events and push tiles need more than 12. | |
| s16 | mode |
| MODE_WORLD_MAP (3) on the world map. | |
| u8 | encounterGroups [8] |
| encounter zone for each kind of ground | |
| s32 | encounterBias |
| randomized distance adjustment between battles | |
| s32 | encounterThreshold |
| encounter steps before a battle; 0x100000 | |
| s32 | walkingDistanceScale |
| scales movement for PP and status updates | |
| s32 | walkingDistance |
| accumulated 16.16 distance awaiting an update | |
| struct MapCell * | currentTile |
| the cell the leader last stepped onto | |
| struct MapCell * | previousTile |
| the cell before it | |
| s32 | transition |
| SCENE_TRANSITION(style, variant); 0x100 on entry. | |
| u16 | unk1c4 |
| not named by TBS code | |
| u16 | transitionActive |
| set once the opening transition has started | |
| s32 | transitionFrames |
| frames; 16 on entry and at each event | |
| s32 | fastForward |
| debug: skip timed event waits and actor messages | |
| u8 | unk1d0 [8] |
| not named by TBS code | |
| s16 | message |
| the next message, advanced as each window opens | |
| u16 | unk1da |
| set to 0xffff by FieldEvent_Begin; not read by name | |
| s16 | unk1dc |
| set to -1 by FieldEvent_Begin; not read by name | |
| s16 | unk1de |
| set to -1 by FieldEvent_Begin; not read by name | |
| struct ObjectRuntime * | camera |
| the object the map view follows | |
| u8 | unk1e4 [0x10] |
| not named by TBS code | |
| s32 | speaker |
| the actor speaking; the leader at each event | |
| s32 | messageWindow |
| the open message window, 0 for none | |
| s32 | sideWindow |
| the speaker's portrait window | |
| u8 | unk200 [0xab6] |
| ObjectTable_ResetForObject builds the leader's two-row placement table at its start; nothing else names it. | |
| u16 | busy |
| Set while a raised or touch event runs; FieldEvent_Begin then resets the effect counter. | |
| s16 | revealActive |
| nonzero while Reveal is active | |
| s16 | revealFrames |
| the frames Reveal has left | |
| s16 | revealCenterX |
| where Reveal was cast, in pixels | |
| s16 | revealCenterY |
| s16 | effectTimerRunning |
| Nonzero lets the Reveal countdown advance; menus and other effects pause it. | |
| s16 | nameMessage |
| first message of the menu's name window (0: none) | |
| s16 | nameWidth |
| width of the name window (0: the default) | |
| s8 | resolvingAction |
| set while Psynergy takes effect | |
| s8 | castStarted |
| set once a cast has been announced | |
| s16 | queuedSound |
| a sound BattleFx_PlayQueuedSound plays; -1 for none | |
| s16 | action |
| The twelve requests: each nonzero value asks the field loop for one thing; Field_ClearRequests clears them and Field_CountRequests sums them. | |
| s16 | input |
| a tile code (252 to 254) for Field_RunPushTileEvent | |
| s16 | exit |
| the exit taken, which ends the scene | |
| s16 | menu |
| open the main menu | |
| s16 | examine |
| the A button: examine what is ahead | |
| s16 | start |
| the Start button: open the pause menu | |
| u16 | descriptor |
| an actor's event, as actor | 0x1000 | |
| s16 | tile |
| a tile's collision code, for Field_SearchTile | |
| s16 | battle |
| the enemy group of a random encounter | |
| s16 | command |
| a field Psynergy to use, as owner << 10 | Psynergy | |
| s16 | item |
| an item to use, packed as Field_UseItem reads it | |
| s16 | event |
| A raised event for Scene_RunRaisedEvent, or -1 when characters fell to poison or hazard damage, -888 the world map, -889 a visibility change. | |
Full event work allocated by Field_RunScene (heap slot 27).
The twelve requests from action to event are handled by the field loop.
Definition at line 77 of file field_runtime.h.
| struct ScenePlacement* FieldWork::tables[4] |
The placement tables placed so far, recorded by Event_SpawnObjectTable.
Definition at line 79 of file field_runtime.h.
Referenced by Event_SpawnObjectTable(), ObjectTable_ResetForObject(), and Scene_FindActorPlacement().
| const struct SceneEvent* FieldWork::events |
the scene's event table
Definition at line 80 of file field_runtime.h.
Referenced by BattleFx_FindMatchingEvent(), Event_SetSceneEvents(), Field_FindItemEvent(), and Scene_FindEvent().
| struct FieldActor* FieldWork::actors[66] |
The actors by id: 0 to 7 the party's characters, 8 on the placed actors.
Definition at line 82 of file field_runtime.h.
Referenced by Djinn_JoinParty(), Event_ShowSpeakerMessage(), Event_SpawnObjectTable(), Field_GetCollisionAheadOfLeader(), Field_ProcessStep(), Field_RunScene(), MercuryLighthouse_ChargeLights(), MercuryLighthouse_HopAcrossPool(), MercuryLighthouse_SparkleAtLeader(), ObjectTable_ClearAll(), ObjectTable_DestroyAtIndex(), ObjectTable_FindActiveByValue(), ObjectTable_ReadActiveValue(), ObjectTable_ResetForObject(), and ObjectTable_Snapshot().
| struct MarkerSlot FieldWork::markers[10] |
the map's markers (MARKER_MAX)
Definition at line 83 of file field_runtime.h.
Referenced by Field_PlaceMapMarkers(), Marker_FindSlot(), Marker_GetActor(), Marker_Hide(), Marker_LaunchMimic(), Marker_MoveLeaderAway(), Marker_SetActorPosition(), Marker_ShowOpened(), and SetMarkerAnimationAndPlaySound().
| s16 FieldWork::action |
The twelve requests: each nonzero value asks the field loop for one thing; Field_ClearRequests clears them and Field_CountRequests sums them.
a step event (1 to 239) for Scene_RunTouchOrExit
Definition at line 87 of file field_runtime.h.
Referenced by Event_EnterDoor(), Field_ClearRequests(), Field_CountRequests(), Field_ProcessStep(), Field_RunScene(), and Lunpa_WatchForFortressApproach().
| s16 FieldWork::input |
a tile code (252 to 254) for Field_RunPushTileEvent
Definition at line 88 of file field_runtime.h.
Referenced by Field_ClearRequests(), Field_CountRequests(), Field_ProcessStep(), and Field_RunScene().
| s16 FieldWork::exit |
the exit taken, which ends the scene
Definition at line 89 of file field_runtime.h.
Referenced by Event_RequestDestination(), Event_SetDestination(), Event_SetExitRequest(), Event_SetSavedDestination(), Field_CheckExitRegions(), Field_ClearRequests(), Field_CountRequests(), Field_RunScene(), Field_UseItem(), Field_UsePsynergy(), and Scene_RunTouchOrExit().
| s16 FieldWork::menu |
open the main menu
Definition at line 90 of file field_runtime.h.
Referenced by Field_CheckConfiguredKeys(), Field_ClearRequests(), Field_CountRequests(), Field_RunScene(), and MercuryLighthouse_InspectHealingFountain().
| s16 FieldWork::examine |
the A button: examine what is ahead
Definition at line 91 of file field_runtime.h.
Referenced by Field_CheckConfiguredKeys(), Field_ClearRequests(), Field_CountRequests(), and Field_RunScene().
| s16 FieldWork::start |
the Start button: open the pause menu
Definition at line 92 of file field_runtime.h.
Referenced by Field_CheckConfiguredKeys(), Field_ClearRequests(), Field_CountRequests(), and Field_RunScene().
| u16 FieldWork::descriptor |
an actor's event, as actor | 0x1000
Definition at line 93 of file field_runtime.h.
Referenced by Field_ClearRequests(), Field_CountRequests(), and Field_RunScene().
| s16 FieldWork::tile |
a tile's collision code, for Field_SearchTile
Definition at line 94 of file field_runtime.h.
Referenced by Field_ClearRequests(), Field_CountRequests(), Field_RunScene(), Field_SearchTile(), and FieldFx_CheckCloakTile().
| s16 FieldWork::battle |
the enemy group of a random encounter
Definition at line 95 of file field_runtime.h.
Referenced by Field_ClearRequests(), Field_CountRequests(), Field_ProcessStep(), Field_RequestBattleFromEncounterTable(), Field_RequestDjinnBattle(), Field_RunScene(), and Field_SearchTile().
| s16 FieldWork::command |
a field Psynergy to use, as owner << 10 | Psynergy
Definition at line 96 of file field_runtime.h.
Referenced by Event_ReadLeftGuardsThoughts(), Field_ClearRequests(), Field_CountRequests(), Field_ProcessStep(), Field_RequestShortcut(), Field_RunScene(), FieldEffect_WatchLeaderDistance(), FieldFx_CheckCloakTile(), FieldFx_StartCloak(), and TretPalette_UpdateSceneTint().
| s16 FieldWork::item |
an item to use, packed as Field_UseItem reads it
Definition at line 97 of file field_runtime.h.
Referenced by Field_ClearRequests(), Field_CountRequests(), Field_RequestShortcut(), Field_RunScene(), Inventory_TryAddAndReturnOwner(), and PartyInventory_GiveItem().
| s16 FieldWork::event |
A raised event for Scene_RunRaisedEvent, or -1 when characters fell to poison or hazard damage, -888 the world map, -889 a visibility change.
Definition at line 100 of file field_runtime.h.
Referenced by Camera_WorldToScreen(), Event_CloakFades(), Field_ClearRequests(), Field_CountRequests(), Field_ProcessStep(), Field_RequestShortcut(), Field_RunScene(), Field_SearchTile(), FieldObject_PlaceSceneActors(), Lunpa_WatchForUncloakedParty(), ResetSceneTransitionEffect(), and UiText_OpenMessageAtObject().
| s16 FieldWork::fallenCount |
the characters who fell this step
Definition at line 102 of file field_runtime.h.
Referenced by Field_ProcessStep(), and Field_RunScene().
| s16 FieldWork::survivorCount |
0 when the whole party fell
Definition at line 103 of file field_runtime.h.
Referenced by Field_ProcessStep(), and Field_RunScene().
| s16 FieldWork::fallenOwners[9] |
the characters who fell, from the active party
Definition at line 104 of file field_runtime.h.
Referenced by Field_ProcessStep(), and Field_RunScene().
| s16 FieldWork::itemArgument |
the inventory slot Field_UseItem receives
Definition at line 105 of file field_runtime.h.
Referenced by Field_RunScene().
| s16 FieldWork::blockedSteps |
Frames the leader has pushed against something, counted by the player controls; touch events and push tiles need more than 12.
Definition at line 108 of file field_runtime.h.
Referenced by Field_RunPushTileEvent(), and Scene_RunTouchOrExit().
| s16 FieldWork::mode |
MODE_WORLD_MAP (3) on the world map.
Definition at line 109 of file field_runtime.h.
Referenced by BattleFx_RunVisibilityTransition(), Camera_FollowActor(), Camera_MoveWithinMapBounds(), Djinn_JoinParty(), Event_ShowSpeakerMessage(), Event_SpawnObjectTable(), Field_GetCollisionAheadOfLeader(), Field_ProcessStep(), Field_RequestBattleFromEncounterTable(), Field_RequestDjinnBattle(), Field_RequestShortcut(), Field_RunScene(), Field_StartEncounterTransition(), Field_UsePsynergy(), FieldFx_CheckCloakTile(), Map_ShowWorldMap(), ObjectTable_ResetForObject(), ObjectTable_Snapshot(), UiText_OpenMessageAtObject(), WorldMap_BeginEvent(), and WorldMap_EndEvent().
| u8 FieldWork::encounterGroups[8] |
encounter zone for each kind of ground
Definition at line 110 of file field_runtime.h.
Referenced by Encounter_RollTerrain(), Encounter_SelectSceneZones(), and Field_ProcessStep().
| s32 FieldWork::encounterBias |
randomized distance adjustment between battles
Definition at line 111 of file field_runtime.h.
Referenced by Encounter_SelectEnemyGroup(), Encounter_SelectSceneZones(), and Field_RunScene().
| s32 FieldWork::encounterThreshold |
encounter steps before a battle; 0x100000
Definition at line 112 of file field_runtime.h.
Referenced by Encounter_SelectSceneZones().
| s32 FieldWork::walkingDistanceScale |
scales movement for PP and status updates
Definition at line 113 of file field_runtime.h.
Referenced by Field_ProcessStep(), Field_TryJumpForward(), and MercuryLighthouse_HopAcrossPool().
| s32 FieldWork::walkingDistance |
accumulated 16.16 distance awaiting an update
Definition at line 114 of file field_runtime.h.
Referenced by Field_ProcessStep(), Field_TryJumpForward(), and MercuryLighthouse_HopAcrossPool().
| struct MapCell* FieldWork::currentTile |
the cell the leader last stepped onto
Definition at line 115 of file field_runtime.h.
Referenced by Field_ProcessStep().
| struct MapCell* FieldWork::previousTile |
the cell before it
Definition at line 116 of file field_runtime.h.
Referenced by Field_ProcessStep().
| s32 FieldWork::transition |
SCENE_TRANSITION(style, variant); 0x100 on entry.
Definition at line 117 of file field_runtime.h.
Referenced by Event_FinishScreenTransition(), Event_StartScreenTransition(), Field_RunScene(), Inn_PlaySleep(), Scene_Initialize(), SolSanctumRooms_Initialize(), and TretTreeInteriors_EnterRoom().
| u16 FieldWork::unk1c4 |
not named by TBS code
Definition at line 118 of file field_runtime.h.
| u16 FieldWork::transitionActive |
set once the opening transition has started
Definition at line 119 of file field_runtime.h.
Referenced by Event_FinishScreenTransition(), Event_StartScreenTransition(), Field_RunScene(), and Field_StartEncounterTransition().
| s32 FieldWork::transitionFrames |
frames; 16 on entry and at each event
Definition at line 120 of file field_runtime.h.
Referenced by Event_FinishScreenTransition(), Event_StartScreenTransition(), Event_WaitTransitionFrames(), Field_RunScene(), FieldEvent_Begin(), Inn_PlaySleep(), Map_ShowWorldMap(), and SolSanctumRooms_Initialize().
| s32 FieldWork::fastForward |
debug: skip timed event waits and actor messages
Definition at line 121 of file field_runtime.h.
Referenced by Event_ShowSpeakerMessage(), Event_UpdateDebugSkip(), FieldEvent_Begin(), FieldEvent_ShowMessageAndWait(), FieldEvent_WaitFrames(), and UiText_OpenMessageAtObject().
| u8 FieldWork::unk1d0[8] |
not named by TBS code
Definition at line 122 of file field_runtime.h.
| s16 FieldWork::message |
the next message, advanced as each window opens
Definition at line 123 of file field_runtime.h.
Referenced by Battle_ShowPairedUnitWorkAndWait(), Event_SetMessageId(), Event_ShowMessageAtPosition(), Event_ShowSpeakerMessage(), FieldEvent_AskYesNoAndShowResponse(), PartyInventory_GiveItem(), and UiText_OpenMessageAtObject().
| u16 FieldWork::unk1da |
set to 0xffff by FieldEvent_Begin; not read by name
Definition at line 124 of file field_runtime.h.
Referenced by FieldEvent_Begin().
| s16 FieldWork::unk1dc |
set to -1 by FieldEvent_Begin; not read by name
Definition at line 125 of file field_runtime.h.
Referenced by FieldEvent_Begin().
| s16 FieldWork::unk1de |
set to -1 by FieldEvent_Begin; not read by name
Definition at line 126 of file field_runtime.h.
Referenced by FieldEvent_Begin().
| struct ObjectRuntime* FieldWork::camera |
the object the map view follows
Definition at line 127 of file field_runtime.h.
Referenced by Camera_FollowActor(), Camera_FollowObject(), Camera_GetEventObject(), Camera_MoveWithinMapBounds(), Camera_SetSpeedParameters(), Field_UpdateObjectVisibilityBounds(), KolimaForestBend_RollLog(), Map_ShowWorldMap(), ObjectTable_ResetForObject(), ObjectTable_Restore(), WorldMap_BeginEvent(), and WorldMap_EndEvent().
| u8 FieldWork::unk1e4[0x10] |
not named by TBS code
Definition at line 128 of file field_runtime.h.
| s32 FieldWork::speaker |
the actor speaking; the leader at each event
Definition at line 129 of file field_runtime.h.
Referenced by Event_AskYesNoWithActorAnimation(), Event_ShowSpeakerMessage(), FieldEvent_Begin(), and UiText_OpenMessageAtObject().
| s32 FieldWork::messageWindow |
the open message window, 0 for none
Definition at line 130 of file field_runtime.h.
Referenced by Event_AskYesNoWithActorAnimation(), Event_ShowSpeakerMessage(), FieldEvent_Begin(), and UiText_OpenMessageAtObject().
| s32 FieldWork::sideWindow |
the speaker's portrait window
Definition at line 131 of file field_runtime.h.
Referenced by Event_AskYesNoWithActorAnimation(), and UiText_OpenMessageAtObject().
| u8 FieldWork::unk200[0xab6] |
ObjectTable_ResetForObject builds the leader's two-row placement table at its start; nothing else names it.
Definition at line 134 of file field_runtime.h.
| u16 FieldWork::busy |
Set while a raised or touch event runs; FieldEvent_Begin then resets the effect counter.
Definition at line 137 of file field_runtime.h.
Referenced by Battle_ResetEffectCounter(), Event_SearchStatue(), Event_TalkToScholarByDoor(), Field_RunScene(), and FieldEvent_Begin().
| s16 FieldWork::revealActive |
nonzero while Reveal is active
Definition at line 138 of file field_runtime.h.
Referenced by AltmillerCave_SetFadeLevel(), Battle_ResetEffectCounter(), BattleFx_DispatchRequestKind(), BattleFx_Run(), Field_IsRevealActive(), FieldFx_RunReveal(), and ResetSceneTransitionEffect().
| s16 FieldWork::revealFrames |
the frames Reveal has left
Definition at line 139 of file field_runtime.h.
Referenced by Event_SearchStatue(), Event_TalkToScholarByDoor(), FieldEffect_WatchLeaderDistance(), FieldFx_RunReveal(), and ResetSceneTransitionEffect().
| s16 FieldWork::revealCenterX |
where Reveal was cast, in pixels
Definition at line 140 of file field_runtime.h.
Referenced by FieldEffect_WatchLeaderDistance(), and FieldFx_RunReveal().
| s16 FieldWork::revealCenterY |
Definition at line 141 of file field_runtime.h.
Referenced by FieldEffect_WatchLeaderDistance(), and FieldFx_RunReveal().
| s16 FieldWork::effectTimerRunning |
Nonzero lets the Reveal countdown advance; menus and other effects pause it.
Definition at line 144 of file field_runtime.h.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), Field_RunScene(), FieldEffect_WatchLeaderDistance(), and FieldFx_RunReveal().
| s16 FieldWork::nameMessage |
first message of the menu's name window (0: none)
Definition at line 145 of file field_runtime.h.
Referenced by Event_AskYesNoWithActorAnimation(), and FieldEvent_Begin().
| s16 FieldWork::nameWidth |
width of the name window (0: the default)
Definition at line 146 of file field_runtime.h.
Referenced by Event_AskYesNoWithActorAnimation(), and FieldEvent_Begin().
| s8 FieldWork::resolvingAction |
set while Psynergy takes effect
Definition at line 147 of file field_runtime.h.
Referenced by BattleEffect_CleanupSceneObjects(), BattleFx_LoadActionEffectResources(), Field_UseItem(), and Field_UsePsynergy().
| s8 FieldWork::castStarted |
set once a cast has been announced
Definition at line 148 of file field_runtime.h.
Referenced by BattleEffect_CleanupSceneObjects(), and EventObject_Initialize().
| s16 FieldWork::queuedSound |
a sound BattleFx_PlayQueuedSound plays; -1 for none
Definition at line 149 of file field_runtime.h.
Referenced by BattleFx_PlayQueuedSound(), BattleFx_SetQueuedSoundAndPlay(), and Field_RunScene().