aboutsummaryrefslogtreecommitdiff
path: root/bunny.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-08-29 16:14:35 +0900
committerAstatin <astatin@redacted>2024-08-29 16:14:35 +0900
commit522bde7b7e7d70fc86a5dac2042b7b20e05c197b (patch)
tree01d3f81170c91debdf0784fa5c6255955730cd80 /bunny.gbasm
parent4a4ff1db8fe026ced0530f8c2531033da43164e6 (diff)
Fix issues related to VBlank wait in sameboy + Add stairs interactions
Diffstat (limited to 'bunny.gbasm')
-rw-r--r--bunny.gbasm6
1 files changed, 3 insertions, 3 deletions
diff --git a/bunny.gbasm b/bunny.gbasm
index 9ba996b..b76c9fa 100644
--- a/bunny.gbasm
+++ b/bunny.gbasm
@@ -57,7 +57,7 @@ Fix_Bunny_screen:
RET
Move_Bunny:
- LD C, $00 ; (bit 0 = has_scrolled)
+ LD C, $00 ; (bit 0 = has_scrolled, bit 1 = has ended movement)
LD A, $mem_moving_sprite_direction
CP $00
JR NZ, =Move_Bunny.check_direction
@@ -155,6 +155,7 @@ Move_Bunny:
AND $0f
LD $mem_moving_animation_step, A
JR NZ, =Move_Bunny.end
+ SET 1, C
LD $mem_moving_sprite_direction, A
LD A, $mem_sprite_direction
DEC A
@@ -168,7 +169,6 @@ Move_Bunny:
LD A, $mem_viewport_x
ADD B
LD $mem_viewport_x, A
- CALL =Load_Column
Move_Bunny.horizontal_tile_move.move_viewport_end:
LD A, $mem_bunny_x
ADD B
@@ -181,7 +181,6 @@ Move_Bunny:
LD A, $mem_viewport_y
ADD B
LD $mem_viewport_y, A
- CALL =Load_Row
Move_Bunny.vertical_tile_move.move_viewport_end:
LD A, $mem_bunny_y
ADD B
@@ -250,6 +249,7 @@ Display_Bunny:
; First OBJ (left)
LD HL, $FE00
LD A, C
+ CALL =VBlank_Wait
LD (HL+), A
LD A, B
LD (HL+), A