Alchemy
Loading...
Searching...
No Matches

keystate.h File Reference

The keypad state the VBlank interrupt keeps. More...

Go to the source code of this file.

Variables

volatile u32 gKeysHeld
 Keys down now.
volatile u32 gKeysPressed
 Keys that went down this frame.
volatile u32 gKeysRepeat
 Pressed keys, repeating while held: after 19 frames, then every 6.
volatile u32 gKeysRepeatDirected
 gKeysRepeat with at most one D-pad direction.
volatile u32 gKeysDirection
 The D-pad direction gKeysRepeatDirected keeps: of several held, the one added last.
u32 gKeysPressedLatch
 Presses since a reader last cleared it.
u32 gKeysHeldLast
 gKeysHeld when the frame loop last read it.
u32 gKeysHeldAtVBlank
 gKeysHeld at the previous VBlank.
s32 gKeyRepeatTimer
 Frames until the held keys repeat; -1 makes them repeat at once.

Detailed Description

The keypad state the VBlank interrupt keeps.

The VBlank handler reads the keypad into these cells, and Input_UpdateKeyRepeatAndDirection turns them into repeats after each frame (runtime/frame.c). The first five are volatile, a device: each tag names what differs without it.

Definition in file keystate.h.

Variable Documentation

◆ gKeysHeld

◆ gKeysPressed

volatile u32 gKeysPressed
extern

Keys that went down this frame.

Referenced by AltinPeak_ShowSecondBeastRoute(), Battle_SelectAbility(), Battle_ShowPairedUnitWorkAndWait(), BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), BattleMenu_RunActionSelection(), BattlePresentation_WaitForAdvance(), BattlePresentation_WaitForPromptAt(), BattleTarget_RunSelection(), CharacterMenu_SelectCommand(), CharacterSelector_RunRearrange(), Debug_SelectAbilityPair(), DebugMenu_SelectItem(), Djinn_ShowJoinedMessage(), DjinnMenu_SelectDjinn(), DjinnMenu_ShowCurrentList(), DjinnMenu_ShowHelp(), DjinnMenu_ShowOwnerStatus(), Event_AskYesNoWithActorAnimation(), Event_UpdateDebugSkip(), Field_CheckConfiguredKeys(), Input_UpdateKeyRepeatAndDirection(), InventoryMenu_ShowModalMessage(), ItemLevel_RunLevelEditor(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemList_SelectEntry(), ItemMenu_ChooseCommand(), ItemMenu_ConfirmDrop(), ItemMenu_ConfirmEquip(), ItemMenu_RunList(), ItemMenu_RunOwnerSelection(), ItemMenu_SelectGiveQuantity(), ItemMenu_SelectItem(), ItemMenu_SelectTarget(), LinkLobby_ChooseDebugPartyPreset(), Menu_CancelSoundTick(), Menu_HandleFlagGridInput(), Menu_RunCommandRow(), Menu_RunResourceSelectionLoop(), Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), Menu_SelectionLoop(), Menu_SelectQuantity(), Menu_WaitForSelectionInput(), MercuryLighthouse_HopAcrossPool(), NameEntry_EditOwnerName(), OwnerAction_RunCompareLoop(), Party_ShowJoinedMessage(), Party_ShowPairJoinedMessage(), PsynergyMenu_RunList(), PsynergyMenu_SelectAction(), PsynergyMenu_SelectMember(), PsynergyMenu_SelectOwner(), PsynergyMenu_SelectTarget(), Runtime_AdjustDebugValueWithButtons(), Runtime_IdleForever(), Sanctum_ChooseRestartOption(), Sanctum_RunPartyService(), SaveMenu_Run(), SaveMenu_SelectSlot(), Shop_BuySpecialItem(), Shop_PickUnit(), Shop_PickUnitItem(), Shop_SelectBuy(), Shop_SelectQuantity(), Shop_SelectRepair(), Shop_SelectSell(), Shop_SelectUse(), SummonMenu_SelectSummon(), System_VBlankHandler(), Title_Run(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), TolbiSpring_RunSpringGame(), Ui_RunIconMonitor(), Ui_RunOwnerStatusScreen(), UiText_CheckTextDismissed(), and UiText_ShowLocalizedMessageAndWait().

