Identify wSpriteStateData1 and wSpriteStateData2 offsets, like pokeyellow

This commit is contained in:
Rangi 2020-07-05 17:29:11 -04:00
parent 7ab43f4d17
commit 2b2ed54bbf
62 changed files with 182 additions and 179 deletions

View file

@ -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

View file

@ -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]

View file

@ -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

View file

@ -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

View file

@ -1,5 +1,5 @@
PrintCinnabarQuiz:
ld a, [wSpriteStateData1 + 9]
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing

View file

@ -3,7 +3,7 @@ GymStatues:
; if in a gym and dont 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

View file

@ -1,5 +1,5 @@
PrintIndigoPlateauHQText:
ld a, [wSpriteStateData1 + 9]
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing

View file

@ -1,5 +1,5 @@
DisplayOakLabEmailText:
ld a, [wSpriteStateData1 + 9]
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing

View file

@ -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

View file

@ -1,5 +1,5 @@
Route15GateLeftBinoculars:
ld a, [wSpriteStateData1 + 9]
ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing

View file

@ -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