diff --git a/constants/event_constants.asm b/constants/event_constants.asm index e405fb9d..8c4ac792 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -788,6 +788,7 @@ const_next $880 const EVENT_GOT_HM03 const EVENT_GOT_MELTAN + const EVENT_BIRDS_FOUND ; hehe ; Cerulean Cave events const_next $8C0 diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 4214c860..9afafb86 100644 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -35,9 +35,9 @@ DEF SHOW EQU $15 const HS_SAFFRON_CITY_E ; 17 const HS_SAFFRON_CITY_F ; 18 const HS_SAFFRON_CITY_UP_GRADE ; 19 - const HS_ROUTE_9_ITEM ; 1C X + const HS_CELESTE_ARTICUNO_G ; 1C was unused HS_ROUTE_9_ITEM const HS_ROUTE_12_SNORLAX ; 1D - const HS_ROUTE_12_ITEM_1 ; 1E X + const HS_CELESTE_ZAPDOS_G ; 1E X was unused HS_ROUTE_12_ITEM_1 const HS_ROUTE_12_ITEM_2 ; 1F X const HS_ROUTE_15_ITEM ; 20 X const HS_ROUTE_16_SNORLAX ; 21 diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm index 40a7df0f..58962b9b 100644 --- a/data/maps/hide_show_data.asm +++ b/data/maps/hide_show_data.asm @@ -24,7 +24,7 @@ MapHSPointers: dw NoHS dw NoHS dw NoHS - dw Route9HS + dw NoHS ; Route9HS made unnecessary from replacements dw NoHS dw NoHS dw Route12HS @@ -80,7 +80,7 @@ MapHSPointers: dw NoHS dw NoHS dw NoHS - dw NoHS + dw CelesteHillHS dw NoHS dw NoHS dw NoHS @@ -298,11 +298,9 @@ SaffronCityHS: ;db ROUTE_2, $02, SHOW ;Route4HS: ;db ROUTE_4, $03, SHOW -Route9HS: - db ROUTE_9, $0A, SHOW Route12HS: db ROUTE_12, $01, SHOW - db ROUTE_12, $09, SHOW + ;db ROUTE_12, $09, SHOW db ROUTE_12, $0A, SHOW Route15HS: db ROUTE_15, $0B, SHOW @@ -602,6 +600,9 @@ ViridianPreGymHS: db VIRIDIAN_PRE_GYM, $02, HIDE ; Yujirou Rematch UnderwaterTunnelHS: db UNDERWATER_TUNNEL, $01, SHOW +CelesteHillHS: + db CELESTE_HILL, $02, SHOW ; Zapdos + db CELESTE_HILL, $03, SHOW ; Articuno db $FF, $01, SHOW ; end diff --git a/data/maps/objects/BrunswickTrail.asm b/data/maps/objects/BrunswickTrail.asm index 87d96475..18fc4c19 100644 --- a/data/maps/objects/BrunswickTrail.asm +++ b/data/maps/objects/BrunswickTrail.asm @@ -2,7 +2,7 @@ BrunswickTrail_Object: db $43 ; border block def_warp_events - warp_event 24, 11, CELESTE_HILL, 1 + warp_event 24, 11, CELESTE_HILL, 2 def_bg_events diff --git a/data/maps/objects/CelesteHill.asm b/data/maps/objects/CelesteHill.asm index ecb78c79..1e3b6f77 100644 --- a/data/maps/objects/CelesteHill.asm +++ b/data/maps/objects/CelesteHill.asm @@ -6,7 +6,12 @@ CelesteHill_Object: warp_event 13, 23, BRUNSWICK_TRAIL, 1 def_bg_events + bg_event 12, 20, 2 + bg_event 12, 8, 3 def_object_events + object_event 12, 7, SPRITE_BIRD, STAY, DOWN, 1 ; person + object_event 13, 6, SPRITE_BIRD, STAY, DOWN, 1 ; person + object_event 11, 6, SPRITE_BIRD, STAY, DOWN, 1, MOLTRES_G, 70 | OW_POKEMON ; person def_warps_to CELESTE_HILL \ No newline at end of file diff --git a/engine/overworld/auto_movement.asm b/engine/overworld/auto_movement.asm index e68f484c..85929126 100644 --- a/engine/overworld/auto_movement.asm +++ b/engine/overworld/auto_movement.asm @@ -290,3 +290,8 @@ RivalIDs: db OPP_RIVAL2 db OPP_RIVAL3 db -1 ; end + +RLEList_PlayerGZapMovement:: + db D_DOWN, 1 + db D_LEFT, 1 + db -1 ; end diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 13280f6d..fc383aeb 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -252,7 +252,7 @@ DoFlyAnimation: jr nz, DoFlyAnimation ret -LoadBirdSpriteGraphics: +LoadBirdSpriteGraphics:: ; Made this farcallable for the Galarian Articuno animation. ld de, BirdSprite ld hl, vNPCSprites lb bc, BANK(BirdSprite), 12 diff --git a/maps/BrunswickTrail.blk b/maps/BrunswickTrail.blk index 6cdef4cd..ec7be0a7 100644 Binary files a/maps/BrunswickTrail.blk and b/maps/BrunswickTrail.blk differ diff --git a/maps/CelesteHill.blk b/maps/CelesteHill.blk index 499ab83e..d2cc0d46 100644 --- a/maps/CelesteHill.blk +++ b/maps/CelesteHill.blk @@ -1 +1 @@ -<@B>@@BB@@nU_U_oBB@@%"#$BB@@qZqBB@D‚rUZ%_r„FB@ƒanoa…B@ƒiU((_i…B@ƒj€ˆ…B@†s.†‡B@B@BDEEEEFYDEEEF \ No newline at end of file +<@B>@@BB@@U_U_BB@@%"#$BB@@|}}BB@D‚rU_„FB@ƒa%a…B@ƒiU.)_i…B@ƒj€ˆ…B@†s.†‡B@B@BDEEEEFYDEEEF \ No newline at end of file diff --git a/maps/CitrineCity.blk b/maps/CitrineCity.blk index 48acf045..947ebb78 100644 --- a/maps/CitrineCity.blk +++ b/maps/CitrineCity.blk @@ -33,4 +33,4 @@ D#####" -n'meCTTTTTF-1eCxxxxxxc>>>>>>>1>>>>>>>> \ No newline at end of file +n'meCTTTTTF-'eCxxxxxxc>>>>>>>'>>>>>>>> \ No newline at end of file diff --git a/ram/wram.asm b/ram/wram.asm index 551e778e..b57b3e13 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -412,7 +412,7 @@ wRelearnableMoves:: ; Try not to use this stack. ; A good amount of space is needed to store data for the move relearner. ; If it's like, 2, it'll lag like crazy and show garbage from elsewhere. - + wLuckySlotHiddenObjectIndex:: db NEXTU @@ -2074,7 +2074,7 @@ wMtMoonCraterCurScript:: db wSilphGauntlet1FCurScript:: db wSilphCo10FCurScript:: db wSilphCo11FCurScript:: db - ds 1 +wCelesteHillCurScript:: db wFuchsiaGymCurScript:: db wSaffronGymCurScript:: db wBrunswickTrailCurScript:: db diff --git a/scripts/BrunswickTrail.asm b/scripts/BrunswickTrail.asm index e81d81e5..d5053a8d 100644 --- a/scripts/BrunswickTrail.asm +++ b/scripts/BrunswickTrail.asm @@ -38,8 +38,8 @@ FakeTreePrompt: text_end ; Ok, so here's how it is. -; So look, I tried to make the text work more efficiently with FakeTreeEvent. -; But one bug literally took me back to the fucking title screen and at that point I gave up and decided to do it this hacky way. +; I tried to make the text work more efficiently here, but nothing worked. +; One bug literally took me back to the fucking title screen and at that point I gave up. ; I wanted to have some text before the CUT check. It did not work. It was terrifying. ; So instead I have two different versions of the same text, despite some being the same. ; It is inefficient, but it works. There's a lot to see in this life, and I'm not wasting it in Notepad++. diff --git a/scripts/CelesteHill.asm b/scripts/CelesteHill.asm index c1eff6c8..01ceafb2 100644 --- a/scripts/CelesteHill.asm +++ b/scripts/CelesteHill.asm @@ -1,7 +1,192 @@ CelesteHill_Script: - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ld hl, CelesteHill_ScriptPointers + ld a, [wCelesteHillCurScript] + jp CallFunctionInTable + +CelesteHill_ScriptPointers: + dw GalarianBirdScript1 + +CelesteHillCoords1: + dbmapcoord 13, 8 + db -1 ; end + +GalarianBirdScript1: +; CheckEvent EVENT_BIRDS_FOUND +; jr z, .cont +; jr nz, .done +;.cont - This code is unfinished and bad. +; If you have any ideas lmk :3 + ld hl, CelesteHillCoords1 + call ArePlayerCoordsInArray + jp nc, .done + + ld [wJoyIgnore], a + SetEvent EVENT_BIRDS_FOUND + ld a, $1 + ldh [hSpriteIndexOrTextID], a + call DisplayTextID + + ld a, ARTICUNO_G + call PlayCry + call WaitForSoundToFinish + pop hl + ld de, BirdSprite + ld hl, vNPCSprites + lb bc, BANK(BirdSprite), $0c + call CopyVideoData + farcall LoadBirdSpriteGraphics + ld a, SFX_FLY + call PlaySound + ld hl, wFlyAnimUsingCoordList + xor a ; is using coord list + ld [hli], a ; wFlyAnimUsingCoordList + ld a, 12 + ld [hli], a ; wFlyAnimCounter + ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing right) + xor a ; is using coord list + ld [hli], a ; wFlyAnimUsingCoordList + ld a, $c + ld [hli], a ; wFlyAnimCounter + ld [hl], $c ; wFlyAnimBirdSpriteImageIndex (facing right) + ld de, GalarianArticunoFlyScreenCoords1 + call GalarianArticunoFlyLoop + ld c, 40 + call DelayFrames + ld hl, wFlyAnimCounter + ld a, 11 + ld [hli], a ; wFlyAnimCounter + ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing left) + ld de, GalarianArticunoFlyScreenCoords2 + call GalarianArticunoFlyLoop + + ld a, HS_CELESTE_ARTICUNO_G + ld [wMissableObjectIndex], a + predef ShowObject + + ld a, ZAPDOS_G + call PlayCry + call ZapdosRunThrough + + ld a, HS_CELESTE_ZAPDOS_G + ld [wMissableObjectIndex], a + predef ShowObject + + ld a, $1 + ldh [hSpriteIndex], a + call SetSpriteMovementBytesToFF + ld a, [wXCoord] + + jr .done +.done + ret + + ; DoFlyAnimation clone, but for Articuno. +GalarianArticunoFlyLoop: + ld a, [wFlyAnimBirdSpriteImageIndex] + xor $1 ; make the bird flap its wings + ld [wFlyAnimBirdSpriteImageIndex], a + ld [wSprite03StateData1ImageIndex], a + call Delay3 + ld a, [wFlyAnimUsingCoordList] + cp $ff + jr z, .skipCopyingCoords ; if the bird is flapping its wings in place + ld hl, wSprite03StateData1YPixels + ld a, [de] + inc de + ld [hli], a ; y + inc hl + ld a, [de] + inc de + ld [hl], a ; x +.skipCopyingCoords + ld a, [wFlyAnimCounter] + dec a + ld [wFlyAnimCounter], a + jr nz, GalarianArticunoFlyLoop + ret + +; Clones of the initial part of the Fly animation. +GalarianArticunoFlyScreenCoords1: +; y, x pairs + db $06, $0B ; 6, 11 $3C, $48 + db $3C, $50 + db $3B, $58 + db $3A, $60 + db $39, $68 + db $37, $70 + db $37, $78 + db $33, $80 + db $30, $88 + db $2D, $90 + db $2A, $98 + db $27, $A0 + +GalarianArticunoFlyScreenCoords2: + db $1A, $90 + db $19, $80 + db $17, $70 + db $15, $60 + db $12, $50 + db $0F, $40 + db $0C, $30 + db $09, $20 + db $05, $10 + db $00, $00 + + db $F0, $00 + +ZapdosRunThrough: + call Delay3 + ld a, $2 + ldh [hSpriteIndex], a + ld de, GalarianZapdosMovement1 + call MoveSprite + + ld hl, wSimulatedJoypadStatesEnd + ld de, RLEList_PlayerGZapMovement + call DecodeRLEList + dec a + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates + ld a, $1 + ldh [hSpriteIndex], a + xor a + ldh [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + + ld a, $2 + ldh [hSpriteIndex], a + ld de, GalarianZapdosMovement2 + call MoveSprite + ret + +GalarianZapdosMovement1: + db NPC_MOVEMENT_DOWN + db -1 + +GalarianZapdosMovement2: + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db NPC_MOVEMENT_DOWN + db -1 CelesteHill_TextPointers: + dw CelesteHillGalarianBirdScreech + dw CelesteHillSign1 + dw CelesteHillSign2 +CelesteHillGalarianBirdScreech: + text_far _CelesteHillGalarianBirdScreech + text_end + +CelesteHillSign1: + text_far _CelesteHillSign1 + text_end + +CelesteHillSign2: + text_far _CelesteHillSign2 + text_end + text_end ; unused \ No newline at end of file diff --git a/text.asm b/text.asm index 7fe9da4b..bff7d55a 100644 --- a/text.asm +++ b/text.asm @@ -283,6 +283,7 @@ SECTION "Text 12", ROMX INCLUDE "text/CitrineRocketHouse.asm" INCLUDE "text/CitrineTradebackHouse.asm" INCLUDE "text/tradeback_move_tutor.asm" +INCLUDE "text/CelesteHill.asm" INCLUDE "text/BrunswickTrail.asm" INCLUDE "text/SilphGauntlet1F.asm" INCLUDE "text/SilphGauntlet7F.asm" diff --git a/text/BrunswickTrail.asm b/text/BrunswickTrail.asm index 7deac90b..c2c2671a 100644 --- a/text/BrunswickTrail.asm +++ b/text/BrunswickTrail.asm @@ -34,7 +34,7 @@ _FakeTreeAttack:: prompt _GalarianZapdosBattleText:: - text "Gyaoo!" ; making the cries consistent with the other legendary birds + text "Gyaoo!" prompt ; Martha can do the text for her things... diff --git a/text/CelesteHill.asm b/text/CelesteHill.asm new file mode 100644 index 00000000..34c2b0eb --- /dev/null +++ b/text/CelesteHill.asm @@ -0,0 +1,19 @@ +_CelesteHillGalarianBirdScreech:: ; I think others should be made a single text_7 thing but this is different as it needs a "done" + text "Gyaoo!" + done + +_CelesteHillSign1:: + text "SOUTH: BRUNSWICK" + line "TRAIL" + done + +_CelesteHillSign2:: + text "When the sun" + line "shines upon this" + cont "HILL, the cruel" + cont "pretenders to" + cont "the winged" + cont "mirages will" + cont "come to roost." + done + \ No newline at end of file