Identify wSpriteStateData1 and wSpriteStateData2 offsets, like pokeyellow

This commit is contained in:
Rangi 2020-07-05 17:29:11 -04:00
parent 7ab43f4d17
commit 2b2ed54bbf
62 changed files with 182 additions and 179 deletions

View file

@ -77,14 +77,14 @@ FindPathToPlayer:
CalcPositionOfPlayerRelativeToNPC:
xor a
ld [hNPCPlayerRelativePosFlags], a
ld a, [wSpriteStateData1 + 4] ; player's sprite screen Y position in pixels
ld a, [wSpritePlayerStateData1YPixels]
ld d, a
ld a, [wSpriteStateData1 + 6] ; player's sprite screen X position in pixels
ld a, [wSpritePlayerStateData1XPixels]
ld e, a
ld hl, wSpriteStateData1
ld a, [hNPCSpriteOffset]
add l
add $4
add wSpritePlayerStateData1YPixels - wSpritePlayerStateData1
ld l, a
jr nc, .noCarry
inc h