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
|
|
@ -88,7 +88,7 @@ GetCoordsInFrontOfPlayer:
|
|||
ld d, a
|
||||
ld a, [wXCoord]
|
||||
ld e, a
|
||||
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
and a
|
||||
jr nz, .notFacingDown
|
||||
; facing down
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ PrintBenchGuyText:
|
|||
.match
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp b
|
||||
jr nz, .loop ; player isn't facing left at the bench guy
|
||||
ld a, [hl]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
BillsHousePC:
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; prints text for bookshelves in buildings without sign events
|
||||
PrintBookshelfText::
|
||||
ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
jr nz, .noMatch
|
||||
; facing up
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
PrintCinnabarQuiz:
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ GymStatues:
|
|||
; if in a gym and don’t have the corresponding badge, a = GymStatueText1_id and jp PrintPredefTextID
|
||||
; else ret
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
ld hl, .BadgeFlags
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
PrintIndigoPlateauHQText:
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
DisplayOakLabEmailText:
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
OpenPokemonCenterPC:
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp SPRITE_FACING_UP ; check to see if player is facing up
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld a, $1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
Route15GateLeftBinoculars:
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
ld a, [wSpritePlayerStateData1FacingDirection]
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
call EnableAutoTextBoxDrawing
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ DisplayPokemonCenterDialogue_::
|
|||
ld hl, NeedYourPokemonText
|
||||
call PrintText
|
||||
ld a, $18
|
||||
ld [wSpriteStateData1 + $12], a ; make the nurse turn to face the machine
|
||||
ld [wSprite01StateData1ImageIndex], a ; make the nurse turn to face the machine
|
||||
call Delay3
|
||||
predef HealParty
|
||||
callba AnimateHealingMachine ; do the healing machine animation
|
||||
|
|
@ -34,7 +34,7 @@ DisplayPokemonCenterDialogue_::
|
|||
ld hl, PokemonFightingFitText
|
||||
call PrintText
|
||||
ld a, $14
|
||||
ld [wSpriteStateData1 + $12], a ; make the nurse bow
|
||||
ld [wSprite01StateData1ImageIndex], a ; make the nurse bow
|
||||
ld c, a
|
||||
call DelayFrames
|
||||
jr .done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue