diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-05-17 18:24:52 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-05-17 18:24:52 -0400 |
commit | 361f600d6d0864a3af8323383b99a806005f8f90 (patch) | |
tree | ca05ed613c127aafefca6c9643037408a3a63189 | |
parent | b5f5a16f43ef62680f09666073f07911306e1561 (diff) |
Add IsTilePassable Function
-rw-r--r-- | engine/overworld/oam.asm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engine/overworld/oam.asm b/engine/overworld/oam.asm index b4247257..71eb297c 100644 --- a/engine/overworld/oam.asm +++ b/engine/overworld/oam.asm @@ -176,3 +176,19 @@ Func_4bd1: ; 4bd1 (1:4bd1) and $f0 ld [de], a ; c1xb (x) ret + +_IsTilePassable:: ; 4aaa (1:4aaa) + ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles + ld a,[hli] + ld h,[hl] + ld l,a ; hl now points to passable tiles +.loop + ld a,[hli] + cp a,$ff + jr z,.tileNotPassable + cp c + ret z + jr .loop +.tileNotPassable + scf + ret
\ No newline at end of file |