projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fa34ed
)
Fixed tile -> player collision by using the correct shift
author
Lukas Krickl
<lukas@krickl.dev>
Sat, 19 Oct 2024 05:09:58 +0000
(07:09 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Sat, 19 Oct 2024 05:09:58 +0000
(07:09 +0200)
instructions.
For future reference sra did not do it because bit 7 might be set in
normal gameplay we needed srl
src/collision.s
patch
|
blob
|
history
src/map.s
patch
|
blob
|
history
diff --git
a/src/collision.s
b/src/collision.s
index 7afc9857b221f31e05d00ce5145ba9ddb680b3d6..63406bb43c083feaf4132923d18829a7a373ed41 100644
(file)
--- a/
src/collision.s
+++ b/
src/collision.s
@@
-103,16
+103,16
@@
collision_tile_table_check:
; a = 1 -> collision
collision_tile:
; y pos / 16 -> tile pos
- sr
a
d ; / 2
- sr
a
d ; / 4
- sr
a
d ; / 8
- sr
a
d ; / 16
+ sr
l
d ; / 2
+ sr
l
d ; / 4
+ sr
l
d ; / 8
+ sr
l
d ; / 16
; x pos / 16 -> tile pos
- sr
a
e ; / 2
- sr
a
e ; / 4
- sr
a
e ; / 8
- sr
a
e ; / 16
+ sr
l
e ; / 2
+ sr
l
e ; / 4
+ sr
l
e ; / 8
+ sr
l
e ; / 16
ld a, e ; a = x pos
ld e, d
diff --git
a/src/map.s
b/src/map.s
index 16a6146ff140de26b09171fa6992d4bf7b0be805..5713f4b0e608558dcd7056d73372c37b2cbebf61 100644
(file)
--- a/
src/map.s
+++ b/
src/map.s
@@
-164,4
+164,4
@@
base_room_flags:
.db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-.db
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+.db
RF_WALL, RF_WALL, RF_WALL, RF_WALL, 0, 0, RF_WALL, RF_WALL, RF_WALL, RF_WALL