pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.1k stars 800 forks source link

`.CheckNPC` label and comment correction #1018

Closed vulcandth closed 1 year ago

vulcandth commented 1 year ago

The .is_npc label is incorrect. In fact, returning 1 means that there is NOT an NPC in front.

Also I expanded on the .no_bump comment (returning 2) as this actually does the SAME as if you returned 0.

See:
https://github.com/pret/pokecrystal/blob/41d5ea0482f4ef577df600d2d8b5cad70f74a396/engine/overworld/player_movement.asm#L267-L271
and
https://github.com/pret/pokecrystal/blob/41d5ea0482f4ef577df600d2d8b5cad70f74a396/engine/overworld/player_movement.asm#L325-L330

The former of which has an unused/unreferenced local label next to the .bump label. Presumably this would have handled the .no_bump functionality at one time.

mid-kid commented 1 year ago

I wonder if wWalkingIntoNPC deserves renaming as a result of this, but that'd be the subject of a different PR, since there's more variables following the same scheme.