diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oakslab.asm | 8 | ||||
-rwxr-xr-x | scripts/pallettown.asm | 21 |
2 files changed, 15 insertions, 14 deletions
diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 1c255103..b32647b5 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -333,14 +333,14 @@ OaksLabScript10: ; 1cd6d (7:4d6d) ld [$ff8c], a call DisplayTextID ld a, $1 - ld [$ff9b], a + ld [hNPCPlayerRelativePosPerspective], a ld a, $1 swap a - ld [$ff95], a + ld [hNPCSpriteOffset], a predef CalcPositionOfPlayerRelativeToNPC - ld a, [$ff95] + ld a, [hNPCPlayerYDistance] dec a - ld [$ff95], a + ld [hNPCPlayerYDistance], a predef FindPathToPlayer ld de, wNPCMovementDirections2 ld a, $1 diff --git a/scripts/pallettown.asm b/scripts/pallettown.asm index 19a06190..5b042066 100755 --- a/scripts/pallettown.asm +++ b/scripts/pallettown.asm @@ -33,7 +33,7 @@ PalletTownScript0: ; 18e81 (6:4e81) ld a,$FF call PlaySound ; stop music ld a, BANK(Music_MeetProfOak) - ld c,a ; song bank + ld c,a ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music call PlayMusic ld a,$FC @@ -50,7 +50,7 @@ PalletTownScript1: ; 18eb2 (6:4eb2) xor a ld [wcf0d],a ld a,1 - ld [$FF8C],a + ld [hSpriteIndexOrTextID],a call DisplayTextID ld a,$FF ld [wJoyIgnore],a @@ -65,25 +65,25 @@ PalletTownScript1: ; 18eb2 (6:4eb2) PalletTownScript2: ; 18ed2 (6:4ed2) ld a,1 - ld [$FF8C],a - ld a,4 + ld [H_SPRITEINDEX],a + ld a,SPRITE_FACING_UP ld [$FF8D],a call SetSpriteFacingDirectionAndDelay call Delay3 ld a,1 ld [W_YCOORD],a ld a,1 - ld [$FF9B],a + ld [hNPCPlayerRelativePosPerspective],a ld a,1 swap a - ld [$FF95],a + ld [hNPCSpriteOffset],a predef CalcPositionOfPlayerRelativeToNPC - ld hl,$FF95 + ld hl,hNPCPlayerYDistance dec [hl] predef FindPathToPlayer ; load Oak’s movement into wNPCMovementDirections2 ld de,wNPCMovementDirections2 ld a,1 ; oak - ld [$FF8C],a + ld [H_SPRITEINDEX],a call MoveSprite ld a,$FF ld [wJoyIgnore],a @@ -104,8 +104,9 @@ PalletTownScript3: ; 18f12 (6:4f12) ld a,$FC ld [wJoyIgnore],a ld a,1 - ld [$FF8C],a + ld [hSpriteIndexOrTextID],a call DisplayTextID +; set up movement script that causes the player to follow Oak to his lab ld a,$FF ld [wJoyIgnore],a ld a,1 @@ -124,7 +125,7 @@ PalletTownScript3: ; 18f12 (6:4f12) PalletTownScript4: ; 18f4b (6:4f4b) ld a,[wNPCMovementScriptPointerTableNum] - and a + and a ; is the movement script over? ret nz ; trigger the next script |