2014-05-22 22:13:20 +00:00
|
|
|
PrintNewBikeText: ; 1e94b (7:694b)
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_jump NewBicycleText
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
NewBicycleText: ; 1e953 (7:6953)
|
|
|
|
TX_FAR _NewBicycleText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
DisplayOakLabLeftPoster: ; 1e958 (7:6958)
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_jump PushStartText
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
PushStartText: ; 1e960 (7:6960)
|
|
|
|
TX_FAR _PushStartText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
DisplayOakLabRightPoster: ; 1e965 (7:6965)
|
|
|
|
call EnableAutoTextBoxDrawing
|
|
|
|
ld hl, wPokedexOwned
|
|
|
|
ld b, wPokedexOwnedEnd - wPokedexOwned
|
|
|
|
call CountSetBits
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd11e]
|
2014-05-22 22:13:20 +00:00
|
|
|
cp $2
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_id SaveOptionText
|
|
|
|
jr c, .ownThreeOrMoreMon
|
|
|
|
tx_pre_id StrengthsAndWeaknessesText
|
|
|
|
.ownThreeOrMoreMon
|
2014-05-22 22:13:20 +00:00
|
|
|
jp PrintPredefTextID
|
|
|
|
|
|
|
|
SaveOptionText: ; 1e97e (7:697e)
|
|
|
|
TX_FAR _SaveOptionText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
StrengthsAndWeaknessesText: ; 1e983 (7:6983)
|
|
|
|
TX_FAR _StrengthsAndWeaknessesText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
SafariZoneCheck: ; 1e988 (7:6988)
|
2015-07-21 01:32:02 +00:00
|
|
|
CheckEventHL EVENT_IN_SAFARI_ZONE ; if we are not in the Safari Zone,
|
2015-07-17 04:41:44 +00:00
|
|
|
jr z, SafariZoneGameStillGoing ; don't bother printing game over text
|
2015-07-03 19:37:53 +00:00
|
|
|
ld a, [W_NUMSAFARIBALLS]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-07-17 04:41:44 +00:00
|
|
|
jr z, SafariZoneGameOver
|
|
|
|
jr SafariZoneGameStillGoing
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
SafariZoneCheckSteps: ; 1e997 (7:6997)
|
2015-07-03 19:37:53 +00:00
|
|
|
ld a, [wSafariSteps]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld a, [wSafariSteps + 1]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
|
|
|
or b
|
2015-07-17 04:41:44 +00:00
|
|
|
jr z, SafariZoneGameOver
|
2014-05-22 22:13:20 +00:00
|
|
|
dec bc
|
|
|
|
ld a, b
|
2015-07-03 19:37:53 +00:00
|
|
|
ld [wSafariSteps], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
2015-07-03 19:37:53 +00:00
|
|
|
ld [wSafariSteps + 1], a
|
2015-07-17 04:41:44 +00:00
|
|
|
SafariZoneGameStillGoing: ; 1e9ab (7:69ab)
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2014-09-14 18:29:18 +00:00
|
|
|
ld [wSafariZoneGameOver], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
2015-07-17 04:41:44 +00:00
|
|
|
|
|
|
|
SafariZoneGameOver: ; 1e9b0 (7:69b0)
|
2014-05-22 22:13:20 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
|
|
|
xor a
|
|
|
|
ld [wMusicHeaderPointer], a
|
|
|
|
dec a
|
|
|
|
call PlaySound
|
2015-07-22 14:57:31 +00:00
|
|
|
ld c, BANK(SFX_Safari_Zone_PA)
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SAFARI_ZONE_PA
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlayMusic
|
|
|
|
.asm_1e9c2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wc02a]
|
2014-05-22 22:13:20 +00:00
|
|
|
cp $b9
|
|
|
|
jr nz, .asm_1e9c2
|
2015-07-24 03:48:35 +00:00
|
|
|
ld a, TEXT_SAFARI_GAME_OVER
|
|
|
|
ld [hSpriteIndexOrTextID], a
|
2014-05-22 22:13:20 +00:00
|
|
|
call DisplayTextID
|
|
|
|
xor a
|
2015-07-20 00:52:26 +00:00
|
|
|
ld [wPlayerMovingDirection], a
|
2015-02-07 19:16:00 +00:00
|
|
|
ld a, SAFARI_ZONE_ENTRANCE
|
2015-07-24 03:48:35 +00:00
|
|
|
ld [hWarpDestinationMap], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $3
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDestinationWarpID], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $5
|
|
|
|
ld [W_SAFARIZONEENTRANCECURSCRIPT], a
|
2015-07-21 01:32:02 +00:00
|
|
|
SetEvent EVENT_SAFARI_GAME_OVER
|
2015-07-24 03:48:35 +00:00
|
|
|
ld a, 1
|
2014-09-14 18:29:18 +00:00
|
|
|
ld [wSafariZoneGameOver], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
PrintSafariGameOverText: ; 1e9ed (7:69ed)
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, SafariGameOverText
|
|
|
|
jp PrintText
|
|
|
|
|
|
|
|
SafariGameOverText: ; 1e9f7 (7:69f7)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2015-07-03 19:37:53 +00:00
|
|
|
ld a, [W_NUMSAFARIBALLS]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
|
|
|
jr z, .asm_1ea04
|
|
|
|
ld hl, TimesUpText
|
|
|
|
call PrintText
|
|
|
|
.asm_1ea04
|
|
|
|
ld hl, GameOverText
|
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
TimesUpText: ; 1ea0d (7:6a0d)
|
|
|
|
TX_FAR _TimesUpText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
GameOverText: ; 1ea12 (7:6a12)
|
|
|
|
TX_FAR _GameOverText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
PrintCinnabarQuiz: ; 1ea17 (7:6a17)
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wSpriteStateData1 + 9]
|
2015-07-04 05:44:12 +00:00
|
|
|
cp SPRITE_FACING_UP
|
2014-05-22 22:13:20 +00:00
|
|
|
ret nz
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_jump CinnabarGymQuiz
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
CinnabarGymQuiz: ; 1ea25 (7:6a25)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-07-26 02:26:54 +00:00
|
|
|
ld [wOpponentAfterWrongAnswer], a
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, [wHiddenObjectFunctionArgument]
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
|
|
|
and $f
|
2015-07-26 02:26:54 +00:00
|
|
|
ld [hGymGateIndex], a
|
2014-05-22 22:13:20 +00:00
|
|
|
pop af
|
|
|
|
and $f0
|
|
|
|
swap a
|
|
|
|
ld [$ffdc], a
|
|
|
|
ld hl, CinnabarGymQuizIntroText
|
|
|
|
call PrintText
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
dec a
|
|
|
|
add a
|
2015-07-26 02:26:54 +00:00
|
|
|
ld d, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
|
|
|
ld hl, CinnabarQuizQuestions
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call PrintText
|
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2014-05-22 22:13:20 +00:00
|
|
|
call CinnabarGymQuiz_1ea92
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
CinnabarGymQuizIntroText: ; 1ea5b (7:6a5b)
|
|
|
|
TX_FAR _CinnabarGymQuizIntroText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestions: ; 1ea60 (7:6a60)
|
|
|
|
dw CinnabarQuizQuestionsText1
|
|
|
|
dw CinnabarQuizQuestionsText2
|
|
|
|
dw CinnabarQuizQuestionsText3
|
|
|
|
dw CinnabarQuizQuestionsText4
|
|
|
|
dw CinnabarQuizQuestionsText5
|
|
|
|
dw CinnabarQuizQuestionsText6
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText1: ; 1ea6c (7:6a6c)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText2: ; 1ea71 (7:6a71)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText3: ; 1ea76 (7:6a76)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText3
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText4: ; 1ea7b (7:6a7b)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText4
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText5: ; 1ea80 (7:6a80)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText5
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
CinnabarQuizQuestionsText6: ; 1ea85 (7:6a85)
|
|
|
|
TX_FAR _CinnabarQuizQuestionsText6
|
|
|
|
db "@"
|
|
|
|
|
2015-07-21 21:21:14 +00:00
|
|
|
CinnabarGymGateFlagAction: ; 1ea8a (7:6a8a)
|
|
|
|
EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED
|
2014-06-16 20:57:26 +00:00
|
|
|
predef_jump FlagActionPredef
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
|
|
|
|
call YesNoChoice
|
|
|
|
ld a, [$ffdc]
|
|
|
|
ld c, a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-22 22:13:20 +00:00
|
|
|
cp c
|
2015-07-26 02:26:54 +00:00
|
|
|
jr nz, .wrongAnswer
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd126
|
2014-05-22 22:13:20 +00:00
|
|
|
set 5, [hl]
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [$ffe0], a
|
|
|
|
ld hl, CinnabarGymQuizCorrectText
|
|
|
|
call PrintText
|
|
|
|
ld a, [$ffe0]
|
2015-07-21 21:21:14 +00:00
|
|
|
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
2015-07-20 03:45:34 +00:00
|
|
|
ld b, FLAG_SET
|
2015-07-21 21:21:14 +00:00
|
|
|
call CinnabarGymGateFlagAction
|
|
|
|
jp UpdateCinnabarGymGateTileBlocks_
|
2015-07-26 02:26:54 +00:00
|
|
|
.wrongAnswer
|
2014-05-22 22:13:20 +00:00
|
|
|
call WaitForSoundToFinish
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_DENIED
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
ld hl, CinnabarGymQuizIncorrectText
|
|
|
|
call PrintText
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
add $2
|
2015-07-21 21:21:14 +00:00
|
|
|
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
2015-07-20 03:45:34 +00:00
|
|
|
ld b, FLAG_TEST
|
2015-07-21 21:21:14 +00:00
|
|
|
EventFlagAddress hl, EVENT_BEAT_CINNABAR_GYM_TRAINER_0
|
2014-06-16 20:57:26 +00:00
|
|
|
predef FlagActionPredef
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
|
|
|
and a
|
|
|
|
ret nz
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
add $2
|
2015-07-26 02:26:54 +00:00
|
|
|
ld [wOpponentAfterWrongAnswer], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
|
|
|
|
db $0b
|
|
|
|
TX_FAR _CinnabarGymQuizCorrectText
|
2015-07-19 04:53:43 +00:00
|
|
|
db $06
|
|
|
|
TX_ASM
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
ld a, [$ffe0]
|
2015-07-21 21:21:14 +00:00
|
|
|
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
2015-07-20 03:45:34 +00:00
|
|
|
ld b, FLAG_TEST
|
2015-07-21 21:21:14 +00:00
|
|
|
call CinnabarGymGateFlagAction
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
|
|
|
and a
|
|
|
|
jp nz, TextScriptEnd
|
|
|
|
call WaitForSoundToFinish
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_GO_INSIDE
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
CinnabarGymQuizIncorrectText: ; 1eb05 (7:6b05)
|
|
|
|
TX_FAR _CinnabarGymQuizIncorrectText
|
|
|
|
db "@"
|
|
|
|
|
2015-07-21 21:21:14 +00:00
|
|
|
UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
|
|
|
|
; Update the overworld map with open floor blocks or locked gate blocks
|
|
|
|
; depending on event flags.
|
|
|
|
ld a, 6
|
2015-07-26 02:26:54 +00:00
|
|
|
ld [hGymGateIndex], a
|
2015-07-21 21:21:14 +00:00
|
|
|
.loop
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
dec a
|
|
|
|
add a
|
|
|
|
add a
|
2015-07-21 21:21:14 +00:00
|
|
|
ld d, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, CinnabarGymGateCoords
|
2014-05-22 22:13:20 +00:00
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, [hl]
|
|
|
|
ld c, a
|
|
|
|
inc hl
|
|
|
|
ld a, [hl]
|
2015-07-26 02:26:54 +00:00
|
|
|
ld [wGymGateTileBlock], a
|
2014-05-22 22:13:20 +00:00
|
|
|
push bc
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [hGymGateIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [$ffe0], a
|
2015-07-21 21:21:14 +00:00
|
|
|
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
2015-07-20 03:45:34 +00:00
|
|
|
ld b, FLAG_TEST
|
2015-07-21 21:21:14 +00:00
|
|
|
call CinnabarGymGateFlagAction
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, c
|
|
|
|
and a
|
2015-07-21 21:21:14 +00:00
|
|
|
jr nz, .unlocked
|
2015-07-26 02:26:54 +00:00
|
|
|
ld a, [wGymGateTileBlock]
|
2015-07-21 21:21:14 +00:00
|
|
|
jr .next
|
|
|
|
.unlocked
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $e
|
2015-07-21 21:21:14 +00:00
|
|
|
.next
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2014-09-14 18:29:18 +00:00
|
|
|
predef ReplaceTileBlock
|
2015-07-26 02:26:54 +00:00
|
|
|
ld hl, hGymGateIndex
|
2014-05-22 22:13:20 +00:00
|
|
|
dec [hl]
|
2015-07-21 21:21:14 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
CinnabarGymGateCoords: ; 1eb48 (7:6b48)
|
|
|
|
; format: x-coord, y-coord, direction, padding
|
|
|
|
; direction: $54 = horizontal gate, $5f = vertical gate
|
|
|
|
db $09,$03,$54,$00
|
|
|
|
db $06,$03,$54,$00
|
|
|
|
db $06,$06,$54,$00
|
|
|
|
db $03,$08,$5f,$00
|
|
|
|
db $02,$06,$54,$00
|
|
|
|
db $02,$03,$54,$00
|
|
|
|
|
|
|
|
PrintMagazinesText: ; 1eb60 (7:6b60)
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre MagazinesText
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
MagazinesText: ; 1eb69 (7:6b69)
|
|
|
|
TX_FAR _MagazinesText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
BillsHousePC: ; 1eb6e (7:6b6e)
|
|
|
|
call EnableAutoTextBoxDrawing
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wSpriteStateData1 + 9]
|
2015-07-04 05:44:12 +00:00
|
|
|
cp SPRITE_FACING_UP
|
2014-05-22 22:13:20 +00:00
|
|
|
ret nz
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
|
2014-05-22 22:13:20 +00:00
|
|
|
jr nz, .asm_1ebd2
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEventReuseA EVENT_USED_CELL_SEPARATOR_ON_BILL
|
2014-05-22 22:13:20 +00:00
|
|
|
jr nz, .asm_1eb86
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEventReuseA EVENT_BILL_SAID_USE_CELL_SEPARATOR
|
2014-05-22 22:13:20 +00:00
|
|
|
jr nz, .asm_1eb8b
|
|
|
|
.asm_1eb86
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_jump BillsHouseMonitorText
|
2014-05-22 22:13:20 +00:00
|
|
|
.asm_1eb8b
|
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre BillsHouseInitiatedText
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 32
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_TINK
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 80
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SHRINK
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 48
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_TINK
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 32
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_GET_ITEM_1
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2014-09-10 03:55:19 +00:00
|
|
|
call PlayDefaultMusic
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_USED_CELL_SEPARATOR_ON_BILL
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
.asm_1ebd2
|
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre BillsHousePokemonList
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
|
|
|
BillsHouseMonitorText: ; 1ebdd (7:6bdd)
|
|
|
|
TX_FAR _BillsHouseMonitorText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
BillsHouseInitiatedText: ; 1ebe2 (7:6be2)
|
|
|
|
TX_FAR _BillsHouseInitiatedText
|
|
|
|
db $06
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $ff
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wc0ee], a
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 16
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_SWITCH
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
call WaitForSoundToFinish
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 60
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
BillsHousePokemonList: ; 1ec05 (7:6c05)
|
2015-07-03 19:58:50 +00:00
|
|
|
TX_ASM
|
2014-05-22 22:13:20 +00:00
|
|
|
call SaveScreenTilesToBuffer1
|
|
|
|
ld hl, BillsHousePokemonListText1
|
|
|
|
call PrintText
|
|
|
|
xor a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [W_ANIMATIONID], a
|
|
|
|
ld [wCurrentMenuItem], a
|
|
|
|
ld [wLastMenuItem], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $3
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wMenuWatchedKeys], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $4
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wMaxMenuItem], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $2
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wTopMenuItemY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $1
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wTopMenuItemX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
.asm_1ec2d
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-22 22:13:20 +00:00
|
|
|
set 6, [hl]
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, $a
|
|
|
|
ld c, $9
|
|
|
|
call TextBoxBorder
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 2, 2
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, BillsMonListText
|
|
|
|
call PlaceString
|
|
|
|
ld hl, BillsHousePokemonListText2
|
|
|
|
call PrintText
|
|
|
|
call SaveScreenTilesToBuffer2
|
|
|
|
call HandleMenuInput
|
|
|
|
bit 1, a
|
|
|
|
jr nz, .asm_1ec74
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
2014-05-22 22:13:20 +00:00
|
|
|
add EEVEE
|
|
|
|
cp EEVEE
|
|
|
|
jr z, .asm_1ec6c
|
|
|
|
cp FLAREON
|
|
|
|
jr z, .asm_1ec6c
|
|
|
|
cp JOLTEON
|
|
|
|
jr z, .asm_1ec6c
|
|
|
|
cp VAPOREON
|
|
|
|
jr z, .asm_1ec6c
|
|
|
|
jr .asm_1ec74
|
|
|
|
.asm_1ec6c
|
|
|
|
call DisplayPokedex
|
|
|
|
call LoadScreenTilesFromBuffer2
|
|
|
|
jr .asm_1ec2d
|
|
|
|
.asm_1ec74
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-22 22:13:20 +00:00
|
|
|
res 6, [hl]
|
|
|
|
call LoadScreenTilesFromBuffer2
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
|
|
|
BillsHousePokemonListText1: ; 1ec7f (7:6c7f)
|
|
|
|
TX_FAR _BillsHousePokemonListText1
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
BillsMonListText: ; 1ec84 (7:6c84)
|
|
|
|
db "EEVEE"
|
|
|
|
next "FLAREON"
|
|
|
|
next "JOLTEON"
|
|
|
|
next "VAPOREON"
|
|
|
|
next "CANCEL@"
|
|
|
|
|
|
|
|
BillsHousePokemonListText2: ; 1ecaa (7:6caa)
|
|
|
|
TX_FAR _BillsHousePokemonListText2
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
DisplayOakLabEmailText: ; 1ecaf (7:6caf)
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wSpriteStateData1 + 9]
|
2015-07-04 05:44:12 +00:00
|
|
|
cp SPRITE_FACING_UP
|
2014-05-22 22:13:20 +00:00
|
|
|
ret nz
|
|
|
|
call EnableAutoTextBoxDrawing
|
2015-07-04 05:44:12 +00:00
|
|
|
tx_pre_jump OakLabEmailText
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
OakLabEmailText: ; 1ecbd (7:6cbd)
|
|
|
|
TX_FAR _OakLabEmailText
|
|
|
|
db "@"
|