aboutsummaryrefslogtreecommitdiffstats
path: root/engine/link
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
committerdannye <33dannye@gmail.com>2025-07-02 21:15:13 -0500
commitca019eac8fd96559f4d4e712f0b53e95492e5dcb (patch)
tree209a500e3bda6c2109e5acec60448e9e52f8c2af /engine/link
parentUse more ldpikacry (diff)
parentRequire RGBDS 0.9.3 for its DMG palette specs (#513) (diff)
downloadpokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.gz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.xz
pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine/link')
-rw-r--r--engine/link/cable_club.asm40
-rw-r--r--engine/link/cable_club_npc.asm6
2 files changed, 23 insertions, 23 deletions
diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm
index 691793e7..ce6c582b 100644
--- a/engine/link/cable_club.asm
+++ b/engine/link/cable_club.asm
@@ -109,17 +109,17 @@ CableClub_DoBattleOrTradeAgain:
call Delay3
xor a
ldh [hSerialSendData], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld a, SC_START | SC_INTERNAL
ldh [rSC], a
call DelayFrame
xor a
ldh [hSerialSendData], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld a, SC_START | SC_INTERNAL
ldh [rSC], a
.skipSendingTwoZeroBytes
call Delay3
call StopAllMusic
- ld a, 1 << SERIAL
+ ld a, IE_SERIAL
ldh [rIE], a
ld hl, wSerialRandomNumberListBlock
ld de, wSerialOtherGameboyRandomNumberListBlock
@@ -139,7 +139,7 @@ CableClub_DoBattleOrTradeAgain:
ld bc, 200
vc_hook Wireless_ExchangeBytes_patch_lists
call Serial_ExchangeBytes
- ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK)
+ ld a, IE_SERIAL | IE_TIMER | IE_VBLANK
ldh [rIE], a
ldh a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
@@ -339,7 +339,7 @@ TradeCenter_SelectMon:
ld [wMenuWatchMovingOutOfBounds], a
inc a
ld [wWhichTradeMonSelectionMenu], a
- ld a, D_DOWN | D_LEFT | A_BUTTON
+ ld a, PAD_DOWN | PAD_LEFT | PAD_A
ld [wMenuWatchedKeys], a
ld a, [wEnemyPartyCount]
ld [wMaxMenuItem], a
@@ -355,7 +355,7 @@ TradeCenter_SelectMon:
res BIT_DOUBLE_SPACED_MENU, [hl]
and a
jp z, .getNewInput
- bit BIT_A_BUTTON, a
+ bit B_PAD_A, a
jr z, .enemyMonMenu_ANotPressed
; if A button pressed
ld a, [wMaxMenuItem]
@@ -374,7 +374,7 @@ TradeCenter_SelectMon:
call TradeCenter_DisplayStats
jp .getNewInput
.enemyMonMenu_ANotPressed
- bit BIT_D_LEFT, a
+ bit B_PAD_LEFT, a
jr z, .enemyMonMenu_LeftNotPressed
; if Left pressed, switch back to the player mon menu
xor a ; player mon menu
@@ -394,14 +394,14 @@ TradeCenter_SelectMon:
ld [wCurrentMenuItem], a
jr .playerMonMenu
.enemyMonMenu_LeftNotPressed
- bit BIT_D_DOWN, a
+ bit B_PAD_DOWN, a
jp z, .getNewInput
jp .selectedCancelMenuItem ; jump if Down pressed
.playerMonMenu
xor a ; player mon menu
ld [wWhichTradeMonSelectionMenu], a
ld [wMenuWatchMovingOutOfBounds], a
- ld a, D_DOWN | D_RIGHT | A_BUTTON
+ ld a, PAD_DOWN | PAD_RIGHT | PAD_A
ld [wMenuWatchedKeys], a
ld a, [wPartyCount]
ld [wMaxMenuItem], a
@@ -422,7 +422,7 @@ TradeCenter_SelectMon:
jr nz, .playerMonMenu_SomethingPressed
jp .getNewInput
.playerMonMenu_SomethingPressed
- bit BIT_A_BUTTON, a
+ bit B_PAD_A, a
jr z, .playerMonMenu_ANotPressed
jp .chosePlayerMon ; jump if A button pressed
; unreachable code
@@ -432,7 +432,7 @@ TradeCenter_SelectMon:
call TradeCenter_DisplayStats
jp .getNewInput
.playerMonMenu_ANotPressed
- bit BIT_D_RIGHT, a
+ bit B_PAD_RIGHT, a
jr z, .playerMonMenu_RightNotPressed
; if Right pressed, switch to the enemy mon menu
ld a, $1 ; enemy mon menu
@@ -454,7 +454,7 @@ TradeCenter_SelectMon:
.notPastLastEnemyMon
jp .enemyMonMenu
.playerMonMenu_RightNotPressed
- bit BIT_D_DOWN, a
+ bit B_PAD_DOWN, a
jr z, .getNewInput
jp .selectedCancelMenuItem ; jump if Down pressed
.getNewInput
@@ -490,14 +490,14 @@ TradeCenter_SelectMon:
.selectStatsMenuItem
ld a, " "
ldcoord_a 11, 16
- ld a, D_RIGHT | B_BUTTON | A_BUTTON
+ ld a, PAD_RIGHT | PAD_B | PAD_A
ld [wMenuWatchedKeys], a
ld a, 1
ld [wTopMenuItemX], a
call HandleMenuInput
- bit BIT_D_RIGHT, a
+ bit B_PAD_RIGHT, a
jr nz, .selectTradeMenuItem
- bit BIT_B_BUTTON, a
+ bit B_PAD_B, a
jr z, .displayPlayerMonStats
.cancelPlayerMonChoice
pop af
@@ -507,14 +507,14 @@ TradeCenter_SelectMon:
.selectTradeMenuItem
ld a, " "
ldcoord_a 1, 16
- ld a, D_LEFT | B_BUTTON | A_BUTTON
+ ld a, PAD_LEFT | PAD_B | PAD_A
ld [wMenuWatchedKeys], a
ld a, 11
ld [wTopMenuItemX], a
call HandleMenuInput
- bit BIT_D_LEFT, a
+ bit B_PAD_LEFT, a
jr nz, .selectStatsMenuItem
- bit BIT_B_BUTTON, a
+ bit B_PAD_B, a
jr nz, .cancelPlayerMonChoice
jr .choseTrade
.displayPlayerMonStats
@@ -563,9 +563,9 @@ TradeCenter_SelectMon:
ldh a, [hJoy5]
and a ; pressed anything?
jr z, .cancelMenuItem_JoypadLoop
- bit BIT_A_BUTTON, a
+ bit B_PAD_A, a
jr nz, .cancelMenuItem_APressed
- bit BIT_D_UP, a
+ bit B_PAD_UP, a
jr z, .cancelMenuItem_JoypadLoop
; if Up pressed
ld a, " "
diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm
index 975f4e03..ba29ca06 100644
--- a/engine/link/cable_club_npc.asm
+++ b/engine/link/cable_club_npc.asm
@@ -29,7 +29,7 @@ CableClubNPC::
ldh [rSB], a
xor a
ldh [hSerialReceiveData], a
- ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ld a, SC_START | SC_EXTERNAL
; This vc_hook causes the Virtual Console to set [hSerialConnectionStatus] to
; USING_INTERNAL_CLOCK, which allows the player to proceed past the link
; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at
@@ -46,7 +46,7 @@ CableClubNPC::
jr z, .failedToEstablishConnection
ld a, ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK
ldh [rSB], a
- ld a, START_TRANSFER_INTERNAL_CLOCK
+ ld a, SC_START | SC_INTERNAL
ldh [rSC], a
call DelayFrame
jr .establishConnectionLoop
@@ -215,6 +215,6 @@ CloseLinkConnection:
ldh [rSB], a
xor a
ldh [hSerialReceiveData], a
- ld a, START_TRANSFER_EXTERNAL_CLOCK
+ ld a, SC_START | SC_EXTERNAL
ldh [rSC], a
ret