Alchemy
Loading...
Searching...
No Matches

GameState Struct Reference

The game's state: play time, coins, the scene and the leader's position, the active party and the options. More...

#include <game_state.h>

Data Fields

u32 buildStamp
 Runtime_GetBuildStampTime's value when the game was last saved; its low half goes into the file's summary.
u32 playTime
 frames, copied from gPlayTimeFrames when saving
u8 unk008 [8]
 Not named by TBS code.
s32 coins
u8 unk014 [0x104]
 The party's Djinn recovery list (struct DjinnRecoveryList), read through Djinn_GetRecoveryTable; not named by TBS code.
s32 shopCredit
 spent on a Game Ticket; not written by name in TBS
s8 shopGifts
 indexes the Game Ticket's credit cost
s8 prizeWeights [0x0f]
 The slot machine's prize weights, three prizes to each of 4, 8, 16, 32 and 64 on a new game; not read by name in TBS.
s8 wonPrizes [0x10]
 Lucky Wheels: 0 to 7 the prize categories won, ended by -1 (-2 once awarded); 8 on the last variant given of each category.
u8 unk13c [0x84]
 not named by TBS code
s16 scene
s16 entrance
s16 savedScene
 where a defeat returns to without a defeat point
s16 savedEntrance
 where a defeat returns to without a defeat point
s16 defaultScene
 the scene being run, kept as it starts
s16 defaultEntrance
 the entrance it was entered by
s16 sceneGroup
 the current scene's group; a new group resets its flags
s16 nextScene
 where the event sends the party next; -1 for none
s16 nextEntrance
 where the event sends the party next; -1 for none
s16 defeatScene
 where a defeat returns to; -1 for none
s16 defeatEntrance
 where a defeat returns to; -1 for none
s16 special
 the battle backdrop chosen for the scene or terrain
u8 unk1d8 [2]
 not named by TBS code
s16 map
 the scene's map; SceneId_Clear for the world map
s32 x
 16.16 fixed-point pixels
s32 y
 16.16 fixed-point pixels
s32 z
 16.16 fixed-point pixels
u32 heading
 1/65536 turns
u16 turn
 the leader's terrainId, kept with its position
s16 sceneCue
 the battle music chosen for the encounter
s16 cue
 the current scene's field music
u8 movementMode
 1 while the leader is climbing, 0 otherwise
u8 unk1f3
 not named by TBS code
s32 selectedActor
 the leader: its unit and its actor
u8 activeOwners [8]
 the party in order
u8 unk200 [5]
 not named by TBS code
u8 paletteGlow [2]
 window hue (0 to 24), brightness
u8 unk207 [3]
 not named by TBS code
u8 speech
 1 shows speakers' portraits beside their messages
u8 unk20b
 1 on a new game; not read by name in TBS
u8 messageSpeed
 0 to 2; 1 on a new game
u8 unk20d [2]
 not named by TBS code
u8 unk20f
 Set on saving at the end of the game; copied to the file's summary as sendFlag.
s16 returnCue
 music playing when the field left; -1 for none
u8 perspectiveScene
 set to 1 on the world map; not read by name in TBS
u8 unk225 [5]
 not named by TBS code
u8 idleSleepEnabled
 the option, saved from gIdleSleepEnabled
u8 battleStart
 how the next battle starts (Battle_SetStart)
s16 pendingDjinnEvent
 The Djinni battle pending (DJINNI_0 plus its number, flags in bits 15 to 11), resolved on returning to the field.
s16 sceneChangeReason
 the last battle's result; -1 for a defeat
s32 encounterSteps
 the encounter count, reset with a new group
u16 pendingItem
 given on returning to the field if the party has room
s16 sceneVariant
 the current scene's variant from its record
s16 retreatScene
 where Retreat goes; the group's first entrance
s16 retreatEntrance
 where Retreat goes; the group's first entrance
s32 avoidDistance
 distance left of Avoid, 16.16 pixels; 0 when off
s8 avoidByItem
 Avoid came from an item (the Sacred Feather).
s8 pausedPose
 Halt: the stopped object's first animation param.
s16 pausedObject
 Halt: the stopped object; -1 for none.
s16 cloaked
 1 under Cloak, which prevents battles
u8 unk24e [2]
 not named by TBS code
u32 pausedUpdate
 Halt: the stopped object's update; not read by name.
u8 unk254 [0x50]
 not named by TBS code
u16 linkTallies [8]
 The link lobby's tallies: 4 the total wins and 7 the consecutive wins it reports, 3 cleared on choosing a monster battle; the others not named by TBS code.
u8 unk2b4 [4]
 not named by TBS code
