summaryrefslogtreecommitdiff
path: root/home/movement.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/movement.asm')
-rw-r--r--home/movement.asm38
1 files changed, 12 insertions, 26 deletions
diff --git a/home/movement.asm b/home/movement.asm
index c2c45d12b..2c19b6355 100644
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -1,4 +1,4 @@
-InitMovementBuffer:: ; 1b1e
+InitMovementBuffer::
ld [wMovementBufferObject], a
xor a
ld [wMovementBufferCount], a
@@ -9,18 +9,16 @@ InitMovementBuffer:: ; 1b1e
ld a, HIGH(wMovementBuffer)
ld [wUnusedMovementBufferPointer + 1], a
ret
-; 1b35
-DecrementMovementBufferCount:: ; 1b35
+DecrementMovementBufferCount::
ld a, [wMovementBufferCount]
and a
ret z
dec a
ld [wMovementBufferCount], a
ret
-; 1b3f
-AppendToMovementBuffer:: ; 1b3f
+AppendToMovementBuffer::
push hl
push de
ld hl, wMovementBufferCount
@@ -33,9 +31,8 @@ AppendToMovementBuffer:: ; 1b3f
pop de
pop hl
ret
-; 1b50
-AppendToMovementBufferNTimes:: ; 1b50
+AppendToMovementBufferNTimes::
push af
ld a, c
and a
@@ -50,9 +47,8 @@ AppendToMovementBufferNTimes:: ; 1b50
dec c
jr nz, .loop
ret
-; 1b5f
-ComputePathToWalkToPlayer:: ; 1b5f
+ComputePathToWalkToPlayer::
push af
; compare x coords, load left/right into h, and x distance into d
ld a, b
@@ -100,9 +96,8 @@ ComputePathToWalkToPlayer:: ; 1b5f
ld c, e
call AppendToMovementBufferNTimes
ret
-; 1b92
-.GetMovementData: ; 1b92
+.GetMovementData:
push de
push hl
ld l, b
@@ -118,7 +113,6 @@ ComputePathToWalkToPlayer:: ; 1b5f
pop hl
pop de
ret
-; 1ba5
.MovementData:
slow_step DOWN
@@ -133,9 +127,8 @@ ComputePathToWalkToPlayer:: ; 1b5f
big_step UP
big_step LEFT
big_step RIGHT
-; 1bb1
-SetMenuAttributes:: ; 1bb1
+SetMenuAttributes::
push hl
push bc
ld hl, w2DMenuCursorInitY
@@ -156,21 +149,18 @@ SetMenuAttributes:: ; 1bb1
pop bc
pop hl
ret
-; 1bc9
-StaticMenuJoypad:: ; 1bc9
+StaticMenuJoypad::
callfar _StaticMenuJoypad
call GetMenuJoypad
ret
-; 1bd3
-ScrollingMenuJoypad:: ; 1bd3
+ScrollingMenuJoypad::
callfar _ScrollingMenuJoypad
call GetMenuJoypad
ret
-; 1bdd
-GetMenuJoypad:: ; 1bdd
+GetMenuJoypad::
push bc
push af
ld a, [hJoyLast]
@@ -184,23 +174,19 @@ GetMenuJoypad:: ; 1bdd
ld a, b
pop bc
ret
-; 1bee
-PlaceHollowCursor:: ; 1bee
+PlaceHollowCursor::
ld hl, wCursorCurrentTile
ld a, [hli]
ld h, [hl]
ld l, a
ld [hl], "▷"
ret
-; 1bf7
-HideCursor:: ; 1bf7
+HideCursor::
ld hl, wCursorCurrentTile
ld a, [hli]
ld h, [hl]
ld l, a
ld [hl], " "
ret
-; 1c00
-