Handle the repositioning in the new map of a mocked player object after going through a map connection (#29)

This commit is contained in:
xCrystal
2024-01-05 20:57:35 +01:00
parent 67e20e454e
commit 98b04522e1
10 changed files with 336 additions and 8 deletions

View File

@@ -1248,10 +1248,12 @@ Script_reloadmapafterviewmapmode:
ld hl, wDisplaySecondarySprites
set SECONDARYSPRITES_SPACES_LEFT_F, [hl]
set SECONDARYSPRITES_BRANCH_SPACE_F, [hl]
; load the saved facing direction to wPlayerSpriteSetupFlags
ld hl, wPlayerSpriteSetupFlags
; get the facing direction from the mocked object's facing direction
ld a, [wMapObject{d:LAST_OBJECT}Movement]
sub SPRITEMOVEDATA_STANDING_DOWN
ld a, [wBeforeViewMapDirection]
srl a
srl a
maskbits NUM_DIRECTIONS
ld [hl], a
set PLAYERSPRITESETUP_CUSTOM_FACING_F, [hl]
ld a, BOARDEVENT_RESUME_BRANCH