u32 startStamp
 Runtime_GetBuildStampTime's value at a new game.
u8 unk2bc [4]
 not named by TBS code
struct BattleUnit owners [8]
 the characters
u16 aKeys
 The buttons for each field command, as KEY_ masks; read with gKeysPressed except dashKeys, held.
u16 bKeys
 KEY_B; not read by name in TBS.
u16 selectKeys
 the menu; KEY_SELECT
u16 startKeys
 KEY_START.
u16 firstShortcutKeys
 firstShortcut; KEY_L
u16 secondShortcutKeys
 secondShortcut; KEY_R
u16 dashKeys
 KEY_B.
u16 firstShortcut
 The shortcuts' assignments.
u16 secondShortcut
s16 hazardLimit
 Hazardous ground (the Lamakan Desert's heat): every hazardLimit steps the party takes hazardDamage (bit 8 a flag, bits 7 to 0 the amount).
s16 hazardMode
 0 counts on hazard cells only; 1 counts every step
s16 hazardDamage
s16 hazardSteps
 reset on entering a new scene group

Detailed Description

The game's state: play time, coins, the scene and the leader's position, the active party and the options.

Definition at line 14 of file game_state.h.

Field Documentation

◆ buildStamp

u32 GameState::buildStamp

Runtime_GetBuildStampTime's value when the game was last saved; its low half goes into the file's summary.

Definition at line 17 of file game_state.h.

Referenced by GameState_InitDefaults(), SaveMenu_Run(), and SaveState_BuildSummaryHeader().

◆ playTime

u32 GameState::playTime

frames, copied from gPlayTimeFrames when saving

Definition at line 18 of file game_state.h.

Referenced by GameState_InitDefaults(), ReelGame_Start(), SaveMenu_Run(), SaveState_BuildSummaryHeader(), and SaveState_LoadRecordIntoWork().

◆ unk008

u8 GameState::unk008[8]

Not named by TBS code.

The party's struct DjinnRecoveryTable (Djinn_GetRecoveryTable) starts at byte 4, its first 8 bytes running over coins.

Definition at line 22 of file game_state.h.

Referenced by Djinn_GetRecoveryTable().

◆ coins

◆ unk014

u8 GameState::unk014[0x104]

The party's Djinn recovery list (struct DjinnRecoveryList), read through Djinn_GetRecoveryTable; not named by TBS code.

Definition at line 26 of file game_state.h.

◆ shopCredit

s32 GameState::shopCredit

spent on a Game Ticket; not written by name in TBS

Definition at line 27 of file game_state.h.

Referenced by Shop_BuySpecialItem().

◆ shopGifts

s8 GameState::shopGifts

indexes the Game Ticket's credit cost

Definition at line 28 of file game_state.h.

Referenced by Battle_ApplyPresetItemsAndFlags(), and Shop_BuySpecialItem().

◆ prizeWeights

s8 GameState::prizeWeights[0x0f]

The slot machine's prize weights, three prizes to each of 4, 8, 16, 32 and 64 on a new game; not read by name in TBS.

Definition at line 31 of file game_state.h.

Referenced by GameState_InitDefaults(), and TolbiSpring_RunSpringGame().

◆ wonPrizes

s8 GameState::wonPrizes[0x10]

Lucky Wheels: 0 to 7 the prize categories won, ended by -1 (-2 once awarded); 8 on the last variant given of each category.

Definition at line 34 of file game_state.h.

Referenced by TolbiSpring_Initialize(), and TolbiSpring_SelectLuckyWheelsPrize().

◆ unk13c

u8 GameState::unk13c[0x84]

not named by TBS code

Definition at line 35 of file game_state.h.

◆ scene

s16 GameState::scene

Definition at line 36 of file game_state.h.

Referenced by AltmillerCave_EndReveal(), AltmillerCave_GetEvents(), AltmillerCave_GetPlacements(), AltmillerCave_Initialize(), AltmillerCave_StartReveal(), BabiLighthouse_SetupScene(), BabiPalace_ApplyEntryState(), Battle_SelectSceneBackdrop(), Bilibin_GetEntrances(), Bilibin_GetEvents(), Bilibin_GetPlacements(), Bilibin_GetRegions(), Bilibin_Initialize(), BilibinCave_GetEntrances(), BilibinCave_GetEvents(), BilibinCave_GetPlacements(), BilibinCave_Initialize(), Clear_GetSaveRecoveryBlockMask(), CollapseFromHeat(), ColosseumEntrance_GetEntrances(), ColosseumEntrance_GetEvents(), ColosseumEntrance_GetPlacements(), ColosseumEntrance_Initialize(), Colosso_GreetAtStage(), Colosso_RepeatStageNumber(), CrossboneIsle_LeaveClearedRoom(), CrossboneIsle_RestoreMovedRoomBlock(), Encounter_SelectSceneZones(), Event_DouseStorm(), Event_EnterGuardedRoom(), Event_FightFinalGuards(), Event_PushBlock(), Event_RequestDestination(), Event_RevealEnds(), Event_RevealStarts(), Event_SetDestination(), Event_StormCarriesPartyAway(), Field_RunScene(), Field_UseItem(), Field_UsePsynergy(), Game_ResetForNewGame(), Imil_GetEntrances(), Imil_GetEvents(), Imil_GetPlacements(), Imil_Initialize(), ImilFuchinFalls_GetEntrances(), ImilFuchinFalls_GetEvents(), ImilFuchinFalls_GetPlacements(), ImilFuchinFalls_HopOnTrigger(), ImilFuchinFalls_Initialize(), ImilFuchinFalls_PrepareRoom(), ImilFuchinFalls_RebuildPlatformRoom(), Kalay_GetEntrances(), Kalay_GetEvents(), Kalay_GetPlacements(), Kalay_Initialize(), KalayInteriors_GetEntrances(), KalayInteriors_GetEvents(), KalayInteriors_GetPlacements(), KalayInteriors_Initialize(), KalayTolbiDocks_GetEntrances(), KalayTolbiDocks_GetEvents(), KalayTolbiDocks_GetPlacements(), KalayTolbiDocks_Initialize(), KalayTolbiDocks_OpenDoorAndLeave(), Kolima_GetEntrances(), Kolima_GetEvents(), Kolima_GetPlacements(), Kolima_GetRegions(), Kolima_Initialize(), LaliveroInteriors_GetEvents(), LaliveroInteriors_GetPlacements(), LaliveroInteriors_GetRegions(), LamakanDesert_GetEntrances(), LamakanDesert_GetPlacements(), LamakanDesert_Initialize(), MercuryLighthouse_EnterRisingPassage(), MercuryLighthouse_GetEntrances(), MercuryLighthouse_GetEvents(), MercuryLighthouse_GetPlacements(), MercuryLighthouse_Initialize(), MercuryLighthouseAerie_Initialize(), MogallForest_GetEntrances(), MogallForest_GetEvents(), MogallForest_GetPlacements(), MogallForest_Initialize(), Reveal_HideSecrets(), Reveal_ShowSecrets(), SaveMenu_Run(), SaveState_BuildSummaryHeader(), Scene_GetEntrances(), Scene_GetEvents(), Scene_GetExits(), Scene_GetPlacements(), Scene_GetRegions(), Scene_Initialize(), Scene_LoadOverlay(), Scene_ResetFlagsOnEnter(), Scene_ResolveInteractionResult(), Scene_ReturnFromBattle(), Scene_RunEntrySetup(), Scene_SetDefeatReturnPoint(), Scene_TakeExit(), SolSanctumEntrance_GetEntrances(), SolSanctumEntrance_GetEvents(), SolSanctumEntrance_GetPlacements(), SolSanctumEntrance_Initialize(), TolbiShipInteriors_SelectEntrances(), TolbiSpring_GetEvents(), TolbiSpring_GetPlacements(), TolbiSpring_Initialize(), TunnelRuins_GetEntrances(), TunnelRuins_GetEvents(), TunnelRuins_GetPlacements(), TunnelRuins_GetRegions(), TunnelRuins_Initialize(), TunnelRuins_UpdateTrackedActor(), UiTimedNotice_Create(), ValeCave_ApplyEntryState(), ValeCave_GetEntrances(), ValeCave_GetEvents(), ValeCave_GetPlacements(), ValeCave_Initialize(), and VenusLighthouse_DispatchPushScript().

◆ entrance

s16 GameState::entrance

Definition at line 37 of file game_state.h.

Referenced by AltinPeak_RestoreRoom1(), AltinPeak_RestoreRoom10(), AltinPeak_RestoreRoom11(), AltinPeak_RestoreRoom3(), AltinPeak_RestoreRoom4(), AltinPeak_RestoreRoom5(), AltinPeak_RestoreRoom6(), AltinPeak_RestoreRoom9(), AltmillerCave_Initialize(), BabiLighthouse_SetupScene(), BabiPalace_ApplyEntryState(), Bilibin_RestoreRaisedEntrance(), Bilibin_RestoreVillageActors(), ColosseumEntrance_ApplyArrivalState(), ColosseumEntrance_GetEvents(), ColosseumEntrance_GetPlacements(), ColossoLog_Initialize(), ColossoLog_RunCompetitorTalk(), ColossoRiver_Initialize(), ColossoWall_Initialize(), Encounter_SelectSceneZones(), Event_PushBlock(), Event_ReadMindAboutGoldenStatue(), Event_RequestDestination(), Event_SetDestination(), Event_TalkAboutGoldenStatue(), Event_TalkToBoardWalkAttendant(), Event_TalkToBridgeAttendant(), Event_TalkToFreeClimbAttendant(), Event_TalkToHealerOnVisit(), Event_TalkToLogRollingAttendant(), Event_TalkToLogRollingAttendant(), Event_TalkToLumberAttendant(), Event_TalkToMiniMazeAttendant(), Event_TalkToMovingSidewalkAttendant(), Event_TalkToPipeworksAttendant(), Event_TalkToRockAttendant(), Event_TalkToScalesAttendant(), Event_TalkToShiftingFloorAttendant(), Event_TalkToSteppingStoneAttendant(), Event_TalkToWallAttendant(), Event_TalkToWallWedgeAttendant(), Field_RunScene(), Field_UseItem(), Field_UsePsynergy(), Fuchin_EndRevealLighting(), Fuchin_RebuildFourthRoomPlatforms(), Game_ResetForNewGame(), HammetPalace_SetUpEntrance(), Imil_Initialize(), ImilFuchinFalls_PrepareRoom(), ImilFuchinFalls_RebuildPlatformRoom(), Kalay_PrepareCave(), Kalay_PreparePalaceGate(), Kalay_PrepareTown(), Kalay_PrepareTunnel(), Kalay_StartWindowTransition(), KalayInteriors_ApplyRoomState(), KalayInteriors_GetEvents(), KalayInteriors_GetPlacements(), KalayTolbiDocks_Initialize(), KalayTolbiDocks_PrepareKalayDocks(), KalayTolbiDocks_PrepareTolbiDocks(), Kolima_Initialize(), KolimaForestBridge_Initialize(), KolimaInteriors_Initialize(), Lalivero_Initialize(), LamakanDesert_GetPlacements(), LemurianShip_SetupScene(), LinkLobby_RunRoundResult(), LinkLobby_SelectPlacements(), LunpaFortress_InitializeGuardRooms(), LunpaFortress_InitializeOuterRooms(), MercuryLighthouse_Initialize(), MercuryLighthouseAerie_GetPlacements(), MercuryLighthouseAerie_Initialize(), MercuryLighthouseEntrance_Initialize(), MogallForest_Initialize(), Sanctum_GetEvents(), Sanctum_GetPlacements(), Sanctum_Initialize(), SaveMenu_Run(), SaveState_BuildSummaryHeader(), Scene_ApplyEntrance(), Scene_GetEvents(), Scene_GetPlacements(), Scene_Initialize(), Scene_ResetFlagsOnEnter(), Scene_ResolveInteractionResult(), Scene_ReturnFromBattle(), Scene_RunEntrySetup(), Scene_SetDefeatReturnPoint(), Scene_TakeExit(), SolSanctumElementalStarRoom_Initialize(), SolSanctumEntrance_GetEvents(), SolSanctumEntrance_GetPlacements(), SolSanctumEntrance_RestoreInteriorState(), SolSanctumEruption_Initialize(), SolSanctumLunaSolRooms_Initialize(), SolSanctumStatue_Initialize(), Title_Run(), TolbiInteriors_ApplyEntryState(), TolbiShipDeck_ApplyEntryState(), TolbiShipDeck_SetUpAtAnchor(), TolbiShipInteriors_ApplyEntryState(), TolbiShipInteriors_SelectEvents(), TolbiShipInteriors_SelectPlacements(), TolbiShipMast_Initialize(), TolbiSpring_Initialize(), TretTreeInteriors_EnterRoom(), TunnelRuins_Initialize(), TunnelRuins_UpdateTrackedActor(), UiTimedNotice_Create(), Vale_Initialize(), ValeBabi_GetEvents(), ValeBabi_GetPlacements(), ValeBabi_Initialize(), ValeCave_ApplyEntryState(), ValeEruption_Initialize(), ValeHome_GetEvents(), ValeHome_GetPlacements(), ValeHome_Initialize(), ValeInteriors_Initialize(), ValeKraden_Initialize(), ValeStorm_Initialize(), VenusLighthouseAerie_Initialize(), Village_ApplyWaterLevel(), WorldMap_GetPlacements(), WorldMap_Initialize(), Xian_Initialize(), XianInteriors_GetEvents(), XianInteriors_GetPlacements(), and XianInteriors_Initialize().

◆ savedScene

◆ savedEntrance

◆ defaultScene

s16 GameState::defaultScene

the scene being run, kept as it starts

Definition at line 40 of file game_state.h.

Referenced by Field_RunScene(), Menu_RunSelection(), and Scene_ReturnFromBattle().

◆ defaultEntrance

s16 GameState::defaultEntrance

the entrance it was entered by

Definition at line 41 of file game_state.h.

Referenced by Field_RunScene(), Menu_RunSelection(), and Scene_ReturnFromBattle().

◆ sceneGroup

s16 GameState::sceneGroup

the current scene's group; a new group resets its flags

Definition at line 42 of file game_state.h.

Referenced by Scene_ResetFlagsOnEnter(), and Scene_ResolveInteractionResult().

◆ nextScene

s16 GameState::nextScene

where the event sends the party next; -1 for none

Definition at line 43 of file game_state.h.

Referenced by Event_SetNextDestination(), Field_RunScene(), and Scene_ReturnFromBattle().

◆ nextEntrance

s16 GameState::nextEntrance

where the event sends the party next; -1 for none

Definition at line 44 of file game_state.h.

Referenced by Event_SetNextDestination(), Field_RunScene(), and Scene_ReturnFromBattle().

◆ defeatScene

s16 GameState::defeatScene

where a defeat returns to; -1 for none

Definition at line 45 of file game_state.h.

Referenced by Event_SetDefeatDestination(), Field_RunScene(), and Scene_ReturnFromBattle().

◆ defeatEntrance

s16 GameState::defeatEntrance

where a defeat returns to; -1 for none

Definition at line 46 of file game_state.h.

Referenced by Event_SetDefeatDestination(), Field_RunScene(), and Scene_ReturnFromBattle().

◆ special

s16 GameState::special

the battle backdrop chosen for the scene or terrain

Definition at line 47 of file game_state.h.

Referenced by Battle_SelectSceneBackdrop(), Battle_SelectTerrainBackdrop(), DebugBattle_RunMenu(), Event_GetSpecialValue(), and Field_RequestBattleFromEncounterTable().

◆ unk1d8

u8 GameState::unk1d8[2]

not named by TBS code

Definition at line 48 of file game_state.h.

◆ map

◆ x

s32 GameState::x

◆ y

s32 GameState::y

16.16 fixed-point pixels

Definition at line 51 of file game_state.h.

Referenced by Field_RunScene(), ObjectTable_ResetForObject(), and Scene_ApplyEntrance().

◆ z

s32 GameState::z

◆ heading

u32 GameState::heading

1/65536 turns

Definition at line 53 of file game_state.h.

Referenced by Field_RunScene(), ObjectTable_ResetForObject(), and Scene_ApplyEntrance().

◆ turn

u16 GameState::turn

the leader's terrainId, kept with its position

Definition at line 54 of file game_state.h.

Referenced by Field_RunScene(), ObjectTable_ResetForObject(), and Scene_ApplyEntrance().

◆ sceneCue

s16 GameState::sceneCue

the battle music chosen for the encounter

Definition at line 55 of file game_state.h.

Referenced by Battle_RunEncounter(), BattleFx_SelectBattleCue(), Field_SearchTile(), and Field_StartEncounterTransition().

◆ cue

s16 GameState::cue

the current scene's field music

Definition at line 56 of file game_state.h.

Referenced by Audio_PlayCueFromEventWork(), and Scene_ResolveInteractionResult().

◆ movementMode

◆ unk1f3

u8 GameState::unk1f3

not named by TBS code

Definition at line 58 of file game_state.h.

◆ selectedActor

s32 GameState::selectedActor

the leader: its unit and its actor

Definition at line 59 of file game_state.h.

Referenced by AltinPeak_RollLog(), AltinPeak_StopLogAndJumpOff(), AltmillerCave_HopSelectedActor(), BattleEffect_UpdatePhasedRadialParticle(), BattleFx_FindMatchingEvent(), BattleFx_LoadActionEffectResources(), BattleFx_Run(), BattleFx_RunAngledApproachPhases(), BattleFx_RunMercuryDjinnCapture(), BattleFx_RunVenusDjinnCapture(), BattleFx_SetupResourcesAndWindow(), BattleFx_StartEffectObject22(), BattleFx_StartFadeOverlay(), BattleFx_UpdateDescendingOrbitObject(), BattleFx_UpdateRadialSpread(), BattleFx_UpdateRandomTargetParticle(), Bilibin_UpdateRiverEffect(), Clear_LoadBackground(), Colosso_AskDoneCheering(), Colosso_ControlCharacterAlone(), Colosso_FindActorAhead(), Colosso_RaiseTakePlaceOnPsynergy(), Colosso_TakePlaceForMatch(), ColossoLog_CollectFinishEquipment(), ColossoLog_PushActorAhead(), ColossoLog_RunCompetitorTalk(), ColossoLog_UpdateEastEndCollision(), ColossoLogRollingStage_SceneTask(), ColossoRiver_CollectFinishItem(), ColossoRiver_MoveActorPairByOffset(), ColossoRiver_PushObjectAhead(), ColossoWall_MovePusherAndLog(), ColossoWall_PushAdjacentObstacle(), ColossoWall_PushBlockToCell(), ColossoWall_RollLogToCell(), ColossoWall_UpdateMovingPlatforms(), CrossboneIsle_MoveSelectedActorAndBlock(), DisplayTransition_UpdateScanlineTable(), Djinn_RunBattleStartHop(), Djinn_RunJupiterJoinEffect(), Djinn_RunMarsJoinEffect(), EffectRuntime_RunRisingObjectSequence(), Event_DouseStorm(), Event_DouseTravelMarker(), Event_FinishAirborneTravel(), Event_PassNorthWallOpening(), Event_PassSouthWallOpening(), Event_PushPipeworksBlock(), Event_RideLog(), Event_RideMovingSidewalk(), Event_RollLogEastWest(), Event_RollLogNorthSouth(), Event_RollLongLog(), Event_RunObjectHookAndWait(), Event_RunRisingSequence(), Event_StepOffScales(), Event_StepOnScales(), Event_StormCarriesPartyAway(), FallIntoPit(), Field_ClimbDown(), Field_ClimbUp(), Field_FindItemEvent(), Field_GetCollisionAheadOfLeader(), Field_ProcessStep(), Field_RequestBattleFromEncounterTable(), Field_RequestDjinnBattle(), Field_RunPsynergyEvents(), Field_RunPushTileEvent(), Field_RunScene(), Field_SearchTile(), Field_TryJumpForward(), Field_UpdateObjectVisibilityBounds(), Field_UseItem(), Field_UsePsynergy(), FieldEffect_SpawnNearbyMarkers(), FieldEffect_WatchLeaderDistance(), FieldEvent_AskYesNoAndShowResponse(), FieldEvent_Begin(), FieldEvent_End(), FieldFx_BlinkAvoidCaster(), FieldFx_CheckCloakTile(), FieldFx_EndCloak(), FieldFx_RunForce(), FieldFx_RunFrost(), FieldFx_RunReveal(), FieldFx_StartCloak(), FieldObject_PlaceSceneActors(), FieldObject_UpdatePlayerControl(), GameState_InitDefaults(), HeatGauge_CountStep(), Imil_RunIceSlide(), Imil_SlideActorAcrossIce(), ItemDisplay_RaiseAboveLeader(), ItemLevel_RunLevelEditor(), Leader_StopMoving(), LinkLobby_ChooseBattleMode(), LinkLobby_ChooseDebugPartyPreset(), LinkLobby_EnterBattle(), LinkLobby_ExplainPartyOrder(), LinkLobby_ReportMonsterRecord(), LinkLobby_ReportWinTallies(), LinkLobby_RunRoundResult(), LinkLobby_TalkByProgress(), LinkLobby_TalkToAttendant(), Map_UpdateWorldMapMarkers(), Marker_MoveLeaderAway(), MercuryLighthouse_ChargeLights(), MercuryLighthouse_HopAcrossPool(), MercuryLighthouse_RestoreLights(), MercuryLighthouse_SparkleAtLeader(), MercuryLighthouse_SpawnSparkPair(), Motion_LaunchFromFocusedObject(), Object_GetTriggerTileAheadOfCurrent(), ObjectEffect_EndContextEffect(), ObjectEffect_PrepareContextEffect(), ObjectEffect_RunPendingFlagEvent(), ObjectMotion_SetActionCallback(), ObjectTable_ResetForObject(), ObjectTable_Restore(), Party_RemoveOwnerRestored(), PartyInventory_FindOwner(), PartyInventory_GiveItem(), PartyInventory_HasSpace(), ResetSceneTransitionEffect(), SaveMenu_Run(), SaveState_BuildSummaryHeader(), Scene_FindEvent(), Scene_ReturnFromBattle(), Scene_TalkToActor(), SceneActor_PlacePairAtOffset(), SlideDownDune(), SuhallaDesert_CatchInStorm(), SuhallaDesert_ChaseLeader(), SuhallaDesert_RaiseStorm(), SuhallaDesert_UpdateCaptureTimer(), Title_Run(), TolbiSpring_RunToss(), TolbiSpring_TossCoinOrMedal(), TretTreeBranch_ShiftLeaderAndCameraByCells(), TretTreeInteriors_EnterRoom(), TretTreeInteriors_StepOnCrackedFloor(), UiText_BuildRenderEntries(), UiText_OpenMessageAtObject(), UiText_ShowPositionedMessageAndWait(), VenusLighthouse_StepActorWithDust(), WorldMap_JitterTransitionCamera(), WorldMap_PlayLighthouseTransition(), WorldMap_SelectExitByX(), WorldMap_SelectExitByZ(), WorldMap_StartAirborneTravel(), WorldMap_UpdateAirborneTravelTimer(), and WorldMap_UpdateLocationContacts().

◆ activeOwners

◆ unk200

u8 GameState::unk200[5]

not named by TBS code

Definition at line 61 of file game_state.h.

◆ paletteGlow

◆ unk207

u8 GameState::unk207[3]

not named by TBS code

Definition at line 63 of file game_state.h.

◆ speech

u8 GameState::speech

1 shows speakers' portraits beside their messages

Definition at line 64 of file game_state.h.

Referenced by BattleFx_GetResourceId(), GameState_InitDefaults(), Menu_RunWorkspaceOptions(), and OptionMenu_InitializeWork().

◆ unk20b

u8 GameState::unk20b

1 on a new game; not read by name in TBS

Definition at line 65 of file game_state.h.

Referenced by GameState_InitDefaults().

◆ messageSpeed

◆ unk20d

u8 GameState::unk20d[2]

not named by TBS code

Definition at line 67 of file game_state.h.

◆ unk20f

u8 GameState::unk20f

Set on saving at the end of the game; copied to the file's summary as sendFlag.

Definition at line 70 of file game_state.h.

Referenced by SaveMenu_Run(), and SaveState_BuildSummaryHeader().

◆ aKeys

u16 GameState::aKeys

The buttons for each field command, as KEY_ masks; read with gKeysPressed except dashKeys, held.

examine; KEY_A

Definition at line 74 of file game_state.h.

Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().

◆ bKeys

u16 GameState::bKeys

KEY_B; not read by name in TBS.

Definition at line 75 of file game_state.h.

Referenced by GameState_InitDefaults().

◆ selectKeys

u16 GameState::selectKeys

the menu; KEY_SELECT

Definition at line 76 of file game_state.h.

Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().

◆ startKeys

u16 GameState::startKeys

KEY_START.

Definition at line 77 of file game_state.h.

Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().

◆ firstShortcutKeys

u16 GameState::firstShortcutKeys

firstShortcut; KEY_L

Definition at line 78 of file game_state.h.

Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().

◆ secondShortcutKeys

u16 GameState::secondShortcutKeys

secondShortcut; KEY_R

Definition at line 79 of file game_state.h.

Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().

◆ dashKeys

u16 GameState::dashKeys

◆ returnCue

s16 GameState::returnCue

music playing when the field left; -1 for none

Definition at line 82 of file game_state.h.

Referenced by Field_RunScene(), Game_ResetForNewGame(), and Scene_ResetFlagsOnEnter().

◆ firstShortcut

u16 GameState::firstShortcut

◆ secondShortcut

◆ perspectiveScene

u8 GameState::perspectiveScene

set to 1 on the world map; not read by name in TBS

Definition at line 89 of file game_state.h.

Referenced by Field_RunScene().

◆ unk225

u8 GameState::unk225[5]

not named by TBS code

Definition at line 90 of file game_state.h.

◆ idleSleepEnabled

u8 GameState::idleSleepEnabled

◆ battleStart

u8 GameState::battleStart

how the next battle starts (Battle_SetStart)

Definition at line 92 of file game_state.h.

Referenced by Battle_RunEncounter(), BattleEscape_CheckSuccess(), and UiText_ShowLocalizedMessageAndWait().

◆ hazardLimit

s16 GameState::hazardLimit

Hazardous ground (the Lamakan Desert's heat): every hazardLimit steps the party takes hazardDamage (bit 8 a flag, bits 7 to 0 the amount).

Definition at line 96 of file game_state.h.

Referenced by Field_ProcessStep(), Field_RunScene(), HeatGauge_Draw(), HeatGauge_RaiseQuarterTriggers(), and LamakanDesert_Initialize().

◆ hazardMode

s16 GameState::hazardMode

0 counts on hazard cells only; 1 counts every step

Definition at line 97 of file game_state.h.

Referenced by Field_ProcessStep(), Field_RunScene(), and LamakanDesert_Initialize().

◆ hazardDamage

s16 GameState::hazardDamage

Definition at line 98 of file game_state.h.

Referenced by Field_ProcessStep(), Field_RunScene(), and LamakanDesert_Initialize().

◆ hazardSteps

s16 GameState::hazardSteps

reset on entering a new scene group

Definition at line 99 of file game_state.h.

Referenced by CollapseFromHeat(), Field_ProcessStep(), HeatGauge_CountStep(), HeatGauge_Draw(), HeatGauge_RaiseQuarterTriggers(), and Scene_ResetFlagsOnEnter().

◆ pendingDjinnEvent

s16 GameState::pendingDjinnEvent

The Djinni battle pending (DJINNI_0 plus its number, flags in bits 15 to 11), resolved on returning to the field.

Definition at line 103 of file game_state.h.

Referenced by Djinn_ResolvePendingEvent(), Field_RequestDjinnBattle(), Field_RunScene(), Field_SearchTile(), FieldObject_PlaceSceneActors(), GomaCavePillar_FidgetWhileForgeFights(), and Scene_Initialize().

◆ sceneChangeReason

s16 GameState::sceneChangeReason

the last battle's result; -1 for a defeat

Definition at line 104 of file game_state.h.

Referenced by Djinn_ResolvePendingEvent(), and Scene_ReturnFromBattle().

◆ encounterSteps

s32 GameState::encounterSteps

the encounter count, reset with a new group

Definition at line 105 of file game_state.h.

Referenced by Encounter_SelectEnemyGroup(), Event_MeetCorona(), Event_MeetHail(), Event_MeetVine(), Field_RunScene(), and Scene_ResetFlagsOnEnter().

◆ pendingItem

u16 GameState::pendingItem

given on returning to the field if the party has room

Definition at line 106 of file game_state.h.

Referenced by BattleSpoils_Clear(), and Field_RunScene().

◆ sceneVariant

s16 GameState::sceneVariant

the current scene's variant from its record

Definition at line 107 of file game_state.h.

Referenced by Clear_GetSaveRecoveryBlockMask(), Field_ProcessStep(), Field_RunScene(), and Scene_ResetFlagsOnEnter().

◆ retreatScene

◆ retreatEntrance

◆ avoidDistance

s32 GameState::avoidDistance

distance left of Avoid, 16.16 pixels; 0 when off

Definition at line 110 of file game_state.h.

Referenced by Encounter_SelectEnemyGroup(), Field_ProcessStep(), FieldEvent_ShowStatusMessage(), and FieldFx_RunAvoid().

◆ avoidByItem

s8 GameState::avoidByItem

Avoid came from an item (the Sacred Feather).

Definition at line 111 of file game_state.h.

Referenced by FieldEvent_ShowStatusMessage(), and FieldFx_RunAvoid().

◆ pausedPose

s8 GameState::pausedPose

Halt: the stopped object's first animation param.

Definition at line 112 of file game_state.h.

Referenced by BattleEffect_PauseObject(), and BattleFx_ResumeObject().

◆ pausedObject

◆ cloaked

◆ unk24e

u8 GameState::unk24e[2]

not named by TBS code

Definition at line 115 of file game_state.h.

◆ pausedUpdate

u32 GameState::pausedUpdate

Halt: the stopped object's update; not read by name.

Definition at line 116 of file game_state.h.

Referenced by BattleEffect_PauseObject(), and BattleFx_ResumeObject().

◆ unk254

u8 GameState::unk254[0x50]

not named by TBS code

Definition at line 117 of file game_state.h.

◆ linkTallies

u16 GameState::linkTallies[8]

The link lobby's tallies: 4 the total wins and 7 the consecutive wins it reports, 3 cleared on choosing a monster battle; the others not named by TBS code.

Definition at line 121 of file game_state.h.

Referenced by LinkLobby_ChooseBattleMode(), LinkLobby_ReportMonsterRecord(), LinkLobby_ReportWinTallies(), and LinkLobby_RunRoundResult().

◆ unk2b4

u8 GameState::unk2b4[4]

not named by TBS code

Definition at line 122 of file game_state.h.

◆ startStamp

u32 GameState::startStamp

Runtime_GetBuildStampTime's value at a new game.

Definition at line 123 of file game_state.h.

Referenced by GameState_InitDefaults().

◆ unk2bc

u8 GameState::unk2bc[4]

not named by TBS code

Definition at line 124 of file game_state.h.

◆ owners

struct BattleUnit GameState::owners[8]

the characters

Definition at line 125 of file game_state.h.

Referenced by UnitGet().