mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Identify wSpriteStateData1 and wSpriteStateData2 offsets, like pokeyellow
This commit is contained in:
parent
7ab43f4d17
commit
2b2ed54bbf
62 changed files with 182 additions and 179 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue