summaryrefslogtreecommitdiff
path: root/engine/menu
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-18 08:17:29 -0700
committerYamaArashi <shadow962@live.com>2015-07-18 08:17:46 -0700
commitfc9af362ae65d24c66b39ea7759637cc9c1f9b0a (patch)
tree37074f79564b1e47b109566dfd9c3c454a4cc226 /engine/menu
parentb85d7c65f35e93534a871ed34b1950daf59ab189 (diff)
fix variable naming
Diffstat (limited to 'engine/menu')
-rwxr-xr-xengine/menu/pokedex.asm22
-rwxr-xr-xengine/menu/prize_menu.asm4
-rwxr-xr-xengine/menu/start_sub_menus.asm2
3 files changed, 14 insertions, 14 deletions
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index 56543c91..80eedecd 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -512,25 +512,25 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
inc de
inc de ; de = address of upper byte of weight
push de
-; put weight in big-endian order at $ff8b
- ld hl,$ff8b
- ld a,[hl] ; save existing value of [$ff8b]
+; put weight in big-endian order at hDexWeight
+ ld hl,hDexWeight
+ ld a,[hl] ; save existing value of [hDexWeight]
push af
ld a,[de] ; a = upper byte of weight
- ld [hli],a ; store upper byte of weight in [$ff8b]
- ld a,[hl] ; save existing value of [$ff8c]
+ ld [hli],a ; store upper byte of weight in [hDexWeight]
+ ld a,[hl] ; save existing value of [hDexWeight + 1]
push af
dec de
ld a,[de] ; a = lower byte of weight
- ld [hl],a ; store lower byte of weight in [$ff8c]
- ld de,$ff8b
+ ld [hl],a ; store lower byte of weight in [hDexWeight + 1]
+ ld de,hDexWeight
hlCoord 11, 8
ld bc,$0205 ; no leading zeroes, right-aligned, 2 bytes, 5 digits
call PrintNumber ; print weight
hlCoord 14, 8
- ld a,[$ff8c]
+ ld a,[hDexWeight + 1]
sub a,10
- ld a,[$ff8b]
+ ld a,[hDexWeight]
sbc a,0
jr nc,.next
ld [hl],"0" ; if the weight is less than 10, put a 0 before the decimal point
@@ -540,9 +540,9 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
ld [hld],a ; make space for the decimal point by moving the last digit forward one tile
ld [hl],$f2 ; decimal point tile
pop af
- ld [$ff8c],a ; restore original value of [$ff8c]
+ ld [hDexWeight + 1],a ; restore original value of [hDexWeight + 1]
pop af
- ld [$ff8b],a ; restore original value of [$ff8b]
+ ld [hDexWeight],a ; restore original value of [hDexWeight]
pop hl
inc hl ; hl = address of pokedex description text
bcCoord 1, 11
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index fff8e4c4..f7206a7f 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -58,13 +58,13 @@ WhichPrizeTextPtr: ; 52789 (14:6789)
GetPrizeMenuId: ; 5278e (14:678e)
; determine which one among the three
; prize-texts has been selected
-; using the text ID (stored in [$FF8C])
+; using the text ID (stored in [hSpriteIndexOrTextID])
; load the three prizes at wd13d-wd13f
; load the three prices at wd141-wd146
; display the three prizes' names
; (distinguishing between Pokemon names
; and Items (specifically TMs) names)
- ld a,[$FF8C]
+ ld a,[hSpriteIndexOrTextID]
sub a,$03 ; prize-texts' id are 3, 4 and 5
ld [wd12f],a ; prize-texts' id (relative, i.e. 0, 1 or 2)
add a
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index 11b7fa90..2804ef7b 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -524,7 +524,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
DrawTrainerInfo: ; 1349a (4:749a)
ld de,RedPicFront
ld bc,(BANK(RedPicFront) << 8) | $01
- predef Predef3B
+ predef DisplayPicCenteredOrUpperRight
call DisableLCD
hlCoord 0, 2
ld a," "