You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Ensure anchor points are applied when landing after warp by creating a new setup script
This commit is contained in:
@@ -412,3 +412,24 @@ GetMapScreenCoords::
|
||||
and 1
|
||||
ld [wPlayerMetatileX], a
|
||||
ret
|
||||
|
||||
AnchorPointAfterWarp:
|
||||
; if wCurSpaceNextSpace is not an anchor point, override any anchor point we pass through
|
||||
ld a, [wCurSpaceNextSpace]
|
||||
cp NEXT_SPACE_IS_ANCHOR_POINT
|
||||
ret c
|
||||
ld a, [wCurMapAnchorEventCount]
|
||||
and a
|
||||
ret z
|
||||
; if we have arrived to an anchor point, load its associated next space to wCurSpaceNextSpace right now.
|
||||
; note that the next space of an anchor point could be another anchor point.
|
||||
ld c, a
|
||||
ld hl, wCurMapAnchorEventsPointer
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld a, [wXCoord]
|
||||
ld d, a
|
||||
ld a, [wYCoord]
|
||||
ld e, a
|
||||
jp CheckAndApplyAnchorPoint
|
||||
|
||||
Reference in New Issue
Block a user