From 5e948e746ba6045c6e0e742cf9080c105a56b64e Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Fri, 2 Apr 2021 12:28:00 -0600 Subject: [PATCH 01/41] add dexnav --- data/event_scripts.s | 2 + data/field_effect_scripts.s | 22 +- data/scripts/dexnav.inc | 47 + graphics/dexnav/captured_all.png | Bin 0 -> 157 bytes graphics/dexnav/cursor.png | Bin 0 -> 172 bytes graphics/dexnav/gui.pal | 19 + graphics/dexnav/gui_tilemap.bin | Bin 0 -> 2048 bytes graphics/dexnav/gui_tiles.png | Bin 0 -> 1421 bytes graphics/dexnav/hidden.png | Bin 0 -> 178 bytes graphics/dexnav/hidden_search.png | Bin 0 -> 359 bytes graphics/dexnav/no_data.png | Bin 0 -> 182 bytes graphics/dexnav/owned_icon.png | Bin 0 -> 159 bytes graphics/dexnav/star.png | Bin 0 -> 170 bytes graphics/dexnav/vision.png | Bin 0 -> 242 bytes graphics/field_effects/palettes/cave_dust.pal | 19 + graphics/field_effects/pics/cave_dust.png | Bin 0 -> 409 bytes graphics/text_window/dexnav_pal.pal | 19 + include/constants/field_effects.h | 9 +- include/constants/flags.h | 6 +- include/constants/game_stat.h | 3 +- include/constants/vars.h | 4 +- include/daycare.h | 1 + include/dexnav.h | 135 + include/event_scripts.h | 9 + include/field_effect.h | 3 + include/global.fieldmap.h | 5 +- include/global.h | 2 + include/party_menu.h | 5 + include/pokemon.h | 3 +- include/pokemon_icon.h | 1 + include/pokemon_summary_screen.h | 2 + include/random.h | 1 + include/strings.h | 1 + include/text_window.h | 3 + include/wild_encounter.h | 7 + ld_script.txt | 2 + .../field_effect_object_template_pointers.h | 2 + src/data/field_effects/field_effect_objects.h | 20 + .../object_events/object_event_graphics.h | 3 + src/data/party_menu.h | 6 +- src/daycare.c | 2 +- src/dexnav.c | 2723 +++++++++++++++++ src/field_effect.c | 15 + src/field_effect_helpers.c | 40 +- src/new_game.c | 3 + src/party_menu.c | 2 +- src/pokemon_icon.c | 2 +- src/pokemon_summary_screen.c | 8 +- src/random.c | 11 + src/start_menu.c | 29 +- src/strings.c | 1 + src/text_window.c | 10 + src/wild_encounter.c | 25 +- sym_ewram.txt | 1 + 54 files changed, 3163 insertions(+), 70 deletions(-) create mode 100644 data/scripts/dexnav.inc create mode 100644 graphics/dexnav/captured_all.png create mode 100644 graphics/dexnav/cursor.png create mode 100644 graphics/dexnav/gui.pal create mode 100644 graphics/dexnav/gui_tilemap.bin create mode 100644 graphics/dexnav/gui_tiles.png create mode 100644 graphics/dexnav/hidden.png create mode 100644 graphics/dexnav/hidden_search.png create mode 100644 graphics/dexnav/no_data.png create mode 100644 graphics/dexnav/owned_icon.png create mode 100644 graphics/dexnav/star.png create mode 100644 graphics/dexnav/vision.png create mode 100644 graphics/field_effects/palettes/cave_dust.pal create mode 100644 graphics/field_effects/pics/cave_dust.png create mode 100644 graphics/text_window/dexnav_pal.pal create mode 100644 include/dexnav.h create mode 100644 src/dexnav.c diff --git a/data/event_scripts.s b/data/event_scripts.s index 8039be6876c7..54807f31b58e 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -1060,3 +1060,5 @@ Common_EventScript_LegendaryFlewAway:: @ 8273776 .include "data/text/frontier_brain.inc" .include "data/text/save.inc" .include "data/text/birch_speech.inc" + .include "data/scripts/dexnav.inc" + diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index c57f19a0401a..2561da83e15b 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -24,9 +24,9 @@ gFieldEffectScriptPointers:: @ 82DB9D4 .4byte gFieldEffectScript_JumpSmallSplash @ FLDEFF_JUMP_SMALL_SPLASH .4byte gFieldEffectScript_LongGrass @ FLDEFF_LONG_GRASS .4byte gFieldEffectScript_JumpLongGrass @ FLDEFF_JUMP_LONG_GRASS - .4byte gFieldEffectScript_UnusedGrass @ FLDEFF_UNUSED_GRASS - .4byte gFieldEffectScript_UnusedGrass2 @ FLDEFF_UNUSED_GRASS_2 - .4byte gFieldEffectScript_UnusedSand @ FLDEFF_UNUSED_SAND + .4byte gFieldEffectScript_ShakingGrass @ FLDEFF_SHAKING_GRASS + .4byte gFieldEffectScript_ShakingGrass2 @ FLDEFF_SHAKING_LONG_GRASS + .4byte gFieldEffectScript_UnusedSand @ FLDEFF_SAND_HOLE .4byte gFieldEffectScript_WaterSurfacing @ FLDEFF_WATER_SURFACING .4byte gFieldEffectScript_BerryTreeGrowthSparkle @ FLDEFF_BERRY_TREE_GROWTH_SPARKLE .4byte gFieldEffectScript_DeepSandFootprints @ FLDEFF_DEEP_SAND_FOOTPRINTS @@ -72,7 +72,8 @@ gFieldEffectScriptPointers:: @ 82DB9D4 .4byte gFieldEffectScript_RayquazaSpotlight @ FLDEFF_RAYQUAZA_SPOTLIGHT .4byte gFieldEffectScript_DestroyDeoxysRock @ FLDEFF_DESTROY_DEOXYS_ROCK .4byte gFieldEffectScript_MoveDeoxysRock @ FLDEFF_MOVE_DEOXYS_ROCK - + .4byte gFieldEffectScript_CaveDust @ FLDEFF_CAVE_DUST + gFieldEffectScript_ExclamationMarkIcon1:: @ 82DBAE0 field_eff_callnative FldEff_ExclamationMarkIcon field_eff_end @@ -149,12 +150,12 @@ gFieldEffectScript_JumpLongGrass:: @ 82DBB74 field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_JumpLongGrass field_eff_end -gFieldEffectScript_UnusedGrass:: @ 82DBB7E - field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass +gFieldEffectScript_ShakingGrass:: @ 82DBB7E + field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_ShakingGrass field_eff_end -gFieldEffectScript_UnusedGrass2:: @ 82DBB88 - field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_UnusedGrass2 +gFieldEffectScript_ShakingGrass2:: @ 82DBB88 + field_eff_loadfadedpal_callnative gSpritePalette_GeneralFieldEffect1, FldEff_ShakingGrass2 field_eff_end gFieldEffectScript_UnusedSand:: @ 82DBB92 @@ -343,3 +344,8 @@ gFieldEffectScript_DestroyDeoxysRock:: @ 82DBCF9 gFieldEffectScript_MoveDeoxysRock:: @ 82DBCFF field_eff_callnative FldEff_MoveDeoxysRock field_eff_end + +@ NEW +gFieldEffectScript_CaveDust:: + field_eff_loadfadedpal_callnative gSpritePalette_CaveDust FldEff_CaveDust + field_eff_end diff --git a/data/scripts/dexnav.inc b/data/scripts/dexnav.inc new file mode 100644 index 000000000000..8cd9c5ebf50e --- /dev/null +++ b/data/scripts/dexnav.inc @@ -0,0 +1,47 @@ +EventScript_StartDexNavBattle:: + lock + playse 0x15 + applymovement OBJ_EVENT_ID_PLAYER Common_Movement_ExclamationMark + waitmovement 0 + waitse + dowildbattle + release + end + + +EventScript_NotFoundNearby:: + msgbox sText_NotFoundNearby, MSGBOX_SIGN + end +sText_NotFoundNearby: + .string "It couldn't be found nearby.\n" + .string "Try looking in a different area!$" + + +EventScript_MovedTooFast:: + msgbox sText_TryMovingSlower, MSGBOX_SIGN + end +sText_TryMovingSlower: + .string "The Pokémon got away!\n" + .string "Try moving more slowly.$" + + +EventScript_PokemonGotAway:: + msgbox sText_PokemonGotAway, MSGBOX_SIGN + end +sText_PokemonGotAway: + .string "The Pokémon got away!$" + + +EventScript_LostSignal:: + msgbox sText_LostSignal, MSGBOX_SIGN + end +sText_LostSignal: + .string "There is no reaction.\n" + .string "The signal was lost!$" + + +EventScript_TooDark:: + msgbox sText_TooDark, MSGBOX_SIGN + end +sText_TooDark: + .string "It's too dark to search\nfor a Pokémon!$" diff --git a/graphics/dexnav/captured_all.png b/graphics/dexnav/captured_all.png new file mode 100644 index 0000000000000000000000000000000000000000..2ed8b40ca9829eb831c1d6787b710852520e3868 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuKyYS1DXH-|37fxKtn?V zkki1xU}$Iv6vPT1o=ivuN@#exIEGZrNlsvB{=~$__U%FeTic~CSD4x+Et^Ykoipb59q?kcv6U2@?Mr0s{gVTJ;$Y7BHk4D``3iwQ+KA wDRFZ+@T4wrVK^MXlWi!|_OgWMe4r!)!^>8t)D@SHgN$JCboFyt=akR{0LY9iO#lD@ literal 0 HcmV?d00001 diff --git a/graphics/dexnav/gui.pal b/graphics/dexnav/gui.pal new file mode 100644 index 000000000000..77939a5aba0b --- /dev/null +++ b/graphics/dexnav/gui.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +255 255 255 +217 73 73 +4 4 4 +1 81 113 +1 121 193 +119 177 75 +93 97 101 +91 179 211 +153 32 32 +111 141 81 +173 173 173 +187 217 167 +75 147 189 +177 219 235 +105 22 22 diff --git a/graphics/dexnav/gui_tilemap.bin b/graphics/dexnav/gui_tilemap.bin new file mode 100644 index 0000000000000000000000000000000000000000..63dbb3b298897f8e29670add79a28bc8b9d8b72c GIT binary patch literal 2048 zcmeH`XH!!_6owx)v4Dt*3W_vQDFV_Wpwdw>pwca%6lu}~G=NfUND)DbNEd|oKfU*6 zb0@>i&D`MwU(7x;J3D*MyZi2$vnCF3kVBaE0MamXm?IqJ7(TlAN?B%(qux5*@nY!Bp+OCI?ekNGC~fCBDtmwOa)A1g&- zRgBg2KwUrN5havTM!5?W%Kep88Q?Kbc*--?yZi=+|7wjdch#)X^>0-FoEOwmM?DR^ zq)~c@!@p6zg(jM5p_Ny((Z28gJLsf~*L2fEFK<-;Z?P%#(XU}Z#B99dJ%bD}%m^R& z$S2jmztqPvpZUTlUm0UuWkST{xL*G_^^<(lFy*5E&NMUpV3s-NS>UIrzf-^HrVoC( x=$BY#g;myAXM^8tivBUG*Ym%HgFkF**by-~!_MDb*p>gId;;&}t-ya;fq#U6kVOCh literal 0 HcmV?d00001 diff --git a/graphics/dexnav/gui_tiles.png b/graphics/dexnav/gui_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..beb41075bc7405990b92962c0bac28cbd0ea9aeb GIT binary patch literal 1421 zcmV;81#uDAiSQcZ5000FT z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?d00001 diff --git a/graphics/dexnav/owned_icon.png b/graphics/dexnav/owned_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fdc5ef71130b2831594ef0c76eb0fca1e146146b GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@Hu9j!B{{R1f_3HmAQ?~s7 zHs{{G;%`BkOQJv;kiq?leJ(C8Nl8iTjWTBdCA2(U978x}CMPg7m-9TeAX{~rF%FClkJ(k|hF@Ra5gObo2ee5xBai1>kw^K|udS?83{1OWGyG$a53 literal 0 HcmV?d00001 diff --git a/graphics/dexnav/star.png b/graphics/dexnav/star.png new file mode 100644 index 0000000000000000000000000000000000000000..5d4b034a45fc56775cb4eb1a9ef22476c8ac6c90 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@Hu9j!B{{R1f_3HmAQ?~s7 zHs{{G;%`BkOQJv;kiq?leJ(C8Nl8iTjWTBdB{&N_B8wRq#8g3;(KATp15i-G)5S4_ zV`g#!19O;!pp=x55$zjwk9F1gvv39MY!Cj-~d%~M-^c+brjNgM8+yEuDcr1|Qfi{|DwAAPM| ze08$6M=W1k!A_x)ozu7#OEx|0F5A|t6KB8w{+i|I=T@F^xHrqV&!x@I*kqyPOw;%+ ao3Gc~8ao_a{9j`q$c3J+elF{r5}E)S?_1db literal 0 HcmV?d00001 diff --git a/graphics/field_effects/palettes/cave_dust.pal b/graphics/field_effects/palettes/cave_dust.pal new file mode 100644 index 000000000000..ed31236c4e36 --- /dev/null +++ b/graphics/field_effects/palettes/cave_dust.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +255 1 255 +159 122 85 +207 189 157 +199 181 149 +114 88 61 +132 101 70 +199 173 141 +225 209 193 +189 165 133 +181 149 115 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/field_effects/pics/cave_dust.png b/graphics/field_effects/pics/cave_dust.png new file mode 100644 index 0000000000000000000000000000000000000000..1f477c7803d4ed2eec52f228fe2d2fe0ccd80ffd GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*!VDxI2ESSgqznRlLR|kd{-0kJdVcTR<6EZ| zMcB5ax*cEJ`|#qyy-QoSPAvwiLIaO8Uff_{U{vvRaSYLz*xPTN-yFcxsvmTtlIP4; z&xE6XnVS?(UC7Z8{mCf4HRzZLv-PS~WqDKXN8fL^3Xy%(Sp4PZt>YS{(MRK$dz9Hb zw744%F6>e37jp1+(Kcrl-MP`^)9fbc=3Li0H4DqhDsPOtgVU6QQj(gPtc34L9@^jX z>f(%&(Cq5OHu;F#VRQWIQVrbd>%Q)nx??W0!kp`TgZEM=CIz!)7XC#YU%mx2q$P6% z%oa1+v(IroU(bO*3TZC3L3dYwI8~9lxys?jqwX1pCr)=47UVnp_rc-n_1)(@KX=3` zFFQNYP@KVI(zO*~Oiz|<&6;>)66<3RrYD85J`8PZo^U={H8-$XQTImF>gAKXW_*l& v>&12