summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-24 20:27:59 -0700
committerYamaArashi <shadow962@live.com>2015-07-24 20:27:59 -0700
commit7f6d0d49b61a77cfba76057d99881634b882486b (patch)
treeafb152986ff34039cb64e3101dd2b2b1e3293552 /main.asm
parent12db77201f7ba50241331c3949241a420f43d660 (diff)
more naming variables
Diffstat (limited to 'main.asm')
-rwxr-xr-xmain.asm62
1 files changed, 31 insertions, 31 deletions
diff --git a/main.asm b/main.asm
index 8160afa5..d98f27c3 100755
--- a/main.asm
+++ b/main.asm
@@ -1642,39 +1642,39 @@ DisplayTwoOptionMenu: ; 7559 (1:7559)
; The bottom and right edges of the menu may remain after the function returns.
TwoOptionMenu_SaveScreenTiles: ; 763e (1:763e)
- ld de, wHPBarMaxHP
- ld bc, $506
-.asm_7644
+ ld de, wBuffer
+ lb bc, 5, 6
+.loop
ld a, [hli]
ld [de], a
inc de
dec c
- jr nz, .asm_7644
+ jr nz, .loop
push bc
- ld bc, 14
+ ld bc, SCREEN_WIDTH - 6
add hl, bc
pop bc
ld c, $6
dec b
- jr nz, .asm_7644
+ jr nz, .loop
ret
TwoOptionMenu_RestoreScreenTiles: ; 7656 (1:7656)
- ld de, wHPBarMaxHP
- ld bc, $506
-.asm_765c
+ ld de, wBuffer
+ lb bc, 5, 6
+.loop
ld a, [de]
inc de
ld [hli], a
dec c
- jr nz, .asm_765c
+ jr nz, .loop
push bc
- ld bc, $e
+ ld bc, SCREEN_WIDTH - 6
add hl, bc
pop bc
- ld c, $6
+ ld c, 6
dec b
- jr nz, .asm_765c
+ jr nz, .loop
call UpdateSprites
ret
@@ -3167,9 +3167,9 @@ RedrawMapView: ; eedc (3:6edc)
and $3
or $98
ld a, l
- ld [wHPBarMaxHP], a
+ ld [wBuffer], a
ld a, h
- ld [wHPBarMaxHP + 1], a
+ ld [wBuffer + 1], a ; this copy of the address is not used
ld a, 2
ld [$ffbe], a
ld c, 9 ; number of rows of 2x2 tiles (this covers the whole screen)
@@ -3177,25 +3177,25 @@ RedrawMapView: ; eedc (3:6edc)
push bc
push hl
push hl
- ld hl, wTileMap - 2 * 20
- ld de, 20
+ ld hl, wTileMap - 2 * SCREEN_WIDTH
+ ld de, SCREEN_WIDTH
ld a, [$ffbe]
-.asm_ef1a
+.calcWRAMAddrLoop
add hl, de
dec a
- jr nz, .asm_ef1a
+ jr nz, .calcWRAMAddrLoop
call CopyToScreenEdgeTiles
pop hl
ld de, $20
ld a, [$ffbe]
ld c, a
-.asm_ef28
+.calcVRAMAddrLoop
add hl, de
ld a, h
and $3
or $98
dec c
- jr nz, .asm_ef28
+ jr nz, .calcVRAMAddrLoop
ld [H_SCREENEDGEREDRAWADDR + 1], a
ld a, l
ld [H_SCREENEDGEREDRAWADDR], a
@@ -3301,7 +3301,7 @@ InitializeMissableObjectsFlags: ; f175 (3:7175)
call FillMemory ; clear missable objects flags
ld hl, MapHS00
xor a
- ld [wd048], a
+ ld [wMissableObjectCounter], a
.missableObjectsLoop
ld a, [hli]
cp $ff ; end of list
@@ -3310,14 +3310,14 @@ InitializeMissableObjectsFlags: ; f175 (3:7175)
inc hl
ld a, [hl]
cp Hide
- jr nz, .asm_f19d
+ jr nz, .skip
ld hl, W_MISSABLEOBJECTFLAGS
- ld a, [wd048]
+ ld a, [wMissableObjectCounter]
ld c, a
ld b, FLAG_SET
- call MissableObjectFlagAction ; set flag iff Item is hidden
-.asm_f19d
- ld hl, wd048
+ call MissableObjectFlagAction ; set flag if Item is hidden
+.skip
+ ld hl, wMissableObjectCounter
inc [hl]
pop hl
inc hl
@@ -3351,21 +3351,21 @@ IsObjectHidden: ; f1a6 (3:71a6)
ret
; adds missable object (items, leg. pokemon, etc.) to the map
-; [wcc4d]: index of the missable object to be added (global index)
+; [wMissableObjectIndex]: index of the missable object to be added (global index)
ShowObject: ; f1c8 (3:71c8)
ShowObject2:
ld hl, W_MISSABLEOBJECTFLAGS
- ld a, [wcc4d]
+ ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_RESET
call MissableObjectFlagAction ; reset "removed" flag
jp UpdateSprites
; removes missable object (items, leg. pokemon, etc.) from the map
-; [wcc4d]: index of the missable object to be removed (global index)
+; [wMissableObjectIndex]: index of the missable object to be removed (global index)
HideObject: ; f1d7 (3:71d7)
ld hl, W_MISSABLEOBJECTFLAGS
- ld a, [wcc4d]
+ ld a, [wMissableObjectIndex]
ld c, a
ld b, FLAG_SET
call MissableObjectFlagAction ; set "removed" flag