diff options
author | IIMarckus <iimarckus@gmail.com> | 2018-08-18 22:22:05 -0600 |
---|---|---|
committer | IIMarckus <iimarckus@gmail.com> | 2018-08-18 22:22:05 -0600 |
commit | c4b381d0dcad6ce121a6b0aa258559110e2b4823 (patch) | |
tree | be437026f6219254f1f59212a6d72d6bbe6479d1 | |
parent | 47317d53b6e573c71a61ff11618427ea9afe0ceb (diff) |
Add map objects for Sprout Tower 3F.
-rw-r--r-- | constants.asm | 1 | ||||
-rw-r--r-- | constants/scene_constants.asm | 157 | ||||
-rwxr-xr-x | engine/specials.asm | 4 | ||||
-rw-r--r-- | main.asm | 3 | ||||
-rw-r--r-- | maps/SproutTower3F.asm | 354 |
5 files changed, 516 insertions, 3 deletions
diff --git a/constants.asm b/constants.asm index 1fdddf1c..0ad13aed 100644 --- a/constants.asm +++ b/constants.asm @@ -42,3 +42,4 @@ INCLUDE "constants/input_constants.asm" INCLUDE "constants/sprite_data_constants.asm" INCLUDE "constants/serial_constants.asm" INCLUDE "constants/menu_constants.asm" +INCLUDE "constants/scene_constants.asm" diff --git a/constants/scene_constants.asm b/constants/scene_constants.asm new file mode 100644 index 00000000..67a0351c --- /dev/null +++ b/constants/scene_constants.asm @@ -0,0 +1,157 @@ +; See data/maps/scenes.asm for which maps have scene variables. +; Each scene_script and coord_event is associated with a current scene ID. + +; Scene variables default to 0. +SCENE_DEFAULT EQU 0 +; Often a map will have a one-time default event for scene 0, and switch to a +; do-nothing scene 1 when the event finishes. +SCENE_FINISHED EQU 1 + +; wPokecenter2FSceneID + const_def 1 + const SCENE_POKECENTER2F_LEAVE_TRADE_CENTER ; 1 + const SCENE_POKECENTER2F_LEAVE_COLOSSEUM ; 2 + const SCENE_POKECENTER2F_LEAVE_TIME_CAPSULE ; 3 + const SCENE_POKECENTER2F_LEAVE_MOBILE_TRADE_ROOM ; 4 + const SCENE_POKECENTER2F_LEAVE_MOBILE_BATTLE_ROOM ; 5 + +; wPowerPlantSceneID + const_def + const SCENE_POWERPLANT_NOTHING ; 0 + const SCENE_POWERPLANT_GUARD_GETS_PHONE_CALL ; 1 + +; wCeruleanGymSceneID + const_def + const SCENE_CERULEANGYM_NOTHING ; 0 + const SCENE_CERULEANGYM_GRUNT_RUNS_OUT ; 1 + +; wRoute25SceneID + const_def + const SCENE_ROUTE25_NOTHING ; 0 + const SCENE_ROUTE25_MISTYS_DATE ; 1 + +; wLancesRoomSceneID + const_def 1 + const SCENE_LANCESROOM_APPROACH_LANCE ; 1 + +; wElmsLabSceneID + const_def 1 + const SCENE_ELMSLAB_CANT_LEAVE ; 1 + const SCENE_ELMSLAB_NOTHING ; 2 + const SCENE_ELMSLAB_MEET_OFFICER ; 3 + const SCENE_ELMSLAB_UNUSED ; 4 + const SCENE_ELMSLAB_AIDE_GIVES_POTION ; 5 + const SCENE_ELMSLAB_AIDE_GIVES_POKE_BALLS ; 6 + +; wRoute29SceneID + const_def + const SCENE_ROUTE29_NOTHING ; 0 + const SCENE_ROUTE29_CATCH_TUTORIAL ; 1 + +; wCherrygroveCitySceneID + const_def + const SCENE_CHERRYGROVECITY_NOTHING ; 0 + const SCENE_CHERRYGROVECITY_MEET_RIVAL ; 1 + +; wRoute32SceneID + const_def 1 + const SCENE_ROUTE32_OFFER_SLOWPOKETAIL ; 1 + const SCENE_ROUTE32_NOTHING ; 2 + +; wRoute35NationalParkGateSceneID + const_def + const SCENE_ROUTE35NATIONALPARKGATE_NOTHING ; 0 + const SCENE_ROUTE35NATIONALPARKGATE_UNUSED ; 1 + const SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY ; 2 + +; wRoute36SceneID + const_def + const SCENE_ROUTE36_NOTHING ; 0 + const SCENE_ROUTE36_SUICUNE ; 1 + +; wRoute36NationalParkGateSceneID + const_def + const SCENE_ROUTE36NATIONALPARKGATE_NOTHING ; 0 + const SCENE_ROUTE36NATIONALPARKGATE_UNUSED ; 1 + const SCENE_ROUTE36NATIONALPARKGATE_LEAVE_CONTEST_EARLY ; 2 + +; wAzaleaTownSceneID + const_def + const SCENE_AZALEATOWN_NOTHING ; 0 + const SCENE_AZALEATOWN_RIVAL_BATTLE ; 1 + const SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL ; 2 + +; wGoldenrodGymSceneID + const_def + const SCENE_GOLDENRODGYM_NOTHING ; 0 + const SCENE_GOLDENRODGYM_WHITNEY_STOPS_CRYING ; 1 + +; wRoute42SceneID + const_def + const SCENE_ROUTE42_NOTHING ; 0 + const SCENE_ROUTE42_SUICUNE ; 1 + +; wCianwoodCitySceneID + const_def + const SCENE_CIANWOODCITY_NOTHING ; 0 + const SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE ; 1 + +; wBurnedTower1FSceneID + const_def 1 + const SCENE_BURNEDTOWER1F_RIVAL_BATTLE ; 1 + const SCENE_BURNEDTOWER1F_NOTHING ; 2 + +; wRadioTower5FSceneID + const_def 1 + const SCENE_RADIOTOWER5F_ROCKET_BOSS ; 1 + const SCENE_RADIOTOWER5F_NOTHING ; 2 + +; wRuinsOfAlphOutsideSceneID + const_def + const SCENE_RUINSOFALPHOUTSIDE_NOTHING ; 0 + const SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX ; 1 + +; wRuinsOfAlphResearchCenterSceneID + const_def + const SCENE_RUINSOFALPHRESEARCHCENTER_NOTHING ; 0 + const SCENE_RUINSOFALPHRESEARCHCENTER_GET_UNOWN_DEX ; 1 + +; wRuinsOfAlphInnerChamberSceneID + const_def + const SCENE_RUINSOFALPHINNERCHAMBER_NOTHING ; 0 + const SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE ; 1 + +; wMahoganyMart1FSceneID + const_def + const SCENE_MAHOGANYMART1F_NOTHING ; 0 + const SCENE_MAHOGANYMART1F_LANCE_UNCOVERS_STAIRS ; 1 + +; wTeamRocketBaseB2FSceneID + const_def 1 + const SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS ; 1 + const SCENE_TEAMROCKETBASEB2F_ELECTRODES ; 2 + const SCENE_TEAMROCKETBASEB2F_NOTHING ; 3 + +; wTeamRocketBaseB3FSceneID + const_def 1 + const SCENE_TEAMROCKETBASEB3F_RIVAL_ENCOUNTER ; 1 + const SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS ; 2 + const SCENE_TEAMROCKETBASEB3F_NOTHING ; 3 + +; wDragonsDenB1FSceneID + const_def + const SCENE_DRAGONSDENB1F_NOTHING ; 0 + const SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM ; 1 + +; wOlivinePortSceneID + const_def 1 + const SCENE_OLIVINEPORT_LEAVE_SHIP ; 1 + +; wVermilionPortSceneID + const_def 1 + const SCENE_VERMILIONPORT_LEAVE_SHIP ; 1 + +; wFastShip1FSceneID + const_def 1 + const SCENE_FASTSHIP1F_ENTER_SHIP ; 1 + const SCENE_FASTSHIP1F_MEET_GRANDPA ; 2 diff --git a/engine/specials.asm b/engine/specials.asm index 6bc3fc48..72c73546 100755 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -135,7 +135,7 @@ SpecialsPointers: add_special Functionc652 add_special Function16ff7 add_special Function2a7d7 - add_special Functionc628 + add_special FadeOutMusic add_special Functionc638 add_special Functionc645 add_special Function90a1b @@ -543,7 +543,7 @@ Functionc611: ; c611 (3:4611) ld [wScriptVar], a ret -Functionc628: ; c628 (3:4628) +FadeOutMusic: ; c628 (3:4628) ld a, $0 ld [wMusicFadeID], a ld a, $0 @@ -1528,7 +1528,8 @@ SECTION "bank41", ROMX, BANK[$41] SECTION "bank42", ROMX, BANK[$42] INCLUDE "maps/SproutTower1F.asm" INCLUDE "maps/SproutTower2F.asm" - dr $10843f, $10c000 +INCLUDE "maps/SproutTower3F.asm" + dr $108b1b, $109dca SECTION "bank43", ROMX, BANK[$43] dr $10c000, $110000 diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm new file mode 100644 index 00000000..5bf9809a --- /dev/null +++ b/maps/SproutTower3F.asm @@ -0,0 +1,354 @@ + const_def 2 ; object constants + const SPROUTTOWER3F_SAGE1 + const SPROUTTOWER3F_SAGE2 + const SPROUTTOWER3F_SAGE3 + const SPROUTTOWER3F_SAGE4 + const SPROUTTOWER3F_POKE_BALL1 + const SPROUTTOWER3F_POKE_BALL2 + const SPROUTTOWER3F_SILVER + +SproutTower3F_MapScripts: + db 2 ; scene scripts + scene_script .DummyScene0 ; SCENE_DEFAULT + scene_script .DummyScene1 ; SCENE_FINISHED + + db 0 ; callbacks + +.DummyScene0: + end + +.DummyScene1: + end + +SproutTower3FRivalScene: + turnobject PLAYER, UP + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + playsound SFX_TACKLE + playsound SFX_ELEVATOR + earthquake 79 + pause 15 + playsound SFX_TACKLE + playsound SFX_ELEVATOR + earthquake 79 + applymovement PLAYER, MovementData_0x184a1d + applymovement SPROUTTOWER3F_SILVER, MovementData_0x184a22 + opentext + writetext UnknownText_0x184a27 + waitbutton + closetext + showemote EMOTE_SHOCK, SPROUTTOWER3F_SILVER, 15 + turnobject SPROUTTOWER3F_SILVER, DOWN + pause 15 + applymovement SPROUTTOWER3F_SILVER, MovementData_0x184a24 + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext SproutTowerRivalOnlyCareAboutStrongText + waitbutton + closetext + turnobject SPROUTTOWER3F_SILVER, UP + opentext + writetext SproutTowerRivalUsedEscapeRopeText + pause 15 + closetext + playsound SFX_WARP_TO + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear SPROUTTOWER3F_SILVER + waitsfx + special FadeInQuickly + setscene SCENE_FINISHED + special RestartMapMusic + end + +SageLiScript: + faceplayer + opentext + checkevent EVENT_GOT_HM05_FLASH + iftrue .GotFlash + writetext SageLiSeenText + waitbutton + closetext + winlosstext SageLiBeatenText, 0 + loadtrainer SAGE, LI + startbattle + reloadmapafterbattle + opentext + writetext SageLiTakeThisFlashText + buttonsound + verbosegiveitem HM_FLASH + setevent EVENT_GOT_HM05_FLASH + setevent EVENT_BEAT_SAGE_LI + writetext SageLiFlashExplanationText + waitbutton + closetext + end + +.GotFlash: + writetext SageLiAfterBattleText + waitbutton + closetext + end + +TrainerSageJin: + trainer SAGE, JIN, EVENT_BEAT_SAGE_JIN, SageJinSeenText, SageJinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageJinAfterBattleText + waitbutton + closetext + end + +TrainerSageTroy: + trainer SAGE, TROY, EVENT_BEAT_SAGE_TROY, SageTroySeenText, SageTroyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageTroyAfterBattleText + waitbutton + closetext + end + +TrainerSageNeal: + trainer SAGE, NEAL, EVENT_BEAT_SAGE_NEAL, SageNealSeenText, SageNealBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageNealAfterBattleText + waitbutton + closetext + end + +SproutTower3FPainting: + jumptext SproutTower3FPaintingText + +SproutTower3FStatue: + jumptext SproutTower3FStatueText + +SproutTower3FPotion: + itemball POTION + +SproutTower3FEscapeRope: + itemball ESCAPE_ROPE + +MovementData_0x184a1d: + step UP + step UP + step UP + step UP + step_end + +MovementData_0x184a22: + step UP + step_end + +MovementData_0x184a24: + step RIGHT + step DOWN + step_end + +UnknownText_0x184a27: + text "ELDER: You are in-" + line "deed skilled as a" + cont "trainer." + + para "As promised, here" + line "is your HM." + + para "But let me say" + line "this: You should" + + para "treat your" + line "#MON better." + + para "The way you battle" + line "is far too harsh." + + para "#MON are not" + line "tools of war…" + done + +SproutTowerRivalOnlyCareAboutStrongText: + text "…" + line "…Humph!" + + para "He claims to be" + line "the ELDER but" + cont "he's weak." + + para "It stands to" + line "reason." + + para "I'd never lose to" + line "fools who babble" + + para "about being nice" + line "to #MON." + + para "I only care about" + line "strong #MON" + cont "that can win." + + para "I really couldn't" + line "care less about" + cont "weak #MON." + done + +SproutTowerRivalUsedEscapeRopeText: + text "<RIVAL> used an" + line "ESCAPE ROPE!" + done + +SageLiSeenText: + text "So good of you to" + line "come here!" + + para "SPROUT TOWER is a" + line "place of training." + + para "People and #MON" + line "test their bonds" + + para "to build a bright" + line "future together." + + para "I am the final" + line "test." + + para "Allow me to check" + line "the ties between" + + para "your #MON and" + line "you!" + done + +SageLiBeatenText: + text "Ah, excellent!" + done + +SageLiTakeThisFlashText: + text "You and your #-" + line "MON should have" + + para "no problem using" + line "this move." + + para "Take this FLASH" + line "HM." + done + +SageLiFlashExplanationText: + text "FLASH illuminates" + line "even the darkest" + cont "of all places." + + para "But to use it out" + line "of battle, you" + + para "need the BADGE" + line "from VIOLET's GYM." + done + +SageLiAfterBattleText: + text "I hope you learn" + line "and grow from your" + cont "journey." + done + +SageJinSeenText: + text "I train to find" + line "enlightenment in" + cont "#MON!" + done + +SageJinBeatenText: + text "Beaten by a mere" + line "child!" + done + +SageJinAfterBattleText: + text "As #MON grow" + line "stronger, so does" + cont "the trainer." + + para "No, wait. As the" + line "trainer grows" + + para "stronger, so do" + line "the #MON." + done + +SageTroySeenText: + text "Let me see how" + line "much you trust" + cont "your #MON." + done + +SageTroyBeatenText: + text "Yes, your trust is" + line "real!" + done + +SageTroyAfterBattleText: + text "It is not far to" + line "the ELDER." + done + +SageNealSeenText: + text "The ELDER's HM" + line "lights even pitch-" + cont "black darkness." + done + +SageNealBeatenText: + text "It is my head that" + line "is bright!" + done + +SageNealAfterBattleText: + text "Let there be light" + line "on your journey." + done + +SproutTower3FPaintingText: + text "It's a powerful" + line "painting of a" + cont "BELLSPROUT." + done + +SproutTower3FStatueText: + text "A #MON statue…" + + para "It looks very" + line "distinguished." + done + +SproutTower3F_MapEvents: + db 0, 0 ; filler + + db 1 ; warp events + warp_event 10, 14, SPROUT_TOWER_2F, 4 + + db 1 ; coord events + coord_event 11, 9, SCENE_DEFAULT, SproutTower3FRivalScene + + db 6 ; bg events + bg_event 8, 1, BGEVENT_READ, SproutTower3FStatue + bg_event 11, 1, BGEVENT_READ, SproutTower3FStatue + bg_event 9, 0, BGEVENT_READ, SproutTower3FPainting + bg_event 10, 0, BGEVENT_READ, SproutTower3FPainting + bg_event 5, 15, BGEVENT_READ, SproutTower3FStatue + bg_event 14, 15, BGEVENT_READ, SproutTower3FStatue + + db 7 ; object events + object_event 8, 13, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageJin, -1 + object_event 8, 8, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerSageTroy, -1 + object_event 10, 2, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SageLiScript, -1 + object_event 11, 11, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageNeal, -1 + object_event 6, 14, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FPotion, EVENT_SPROUT_TOWER_3F_POTION + object_event 14, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FEscapeRope, EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE + object_event 10, 4, SPRITE_SILVER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_SPROUT_TOWER |