@@ -138,19 +138,19 @@ FacingPlayerDistance::
|
||||
; Return carry if the sprite at bc is facing the player,
|
||||
; its distance in d, and its direction in e.
|
||||
|
||||
ld hl, OBJECT_NEXT_MAP_X ; x
|
||||
ld hl, OBJECT_MAP_X ; x
|
||||
add hl, bc
|
||||
ld d, [hl]
|
||||
|
||||
ld hl, OBJECT_NEXT_MAP_Y ; y
|
||||
ld hl, OBJECT_MAP_Y ; y
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
cp d
|
||||
jr z, .CheckY
|
||||
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
cp e
|
||||
jr z, .CheckX
|
||||
|
||||
@@ -158,7 +158,7 @@ FacingPlayerDistance::
|
||||
ret
|
||||
|
||||
.CheckY:
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
sub e
|
||||
jr z, .NotFacing
|
||||
jr nc, .Above
|
||||
@@ -176,7 +176,7 @@ FacingPlayerDistance::
|
||||
jr .CheckFacing
|
||||
|
||||
.CheckX:
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
sub d
|
||||
jr z, .NotFacing
|
||||
jr nc, .Left
|
||||
|
Reference in New Issue
Block a user