mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
.CheckNPC
label and comment correction
This commit is contained in:
parent
8b429e2a54
commit
f7d26fbe9c
@ -613,7 +613,8 @@ ENDM
|
|||||||
.CheckNPC:
|
.CheckNPC:
|
||||||
; Returns 0 if there is an NPC in front that you can't move
|
; Returns 0 if there is an NPC in front that you can't move
|
||||||
; Returns 1 if there is no NPC in front
|
; Returns 1 if there is no NPC in front
|
||||||
; Returns 2 if there is a movable NPC in front
|
; Returns 2 if there is a movable NPC in front. The game actually treats
|
||||||
|
; this the same as an NPC in front (bump).
|
||||||
ld a, 0
|
ld a, 0
|
||||||
ldh [hMapObjectIndex], a
|
ldh [hMapObjectIndex], a
|
||||||
; Load the next X coordinate into d
|
; Load the next X coordinate into d
|
||||||
@ -631,14 +632,14 @@ ENDM
|
|||||||
; Find an object struct with coordinates equal to d,e
|
; Find an object struct with coordinates equal to d,e
|
||||||
ld bc, wObjectStructs ; redundant
|
ld bc, wObjectStructs ; redundant
|
||||||
farcall IsNPCAtCoord
|
farcall IsNPCAtCoord
|
||||||
jr nc, .is_npc
|
jr nc, .no_npc
|
||||||
call .CheckStrengthBoulder
|
call .CheckStrengthBoulder
|
||||||
jr c, .no_bump
|
jr c, .no_bump
|
||||||
|
|
||||||
xor a
|
xor a ; bump
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.is_npc
|
.no_npc
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user