mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
more movement stuff
This commit is contained in:
parent
7b676f5851
commit
ac78dda7d8
9 changed files with 192 additions and 137 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue