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 | |
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.
| 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().
| 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().
| 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().
| s32 GameState::coins |
Definition at line 23 of file game_state.h.
Referenced by Battle_ApplyPresetItemsAndFlags(), Clear_PackPasswordData(), CommandTable_ConfigureCommandList(), GameState_InitDefaults(), Inn_CheckIn(), KalayTolbiDocks_TalkToTicketSeller(), LuckyDice_Run(), Party_AdjustCoins(), Party_EndChildhood(), Sanctum_RunPartyService(), SaveState_BuildSummaryHeader(), Shop_DrawMoney(), Shop_RepairItem(), Shop_SelectBuy(), Shop_SelectBuyNum(), TolbiSpring_Initialize(), TolbiSpring_OfferLuckyDice(), TolbiSpring_RunSpringGame(), and UiText_DrawWorkValueWithLabel().
| 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.
| 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().
| 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().
| 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().
| 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().
| u8 GameState::unk13c[0x84] |
not named by TBS code
Definition at line 35 of file game_state.h.
| 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().
| 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().
| s16 GameState::savedScene |
where a defeat returns to without a defeat point
Definition at line 38 of file game_state.h.
Referenced by Event_IodemAsksWhyTurningBack(), Event_SetSavedDestination(), Field_RunScene(), SaveMenu_Run(), Scene_Initialize(), Scene_ReturnFromBattle(), Scene_SetDefeatReturnPoint(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipMast_AnnounceLand(), TolbiShipMast_Initialize(), and WorldMap_RunBlackOrbScene().
| s16 GameState::savedEntrance |
where a defeat returns to without a defeat point
Definition at line 39 of file game_state.h.
Referenced by Event_IodemAsksWhyTurningBack(), Event_SetSavedDestination(), Field_RunScene(), SaveMenu_Run(), Scene_Initialize(), Scene_ReturnFromBattle(), Scene_SetDefeatReturnPoint(), TolbiShipDeck_JumpIntoKrakenBattle(), TolbiShipMast_AnnounceLand(), TolbiShipMast_Initialize(), and WorldMap_RunBlackOrbScene().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| u8 GameState::unk1d8[2] |
not named by TBS code
Definition at line 48 of file game_state.h.
| s16 GameState::map |
the scene's map; SceneId_Clear for the world map
Definition at line 49 of file game_state.h.
Referenced by BattleFx_LoadActionEffectResources(), BattleFx_UpdateDescendingParticleNegativeArc(), BattleFx_UpdateDescendingParticlePositiveArc(), BattleFx_UpdatePairedArcSpawner(), Field_RunScene(), and Game_ResetForNewGame().
| s32 GameState::x |
16.16 fixed-point pixels
Definition at line 50 of file game_state.h.
Referenced by BabiLighthouse_SetupScene(), Field_RunScene(), ObjectTable_ResetForObject(), Scene_ApplyEntrance(), and TretTreeInteriors_StepOnCrackedFloor().
| 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().
| s32 GameState::z |
16.16 fixed-point pixels
Definition at line 52 of file game_state.h.
Referenced by BabiLighthouse_SetupScene(), Field_RunScene(), ObjectTable_ResetForObject(), Scene_ApplyEntrance(), and TretTreeInteriors_StepOnCrackedFloor().
| u32 GameState::heading |
1/65536 turns
Definition at line 53 of file game_state.h.
Referenced by Field_RunScene(), ObjectTable_ResetForObject(), and Scene_ApplyEntrance().
| 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().
| 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().
| 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().
| u8 GameState::movementMode |
1 while the leader is climbing, 0 otherwise
Definition at line 57 of file game_state.h.
Referenced by BabiLighthouse_ClimbOrAdvancePair(), Colosso_RestoreCompetitor(), ColossoLog_Initialize(), ColossoWall_Initialize(), CrossboneIslePillarRooms_TryJumpAcrossPillar(), Event_TalkToMovingSidewalkAttendant(), Field_ClimbDown(), Field_ClimbUp(), Field_ProcessStep(), Field_RunScene(), Leader_StopMoving(), ObjectTable_ResetForObject(), Scene_Initialize(), SuhallaDesert_CatchInStorm(), WorldMap_Initialize(), and WorldMap_StartAirborneTravel().
| u8 GameState::unk1f3 |
not named by TBS code
Definition at line 58 of file game_state.h.
| 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().
| u8 GameState::activeOwners[8] |
the party in order
Definition at line 60 of file game_state.h.
Referenced by Battle_RunEncounter(), BattleParty_ApplyDrain(), BattleParty_ApplyHealthDelta(), BattleParty_ApplyStatusDamage(), BattleParty_PrepareActiveOwners(), Colosso_OfferCheeringSpot(), Djinn_AddToLeastLoadedOwner(), Field_ProcessStep(), Field_UseItem(), GameFlag_RefreshLureCap(), InventorySnapshot_Restore(), InventorySnapshot_Save(), LinkLobby_CopyPartyOwnerIds(), LinkLobby_PartyContains(), Party_AddActiveOwner(), Party_CheckItemLimit(), Party_GetAverageLevel(), Party_ListActiveOwners(), Party_RemoveActiveOwner(), Party_RemoveOwnerRestored(), Party_RestoreHpPp(), Party_RestorePpOfLitElements(), and PartyStatusDraw().
| u8 GameState::unk200[5] |
not named by TBS code
Definition at line 61 of file game_state.h.
| u8 GameState::paletteGlow[2] |
window hue (0 to 24), brightness
Definition at line 62 of file game_state.h.
Referenced by Game_ResetForNewGame(), GameState_InitDefaults(), Menu_RunWorkspaceOptions(), OptionMenu_InitializeWork(), OptionMenu_LowerSetting(), OptionMenu_RaiseSetting(), OptionMenu_StepWindowHue(), SaveMenu_Run(), SaveMenu_SelectSlot(), SaveState_BuildSummaryHeader(), Ui_SetBank15PaletteAndClearRenderMode(), WindowColor_ComputeTint(), and WorldMap_ShowEndingScene().
| u8 GameState::unk207[3] |
not named by TBS code
Definition at line 63 of file game_state.h.
| 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().
| 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().
| u8 GameState::messageSpeed |
0 to 2; 1 on a new game
Definition at line 66 of file game_state.h.
Referenced by DebugBattle_ViewMessages(), DebugMenu_BrowseMessageRange(), DjinnMenu_Run(), DjinnMenu_SelectDjinn(), GameState_InitDefaults(), Menu_RunWorkspaceOptions(), OptionMenu_InitializeWork(), OptionMenu_LowerSetting(), OptionMenu_RaiseSetting(), OwnerAction_RunCompareLoop(), Ui_SetMessageVoiceFromActor(), and UiWork_StepChannelScript().
| u8 GameState::unk20d[2] |
not named by TBS code
Definition at line 67 of file game_state.h.
| 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().
| 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().
| u16 GameState::bKeys |
KEY_B; not read by name in TBS.
Definition at line 75 of file game_state.h.
Referenced by GameState_InitDefaults().
| u16 GameState::selectKeys |
the menu; KEY_SELECT
Definition at line 76 of file game_state.h.
Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().
| u16 GameState::startKeys |
KEY_START.
Definition at line 77 of file game_state.h.
Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().
| u16 GameState::firstShortcutKeys |
firstShortcut; KEY_L
Definition at line 78 of file game_state.h.
Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().
| u16 GameState::secondShortcutKeys |
secondShortcut; KEY_R
Definition at line 79 of file game_state.h.
Referenced by Field_CheckConfiguredKeys(), and GameState_InitDefaults().
| u16 GameState::dashKeys |
KEY_B.
Definition at line 80 of file game_state.h.
Referenced by FieldObject_UpdatePlayerControl(), GameState_InitDefaults(), and Object_MoveOnWorldMap().
| 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().
| u16 GameState::firstShortcut |
The shortcuts' assignments.
bits: 15..14 kind (0 Psynergy, 1 an item) | 13..0 which one.
Definition at line 86 of file game_state.h.
Referenced by Debug_SelectAbilityPair(), Event_ClearInvalidPackedValues(), Field_CheckConfiguredKeys(), GameState_InitDefaults(), InventorySnapshot_Restore(), InventorySnapshot_Save(), Menu_FindShortcutEntries(), PsynergyMenu_DrawShortcuts(), and PsynergyMenu_SetShortcut().
| u16 GameState::secondShortcut |
Definition at line 87 of file game_state.h.
Referenced by Debug_SelectAbilityPair(), Event_ClearInvalidPackedValues(), Field_CheckConfiguredKeys(), GameState_InitDefaults(), InventorySnapshot_Restore(), InventorySnapshot_Save(), Menu_FindShortcutEntries(), PsynergyMenu_DrawShortcuts(), and PsynergyMenu_SetShortcut().
| 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().
| u8 GameState::unk225[5] |
not named by TBS code
Definition at line 90 of file game_state.h.
| u8 GameState::idleSleepEnabled |
the option, saved from gIdleSleepEnabled
Definition at line 91 of file game_state.h.
Referenced by GameState_InitDefaults(), LinkLobby_RunRoundResult(), Menu_RunWorkspaceOptions(), OptionMenu_InitializeWork(), SaveMenu_Run(), SaveState_BuildSummaryHeader(), and SaveState_LoadRecordIntoWork().
| 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().
| 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().
| 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().
| s16 GameState::hazardDamage |
Definition at line 98 of file game_state.h.
Referenced by Field_ProcessStep(), Field_RunScene(), and LamakanDesert_Initialize().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| s16 GameState::retreatScene |
where Retreat goes; the group's first entrance
Definition at line 108 of file game_state.h.
Referenced by BabiLighthouse_SetupScene(), Field_UseItem(), Field_UsePsynergy(), KolimaForestTree_Initialize(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), Scene_Initialize(), Scene_ResetFlagsOnEnter(), SolSanctumEntrance_RestoreInteriorState(), and TunnelRuins_Initialize().
| s16 GameState::retreatEntrance |
where Retreat goes; the group's first entrance
Definition at line 109 of file game_state.h.
Referenced by BabiLighthouse_SetupScene(), Field_UseItem(), Field_UsePsynergy(), KolimaForestTree_Initialize(), MercuryLighthouse_Initialize(), MercuryLighthouseEntrance_Initialize(), Scene_Initialize(), Scene_ResetFlagsOnEnter(), SolSanctumEntrance_RestoreInteriorState(), and TunnelRuins_Initialize().
| 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().
| 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().
| 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().
| s16 GameState::pausedObject |
Halt: the stopped object; -1 for none.
Definition at line 113 of file game_state.h.
Referenced by BattleFx_ClearChildValueOnMismatch(), BattleFx_DispatchRequestKind(), BattleFx_Run(), CrossboneIslePlatformRooms_CheckFifthPursuerTrigger(), CrossboneIslePlatformRooms_CheckFirstPursuerTrigger(), CrossboneIslePlatformRooms_CheckSecondPursuerTrigger(), CrossboneIslePlatformRooms_TrackPursuerColumn(), Event_BaneKeepsAway(), Event_DodgeFourthPursuer(), Event_DodgeThirdPursuer(), Event_KiteKeepsAway(), Field_RunScene(), Scene_FindActorTalkEvent(), and Scene_TalkToActor().
| s16 GameState::cloaked |
1 under Cloak, which prevents battles
Definition at line 114 of file game_state.h.
Referenced by CrossboneIslePlatformRooms_CheckFifthPursuerTrigger(), CrossboneIslePlatformRooms_CheckFirstPursuerTrigger(), CrossboneIslePlatformRooms_CheckSecondPursuerTrigger(), Encounter_SelectEnemyGroup(), Event_GuardsBlockGate(), Event_ReadLeftGuardsThoughts(), Event_TalkToLeftGuard(), Event_TalkToRightGuard(), Field_RunScene(), FieldFx_EndCloak(), FieldFx_ResumeCloakCheck(), FieldFx_RunAvoid(), FieldFx_StartCloak(), Lunpa_WatchForUncloakedParty(), LunpaFortress_CheckEntranceGuard(), LunpaFortress_CheckFirstEntranceSentry(), LunpaFortress_CheckSecondEntranceSentry(), LunpaFortress_CheckUpperHallGuard(), LunpaFortress_UpdateHallGuardDetection(), LunpaFortress_UpdateOuterGuardDetection(), LunpaFortress_UpdatePairedGuardDetection(), and Scene_Initialize().
| u8 GameState::unk24e[2] |
not named by TBS code
Definition at line 115 of file game_state.h.
| 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().
| u8 GameState::unk254[0x50] |
not named by TBS code
Definition at line 117 of file game_state.h.
| 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().
| u8 GameState::unk2b4[4] |
not named by TBS code
Definition at line 122 of file game_state.h.
| u32 GameState::startStamp |
Runtime_GetBuildStampTime's value at a new game.
Definition at line 123 of file game_state.h.
Referenced by GameState_InitDefaults().
| u8 GameState::unk2bc[4] |
not named by TBS code
Definition at line 124 of file game_state.h.
| struct BattleUnit GameState::owners[8] |