From 9878f01e29b1443d6c894c1332cbf381fa12646e Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2020 16:37:47 -0400 Subject: Organize macros/ like pokecrystal While doing so I replaced the StopAllMusic macro with a SFX_STOP_ALL_MUSIC constant and applied it throughout the code. --- engine/link/cable_club.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/link') diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 141ed396..8aadf1e5 100755 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -139,7 +139,7 @@ CableClub_DoBattleOrTradeAgain: call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ld [rIE], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK @@ -261,7 +261,7 @@ CableClub_DoBattleOrTradeAgain: ld [wUnusedCF8D + 1], a xor a ld [wTradeCenterPointerTableIndex], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK -- cgit v1.2.3 From 35deb771130a9012ee4494b1db097761f2fe2919 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2020 19:59:41 -0400 Subject: H_CONSTANTNAMES -> hConstantNames --- engine/link/cable_club.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/link') diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 8aadf1e5..13b92e71 100755 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -338,10 +338,10 @@ TradeCenter_SelectMon: ld a, 1 ld [wTopMenuItemX], a .enemyMonMenu_HandleInput - ld hl, hFlags_0xFFF6 + ld hl, hFlagsFFF6 set 1, [hl] call HandleMenuInput - ld hl, hFlags_0xFFF6 + ld hl, hFlagsFFF6 res 1, [hl] and a jp z, .getNewInput @@ -403,10 +403,10 @@ TradeCenter_SelectMon: lb bc, 6, 1 call ClearScreenArea .playerMonMenu_HandleInput - ld hl, hFlags_0xFFF6 + ld hl, hFlagsFFF6 set 1, [hl] call HandleMenuInput - ld hl, hFlags_0xFFF6 + ld hl, hFlagsFFF6 res 1, [hl] and a ; was anything pressed? jr nz, .playerMonMenu_SomethingPressed -- cgit v1.2.3 From 6ef36800b0dcb86100a7c716172015667e60dc99 Mon Sep 17 00:00:00 2001 From: Rangi Date: Fri, 3 Jul 2020 22:11:35 -0400 Subject: Replace raw hex values with HRAM constants To do: turn constants into labels and use ldh --- engine/link/cable_club.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/link') diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 13b92e71..58008a94 100755 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -663,7 +663,7 @@ TradeCenter_PrintPartyListNames: push de push hl ld a, c - ld [$ff95], a + ld [hPastLeadingZeros], a call GetMonName pop hl call PlaceString @@ -903,7 +903,7 @@ CableClub_Run: ld [wTilesetGfxPtr + 1], a ld a, l ld [wTilesetGfxPtr], a - ld a, Bank(Club_GFX) + ld a, BANK(Club_GFX) ld [wTilesetBank], a ld hl, Club_Coll ld a, h -- cgit v1.2.3