projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
848b669
)
player: Added cap for right and bottom of screen when moving
author
Lukas Krickl
<lukas@krickl.dev>
Fri, 26 Sep 2025 16:58:47 +0000
(18:58 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Fri, 26 Sep 2025 16:58:47 +0000
(18:58 +0200)
src/player.s
patch
|
blob
|
history
diff --git
a/src/player.s
b/src/player.s
index 25b245d2859f6cb017618331989c27d74c514411..d0102a31f91d49ae1ecbc47aa707e53a2e90f505 100644
(file)
--- a/
src/player.s
+++ b/
src/player.s
@@
-129,6
+129,12
@@
player_stage_move_p:
jr nc, @no_overflow_y REL
ld a, 0xFF
@no_overflow_y:
+
+ ; bottom of screen
+ cp a, 0x60
+ jr c, @no_edge_y REL
+ ld a, 0x60
+@no_edge_y:
ld b, a
@@
-141,6
+147,13
@@
player_stage_move_p:
jr nc, @no_overflow_x REL
ld a, 0xFF
@no_overflow_x:
+
+ ; right side of screen
+ cp a, 0x90
+ jr c, @no_edge_x REL
+ ld a, 0x90
+@no_edge_x:
+
ld c, a
ret