From 2b2ed54bbf017943ba2343cd6c1dbe88b8f34a4e Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 5 Jul 2020 17:29:11 -0400 Subject: Identify wSpriteStateData1 and wSpriteStateData2 offsets, like pokeyellow --- engine/events/card_key.asm | 2 +- engine/events/hidden_objects/bench_guys.asm | 2 +- engine/events/hidden_objects/bills_house_pc.asm | 2 +- engine/events/hidden_objects/bookshelves.asm | 2 +- engine/events/hidden_objects/cinnabar_gym_quiz.asm | 2 +- engine/events/hidden_objects/gym_statues.asm | 2 +- engine/events/hidden_objects/indigo_plateau_hq.asm | 2 +- engine/events/hidden_objects/oaks_lab_email.asm | 2 +- engine/events/hidden_objects/pokecenter_pc.asm | 4 ++-- engine/events/hidden_objects/route_15_binoculars.asm | 2 +- engine/events/pokecenter.asm | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) (limited to 'engine/events') diff --git a/engine/events/card_key.asm b/engine/events/card_key.asm index cc641893..a37a1f27 100755 --- a/engine/events/card_key.asm +++ b/engine/events/card_key.asm @@ -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 diff --git a/engine/events/hidden_objects/bench_guys.asm b/engine/events/hidden_objects/bench_guys.asm index a6db73b9..d5db99ec 100644 --- a/engine/events/hidden_objects/bench_guys.asm +++ b/engine/events/hidden_objects/bench_guys.asm @@ -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] diff --git a/engine/events/hidden_objects/bills_house_pc.asm b/engine/events/hidden_objects/bills_house_pc.asm index d6e9c19a..92679d66 100644 --- a/engine/events/hidden_objects/bills_house_pc.asm +++ b/engine/events/hidden_objects/bills_house_pc.asm @@ -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 diff --git a/engine/events/hidden_objects/bookshelves.asm b/engine/events/hidden_objects/bookshelves.asm index eaf744ff..9cdd037a 100644 --- a/engine/events/hidden_objects/bookshelves.asm +++ b/engine/events/hidden_objects/bookshelves.asm @@ -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 diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm index 9412ee45..da309f87 100644 --- a/engine/events/hidden_objects/cinnabar_gym_quiz.asm +++ b/engine/events/hidden_objects/cinnabar_gym_quiz.asm @@ -1,5 +1,5 @@ PrintCinnabarQuiz: - ld a, [wSpriteStateData1 + 9] + ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz call EnableAutoTextBoxDrawing diff --git a/engine/events/hidden_objects/gym_statues.asm b/engine/events/hidden_objects/gym_statues.asm index 3a17557f..1f592f2f 100644 --- a/engine/events/hidden_objects/gym_statues.asm +++ b/engine/events/hidden_objects/gym_statues.asm @@ -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 diff --git a/engine/events/hidden_objects/indigo_plateau_hq.asm b/engine/events/hidden_objects/indigo_plateau_hq.asm index 840c114d..e8fd0220 100644 --- a/engine/events/hidden_objects/indigo_plateau_hq.asm +++ b/engine/events/hidden_objects/indigo_plateau_hq.asm @@ -1,5 +1,5 @@ PrintIndigoPlateauHQText: - ld a, [wSpriteStateData1 + 9] + ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz call EnableAutoTextBoxDrawing diff --git a/engine/events/hidden_objects/oaks_lab_email.asm b/engine/events/hidden_objects/oaks_lab_email.asm index cf3b2c9e..b66babe0 100644 --- a/engine/events/hidden_objects/oaks_lab_email.asm +++ b/engine/events/hidden_objects/oaks_lab_email.asm @@ -1,5 +1,5 @@ DisplayOakLabEmailText: - ld a, [wSpriteStateData1 + 9] + ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz call EnableAutoTextBoxDrawing diff --git a/engine/events/hidden_objects/pokecenter_pc.asm b/engine/events/hidden_objects/pokecenter_pc.asm index 9a2ab064..9ae7d41c 100644 --- a/engine/events/hidden_objects/pokecenter_pc.asm +++ b/engine/events/hidden_objects/pokecenter_pc.asm @@ -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 diff --git a/engine/events/hidden_objects/route_15_binoculars.asm b/engine/events/hidden_objects/route_15_binoculars.asm index 028ea30d..ce047c2f 100644 --- a/engine/events/hidden_objects/route_15_binoculars.asm +++ b/engine/events/hidden_objects/route_15_binoculars.asm @@ -1,5 +1,5 @@ Route15GateLeftBinoculars: - ld a, [wSpriteStateData1 + 9] + ld a, [wSpritePlayerStateData1FacingDirection] cp SPRITE_FACING_UP ret nz call EnableAutoTextBoxDrawing diff --git a/engine/events/pokecenter.asm b/engine/events/pokecenter.asm index f6ec6491..030c333f 100755 --- a/engine/events/pokecenter.asm +++ b/engine/events/pokecenter.asm @@ -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 -- cgit v1.2.3