summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xengine/cable_club.asm2
-rwxr-xr-xengine/evolution.asm2
-rwxr-xr-xengine/menu/main_menu.asm4
-rwxr-xr-xengine/menu/naming_screen.asm2
-rwxr-xr-xengine/menu/pokedex.asm2
-rwxr-xr-xengine/menu/start_menu.asm2
-rwxr-xr-xengine/slot_machine.asm2
-rwxr-xr-xengine/town_map.asm4
-rw-r--r--home.asm32
-rwxr-xr-xmain.asm4
10 files changed, 28 insertions, 28 deletions
diff --git a/engine/cable_club.asm b/engine/cable_club.asm
index 73f0dada..be3184aa 100755
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -540,7 +540,7 @@ TradeCenter_SelectMon:
ld a, $ed
ld [$c4e1], a
.asm_574a
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [$ffb5]
and a
jr z, .asm_574a ; 0x5750 $f8
diff --git a/engine/evolution.asm b/engine/evolution.asm
index 664aaa5e..12f7e5c5 100755
--- a/engine/evolution.asm
+++ b/engine/evolution.asm
@@ -141,7 +141,7 @@ Func_7bed6: ; 7bed6 (1e:7ed6)
asm_7befa: ; 7befa (1e:7efa)
call DelayFrame
push bc
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [$ffb5]
pop bc
and $2
diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm
index 2ab7d35e..49ed67f6 100755
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -100,7 +100,7 @@ MainMenu: ; 5af2 (1:5af2)
ld [hJoyPressed],a
ld [hJoyReleased],a
ld [hJoyHeld],a
- call GetJoypadState
+ call Joypad
ld a,[hJoyHeld]
bit 0,a
jr nz,.next5
@@ -483,7 +483,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
call PlaceMenuCursor
call SetOptionsFromCursorPositions
.getJoypadStateLoop
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a,[$ffb5]
ld b,a
and a,%11111011 ; any key besides select pressed?
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
index b62d8a94..b4e7ff92 100755
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -133,7 +133,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
callba AnimatePartyMon_ForceSpeed1
pop af
ld [wCurrentMenuItem], a ; $cc26
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [hJoyPressed]
and a
jr z, .asm_65ff
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index dbb9f57f..2b56726a 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -584,7 +584,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
xor a
ld [$fff4],a
.waitForButtonPress
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a,[$ffb5]
and a,%00000011 ; A button and B button
jr z,.waitForButtonPress
diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm
index be0e851d..87e08daf 100755
--- a/engine/menu/start_menu.asm
+++ b/engine/menu/start_menu.asm
@@ -80,7 +80,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)
; EXIT falls through to here
CloseStartMenu:: ; 2b70 (0:2b70)
- call GetJoypadState
+ call Joypad
ld a,[hJoyPressed]
bit 0,a ; was A button newly pressed?
jr nz,CloseStartMenu
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index 6c106239..1d320207 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -799,7 +799,7 @@ SlotMachine_3784e: ; 3784e (d:784e)
SlotMachine_37882: ; 37882 (d:7882)
call DelayFrame
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [$ffb5]
and $1
ret z
diff --git a/engine/town_map.asm b/engine/town_map.asm
index 6fbdeb2a..e759d503 100755
--- a/engine/town_map.asm
+++ b/engine/town_map.asm
@@ -67,7 +67,7 @@ Func_70e92: ; 70e92 (1c:4e92)
call CopyData
.asm_70ec8
call Func_716c6
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [$ffb5]
ld b, a
and $c3
@@ -195,7 +195,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
.asm_71004
push hl
call DelayFrame
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, [$ffb5]
ld b, a
pop hl
diff --git a/home.asm b/home.asm
index 88482180..4ccb0ebe 100644
--- a/home.asm
+++ b/home.asm
@@ -156,12 +156,12 @@ ReadJoypad::
ld [rJOYP], a
ret
-GetJoypadState::
+Joypad::
; Update the joypad state variables:
; [hJoyReleased] keys released since last time
; [hJoyPressed] keys pressed since last time
; [hJoyHeld] currently pressed keys
- homecall _GetJoypadState
+ homecall _Joypad
ret
@@ -220,7 +220,7 @@ OverworldLoopLessDelay::
ld a,[wWalkCounter]
and a
jp nz,.moveAhead ; if the player sprite has not yet completed the walking animation
- call GetJoypadStateOverworld ; get joypad state (which is possibly simulated)
+ call JoypadOverworld ; get joypad state (which is possibly simulated)
callba SafariZoneCheck
ld a,[$da46]
and a
@@ -588,7 +588,7 @@ CheckWarpsNoCollisionLoop:: ; 06cc (0:06cc)
jr nz,WarpFound1
push de
push bc
- call GetJoypadState
+ call Joypad
pop bc
pop de
ld a,[hJoyHeld] ; current joypad state
@@ -2006,12 +2006,12 @@ DrawTileBlock:: ; 0f1d (0:0f1d)
ret
; function to update joypad state and simulate button presses
-GetJoypadStateOverworld:: ; 0f4d (0:0f4d)
+JoypadOverworld:: ; 0f4d (0:0f4d)
xor a
ld [$c103],a
ld [$c105],a
call RunMapScript
- call GetJoypadState
+ call Joypad
ld a,[W_FLAGS_D733]
bit 3,a ; check if a trainer wants a challenge
jr nz,.notForcedDownwards
@@ -2596,7 +2596,7 @@ ForceBikeOrSurf:: ; 12ed (0:12ed)
CheckForUserInterruption:: ; 12f8 (0:12f8)
call DelayFrame
push bc
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
pop bc
ld a,[hJoyHeld] ; currently pressed buttons
cp a,%01000110 ; Up, Select button, B button
@@ -4225,7 +4225,7 @@ TextCommand09:: ; 1bff (0:1bff)
; (no arguments)
TextCommand0A:: ; 1c1d (0:1c1d)
push bc
- call GetJoypadState
+ call Joypad
ld a,[hJoyHeld]
and a,%00000011 ; A and B buttons
jr nz,.skipDelay
@@ -4302,7 +4302,7 @@ TextCommand0C:: ; 1c78 (0:1c78)
ld a,$75 ; ellipsis
ld [hli],a
push de
- call GetJoypadState
+ call Joypad
pop de
ld a,[hJoyHeld] ; joypad state
and a,%00000011 ; is A or B button pressed?
@@ -6513,7 +6513,7 @@ AfterDisplayingTextID:: ; 29d6 (0:29d6)
; loop to hold the dialogue box open as long as the player keeps holding down the A button
HoldTextDisplayOpen:: ; 29df (0:29df)
- call GetJoypadState
+ call Joypad
ld a,[hJoyHeld]
bit 0,a ; is the A button being pressed?
jr nz,HoldTextDisplayOpen
@@ -6953,7 +6953,7 @@ DisplayChooseQuantityMenu:: ; 2d57 (0:2d57)
ld [$cf96],a ; initialize current quantity to 0
jp .incrementQuantity
.waitForKeyPressLoop
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a,[hJoyPressed] ; newly pressed buttons
bit 0,a ; was the A button pressed?
jp nz,.buttonAPressed
@@ -8773,8 +8773,8 @@ CopyString:: ; 3829 (0:3829)
; report only one button press.
; 3. Same as 2, but report no buttons as pressed if A or B is held down.
; ([$ffb7] == 1, [$ffb6] == 0)
-GetJoypadStateLowSensitivity:: ; 3831 (0:3831)
- call GetJoypadState
+JoypadLowSensitivity:: ; 3831 (0:3831)
+ call Joypad
ld a,[$ffb7] ; flag
and a ; get all currently pressed buttons or only newly pressed buttons?
ld a,[hJoyPressed] ; newly pressed buttons
@@ -8832,7 +8832,7 @@ WaitForTextScrollButtonPress:: ; 3865 (0:3865)
ld hl, Coord
call HandleDownArrowBlinkTiming
pop hl
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a, $2d
call Predef ; indirect jump to Func_5a5f (5a5f (1:5a5f))
ld a, [$ffb5]
@@ -8922,7 +8922,7 @@ PrintLetterDelay:: ; 38d3 (0:38d3)
ld a,1
ld [H_FRAMECOUNTER],a
.checkButtons
- call GetJoypadState
+ call Joypad
ld a,[hJoyHeld]
.checkAButton
bit 0,a ; is the A button pressed?
@@ -9301,7 +9301,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2)
callba AnimatePartyMon ; shake mini sprite of selected pokemon
.getJoypadState
pop hl
- call GetJoypadStateLowSensitivity
+ call JoypadLowSensitivity
ld a,[$ffb5]
and a ; was a key pressed?
jr nz,.keyPressed
diff --git a/main.asm b/main.asm
index da4109c0..183d62cc 100755
--- a/main.asm
+++ b/main.asm
@@ -3075,7 +3075,7 @@ Func_7c18: ; 7c18 (1:7c18)
SECTION "bank3",ROMX,BANK[$3]
-_GetJoypadState::
+_Joypad::
ld a, [hJoyInput]
cp A_BUTTON + B_BUTTON + SELECT + START ; soft reset
jp z, TrySoftReset
@@ -3125,7 +3125,7 @@ TrySoftReset:
ld hl, hSoftReset
dec [hl]
jp z, SoftReset
- jp GetJoypadState
+ jp Joypad
INCLUDE "data/map_songs.asm"