projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e135ddf
)
WIP: exit direction selection
author
Lukas Krickl
<lukas@krickl.dev>
Mon, 23 Dec 2024 08:02:49 +0000
(09:02 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Mon, 23 Dec 2024 08:02:49 +0000
(09:02 +0100)
src/map.s
patch
|
blob
|
history
diff --git
a/src/map.s
b/src/map.s
index 3c2efb27de83020d56eae9ee4eb009da3252e178..dfe844d50f0a2ca2fb7a0084570a898188fa3921 100644
(file)
--- a/
src/map.s
+++ b/
src/map.s
@@
-71,8
+71,23
@@
room_goto_player_pos:
; compare to expected positions to decide what to do
+ ; 0/0 == north
+ xor a, a ; a = 0
+
+ ; d == 0 && e == 0
+ cp a, d
+ jr nz, @not_north REL
+ cp a, e
+ jr nz, @not_north REL
+
+ ; load north as direction
+ ld a, NORTH
+ jp room_goto
+@not_north:
+
; default use special exit
ld a, EXIT_SPECIAL
+ ; no need to jmp in default case
; transitions to a new room
; that is part of the map: