diff options
Diffstat (limited to 'scripts/pewtercity.asm')
-rwxr-xr-x | scripts/pewtercity.asm | 71 |
1 files changed, 39 insertions, 32 deletions
diff --git a/scripts/pewtercity.asm b/scripts/pewtercity.asm index bd6872a1..66589d52 100755 --- a/scripts/pewtercity.asm +++ b/scripts/pewtercity.asm @@ -16,14 +16,12 @@ PewterCityScriptPointers: ; 19243 (6:5243) PewterCityScript0: ; 19251 (6:5251) xor a ld [W_MUSEUM1FCURSCRIPT], a - ld hl, wd754 - res 0, [hl] + ResetEvent EVENT_BOUGHT_MUSEUM_TICKET call PewterCityScript_1925e ret PewterCityScript_1925e: ; 1925e (6:525e) - ld a, [wd755] - bit 7, a + CheckEvent EVENT_BEAT_BROCK ret nz ld hl, CoordsData_19277 call ArePlayerCoordsInArray @@ -31,7 +29,7 @@ PewterCityScript_1925e: ; 1925e (6:525e) ld a, $f0 ld [wJoyIgnore], a ld a, $5 - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a jp DisplayTextID CoordsData_19277: ; 19277 (6:5277) @@ -48,16 +46,16 @@ PewterCityScript1: ; 19280 (6:5280) ld a, $3 ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_UP - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($3 << 4) | SPRITE_FACING_UP - ld [$ff8d], a + ld [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $d - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c ld [$ffeb], a @@ -71,22 +69,26 @@ PewterCityScript1: ; 19280 (6:5280) ld [wSpriteIndex], a call SetSpritePosition1 ld a, $3 - ld [$ff8c], a - ld de, MovementData_PewterMuseumGuyExit ; $52ce + ld [H_SPRITEINDEX], a + ld de, MovementData_PewterMuseumGuyExit call MoveSprite ld a, $2 ld [W_PEWTERCITYCURSCRIPT], a ret MovementData_PewterMuseumGuyExit: ; 192ce (6:52ce) - db $00,$00,$00,$00,$FF + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db $FF PewterCityScript2: ; 192d3 (6:52d3) ld a, [wd730] bit 0, a ret nz ld a, HS_MUSEUM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $3 ld [W_PEWTERCITYCURSCRIPT], a @@ -97,7 +99,7 @@ PewterCityScript3: ; 192e9 (6:52e9) ld [wSpriteIndex], a call SetSpritePosition2 ld a, HS_MUSEUM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject xor a ld [wJoyIgnore], a @@ -110,18 +112,18 @@ PewterCityScript4: ; 19305 (6:5305) and a ret nz ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_LEFT - ld [$ff8d], a + ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay ld a, ($1 << 4) | SPRITE_FACING_LEFT - ld [$ff8d], a + ld [hSpriteImageIndex], a call SetSpriteImageIndexAfterSettingFacingDirection call PlayDefaultMusic ld hl, wFlags_0xcd60 set 4, [hl] ld a, $e - ld [$ff8c], a + ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $3c ld [$ffeb], a @@ -135,7 +137,7 @@ PewterCityScript4: ; 19305 (6:5305) ld [wSpriteIndex], a call SetSpritePosition1 ld a, $5 - ld [$ff8c], a + ld [H_SPRITEINDEX], a ld de, MovementData_PewterGymGuyExit call MoveSprite ld a, $5 @@ -143,14 +145,19 @@ PewterCityScript4: ; 19305 (6:5305) ret MovementData_PewterGymGuyExit: ; 19353 (6:5353) - db $C0,$C0,$C0,$C0,$C0,$FF + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db $FF PewterCityScript5: ; 19359 (6:5359) ld a, [wd730] bit 0, a ret nz ld a, HS_GYM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef HideObject ld a, $6 ld [W_PEWTERCITYCURSCRIPT], a @@ -161,7 +168,7 @@ PewterCityScript6: ; 1936f (6:536f) ld [wSpriteIndex], a call SetSpritePosition2 ld a, HS_GYM_GUY - ld [wcc4d], a + ld [wMissableObjectIndex], a predef ShowObject xor a ld [wJoyIgnore], a @@ -194,17 +201,17 @@ PewterCityText2: ; 193ac (6:53ac) db "@" PewterCityText3: ; 193b1 (6:53b1) - db $08 ; asm + TX_ASM ld hl, PewterCityText_193f1 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] and a - jr nz, .asm_f46a9 ; 0x193bf + jr nz, .asm_193c9 ld hl, PewterCityText_193f6 call PrintText - jr .asm_ac429 ; 0x193c7 -.asm_f46a9 ; 0x193c9 + jr .asm_193ee +.asm_193c9 ld hl, PewterCityText_193fb call PrintText xor a @@ -220,7 +227,7 @@ PewterCityText3: ; 193b1 (6:53b1) call GetSpritePosition2 ld a, $1 ld [W_PEWTERCITYCURSCRIPT], a -.asm_ac429 ; 0x193ee +.asm_193ee jp TextScriptEnd PewterCityText_193f1: ; 193f1 (6:53f1) @@ -240,20 +247,20 @@ PewterCityText13: ; 19400 (6:5400) db "@" PewterCityText4: ; 19405 (6:5405) - db $8 + TX_ASM ld hl, PewterCityText_19427 call PrintText call YesNoChoice ld a, [wCurrentMenuItem] cp $0 - jr nz, .asm_e4603 + jr nz, .asm_1941e ld hl, PewterCityText_1942c call PrintText - jr .asm_e4604 ; 0x1941c $6 -.asm_e4603 + jr .asm_19424 +.asm_1941e ld hl, PewterCityText_19431 call PrintText -.asm_e4604 ; 0x19424 +.asm_19424 jp TextScriptEnd PewterCityText_19427: ; 19427 (6:5427) @@ -269,7 +276,7 @@ PewterCityText_19431: ; 19431 (6:5431) db "@" PewterCityText5: ; 19436 (6:5436) - db $08 ; asm + TX_ASM ld hl, PewterCityText_1945d call PrintText xor a |