◆ gKeysRepeat

volatile u32 gKeysRepeat
extern

Pressed keys, repeating while held: after 19 frames, then every 6.

Referenced by AudioTest_RunParameterController(), Battle_SelectAbility(), BattleFx_RunAtalanta(), BattleFx_RunBoreas(), BattleFx_RunCybele(), BattleFx_RunJudgment(), BattleFx_RunKirin(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunProcne(), BattleFx_RunRamses(), BattleFx_RunThor(), BattleMenu_RunActionSelection(), BattleTarget_RunSelection(), CharacterMenu_SelectCommand(), CharacterSelector_RunRearrange(), Debug_RunPaletteEditor(), Debug_SelectAbilityPair(), DebugBattle_RunMenu(), DebugBattle_ViewMessages(), DebugMenu_BrowseEntryGlyphs(), DebugMenu_BrowseIcons(), DebugMenu_SelectItem(), DjinnMenu_SelectDjinn(), DjinnMenu_ShowHelp(), DjinnMenu_ShowOwnerStatus(), Input_UpdateKeyRepeatAndDirection(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemList_SelectEntry(), ItemMenu_ChooseCommand(), ItemMenu_ConfirmDrop(), ItemMenu_ConfirmEquip(), ItemMenu_RunList(), ItemMenu_RunOwnerSelection(), ItemMenu_SelectGiveQuantity(), ItemMenu_SelectItem(), ItemMenu_SelectTarget(), LinkLobby_ChooseDebugPartyPreset(), LuckyDice_Run(), Map_ShowWorldMap(), Menu_HandleFlagGridInput(), Menu_HandlePageInput(), Menu_HandleSelectionRowInput(), Menu_RunCommandRow(), Menu_RunResourceSelectionLoop(), Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), Menu_SelectionLoop(), Menu_SelectQuantity(), Menu_WaitForSelectionInput(), NameEntry_EditOwnerName(), Object_MoveOnWorldMap(), OwnerAction_RunCompareLoop(), PartyTalkMenu_Choose(), PsynergyMenu_RunList(), PsynergyMenu_SelectAction(), PsynergyMenu_SelectMember(), PsynergyMenu_SelectOwner(), PsynergyMenu_SelectTarget(), Runtime_AdjustDebugValueWithButtons(), Sanctum_ChooseRestartOption(), Sanctum_RunPartyService(), SaveMenu_SelectSlot(), Shop_BuySpecialItem(), Shop_PickUnit(), Shop_PickUnitItem(), Shop_SelectBuy(), Shop_SelectQuantity(), Shop_SelectRepair(), Shop_SelectSell(), Shop_SelectUse(), SummonMenu_SelectSummon(), System_VBlankHandler(), TretTreeBranch_ExchangeInputPacket(), Ui_RunIconMonitor(), Ui_RunOwnerStatusScreen(), and WaitFrames().

◆ gKeysRepeatDirected

volatile u32 gKeysRepeatDirected
extern

gKeysRepeat with at most one D-pad direction.

Referenced by Input_UpdateKeyRepeatAndDirection().

◆ gKeysDirection

volatile u32 gKeysDirection
extern

The D-pad direction gKeysRepeatDirected keeps: of several held, the one added last.

Referenced by Input_UpdateKeyRepeatAndDirection().

◆ gKeysPressedLatch

u32 gKeysPressedLatch
extern

◆ gKeysHeldLast

u32 gKeysHeldLast
extern

gKeysHeld when the frame loop last read it.

Referenced by Input_UpdateKeyRepeatAndDirection().

◆ gKeysHeldAtVBlank

u32 gKeysHeldAtVBlank
extern

gKeysHeld at the previous VBlank.

Referenced by System_VBlankHandler().

◆ gKeyRepeatTimer

s32 gKeyRepeatTimer
extern

Frames until the held keys repeat; -1 makes them repeat at once.

Referenced by Input_ResetKeyRepeat(), Input_UpdateKeyRepeatAndDirection(), and System_VBlankHandler().