From 40c17c906b2b3f65b3b04b1933b90238a7ac5566 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 26 May 2014 14:04:56 -0700 Subject: Remove most static wram addresses. Use labels instead. For unknown addresses, use "w
". Label overleads are still an issue. --- scripts/bikeshop.asm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'scripts/bikeshop.asm') diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index 75714dbc..c30829e9 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -8,7 +8,7 @@ BikeShopTextPointers: ; 1d73f (7:573f) BikeShopText1: ; 1d745 (7:5745) db $08 ; asm - ld a, [$d75f] + ld a, [wd75f] bit 0, a jr z, .asm_260d4 ; 0x1d74b ld hl, BikeShopText_1d82f @@ -26,7 +26,7 @@ BikeShopText1: ; 1d745 (7:5745) ld a, BIKE_VOUCHER ldh [$db], a callba RemoveItemByID - ld hl, $d75f + ld hl, wd75f set 0, [hl] ld hl, BikeShopText_1d824 call PrintText @@ -39,28 +39,28 @@ BikeShopText1: ; 1d745 (7:5745) ld hl, BikeShopText_1d810 call PrintText xor a - ld [$cc26], a - ld [$cc2a], a + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld a, $3 - ld [$cc29], a + ld [wMenuWatchedKeys], a ld a, $1 - ld [$cc28], a + ld [wMaxMenuItem], a ld a, $2 - ld [$cc24], a + ld [wTopMenuItemY], a ld a, $1 - ld [$cc25], a - ld hl, $d730 + ld [wTopMenuItemX], a + ld hl, wd730 set 6, [hl] ld hl, wTileMap ld b, $4 ld c, $f call TextBoxBorder call UpdateSprites - FuncCoord 2, 2 ; $c3ca + FuncCoord 2, 2 ld hl, Coord ld de, BikeShopMenuText call PlaceString - FuncCoord 8, 3 ; $c3e4 + FuncCoord 8, 3 ld hl, Coord ld de, BikeShopMenuPrice call PlaceString @@ -69,9 +69,9 @@ BikeShopText1: ; 1d745 (7:5745) call HandleMenuInput bit 1, a jr nz, .asm_b7579 ; 0x1d7dc - ld hl, $d730 + ld hl, wd730 res 6, [hl] - ld a, [$cc26] + ld a, [wCurrentMenuItem] and a jr nz, .asm_b7579 ; 0x1d7e7 ld hl, BikeShopText_1d81a @@ -133,7 +133,7 @@ BikeShopText_1d843: ; 1d843 (7:5843) BikeShopText3: ; 1d848 (7:5848) db $08 ; asm - ld a, [$d75f] + ld a, [wd75f] bit 0, a ld hl, BikeShopText_1d861 jr nz, .asm_34d2d ; 0x1d851 -- cgit v1.2.3 From bd533aa79bbe1998fd2b699bd7205da2de4fe55c Mon Sep 17 00:00:00 2001 From: "U-Fish-PC\\Daniel" Date: Wed, 25 Jun 2014 16:58:27 -0400 Subject: Use *Coord instead of FuncCoord Using 'Coord =' doesn't like using wTileMap So use hlCoord, deCoord, bcCoord, aCoord, Coorda, or dwCoord to avoid static addresses --- scripts/bikeshop.asm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/bikeshop.asm') diff --git a/scripts/bikeshop.asm b/scripts/bikeshop.asm index c30829e9..4bd26a7e 100755 --- a/scripts/bikeshop.asm +++ b/scripts/bikeshop.asm @@ -56,12 +56,10 @@ BikeShopText1: ; 1d745 (7:5745) ld c, $f call TextBoxBorder call UpdateSprites - FuncCoord 2, 2 - ld hl, Coord + hlCoord 2, 2 ld de, BikeShopMenuText call PlaceString - FuncCoord 8, 3 - ld hl, Coord + hlCoord 8, 3 ld de, BikeShopMenuPrice call PlaceString ld hl, BikeShopText_1d815 -- cgit v1.2.3