mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Commented function
- Named and commented Func_4c70. - Removed gfx/diagonal_lines.png, which is not actually graphics.
This commit is contained in:
parent
fb11ff7e55
commit
c9946975d4
3 changed files with 186 additions and 103 deletions
|
|
@ -17,7 +17,7 @@ UpdatePlayerSprite: ; 4e31 (1:4e31)
|
|||
ld [wSpriteStateData1 + 2], a
|
||||
ret
|
||||
.asm_4e50
|
||||
call Func_4c70
|
||||
call DetectCollisionBetweenSprites
|
||||
ld h, $c1
|
||||
ld a, [wWalkCounter] ; wcfc5
|
||||
and a
|
||||
|
|
@ -604,16 +604,16 @@ CanWalkOntoTile: ; 516e (1:516e)
|
|||
jr nc, .impassable ; don't walk off screen
|
||||
push de
|
||||
push bc
|
||||
call Func_4c70
|
||||
call DetectCollisionBetweenSprites
|
||||
pop bc
|
||||
pop de
|
||||
ld h, $c1
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
add $c
|
||||
ld l, a
|
||||
ld a, [hl] ; c1xc (forbidden directions flags(?))
|
||||
ld a, [hl] ; c1xc (directions in which sprite collision would occur)
|
||||
and b ; check against chosen direction (1,2,4 or 8)
|
||||
jr nz, .impassable ; direction forbidden, don't go there
|
||||
jr nz, .impassable ; collision between sprites, don't go there
|
||||
ld h, $c2
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
add $2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue