projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cfeb89
)
map: Fixed de not being preserved when re-trying room door placement
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 25 Jan 2025 05:51:52 +0000
(06:51 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 25 Jan 2025 05:51:52 +0000
(06:51 +0100)
src/map.s
patch
|
blob
|
history
diff --git
a/src/map.s
b/src/map.s
index 24a6ce96faea061e1ff01683abf8acd1b6a3b74e..58495845e1d5dab5b2dec7c6e9f0a5325ed0069c 100644
(file)
--- a/
src/map.s
+++ b/
src/map.s
@@
-631,6
+631,9
@@
map_gen_pick_direction:
ld hl, roomb_exits
add hl, de ; hl = room exit struct
+ ; de needs to be saved
+ push de
+
add a, a ; a * 2 = ptr offset
ld d, 0
ld e, a
@@
-645,6
+648,7
@@
map_gen_pick_direction:
ld e, a
ld a, [hl]
add a, e ; this must be 0
+ pop de ; get de back before jumping :^)
cp a, 0
jr nz, @again REL