This website works better with JavaScript.
Home
Explore
Help
Sign In
forestbelton
/
island-story
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Projects
0
Releases
0
Wiki
Activity
Browse Source
Don't allow player movement off-screen
master
Forest Belton
3 years ago
parent
e27e6530bd
commit
2079d44097
1 changed files
with
12 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+12
-1
src/player.s
+ 12
- 1
src/player.s
View File
@ -53,16 +53,27 @@ Player_Update::
and
BTN_RIGHT
jr
z
,
.left
;
check
for
right
boundary
ld
hl
,
_OAM
+
1
ld
a
,
[
hl
]
cp
160
jr
nc
,
.done
ld
hl
,
_OAM
+
1
inc
[
hl
]
.left:
;
check
for
move
left
;
check
for
left
button
ld
a
,
b
and
BTN_LEFT
jr
z
,
.done
;
check
for
left
boundary
ld
hl
,
_OAM
+
1
ld
a
,
[
hl
]
cp
9
jr
c
,
.done
dec
[
hl
]
.done:
Write
Preview
Loading…
Cancel
Save