diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/celadonmansion1.asm | 29 | ||||
-rwxr-xr-x | scripts/celadonmansion1_2.asm | 78 | ||||
-rwxr-xr-x | scripts/celadonmansion3.asm | 135 | ||||
-rwxr-xr-x | scripts/celadonmansion3_2.asm | 35 | ||||
-rwxr-xr-x | scripts/celadonmansion4.asm | 3 | ||||
-rwxr-xr-x | scripts/celadonmart3_2.asm | 38 |
6 files changed, 292 insertions, 26 deletions
diff --git a/scripts/celadonmansion1.asm b/scripts/celadonmansion1.asm index 857c2e42..b29ee196 100755 --- a/scripts/celadonmansion1.asm +++ b/scripts/celadonmansion1.asm @@ -1,5 +1,6 @@ CeladonMansion1Script: ; 48694 (12:4694) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMansion1TextPointers: ; 48697 (12:4697) dw CeladonMansion1Text1 @@ -8,31 +9,39 @@ CeladonMansion1TextPointers: ; 48697 (12:4697) dw CeladonMansion1Text4 dw CeladonMansion1Text5 -CeladonMansion1_486a1: ; 486a1 (12:46a1) - call PlayCry - jp TextScriptEnd - CeladonMansion1Text1: ; 486a7 (12:46a7) TX_FAR _CeladonMansion1Text1 TX_ASM ld a, MEOWTH - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text2: ; 486b1 (12:46b1) - TX_FAR _CeladonMansion1Text2 - db "@" + TX_ASM + callba Func_f1e70 + ld a, [wPikachuHappiness] + cp 251 + jr c, .asm_485d9 + ld c, 50 + call DelayFrames + ldpikacry e, PikachuCry23 + callab PlayPikachuSoundClip +.asm_485d9 + jp TextScriptEnd CeladonMansion1Text3: ; 486b6 (12:46b6) TX_FAR _CeladonMansion1Text3 TX_ASM ld a, CLEFAIRY - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text4: ; 486c0 (12:46c0) TX_FAR _CeladonMansion1Text4 TX_ASM ld a, NIDORAN_F - jp CeladonMansion1_486a1 + call PlayCry + jp TextScriptEnd CeladonMansion1Text5: ; 486ca (12:46ca) TX_FAR _CeladonMansion1Text5 diff --git a/scripts/celadonmansion1_2.asm b/scripts/celadonmansion1_2.asm new file mode 100755 index 00000000..0e1c2389 --- /dev/null +++ b/scripts/celadonmansion1_2.asm @@ -0,0 +1,78 @@ +Func_f1e70: + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, CeladonMansion1Text_f1e96 + call PrintText + callab IsStarterPikachuInOurParty + ret nc + ld hl, CeladonMansionText_f1e9c + call PrintText + ld a, $0 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call Func_f1ea2 + call PrintText + ret + +CeladonMansion1Text_f1e96: + TX_FAR _CeladonMansion1Text2 + TX_WAIT_BUTTON + db "@" + +CeladonMansionText_f1e9c: + TX_FAR _CeladonMansion1Text6 + TX_BUTTON_SOUND + db "@" + +Func_f1ea2: + ld hl, PikachuHappinessThresholds_f1eb9 +.asm_f1ea5 + ld a, [hli] + inc hl + and a + jr z, .asm_f1eb5 + ld b, a + ld a, [wPikachuHappiness] + cp b + jr c, .asm_f1eb5 + inc hl + inc hl + jr .asm_f1ea5 + +.asm_f1eb5 + ld a, [hli] + ld h, [hl] + ld l, a + ret + +PikachuHappinessThresholds_f1eb9 + dw 51, CeladonMansion1Text_f1ed5 + dw 101, CeladonMansion1Text_f1eda + dw 131, CeladonMansion1Text_f1edf + dw 161, CeladonMansion1Text_f1ee4 + dw 201, CeladonMansion1Text_f1ee9 + dw 255, CeladonMansion1Text_f1eee + dbbw 0, $ff, CeladonMansion1Text_f1eee + +CeladonMansion1Text_f1ed5: + TX_FAR _CeladonMansion1Text7 + db "@" + +CeladonMansion1Text_f1eda: + TX_FAR _CeladonMansion1Text8 + db "@" + +CeladonMansion1Text_f1edf: + TX_FAR _CeladonMansion1Text9 + db "@" + +CeladonMansion1Text_f1ee4: + TX_FAR _CeladonMansion1Text10 + db "@" + +CeladonMansion1Text_f1ee9: + TX_FAR _CeladonMansion1Text11 + db "@" + +CeladonMansion1Text_f1eee: + TX_FAR _CeladonMansion1Text12 + db "@" diff --git a/scripts/celadonmansion3.asm b/scripts/celadonmansion3.asm index 11a8646d..191d9304 100755 --- a/scripts/celadonmansion3.asm +++ b/scripts/celadonmansion3.asm @@ -1,5 +1,13 @@ CeladonMansion3Script: ; 48790 (12:4790) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret + +CeladonMansion3_PokedexCount: + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + ret CeladonMansion3TextPointers: ; 48793 (12:4793) dw ProgrammerText @@ -12,31 +20,120 @@ CeladonMansion3TextPointers: ; 48793 (12:4793) dw GameFreakSignText ProgrammerText: ; 487a3 (12:47a3) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + ld hl, CeladonMansion3Text_486f5 + jr nc, .print + ld hl, CeladonMansion3Text_486f0 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_486f0: TX_FAR _ProgrammerText db "@" +CeladonMansion3Text_486f5: + TX_FAR _ProgrammerText2 + db "@" + GraphicArtistText: ; 487a8 (12:47a8) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + jr nc, .completed + ld hl, CeladonMansion3Text_48757 + jr .print + +.completed + ld hl, CeladonMansion3Text_4875c + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .declined_print + call SaveScreenTilesToBuffer2 + xor a + ld [wUpdateSpritesEnabled], a + ld hl, wd730 + set 6, [hl] + callab Func_e8cb1 + ld hl, wd730 + res 6, [hl] + call GBPalWhiteOutWithDelay3 + call ReloadTilesetTilePatterns + call RestoreScreenTilesAndReloadTilePatterns + call LoadScreenTilesFromBuffer2 + call Delay3 + call GBPalNormal + ld hl, CeladonMansion3Text_4876b + ld a, [$ffdb] + and a + jr nz, .print + ld hl, CeladonMansion3Text_48766 + jr .print + +.declined_print + ld hl, CeladonMansion3Text_48761 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_48757: TX_FAR _GraphicArtistText db "@" +CeladonMansion3Text_4875c: + TX_FAR _GraphicArtistText2 + db "@" + +CeladonMansion3Text_48761: + TX_FAR _GraphicArtistText3 + db "@" + +CeladonMansion3Text_48766: + TX_FAR _GraphicArtistText4 + db "@" + +CeladonMansion3Text_4876b: + TX_FAR _GraphicArtistText5 + db "@" + WriterText: ; 487ad (12:47ad) + TX_ASM + call CeladonMansion3_PokedexCount + cp 150 + ld hl, CeladonMansion3Text_48789 + jr nc, .print + ld hl, CeladonMansion3Text_48784 +.print + call PrintText + jp TextScriptEnd + +CeladonMansion3Text_48784: TX_FAR _WriterText db "@" +CeladonMansion3Text_48789: + TX_FAR _WriterText2 + db "@" + DirectorText: ; 487b2 (12:47b2) TX_ASM - + call CeladonMansion3_PokedexCount ; check pokédex - ld hl, wPokedexOwned - ld b, wPokedexOwnedEnd - wPokedexOwned - call CountSetBits - ld a, [wNumSetBits] cp 150 jr nc, .CompletedDex ld hl, .GameDesigner jr .done .CompletedDex ld hl, .CompletedDexText + call PrintText + call Delay3 + xor a + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, .UnlockedDiplomaPrinting .done call PrintText jp TextScriptEnd @@ -47,25 +144,33 @@ DirectorText: ; 487b2 (12:47b2) .CompletedDexText TX_FAR _CompletedDexText - db $6 + TX_BUTTON_SOUND TX_ASM callab DisplayDiploma ld a, $1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a jp TextScriptEnd -GameFreakPCText1: ; 487eb (12:47eb) - TX_FAR _CeladonMansion3Text5 +.UnlockedDiplomaPrinting + TX_FAR _CompletedDexText2 db "@" +GameFreakPCText1: ; 487eb (12:47eb) + TX_ASM + callba Func_f1ef3 + jp TextScriptEnd + GameFreakPCText2: ; 487f0 (12:47f0) - TX_FAR _CeladonMansion3Text6 - db "@" + TX_ASM + callba Func_f1eff + jp TextScriptEnd GameFreakPCText3: ; 487f5 (12:47f5) - TX_FAR _CeladonMansion3Text7 - db "@" + TX_ASM + callba Func_f1f0b + jp TextScriptEnd GameFreakSignText: ; 487fa (12:47fa) - TX_FAR _CeladonMansion3Text8 - db "@" + TX_ASM + callba Func_f1f17 + jp TextScriptEnd diff --git a/scripts/celadonmansion3_2.asm b/scripts/celadonmansion3_2.asm new file mode 100755 index 00000000..2d5069d1 --- /dev/null +++ b/scripts/celadonmansion3_2.asm @@ -0,0 +1,35 @@ +Func_f1ef3: + ld hl, CeladonMansion3Text_f1efa + call PrintText + ret + +CeladonMansion3Text_f1efa: ; 487eb (12:47eb) + TX_FAR _CeladonMansion3Text5 + db "@" + +Func_f1eff: + ld hl, CeladonMansion3Text_f1f06 + call PrintText + ret + +CeladonMansion3Text_f1f06: ; 487f0 (12:47f0) + TX_FAR _CeladonMansion3Text6 + db "@" + +Func_f1f0b: + ld hl, CeladonMansion3Text_f1f12 + call PrintText + ret + +CeladonMansion3Text_f1f12: ; 487f5 (12:47f5) + TX_FAR _CeladonMansion3Text7 + db "@" + +Func_f1f17: + ld hl, CeladonMansion3Text_f1f1e + call PrintText + ret + +CeladonMansion3Text_f1f1e: ; 487fa (12:47fa) + TX_FAR _CeladonMansion3Text8 + db "@" diff --git a/scripts/celadonmansion4.asm b/scripts/celadonmansion4.asm index f9045bcd..475baff3 100755 --- a/scripts/celadonmansion4.asm +++ b/scripts/celadonmansion4.asm @@ -1,5 +1,6 @@ CeladonMansion4Script: ; 4886b (12:486b) - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ret CeladonMansion4TextPointers: ; 4886e (12:486e) dw CeladonMansion4Text1 diff --git a/scripts/celadonmart3_2.asm b/scripts/celadonmart3_2.asm new file mode 100755 index 00000000..1c9f0db1 --- /dev/null +++ b/scripts/celadonmart3_2.asm @@ -0,0 +1,38 @@ +Func_f1e30 + CheckEvent EVENT_GOT_TM18 + jr nz, .asm_f1e54 + ld hl, CeladonMart3Text_f1e5b + call PrintText + lb bc, TM_18, 1 + call GiveItem + jr nc, .asm_f1e4f + SetEvent EVENT_GOT_TM18 + ld hl, CeladonMart3Text_f1e60 + jr .asm_f1e57 + +.asm_f1e4f + ld hl, CeladonMart3Text_f1e6b + jr .asm_f1e57 + +.asm_f1e54 + ld hl, CeladonMart3Text_f1e66 +.asm_f1e57 + call PrintText + ret + +CeladonMart3Text_f1e5b: + TX_FAR _TM18PreReceiveText + db "@" + +CeladonMart3Text_f1e60: + TX_FAR _ReceivedTM18Text + TX_SFX_ITEM + db "@" + +CeladonMart3Text_f1e66: + TX_FAR _TM18ExplanationText + db "@" + +CeladonMart3Text_f1e6b: + TX_FAR _TM18NoRoomText + db "@" |