shithub: pokecrystal

Download patch

ref: f7d26fbe9c878c67271db67257073f6ccc34daf3
parent: 8b429e2a545e87407a3b8c7b92f7ceafc455e390
author: vulcandth <vulcandth@gmail.com>
date: Mon Nov 7 15:27:09 EST 2022

`.CheckNPC` label and comment correction

--- a/engine/overworld/player_movement.asm
+++ b/engine/overworld/player_movement.asm
@@ -613,7 +613,8 @@
 .CheckNPC:
 ; Returns 0 if there is an NPC in front that you can't move
 ; 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
 	ldh [hMapObjectIndex], a
 ; Load the next X coordinate into d
@@ -631,14 +632,14 @@
 ; Find an object struct with coordinates equal to d,e
 	ld bc, wObjectStructs ; redundant
 	farcall IsNPCAtCoord
-	jr nc, .is_npc
+	jr nc, .no_npc
 	call .CheckStrengthBoulder
 	jr c, .no_bump
 
-	xor a
+	xor a ; bump
 	ret
 
-.is_npc
+.no_npc
 	ld a, 1
 	ret