From edc478c1c47202e582737294b10fd1c630a3b199 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 8 Oct 2022 20:15:22 -0400 Subject: [PATCH 1/3] Sync -num_tiles flags --- tools/gbagfx/gfx.c | 32 ++++++++++++++++++++++++++------ tools/gbagfx/gfx.h | 8 +++++++- tools/gbagfx/main.c | 9 ++++++++- tools/gbagfx/options.h | 2 ++ 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/tools/gbagfx/gfx.c b/tools/gbagfx/gfx.c index b28bb4021..4fbf9b7d3 100644 --- a/tools/gbagfx/gfx.c +++ b/tools/gbagfx/gfx.c @@ -397,7 +397,7 @@ void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int free(buffer); } -void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) +void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors) { int tileSize = bitDepth * 8; @@ -424,7 +424,8 @@ void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int m FATAL_ERROR("The specified number of tiles (%d) is greater than the maximum possible value (%d).\n", numTiles, maxNumTiles); int bufferSize = numTiles * tileSize; - unsigned char *buffer = malloc(bufferSize); + int maxBufferSize = maxNumTiles * tileSize; + unsigned char *buffer = malloc(maxBufferSize); if (buffer == NULL) FATAL_ERROR("Failed to allocate memory for pixels.\n"); @@ -433,17 +434,36 @@ void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int m switch (bitDepth) { case 1: - ConvertToTiles1Bpp(image->pixels, buffer, numTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); + ConvertToTiles1Bpp(image->pixels, buffer, maxNumTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); break; case 4: - ConvertToTiles4Bpp(image->pixels, buffer, numTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); + ConvertToTiles4Bpp(image->pixels, buffer, maxNumTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); break; case 8: - ConvertToTiles8Bpp(image->pixels, buffer, numTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); + ConvertToTiles8Bpp(image->pixels, buffer, maxNumTiles, metatilesWide, metatileWidth, metatileHeight, invertColors); break; } - WriteWholeFile(path, buffer, bufferSize); + bool zeroPadded = true; + for (int i = bufferSize; i < maxBufferSize && zeroPadded; i++) { + if (buffer[i] != 0) + { + switch (numTilesMode) + { + case NUM_TILES_IGNORE: + break; + case NUM_TILES_WARN: + fprintf(stderr, "Ignoring -num_tiles %d because tile %d contains non-transparent pixels.\n", numTiles, 1 + i / tileSize); + zeroPadded = false; + break; + case NUM_TILES_ERROR: + FATAL_ERROR("Tile %d contains non-transparent pixels.\n", 1 + i / tileSize); + break; + } + } + } + + WriteWholeFile(path, buffer, zeroPadded ? bufferSize : maxBufferSize); free(buffer); } diff --git a/tools/gbagfx/gfx.h b/tools/gbagfx/gfx.h index edb9e62c4..f1dbfcf4f 100644 --- a/tools/gbagfx/gfx.h +++ b/tools/gbagfx/gfx.h @@ -44,8 +44,14 @@ struct Image { bool isAffine; }; +enum NumTilesMode { + NUM_TILES_IGNORE, + NUM_TILES_WARN, + NUM_TILES_ERROR, +}; + void ReadImage(char *path, int tilesWidth, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); -void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); +void WriteImage(char *path, enum NumTilesMode numTilesMode, int numTiles, int bitDepth, int metatileWidth, int metatileHeight, struct Image *image, bool invertColors); void FreeImage(struct Image *image); void ReadGbaPalette(char *path, struct Palette *palette); void WriteGbaPalette(char *path, struct Palette *palette); diff --git a/tools/gbagfx/main.c b/tools/gbagfx/main.c index cf3031696..5d4faacab 100644 --- a/tools/gbagfx/main.c +++ b/tools/gbagfx/main.c @@ -77,7 +77,7 @@ void ConvertPngToGba(char *inputPath, char *outputPath, struct PngToGbaOptions * ReadPng(inputPath, &image); - WriteImage(outputPath, options->numTiles, options->bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); + WriteImage(outputPath, options->numTilesMode, options->numTiles, options->bitDepth, options->metatileWidth, options->metatileHeight, &image, !image.hasPalette); FreeImage(&image); } @@ -179,6 +179,7 @@ void HandlePngToGbaCommand(char *inputPath, char *outputPath, int argc, char **a char *outputFileExtension = GetFileExtensionAfterDot(outputPath); int bitDepth = outputFileExtension[0] - '0'; struct PngToGbaOptions options; + options.numTilesMode = NUM_TILES_IGNORE; options.numTiles = 0; options.bitDepth = bitDepth; options.metatileWidth = 1; @@ -203,6 +204,12 @@ void HandlePngToGbaCommand(char *inputPath, char *outputPath, int argc, char **a if (options.numTiles < 1) FATAL_ERROR("Number of tiles must be positive.\n"); } + else if (strcmp(option, "-Wnum_tiles") == 0) { + options.numTilesMode = NUM_TILES_WARN; + } + else if (strcmp(option, "-Werror=num_tiles") == 0) { + options.numTilesMode = NUM_TILES_ERROR; + } else if (strcmp(option, "-mwidth") == 0) { if (i + 1 >= argc) diff --git a/tools/gbagfx/options.h b/tools/gbagfx/options.h index 3b038f572..250b72345 100644 --- a/tools/gbagfx/options.h +++ b/tools/gbagfx/options.h @@ -4,6 +4,7 @@ #define OPTIONS_H #include +#include "gfx.h" struct GbaToPngOptions { char *paletteFilePath; @@ -18,6 +19,7 @@ struct GbaToPngOptions { struct PngToGbaOptions { int numTiles; + enum NumTilesMode numTilesMode; int bitDepth; int metatileWidth; int metatileHeight; From 7178aa8b99a78d08726110aa954c951095e2f78c Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 8 Oct 2022 20:44:08 -0400 Subject: [PATCH 2/3] Set unused tiles to transparent, document adjacent files --- graphics/item_pc/{unk_8E85458.bin => bg.bin} | Bin graphics/item_pc/{unk_8E85408.pal => bg.pal} | 0 graphics/item_pc/bg.png | Bin 0 -> 807 bytes graphics/item_pc/unk_8E85090.png | Bin 746 -> 0 bytes graphics/ss_anne/smoke.png | Bin 0 -> 315 bytes graphics/ss_anne/unk_8479838.png | Bin 188 -> 0 bytes graphics/ss_anne/unk_8479A38.png | Bin 271 -> 0 bytes graphics/ss_anne/wake.png | Bin 0 -> 244 bytes graphics/teachy_tv/tiles.png | Bin 1761 -> 1760 bytes .../tm_case/{unk_8E84D90.png => disc.png} | Bin .../{unk_8E84F20.pal => disc_types_1.pal} | 0 .../{unk_8E85068.pal => disc_types_2.pal} | 0 graphics/tm_case/{unk_8E99118.png => hm.png} | Bin .../tm_case/{unk_8E84A24.bin => menu.bin} | Bin .../{unk_8E84D20.pal => menu_female.pal} | 0 .../{unk_8E84CB0.pal => menu_male.pal} | 0 .../tm_case/{unk_8E84B70.bin => tm_case.bin} | Bin graphics/tm_case/tm_case.png | Bin 0 -> 1012 bytes graphics/tm_case/unk_8E845D8.png | Bin 951 -> 0 bytes graphics_file_rules.mk | 250 +++++++++--------- include/graphics.h | 18 +- src/graphics.c | 24 +- src/ss_anne.c | 4 +- src/tm_case.c | 37 +-- tileset_rules.mk | 134 +++++----- 25 files changed, 235 insertions(+), 232 deletions(-) rename graphics/item_pc/{unk_8E85458.bin => bg.bin} (100%) rename graphics/item_pc/{unk_8E85408.pal => bg.pal} (100%) create mode 100644 graphics/item_pc/bg.png delete mode 100644 graphics/item_pc/unk_8E85090.png create mode 100644 graphics/ss_anne/smoke.png delete mode 100644 graphics/ss_anne/unk_8479838.png delete mode 100644 graphics/ss_anne/unk_8479A38.png create mode 100644 graphics/ss_anne/wake.png rename graphics/tm_case/{unk_8E84D90.png => disc.png} (100%) rename graphics/tm_case/{unk_8E84F20.pal => disc_types_1.pal} (100%) rename graphics/tm_case/{unk_8E85068.pal => disc_types_2.pal} (100%) rename graphics/tm_case/{unk_8E99118.png => hm.png} (100%) rename graphics/tm_case/{unk_8E84A24.bin => menu.bin} (100%) rename graphics/tm_case/{unk_8E84D20.pal => menu_female.pal} (100%) rename graphics/tm_case/{unk_8E84CB0.pal => menu_male.pal} (100%) rename graphics/tm_case/{unk_8E84B70.bin => tm_case.bin} (100%) create mode 100644 graphics/tm_case/tm_case.png delete mode 100644 graphics/tm_case/unk_8E845D8.png diff --git a/graphics/item_pc/unk_8E85458.bin b/graphics/item_pc/bg.bin similarity index 100% rename from graphics/item_pc/unk_8E85458.bin rename to graphics/item_pc/bg.bin diff --git a/graphics/item_pc/unk_8E85408.pal b/graphics/item_pc/bg.pal similarity index 100% rename from graphics/item_pc/unk_8E85408.pal rename to graphics/item_pc/bg.pal diff --git a/graphics/item_pc/bg.png b/graphics/item_pc/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..4db6a6bcbc7f4407b8eed2ff5d7aef89e2c28d91 GIT binary patch literal 807 zcmV+?1K9kDP)S7??v}7${13iH4 z6V&z%tjvntXe!VSMO41W_vlB8vWDab*p$hSpZHI*QaUH0T#Yc$uHr=GbB2i>;A&uV z5e7y!mtRYa2V7oLd(r^38QzLPj)R87AU}ReF&40DYB0Zu_JG?;2Y(EC&Mt7))nNgD zOQ2%I5Zi&caDXlw&`n^_Kmxo_d`n>%f`Gpi&q)}t4Mzw7_oUvYdSsB(e*a8yPwEYT zZXH4~fV#TDuEAgcb#;RP!Ul1Rut5wmWN@bF7=HKr=l&w0K`txUPQ>wp9Z+&(z!tke zqU6?sA-+zWD0w*0kobT&UTAoiI#Kd~qM;7hUw}RAdnU= z+rA8dsr!JlNFm@4T;5P)2(W>TYXwrh3HCoTP4%f5?=)Fvx|}Z-Q0^BB7kUy$A2fad z_A>&O%Iv}>2@euBnRwhqqF%|kr9 z=pc<9^9m{Nct;;4$_9%5fJ}+}_=zGZ8D31DL%Cg00D-bl`I=Em54c^q+=qdM%iZUQ zQUmU8xV>lrjv0QdLC%AQ{UE=8%P9_UYHqMsOxJ)bFrka3JhKlxZcRiWzZw8BEU6ud zdk@%(f!quR4J@D&kXtIl5(V-D@=VG=Z8Smzq$l^b)eDO}t=EqrJ-Igmrge$MiYglh zHwUW~)-??Z2piNb!Ui?SkimOI&+vA=erQY*Mo%l+p4Ill6#%_3Xe)i70KK$mC~pcc zpf?8@iaMaS7a4x#UO;b9GBg1N>al>$ zQJ`;Ps$StTUxxs$dOtP!cmViW9JiKxe|h5bP?< zswWTVju;rg*@YR&r>p`2CRS~McSEqdA-nu3z*qyFJ_Bc$Vwi|wNCpJD(+^RcZ5bHz z=tlzu7$RfCWWvBu41>Ns>8Dtp;{1^f->i)(VJJXv51OJvuh-&xEpvgIpGH43|=Vr?t0C>|L2C{a*y*O==SFaV2m$wzD ceIpzB3qTndJYBc9ZU6uP07*qoM6N<$f|f@?mjD0& diff --git a/graphics/ss_anne/smoke.png b/graphics/ss_anne/smoke.png new file mode 100644 index 0000000000000000000000000000000000000000..5560247873a1899b9b9b78babc2202a244d7e808 GIT binary patch literal 315 zcmV-B0mS}^P)G4{<$tdv?(Qfk%J?rLg_gNv-qw0r;m{}2!urC*hD0002S zNkl6@F7{3f^#%4L5VeO+o_}wpJu#yjzUkuf;yB`8~|O zyK?mbdAiA$_7CuFgIq)jVul&HvJ@xH*8*9T96fETQ&YGMEY N002ovPDHLkV1jDsg_-~W literal 0 HcmV?d00001 diff --git a/graphics/ss_anne/unk_8479838.png b/graphics/ss_anne/unk_8479838.png deleted file mode 100644 index e7d0d8c44e47da28b5eac793aab7f3a89d432ecd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0zmA*0wfqdKXdg4Qq7(&jv*Qo=T6wo+hD-s5_zyS zJ8jX9Tfg}yNIiN|Bh)paA;f>8{rf$0Yi_GIC~%1BavWf>|Krj$b9>y31OunzO#MtY z|L@$k4A9=P#Y9EzYQ5)u2c7hfnHOu9g85>WS!c*Kgc^f7)x9>uq`oa+as7pUXO@geCygiASXX diff --git a/graphics/ss_anne/unk_8479A38.png b/graphics/ss_anne/unk_8479A38.png deleted file mode 100644 index 98fbc8d9710804158618579484e2b5f24a6a1a6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 271 zcmV+q0r38bP)IDVBnWRCl9!72fry4YRfQhx|F?ty95M6xaisMYatA3v@XhQGFOsF%J zh-5gvu5QJt?)^eumo8r*%d96*DT5ZQ0^oP$aCSG%$i>9Nu;qqcdB2#3E-Ix)et;>T z+p7GDyA`dE((*7$mLfccR?Ze*_R;{J5${KyBxEne_{e=UofGml)Keo&Tyy>hJ^;%N Vo!X^08+8Bx002ovPDHLkV1l$eb8`Ry diff --git a/graphics/ss_anne/wake.png b/graphics/ss_anne/wake.png new file mode 100644 index 0000000000000000000000000000000000000000..b7ce6763fba36308c99e366a5f17afb583fd7951 GIT binary patch literal 244 zcmVG4{<$tdv?(Qfk%J?rLg_gNv-qw0r;m{}2!urC*hD0001g zNkl(Xn23a0BVtkgUpeZ^YFQNJRdWLfPWSRQYr*Ng0D|8A u3B&_l4`{!_Z4NX!q1LciR3o2tzNk0o3%=<}y$lxs0000{k=tddZb_!E3Z z0v&cMNQb{}<+)Cj+SI4Vbbp#cdzx-(wSNduG3L1@!;jhlwivK^ zjO|<619TJ#&|PwYMy@zd0^lRI>tz7Fi!RW}l~V~g#lh)*37~66-mt6Ob&~*_Dcbaw z1N82N2WaJT0lp{Tz%koMz@G_70E~(N%mo29F@ho>$pNSUx_9BLfU!d^F!)4~10{eu z$SWzXu*s1SZhu4D7nK(;B;XGMh$*oE@Hg6S>}>25lDHy(WT&$IaxK8dv&!~bfXd4? zJ=m_id^Qj850Rb391PIC4@Vz0@$uR+fm*d4V-D+wc|WbQLpQssl!69zh;K-CoFI{^;AJK)y^06il) zfS2_BQ-1;3ni2qswKhRz+F(tzCB-&pdE)_7>!g`Af;L^KW!_Td`dixwTCz|JBdL7< z)rChQ0Nh;nAlsuo>$OjowNYNP!Oq&(SS|!SfQ6qUd-m2TqmnkzVw<&Z3tujfC$A$19m1Iq{ z<^Y)QcJMj?*k%y(6$=^xLpP7w;l@v-Xp>8L1VA_TDvsd+*B%hu;uvGXhoNmq)1bpH zp73IlZt<)iV3$?|bV>ki0`wd}2Hy6z#(&QlZlghmaf!BRKcFn~a`*4#=)sW*+d!D7 zSfGI`lIw#z(wbY^)W+TZNdS)F>41l|TyRI*?Q+9{^dbNb=Wo9CYUTcXV$$($*@sVd zuDzbs+?nqH4|Lk=Pkf}GjfIfeXgvPn`?Cfo{I%A5?iDAz*pMTa{$c;;FD?Ss7|`Sw#c9%s$zUOR=1NmH>QHwSwRQWjXkFf1g4RiU35yR8|4p5LNI4M^^#> z-w0;_ZXPh8$GO8K#0UW3Ubam?0x>eNHJl+JE;8?Wi~#0=2bil>0B&dzfw2K#_9DQ} z17P{yjop7U3+M+xBkl|{05|rN%mgTZto<}_fVduF7H0vJ1oYx-E{B=IBTLjVWN{Wi zF~kT)0?;--oJ?-<1pvkni+IHgK;hYkH_oYeOcekaLntE5!zKexuxm5(g$*$j08~gW zVu%0$guBb2us1S>A^?-XDL4;HSb+o7*BADI>rez-iXz&OHr4hu0qC8pgLC13?8}GW zJfPnTN$^FyiYr)gN{suS#r@fj=l2qL>Jy6_a?fYrE)M|rd0UwBDFyv`*83H5$;fld zHDCZFA*7|@?MGU3!nrhO&Vjz%N0m3a3DBv{ea5*DUilK!7n>jh3)cYZec_W^E^{UhKmn0mX$ljVQbEpL{YWMAO`0000J_!;jhlHW;ve zg#8=Z19TJ#(5K`A&0KSy1i(k^*NXsp8(pB8YbO$Lf|FBw0pQe(yy2;GpX&rzPtm5g z7@)T=JU}a#3-CPw2aecA0{%=u0$@}GU@i!-ju8|ANe(~-(7g*^1&keXfx#z=94G-a zL0(C5g-s5HaDN}#zNo!;Apw67KrD$0z~5-QwzalZNaB(JlC9e2%as6Y&uW`10ctN- z^kB30^4UDVKUmT-fVAC$B&Zeuln@@Y3}CbNY)g4>G;pR(*N^KwMZKwerU@IliQE4q zr9Sj{AD^M@*Xt6Hl>jarK(FHtoB`BPl=mhr2W$&~&VK<|ssN`=ZE8)uhJe2$puPm) z2=pERVDRR1?tctGfxg|;7ch8jgZuZ(0Kb$1F#Fm#z=^5^ye|Ws8W?=afOH0MkASdn zJT2uTpy|tspSW=L;gf2PH4`OgQ9pWs5d#Z=eJXkVr!s(E0H~XSd?&#EcL)4h0njs& z19(Z_KYtaFttbJISZfnhrU$HvzNFaaEN?tuYMr#QgP=_-wai44N_RG(9$~rCq0V{Xa150Kla{0NSLGu?dQM-eCZ72l#&ofZI52HxC#DKs$KV z#<7lt58D9vRt7lE10ob34cM7q#)IBLMz!n*oNYIRL~POt}x| zX@3W7ngg(faQu(~U9M)DdoBROQoul@UILCewOs*_1@k%V8U`Gf0dOUh0pK?1_^v}| zn*(6JJHhJ!V4FeAS1f1*4Ba~Fgoa;8(I%Jh2!LViRh+{Eu00^Q#WBW&4@2LOmO+n(St)1j)AaF zu|NY?BsT_6q!o{}sg0-olK>pU(*X}Fx!|t0+r@?j=|uos&fk3R)zahn#-!`rvJao^ zTzfsMxjWwh9_Y5$pZH2Y8w(+`(RlpDk7o^T_-n0q+$&Cau^~q;$2nnS&*Zcn@qdOA z3AfJXLzLgieEj+C_$vW|cAf)d{`HBHIsQ)oKA`z%{KM|gUt9#NF`&gSiqoVutpdCo zyYO}cpp_*_rtD38>#PL4rC82BO8~y9T0!uDvK;)oyGx-5MF1jUDysl)h${GrqbmV` zZ-g@dw+# z0kC}U#_qqF1@r^pAf5~}05|uO%mgTZt^G1^fVdxG7H0vJ1oYx-E{B=ID@)WdWN{Wi zF~kT)0?;u&oJ=0^1pvkni+IHwK;hko4d+z6rV0RzArukTVT%FBIJA}d!iE?M04gLG zF+>0W!rf(1*c%x`5r9eH6r6`GtiS;p>kIq9btnQZMGJy6xa?fYrE)M|r`B<3pEd}Fw)%zWC$;fld zHDCZFA*AKN+mE#7gmY=moCAG%jw)|-6QEO@`x@uI@XD8%zBmLKU=R>@lpx^v8~$!h zf`{l`5gexaE}JEIX>np$ za^oW)*Bc2pBDH1X=K3dp#00000NkvXXu0mjf DlGYF4 diff --git a/graphics/tm_case/unk_8E84D90.png b/graphics/tm_case/disc.png similarity index 100% rename from graphics/tm_case/unk_8E84D90.png rename to graphics/tm_case/disc.png diff --git a/graphics/tm_case/unk_8E84F20.pal b/graphics/tm_case/disc_types_1.pal similarity index 100% rename from graphics/tm_case/unk_8E84F20.pal rename to graphics/tm_case/disc_types_1.pal diff --git a/graphics/tm_case/unk_8E85068.pal b/graphics/tm_case/disc_types_2.pal similarity index 100% rename from graphics/tm_case/unk_8E85068.pal rename to graphics/tm_case/disc_types_2.pal diff --git a/graphics/tm_case/unk_8E99118.png b/graphics/tm_case/hm.png similarity index 100% rename from graphics/tm_case/unk_8E99118.png rename to graphics/tm_case/hm.png diff --git a/graphics/tm_case/unk_8E84A24.bin b/graphics/tm_case/menu.bin similarity index 100% rename from graphics/tm_case/unk_8E84A24.bin rename to graphics/tm_case/menu.bin diff --git a/graphics/tm_case/unk_8E84D20.pal b/graphics/tm_case/menu_female.pal similarity index 100% rename from graphics/tm_case/unk_8E84D20.pal rename to graphics/tm_case/menu_female.pal diff --git a/graphics/tm_case/unk_8E84CB0.pal b/graphics/tm_case/menu_male.pal similarity index 100% rename from graphics/tm_case/unk_8E84CB0.pal rename to graphics/tm_case/menu_male.pal diff --git a/graphics/tm_case/unk_8E84B70.bin b/graphics/tm_case/tm_case.bin similarity index 100% rename from graphics/tm_case/unk_8E84B70.bin rename to graphics/tm_case/tm_case.bin diff --git a/graphics/tm_case/tm_case.png b/graphics/tm_case/tm_case.png new file mode 100644 index 0000000000000000000000000000000000000000..ce013967e2ae10760838705505a6634d187cbb1a GIT binary patch literal 1012 zcmVDm4Fh+)sEmU2*v|W?UduTv(%NS3lqfLioted54HF+$Y?RYF$ zg;2U#XS}x(okB^Ws)j&nl16<$?#_}dB@haIC)s-Lx%YQDUrq?9pj17qgYQ0;s0Ys0 zK(DI)8<0@d0|ymAS!q7L8w}n&gW3QxtczX`pZB3e@0Fyg0@xsnK#cYEL(XsmP-(zX z-GZUi1CH7*7;-5v+J*sXGn$_Da>cqtHwSbXpt3-PflBEr81}p0vT|ud!U?u30G>BF zNv};Xeu^n1*||0nA7@b1MigmTxA)rpjeO4ODg4*XTKHDQ<%J)zy$;AKxIJ3 zycK{1%PJtzCE$z0D!~4+%CTwzzozUI?V1AM{qjbGiDQSn#82n+SXc)$qBFpH>kqTl z5TAs}tH*Z+uW1_`UMIhP(|#~EpW~kZIL?F9Js7@=fbPoxlbC@$4-~uB&>55g z4;9t`VK)F&SVI|j;y4~ETJDxM9Q6ypCj>y@B0vUN1U@^?Jy1M%UBw1i0|NX%U-|}u zMt}n5ky2B%z&p`4K=_dwc?c^8eX1#15U_@DjPtZwEf?ERtD-?pqHv^8fd-f%JTDkz zJXwSi51OZ15EcwFj>eIijftT56vP^2yjaYY26Rn*Hb^wYQ4|5db8t}$Xov-6rriU5 zC@0sc|3H!(&yzq5XVP;;TZB&tgl9Q i1VqDLjqVEETz>%(Gcw2;GSzng0000HV%7{;%(3Y9t-BT=DDl?{88b2fx3;Yf^Wl9L!SnU$r4u^mt{qD<-74OuGco~>Ph zg%u;gh!iWzKVaUE^TnU7sE~N3i~W0_d!Lj2#v%dv1x-<>j{}sb2lh9>v`YUCuu1j6 zX$4TUOn<%}kKcXmX-olbFm1`^Zvic|%#gUSOA>dDKD!wo>C16Iv)4uu}D>MG}u zNrBNy4oIifwARPvXo*<{m@z;yK!pQIYULcxW(T4qcCb0YRRzHN+WXw~%rSe5ZQ6<* zv;~|%2I$cFXa{~$&N32$Pf%3D{*|qasjJ4FCyRRe-G};KE52 zV45$+ss(}?nJpGI0^n8aMu$|UEpQDEW#PQGOIh0=@p!-UJzQe$I2o@K{VLmPbAzBy*2wMWs!Z;LxuW=lr z#WK3q4#$%m@EifKh!7wLl?R^1@o%vB6h)F9;0y=|?meBP5Htc5FyE!@p$ps-ixlu) zP$NI!#Gp^vLl*>$gEzo^mdj;?ZOBI6LG@j4DA58PU483^1W>AtRi_~+Gd+JU zT_1RU*I0SIg}|2h`D+s}gbxgr5~>jh%uG-4VjJzfu1^HP3XW4;Yaj>^@O*#B1Whx1 zH!(B6hnKj&?{|slDm6UBCrafW%}^ zl4>B~?3Ny&>8DZ#fbl5OWi?RJ`riTT%(qkJU-~-pX>>OrSszqh{|g{lXFiSY25eMy Z{|~29B7fdUcNzcy002ovPDHLkV1h#Lu$TY< diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 0aa81586d..d9ac26cfa 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -100,13 +100,13 @@ graphics/title_screen/pokemon_logo.gbapal: %.gbapal: %.pal $(GFX) $< $@ -num_colors 224 graphics/pokemon_jump/bg.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 63 + $(GFX) $< $@ -num_tiles 63 -Wnum_tiles $(MISCGFXDIR)/japanese_hof.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 29 + $(GFX) $< $@ -num_tiles 29 -Wnum_tiles $(MISCGFXDIR)/markings2.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 25 + $(GFX) $< $@ -num_tiles 25 -Wnum_tiles $(INTERFACEGFXDIR)/menu.gbapal: $(INTERFACEGFXDIR)/menu_0.gbapal \ $(INTERFACEGFXDIR)/menu_1.gbapal @@ -150,13 +150,13 @@ $(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin \ @cat $^ >$@ $(UNUSEDGFXDIR)/color_frames.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 353 + $(GFX) $< $@ -num_tiles 353 -Wnum_tiles $(BATINTGFXDIR)/unused_window2bar.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 5 + $(GFX) $< $@ -num_tiles 5 -Wnum_tiles $(BATINTGFXDIR)/level_up_banner.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 36 + $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(BATINTGFXDIR)/window.gbapal: $(BATINTGFXDIR)/window1.gbapal $(BATINTGFXDIR)/window2.gbapal cat $^ > $@ @@ -175,7 +175,7 @@ $(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp \ @cat $^ >$@ $(UNKNOWNGFXDIR)/unknown_D196E4.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 36 + $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(BTLANMSPRGFXDIR)/ice_crystals.4bpp: $(BTLANMSPRGFXDIR)/ice_crystals_0.4bpp \ $(BTLANMSPRGFXDIR)/ice_crystals_1.4bpp \ @@ -197,13 +197,13 @@ $(BTLANMSPRGFXDIR)/spark.4bpp: $(BTLANMSPRGFXDIR)/spark_0.4bpp \ @cat $^ >$@ $(MASKSGFXDIR)/unknown_D2EC24.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 14 + $(GFX) $< $@ -num_tiles 14 -Wnum_tiles $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 16 + $(GFX) $< $@ -num_tiles 16 -Wnum_tiles $(INTERFACEGFXDIR)/party_menu_misc.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 62 + $(GFX) $< $@ -num_tiles 62 -Wnum_tiles $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) @cat $^ >$@ @@ -214,29 +214,29 @@ $(TYPESGFXDIR)/move_types.gbapal: $(TYPESGFXDIR)/move_types_1.gbapal \ @cat $^ >$@ $(INTERFACEGFXDIR)/bag_screen.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(RAYQUAZAGFXDIR)/rayquaza.8bpp: %.8bpp: %.png - $(GFX) $< $@ -num_tiles 227 + $(GFX) $< $@ -num_tiles 227 -Wnum_tiles $(RAYQUAZAGFXDIR)/overcast.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 313 + $(GFX) $< $@ -num_tiles 313 -Wnum_tiles $(RAYQUAZAGFXDIR)/rayquaza_fly1.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 124 + $(GFX) $< $@ -num_tiles 124 -Wnum_tiles $(RAYQUAZAGFXDIR)/rayquaza_tail_fix.4bpp: $(RAYQUAZAGFXDIR)/rayquaza_tail.4bpp cp $< $@ head -c 12 /dev/zero >> $@ $(RAYQUAZAGFXDIR)/chase_streaks.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 19 + $(GFX) $< $@ -num_tiles 19 -Wnum_tiles $(RAYQUAZAGFXDIR)/rayquaza_chase.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 155 + $(GFX) $< $@ -num_tiles 155 -Wnum_tiles graphics/picture_frame/frame5.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 86 + $(GFX) $< $@ -num_tiles 86 -Wnum_tiles $(ROULETTEGFXDIR)/roulette_tilt.4bpp: $(ROULETTEGFXDIR)/shroomish.4bpp \ $(ROULETTEGFXDIR)/tailow.4bpp @@ -249,10 +249,10 @@ $(ROULETTEGFXDIR)/poke_icons2.4bpp: $(ROULETTEGFXDIR)/wynaut.4bpp \ @cat $^ >$@ $(BATTRANSGFXDIR)/85BBC14.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(BATTRANSGFXDIR)/rayquaza.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 938 + $(GFX) $< $@ -num_tiles 938 -Wnum_tiles $(BATTRANSGFXDIR)/frontier_square_1.4bpp: $(BATTRANSGFXDIR)/frontier_squares_blanktiles.4bpp \ $(BATTRANSGFXDIR)/frontier_squares_1.4bpp @@ -275,16 +275,16 @@ $(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu. @cat $^ >$@ $(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 822 + $(GFX) $< $@ -num_tiles 822 -Wnum_tiles $(PSSGFXDIR)/forest_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 55 + $(GFX) $< $@ -num_tiles 55 -Wnum_tiles $(PSSGFXDIR)/forest.4bpp: $(PSSGFXDIR)/forest_frame.4bpp $(PSSGFXDIR)/forest_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/city_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 52 + $(GFX) $< $@ -num_tiles 52 -Wnum_tiles $(PSSGFXDIR)/city.4bpp: $(PSSGFXDIR)/city_frame.4bpp $(PSSGFXDIR)/city_bg.4bpp @cat $^ >$@ @@ -293,97 +293,97 @@ $(PSSGFXDIR)/desert.4bpp: $(PSSGFXDIR)/desert_frame.4bpp $(PSSGFXDIR)/desert_bg. @cat $^ >$@ $(PSSGFXDIR)/savanna_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 45 + $(GFX) $< $@ -num_tiles 45 -Wnum_tiles $(PSSGFXDIR)/savanna_bg.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 23 + $(GFX) $< $@ -num_tiles 23 -Wnum_tiles $(PSSGFXDIR)/savanna.4bpp: $(PSSGFXDIR)/savanna_frame.4bpp $(PSSGFXDIR)/savanna_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/crag_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 49 + $(GFX) $< $@ -num_tiles 49 -Wnum_tiles $(PSSGFXDIR)/crag.4bpp: $(PSSGFXDIR)/crag_frame.4bpp $(PSSGFXDIR)/crag_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/volcano_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 56 + $(GFX) $< $@ -num_tiles 56 -Wnum_tiles $(PSSGFXDIR)/volcano.4bpp: $(PSSGFXDIR)/volcano_frame.4bpp $(PSSGFXDIR)/volcano_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/snow_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 57 + $(GFX) $< $@ -num_tiles 57 -Wnum_tiles $(PSSGFXDIR)/snow.4bpp: $(PSSGFXDIR)/snow_frame.4bpp $(PSSGFXDIR)/snow_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/cave_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 55 + $(GFX) $< $@ -num_tiles 55 -Wnum_tiles $(PSSGFXDIR)/cave.4bpp: $(PSSGFXDIR)/cave_frame.4bpp $(PSSGFXDIR)/cave_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/beach_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 46 + $(GFX) $< $@ -num_tiles 46 -Wnum_tiles $(PSSGFXDIR)/beach_bg.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 23 + $(GFX) $< $@ -num_tiles 23 -Wnum_tiles $(PSSGFXDIR)/beach.4bpp: $(PSSGFXDIR)/beach_frame.4bpp $(PSSGFXDIR)/beach_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/seafloor_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 54 + $(GFX) $< $@ -num_tiles 54 -Wnum_tiles $(PSSGFXDIR)/seafloor.4bpp: $(PSSGFXDIR)/seafloor_frame.4bpp $(PSSGFXDIR)/seafloor_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/river_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 51 + $(GFX) $< $@ -num_tiles 51 -Wnum_tiles $(PSSGFXDIR)/river_bg.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 11 + $(GFX) $< $@ -num_tiles 11 -Wnum_tiles $(PSSGFXDIR)/river.4bpp: $(PSSGFXDIR)/river_frame.4bpp $(PSSGFXDIR)/river_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/sky_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 45 + $(GFX) $< $@ -num_tiles 45 -Wnum_tiles $(PSSGFXDIR)/sky.4bpp: $(PSSGFXDIR)/sky_frame.4bpp $(PSSGFXDIR)/sky_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/polkadot_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 54 + $(GFX) $< $@ -num_tiles 54 -Wnum_tiles $(PSSGFXDIR)/polkadot.4bpp: $(PSSGFXDIR)/polkadot_frame.4bpp $(PSSGFXDIR)/polkadot_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/pokecenter_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 35 + $(GFX) $< $@ -num_tiles 35 -Wnum_tiles $(PSSGFXDIR)/pokecenter.4bpp: $(PSSGFXDIR)/pokecenter_frame.4bpp $(PSSGFXDIR)/pokecenter_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/machine_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 33 + $(GFX) $< $@ -num_tiles 33 -Wnum_tiles $(PSSGFXDIR)/machine.4bpp: $(PSSGFXDIR)/machine_frame.4bpp $(PSSGFXDIR)/machine_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/plain_frame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 18 + $(GFX) $< $@ -num_tiles 18 -Wnum_tiles $(PSSGFXDIR)/plain.4bpp: $(PSSGFXDIR)/plain_frame.4bpp $(PSSGFXDIR)/plain_bg.4bpp @cat $^ >$@ $(PSSGFXDIR)/friends_frame1.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 57 + $(GFX) $< $@ -num_tiles 57 -Wnum_tiles $(PSSGFXDIR)/friends_frame2.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 57 + $(GFX) $< $@ -num_tiles 57 -Wnum_tiles $(PSSGFXDIR)/zigzagoon.4bpp: $(PSSGFXDIR)/friends_frame1.4bpp $(PSSGFXDIR)/zigzagoon_bg.4bpp @cat $^ >$@ @@ -449,70 +449,70 @@ $(FIELDEFFECTSGFXDIR)/pics/tree_disguise.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 4 $(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 8 + $(GFX) $< $@ -num_tiles 8 -Wnum_tiles $(BATTRANSGFXDIR)/frontier_transition.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 43 + $(GFX) $< $@ -num_tiles 43 -Wnum_tiles -graphics/tm_case/unk_8E845D8.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 91 +graphics/tm_case/tm_case.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 91 -Wnum_tiles $(PKNAVGFXDIR)/header.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(PKNAVGFXDIR)/outline.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(PKNAVGFXDIR)/ui_matchcall.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 13 + $(GFX) $< $@ -num_tiles 13 -Wnum_tiles $(INTERFACEGFXDIR)/region_map.8bpp: %.8bpp: %.png - $(GFX) $< $@ -num_tiles 232 + $(GFX) $< $@ -num_tiles 232 -Wnum_tiles $(INTERFACEGFXDIR)/region_map_affine.8bpp: %.8bpp: %.png - $(GFX) $< $@ -num_tiles 233 + $(GFX) $< $@ -num_tiles 233 -Wnum_tiles $(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp @cat $^ >$@ $(FAMECHECKERGFXDIR)/spinning_pokeball.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 15 + $(GFX) $< $@ -num_tiles 15 -Wnum_tiles $(FAMECHECKERGFXDIR)/bg.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 165 + $(GFX) $< $@ -num_tiles 165 -Wnum_tiles graphics/seagallop/water.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 41 + $(GFX) $< $@ -num_tiles 41 -Wnum_tiles graphics/link/321start.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 4 -mheight 4 $(TEXTWINDOWGFXDIR)/unk_8470B0C.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 19 + $(GFX) $< $@ -num_tiles 19 -Wnum_tiles $(SLOTMACHINEGFXDIR)/unk_8466620.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 66 + $(GFX) $< $@ -num_tiles 66 -Wnum_tiles $(SLOTMACHINEGFXDIR)/unk_84659d0.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 138 + $(GFX) $< $@ -num_tiles 138 -Wnum_tiles $(TEACHYTVGFXDIR)/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 233 + $(GFX) $< $@ -num_tiles 233 -Wnum_tiles -$(SSANNEGFXDIR)/unk_8479A38.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 17 +$(SSANNEGFXDIR)/smoke.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 17 -Wnum_tiles -$(ITEMPCGFXDIR)/unk_8E85090.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 82 +$(ITEMPCGFXDIR)/bg.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 82 -Wnum_tiles $(TITLESCREENGFXDIR)/firered/box_art_mon.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 135 + $(GFX) $< $@ -num_tiles 135 -Wnum_tiles $(TITLESCREENGFXDIR)/leafgreen/box_art_mon.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 123 + $(GFX) $< $@ -num_tiles 123 -Wnum_tiles $(CREDITSGFXDIR)/unk_8EAE548.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 77 + $(GFX) $< $@ -num_tiles 77 -Wnum_tiles POKEDEXAREAMARKERSDATADIR := graphics/pokedex/area_markers @@ -535,188 +535,188 @@ graphics/misc/emoticons.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 2 $(ITEMMENUGFXDIR)/bag_tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 55 + $(GFX) $< $@ -num_tiles 55 -Wnum_tiles $(INTROGFXDIR)/scene_1/grass.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 397 + $(GFX) $< $@ -num_tiles 397 -Wnum_tiles $(INTROGFXDIR)/scene_2/plants.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 17 + $(GFX) $< $@ -num_tiles 17 -Wnum_tiles $(INTROGFXDIR)/scene_2/nidorino_close.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 170 + $(GFX) $< $@ -num_tiles 170 -Wnum_tiles $(INTROGFXDIR)/scene_2/gengar_close.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 114 + $(GFX) $< $@ -num_tiles 114 -Wnum_tiles $(INTROGFXDIR)/scene_3/gengar_anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 348 + $(GFX) $< $@ -num_tiles 348 -Wnum_tiles $(BATTLETERRAINGFXDIR)/building/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 77 + $(GFX) $< $@ -num_tiles 77 -Wnum_tiles $(BATTLETERRAINGFXDIR)/cave/anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 106 + $(GFX) $< $@ -num_tiles 106 -Wnum_tiles $(BATTLETERRAINGFXDIR)/cave/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 84 + $(GFX) $< $@ -num_tiles 84 -Wnum_tiles $(BATTLETERRAINGFXDIR)/grass/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 98 + $(GFX) $< $@ -num_tiles 98 -Wnum_tiles $(BATTLETERRAINGFXDIR)/indoor/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 77 + $(GFX) $< $@ -num_tiles 77 -Wnum_tiles $(BATTLETERRAINGFXDIR)/longgrass/anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 133 + $(GFX) $< $@ -num_tiles 133 -Wnum_tiles $(BATTLETERRAINGFXDIR)/longgrass/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 98 + $(GFX) $< $@ -num_tiles 98 -Wnum_tiles $(BATTLETERRAINGFXDIR)/mountain/anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 47 + $(GFX) $< $@ -num_tiles 47 -Wnum_tiles $(BATTLETERRAINGFXDIR)/pond/anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 36 + $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(BATTLETERRAINGFXDIR)/pond/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 75 + $(GFX) $< $@ -num_tiles 75 -Wnum_tiles $(BATTLETERRAINGFXDIR)/sand/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 83 + $(GFX) $< $@ -num_tiles 83 -Wnum_tiles $(BATTLETERRAINGFXDIR)/underwater/anim.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 26 + $(GFX) $< $@ -num_tiles 26 -Wnum_tiles $(BATTLETERRAINGFXDIR)/underwater/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 85 + $(GFX) $< $@ -num_tiles 85 -Wnum_tiles $(BATTLETERRAINGFXDIR)/water/terrain.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 81 + $(GFX) $< $@ -num_tiles 81 -Wnum_tiles $(BERRYPOUCHGFXDIR)/background.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 52 + $(GFX) $< $@ -num_tiles 52 -Wnum_tiles $(HALLOFFAMEGFXDIR)/hall_of_fame.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 29 + $(GFX) $< $@ -num_tiles 29 -Wnum_tiles $(TILESETGFXDIR)/primary/general/anim/water_current_landwatersedge/7.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 47 + $(GFX) $< $@ -num_tiles 47 -Wnum_tiles $(MAPPREVIEWGFXDIR)/altering_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 391 + $(GFX) $< $@ -num_tiles 391 -Wnum_tiles $(MAPPREVIEWGFXDIR)/berry_forest/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 395 + $(GFX) $< $@ -num_tiles 395 -Wnum_tiles $(MAPPREVIEWGFXDIR)/digletts_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 398 + $(GFX) $< $@ -num_tiles 398 -Wnum_tiles $(MAPPREVIEWGFXDIR)/dotted_hole/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 317 + $(GFX) $< $@ -num_tiles 317 -Wnum_tiles $(MAPPREVIEWGFXDIR)/icefall_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 399 + $(GFX) $< $@ -num_tiles 399 -Wnum_tiles $(MAPPREVIEWGFXDIR)/lost_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 404 + $(GFX) $< $@ -num_tiles 404 -Wnum_tiles $(MAPPREVIEWGFXDIR)/monean_chamber/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 326 + $(GFX) $< $@ -num_tiles 326 -Wnum_tiles $(MAPPREVIEWGFXDIR)/mt_ember/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 355 + $(GFX) $< $@ -num_tiles 355 -Wnum_tiles $(MAPPREVIEWGFXDIR)/mt_moon/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 364 + $(GFX) $< $@ -num_tiles 364 -Wnum_tiles $(MAPPREVIEWGFXDIR)/pokemon_mansion/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 388 + $(GFX) $< $@ -num_tiles 388 -Wnum_tiles $(MAPPREVIEWGFXDIR)/pokemon_tower/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 290 + $(GFX) $< $@ -num_tiles 290 -Wnum_tiles $(MAPPREVIEWGFXDIR)/power_plant/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 368 + $(GFX) $< $@ -num_tiles 368 -Wnum_tiles $(MAPPREVIEWGFXDIR)/rock_tunnel/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 407 + $(GFX) $< $@ -num_tiles 407 -Wnum_tiles $(MAPPREVIEWGFXDIR)/rocket_hideout/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 194 + $(GFX) $< $@ -num_tiles 194 -Wnum_tiles $(MAPPREVIEWGFXDIR)/rocket_warehouse/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 234 + $(GFX) $< $@ -num_tiles 234 -Wnum_tiles $(MAPPREVIEWGFXDIR)/safari_zone/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 330 + $(GFX) $< $@ -num_tiles 330 -Wnum_tiles $(MAPPREVIEWGFXDIR)/seafoam_islands/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 408 + $(GFX) $< $@ -num_tiles 408 -Wnum_tiles $(MAPPREVIEWGFXDIR)/silph_co/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 355 + $(GFX) $< $@ -num_tiles 355 -Wnum_tiles $(MAPPREVIEWGFXDIR)/victory_road/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 375 + $(GFX) $< $@ -num_tiles 375 -Wnum_tiles $(MAPPREVIEWGFXDIR)/viridian_forest/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 389 + $(GFX) $< $@ -num_tiles 389 -Wnum_tiles $(NAMINGGFXDIR)/cursor.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 5 + $(GFX) $< $@ -num_tiles 5 -Wnum_tiles $(NAMINGGFXDIR)/cursor_squished.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 5 + $(GFX) $< $@ -num_tiles 5 -Wnum_tiles $(NAMINGGFXDIR)/cursor_filled.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 5 + $(GFX) $< $@ -num_tiles 5 -Wnum_tiles $(WALLPAPERGFXDIR)/beach/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 60 + $(GFX) $< $@ -num_tiles 60 -Wnum_tiles $(WALLPAPERGFXDIR)/cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 61 + $(GFX) $< $@ -num_tiles 61 -Wnum_tiles $(WALLPAPERGFXDIR)/city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 40 + $(GFX) $< $@ -num_tiles 40 -Wnum_tiles $(WALLPAPERGFXDIR)/crag/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 54 + $(GFX) $< $@ -num_tiles 54 -Wnum_tiles $(WALLPAPERGFXDIR)/desert/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 52 + $(GFX) $< $@ -num_tiles 52 -Wnum_tiles $(WALLPAPERGFXDIR)/forest/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(WALLPAPERGFXDIR)/pokecenter/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 57 + $(GFX) $< $@ -num_tiles 57 -Wnum_tiles $(WALLPAPERGFXDIR)/river/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 63 + $(GFX) $< $@ -num_tiles 63 -Wnum_tiles $(WALLPAPERGFXDIR)/savanna/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 45 + $(GFX) $< $@ -num_tiles 45 -Wnum_tiles $(WALLPAPERGFXDIR)/seafloor/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 53 + $(GFX) $< $@ -num_tiles 53 -Wnum_tiles $(WALLPAPERGFXDIR)/simple/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 25 + $(GFX) $< $@ -num_tiles 25 -Wnum_tiles $(WALLPAPERGFXDIR)/sky/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 52 + $(GFX) $< $@ -num_tiles 52 -Wnum_tiles $(WALLPAPERGFXDIR)/snow/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 51 + $(GFX) $< $@ -num_tiles 51 -Wnum_tiles $(WALLPAPERGFXDIR)/stars/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 37 + $(GFX) $< $@ -num_tiles 37 -Wnum_tiles $(WALLPAPERGFXDIR)/tiles/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 31 + $(GFX) $< $@ -num_tiles 31 -Wnum_tiles $(WALLPAPERGFXDIR)/volcano/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 57 + $(GFX) $< $@ -num_tiles 57 -Wnum_tiles diff --git a/include/graphics.h b/include/graphics.h index c486aa058..5efc885bc 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2866,15 +2866,15 @@ extern const u16 gFameCheckerBg3Tilemap[0x400]; extern const u16 gFameCheckerBg2Tilemap[0x400]; // tm_case -extern const u32 gUnknown_8E845D8[]; -extern const u32 gUnknown_8E84A24[]; -extern const u32 gUnknown_8E84B70[]; -extern const u32 gUnknown_8E84CB0[]; -extern const u32 gUnknown_8E84D20[]; -extern const u32 gTMCase_TMSpriteGfx[]; -extern const u32 gUnknown_8E84F20[]; -extern const u32 gUnknown_8E85068[]; -extern const u8 gUnknown_8E99118[]; +extern const u32 gTMCase_Gfx[]; +extern const u32 gTMCaseMenu_Tilemap[]; +extern const u32 gTMCase_Tilemap[]; +extern const u32 gTMCaseMenu_Male_Pal[]; +extern const u32 gTMCaseMenu_Female_Pal[]; +extern const u32 gTMCaseDisc_Gfx[]; +extern const u32 gTMCaseDiscTypes1_Pal[]; +extern const u32 gTMCaseDiscTypes2_Pal[]; +extern const u8 gTMCaseHM_Gfx[]; extern const u16 gTMCaseMainWindowPalette[]; // egg_hatch diff --git a/src/graphics.c b/src/graphics.c index 440083539..b4ab91a60 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1123,18 +1123,18 @@ const u32 gBag_Pal[] = INCBIN_U32("graphics/interface/bag.gbapal.lz"); const u32 gSwapLine_Gfx[] = INCBIN_U32("graphics/interface/bag_swap.4bpp.lz"); const u32 gSwapLine_Pal[] = INCBIN_U32("graphics/interface/bag_swap.gbapal.lz"); -const u32 gUnknown_8E845D8[] = INCBIN_U32("graphics/tm_case/unk_8E845D8.4bpp.lz"); -const u32 gUnknown_8E84A24[] = INCBIN_U32("graphics/tm_case/unk_8E84A24.bin.lz"); -const u32 gUnknown_8E84B70[] = INCBIN_U32("graphics/tm_case/unk_8E84B70.bin.lz"); -const u32 gUnknown_8E84CB0[] = INCBIN_U32("graphics/tm_case/unk_8E84CB0.gbapal.lz"); -const u32 gUnknown_8E84D20[] = INCBIN_U32("graphics/tm_case/unk_8E84D20.gbapal.lz"); -const u32 gTMCase_TMSpriteGfx[] = INCBIN_U32("graphics/tm_case/unk_8E84D90.4bpp.lz"); -const u32 gUnknown_8E84F20[] = INCBIN_U32("graphics/tm_case/unk_8E84F20.gbapal.lz"); -const u32 gUnknown_8E85068[] = INCBIN_U32("graphics/tm_case/unk_8E85068.gbapal.lz"); +const u32 gTMCase_Gfx[] = INCBIN_U32("graphics/tm_case/tm_case.4bpp.lz"); +const u32 gTMCaseMenu_Tilemap[] = INCBIN_U32("graphics/tm_case/menu.bin.lz"); +const u32 gTMCase_Tilemap[] = INCBIN_U32("graphics/tm_case/tm_case.bin.lz"); +const u32 gTMCaseMenu_Male_Pal[] = INCBIN_U32("graphics/tm_case/menu_male.gbapal.lz"); +const u32 gTMCaseMenu_Female_Pal[] = INCBIN_U32("graphics/tm_case/menu_female.gbapal.lz"); +const u32 gTMCaseDisc_Gfx[] = INCBIN_U32("graphics/tm_case/disc.4bpp.lz"); +const u32 gTMCaseDiscTypes1_Pal[] = INCBIN_U32("graphics/tm_case/disc_types_1.gbapal.lz"); +const u32 gTMCaseDiscTypes2_Pal[] = INCBIN_U32("graphics/tm_case/disc_types_2.gbapal.lz"); -const u8 gItemPcTiles[] = INCBIN_U8("graphics/item_pc/unk_8E85090.4bpp.lz"); -const u32 gItemPcBgPals[] = INCBIN_U32("graphics/item_pc/unk_8E85408.gbapal.lz"); -const u8 gItemPcTilemap[] = INCBIN_U8("graphics/item_pc/unk_8E85458.bin.lz"); +const u8 gItemPcTiles[] = INCBIN_U8("graphics/item_pc/bg.4bpp.lz"); +const u32 gItemPcBgPals[] = INCBIN_U32("graphics/item_pc/bg.gbapal.lz"); +const u8 gItemPcTilemap[] = INCBIN_U8("graphics/item_pc/bg.bin.lz"); const u32 gBerryPouchSpriteTiles[] = INCBIN_U32("graphics/berry_pouch/berry_pouch.4bpp.lz"); const u8 gBerryPouchBgGfx[] = INCBIN_U8("graphics/berry_pouch/background.4bpp.lz"); @@ -1212,7 +1212,7 @@ const u32 gNamingScreenPageSwapButton_Gfx[] = INCBIN_U32("graphics/naming_screen const u32 gNamingScreenInputArrow_Gfx[] = INCBIN_U32("graphics/naming_screen/input_arrow.4bpp"); const u32 gNamingScreenUnderscore_Gfx[] = INCBIN_U32("graphics/naming_screen/underscore.4bpp"); -const u8 gUnknown_8E99118[] = INCBIN_U8("graphics/tm_case/unk_8E99118.4bpp"); +const u8 gTMCaseHM_Gfx[] = INCBIN_U8("graphics/tm_case/hm.4bpp"); const u16 gKantoTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star.gbapal"); const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.lz"); diff --git a/src/ss_anne.c b/src/ss_anne.c index ce46bc6f6..71335915a 100644 --- a/src/ss_anne.c +++ b/src/ss_anne.c @@ -18,8 +18,8 @@ static void WakeSpriteCallback(struct Sprite *sprite); static void CreateSmokeSprite(void); static void SmokeSpriteCallback(struct Sprite *sprite); -static const u16 sWakeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479838.4bpp"); -static const u16 sSmokeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479A38.4bpp"); +static const u16 sWakeTiles[] = INCBIN_U16("graphics/ss_anne/wake.4bpp"); +static const u16 sSmokeTiles[] = INCBIN_U16("graphics/ss_anne/smoke.4bpp"); static const struct SpriteSheet sSpriteSheets[] = { {(const void *)sWakeTiles, sizeof(sWakeTiles), SPRITE_TAG_WAKE}, diff --git a/src/tm_case.c b/src/tm_case.c index 73807c670..8ef9e7fbb 100644 --- a/src/tm_case.c +++ b/src/tm_case.c @@ -226,7 +226,7 @@ static const union AnimCmd *const sTMSpriteAnims[] = { }; static const struct CompressedSpriteSheet sTMSpriteSheet = { - (const void *)gTMCase_TMSpriteGfx, + (const void *)gTMCaseDisc_Gfx, 0x400, TM_CASE_TM_TAG }; @@ -241,7 +241,7 @@ static const struct SpriteTemplate sTMSpriteTemplate = { SpriteCallbackDummy }; -static const u16 sTMSpritePaletteOffsetByType[] = { +static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = { [TYPE_NORMAL] = 0x000, [TYPE_FIRE] = 0x010, [TYPE_WATER] = 0x020, @@ -440,25 +440,25 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void) { case 0: ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(1, gUnknown_8E845D8, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, gTMCase_Gfx, 0, 0, 0); sTMCaseDynamicResources->seqId++; break; case 1: if (FreeTempTileDataBuffersIfPossible() != TRUE) { - LZDecompressWram(gUnknown_8E84A24, sTilemapBuffer); + LZDecompressWram(gTMCaseMenu_Tilemap, sTilemapBuffer); sTMCaseDynamicResources->seqId++; } break; case 2: - LZDecompressWram(gUnknown_8E84B70, GetBgTilemapBuffer(1)); + LZDecompressWram(gTMCase_Tilemap, GetBgTilemapBuffer(1)); sTMCaseDynamicResources->seqId++; break; case 3: if (gSaveBlock2Ptr->playerGender == MALE) - LoadCompressedPalette(gUnknown_8E84CB0, 0, 0x80); + LoadCompressedPalette(gTMCaseMenu_Male_Pal, 0, 0x80); else - LoadCompressedPalette(gUnknown_8E84D20, 0, 0x80); + LoadCompressedPalette(gTMCaseMenu_Female_Pal, 0, 0x80); sTMCaseDynamicResources->seqId++; break; case 4: @@ -1387,7 +1387,7 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y) { - BlitBitmapToWindow(windowId, gUnknown_8E99118, x, y, 16, 12); + BlitBitmapToWindow(windowId, gTMCaseHM_Gfx, x, y, 16, 12); } static void HandlePrintMoneyOnHand(void) @@ -1423,7 +1423,7 @@ static void RemoveTMContextMenu(u8 * a0) static u8 CreateTMSprite(u16 itemId) { u8 spriteId = CreateSprite(&sTMSpriteTemplate, 0x29, 0x2E, 0); - u8 r5; + u8 tmIdx; if (itemId == ITEM_NONE) { UpdateTMSpritePosition(&gSprites[spriteId], 0xFF); @@ -1431,17 +1431,17 @@ static u8 CreateTMSprite(u16 itemId) } else { - r5 = itemId - 33; - SetTMSpriteAnim(&gSprites[spriteId], r5); + tmIdx = itemId - ITEM_TM01; + SetTMSpriteAnim(&gSprites[spriteId], tmIdx); TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type); - UpdateTMSpritePosition(&gSprites[spriteId], r5); + UpdateTMSpritePosition(&gSprites[spriteId], tmIdx); return spriteId; } } static void SetTMSpriteAnim(struct Sprite *sprite, u8 idx) { - if (idx >= 50) + if (idx >= NUM_TECHNICAL_MACHINES) StartSpriteAnim(sprite, 1); else StartSpriteAnim(sprite, 0); @@ -1517,14 +1517,17 @@ static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite) } } +// - 1 excludes TYPE_MYSTERY +#define NUM_TM_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16) + static void LoadTMTypePalettes(void) { struct SpritePalette spritePalette; - sTMSpritePaletteBuffer = Alloc(0x110 * sizeof(u16)); - LZDecompressWram(gUnknown_8E84F20, sTMSpritePaletteBuffer); - LZDecompressWram(gUnknown_8E85068, sTMSpritePaletteBuffer + 0x100); - spritePalette.data = sTMSpritePaletteBuffer + 0x110; + sTMSpritePaletteBuffer = Alloc(NUM_TM_COLORS * sizeof(u16)); + LZDecompressWram(gTMCaseDiscTypes1_Pal, sTMSpritePaletteBuffer); // Decompress the first 16 + LZDecompressWram(gTMCaseDiscTypes2_Pal, sTMSpritePaletteBuffer + 0x100); // Decompress the rest (Only 17 total, this is just Dragon type) + spritePalette.data = sTMSpritePaletteBuffer + NUM_TM_COLORS; spritePalette.tag = TM_CASE_TM_TAG; LoadSpritePalette(&spritePalette); } diff --git a/tileset_rules.mk b/tileset_rules.mk index 707bceb8d..a868248cf 100644 --- a/tileset_rules.mk +++ b/tileset_rules.mk @@ -1,202 +1,202 @@ TILESETGFXDIR := data/tilesets $(TILESETGFXDIR)/primary/building/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 640 + $(GFX) $< $@ -num_tiles 640 -Wnum_tiles $(TILESETGFXDIR)/primary/general/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 640 + $(GFX) $< $@ -num_tiles 640 -Wnum_tiles $(TILESETGFXDIR)/secondary/pallet_town/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 76 + $(GFX) $< $@ -num_tiles 76 -Wnum_tiles $(TILESETGFXDIR)/secondary/lavender_town/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 256 + $(GFX) $< $@ -num_tiles 256 -Wnum_tiles $(TILESETGFXDIR)/secondary/cinnabar_island/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 128 + $(GFX) $< $@ -num_tiles 128 -Wnum_tiles $(TILESETGFXDIR)/secondary/pokemon_center/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 376 + $(GFX) $< $@ -num_tiles 376 -Wnum_tiles $(TILESETGFXDIR)/secondary/cable_club/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 632 + $(GFX) $< $@ -num_tiles 632 -Wnum_tiles $(TILESETGFXDIR)/secondary/fuchsia_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 92 + $(GFX) $< $@ -num_tiles 92 -Wnum_tiles $(TILESETGFXDIR)/secondary/pewter_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 207 + $(GFX) $< $@ -num_tiles 207 -Wnum_tiles $(TILESETGFXDIR)/secondary/saffron_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 82 + $(GFX) $< $@ -num_tiles 82 -Wnum_tiles $(TILESETGFXDIR)/secondary/viridian_forest/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 101 + $(GFX) $< $@ -num_tiles 101 -Wnum_tiles $(TILESETGFXDIR)/secondary/seafoam_islands/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 318 + $(GFX) $< $@ -num_tiles 318 -Wnum_tiles $(TILESETGFXDIR)/secondary/generic_building_2/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 152 + $(GFX) $< $@ -num_tiles 152 -Wnum_tiles $(TILESETGFXDIR)/secondary/underground_path/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 50 + $(GFX) $< $@ -num_tiles 50 -Wnum_tiles $(TILESETGFXDIR)/secondary/restaurant_hotel/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 76 + $(GFX) $< $@ -num_tiles 76 -Wnum_tiles $(TILESETGFXDIR)/secondary/burgled_house/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 172 + $(GFX) $< $@ -num_tiles 172 -Wnum_tiles $(TILESETGFXDIR)/secondary/berry_forest/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 101 + $(GFX) $< $@ -num_tiles 101 -Wnum_tiles $(TILESETGFXDIR)/secondary/sevii_islands_45/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 374 + $(GFX) $< $@ -num_tiles 374 -Wnum_tiles $(TILESETGFXDIR)/secondary/pokemon_league/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 340 + $(GFX) $< $@ -num_tiles 340 -Wnum_tiles $(TILESETGFXDIR)/secondary/viridian_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 112 + $(GFX) $< $@ -num_tiles 112 -Wnum_tiles $(TILESETGFXDIR)/secondary/vermilion_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 140 + $(GFX) $< $@ -num_tiles 140 -Wnum_tiles $(TILESETGFXDIR)/secondary/indigo_plateau/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 247 + $(GFX) $< $@ -num_tiles 247 -Wnum_tiles $(TILESETGFXDIR)/secondary/cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 256 + $(GFX) $< $@ -num_tiles 256 -Wnum_tiles $(TILESETGFXDIR)/secondary/bike_shop/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 60 + $(GFX) $< $@ -num_tiles 60 -Wnum_tiles $(TILESETGFXDIR)/secondary/viridian_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 90 + $(GFX) $< $@ -num_tiles 90 -Wnum_tiles $(TILESETGFXDIR)/secondary/cerulean_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 119 + $(GFX) $< $@ -num_tiles 119 -Wnum_tiles $(TILESETGFXDIR)/secondary/cinnabar_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 146 + $(GFX) $< $@ -num_tiles 146 -Wnum_tiles $(TILESETGFXDIR)/secondary/unused_gatehouse_1/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 144 + $(GFX) $< $@ -num_tiles 144 -Wnum_tiles $(TILESETGFXDIR)/secondary/unused_gatehouse_2/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 144 + $(GFX) $< $@ -num_tiles 144 -Wnum_tiles $(TILESETGFXDIR)/secondary/power_plant/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 80 + $(GFX) $< $@ -num_tiles 80 -Wnum_tiles $(TILESETGFXDIR)/secondary/pokemon_tower/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 128 + $(GFX) $< $@ -num_tiles 128 -Wnum_tiles $(TILESETGFXDIR)/secondary/school/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 50 + $(GFX) $< $@ -num_tiles 50 -Wnum_tiles $(TILESETGFXDIR)/secondary/dummy_3/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 2 + $(GFX) $< $@ -num_tiles 2 -Wnum_tiles $(TILESETGFXDIR)/secondary/navel_rock/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 282 + $(GFX) $< $@ -num_tiles 282 -Wnum_tiles $(TILESETGFXDIR)/secondary/sevii_islands_67/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 374 + $(GFX) $< $@ -num_tiles 374 -Wnum_tiles $(TILESETGFXDIR)/secondary/hall_of_fame/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 208 + $(GFX) $< $@ -num_tiles 208 -Wnum_tiles $(TILESETGFXDIR)/secondary/pewter_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 280 + $(GFX) $< $@ -num_tiles 280 -Wnum_tiles $(TILESETGFXDIR)/secondary/celadon_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 244 + $(GFX) $< $@ -num_tiles 244 -Wnum_tiles $(TILESETGFXDIR)/secondary/saffron_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 262 + $(GFX) $< $@ -num_tiles 262 -Wnum_tiles $(TILESETGFXDIR)/secondary/dummy_1/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 2 + $(GFX) $< $@ -num_tiles 2 -Wnum_tiles $(TILESETGFXDIR)/secondary/generic_building_1/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 63 + $(GFX) $< $@ -num_tiles 63 -Wnum_tiles $(TILESETGFXDIR)/secondary/hoenn_building/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 383 + $(GFX) $< $@ -num_tiles 383 -Wnum_tiles $(TILESETGFXDIR)/secondary/vermilion_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 247 + $(GFX) $< $@ -num_tiles 247 -Wnum_tiles $(TILESETGFXDIR)/secondary/ss_anne/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 245 + $(GFX) $< $@ -num_tiles 245 -Wnum_tiles $(TILESETGFXDIR)/secondary/rock_tunnel/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 256 + $(GFX) $< $@ -num_tiles 256 -Wnum_tiles $(TILESETGFXDIR)/secondary/cerulean_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 246 + $(GFX) $< $@ -num_tiles 246 -Wnum_tiles $(TILESETGFXDIR)/secondary/sea_cottage/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 68 + $(GFX) $< $@ -num_tiles 68 -Wnum_tiles $(TILESETGFXDIR)/secondary/safari_zone_building/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 90 + $(GFX) $< $@ -num_tiles 90 -Wnum_tiles $(TILESETGFXDIR)/secondary/fan_club_daycare/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 85 + $(GFX) $< $@ -num_tiles 85 -Wnum_tiles $(TILESETGFXDIR)/secondary/dummy_4/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 2 + $(GFX) $< $@ -num_tiles 2 -Wnum_tiles $(TILESETGFXDIR)/secondary/tanoby_ruins/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 74 + $(GFX) $< $@ -num_tiles 74 -Wnum_tiles $(TILESETGFXDIR)/secondary/trainer_tower/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 343 + $(GFX) $< $@ -num_tiles 343 -Wnum_tiles $(TILESETGFXDIR)/secondary/cerulean_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 158 + $(GFX) $< $@ -num_tiles 158 -Wnum_tiles $(TILESETGFXDIR)/secondary/fuchsia_city/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 191 + $(GFX) $< $@ -num_tiles 191 -Wnum_tiles $(TILESETGFXDIR)/secondary/mart/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 36 + $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(TILESETGFXDIR)/secondary/museum/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 137 + $(GFX) $< $@ -num_tiles 137 -Wnum_tiles $(TILESETGFXDIR)/secondary/lab/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 102 + $(GFX) $< $@ -num_tiles 102 -Wnum_tiles $(TILESETGFXDIR)/secondary/game_corner/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 171 + $(GFX) $< $@ -num_tiles 171 -Wnum_tiles $(TILESETGFXDIR)/secondary/celadon_gym/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 103 + $(GFX) $< $@ -num_tiles 103 -Wnum_tiles $(TILESETGFXDIR)/secondary/dummy_2/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 2 + $(GFX) $< $@ -num_tiles 2 -Wnum_tiles $(TILESETGFXDIR)/secondary/digletts_cave/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 248 + $(GFX) $< $@ -num_tiles 248 -Wnum_tiles $(TILESETGFXDIR)/secondary/department_store/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 201 + $(GFX) $< $@ -num_tiles 201 -Wnum_tiles $(TILESETGFXDIR)/secondary/pokemon_mansion/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 350 + $(GFX) $< $@ -num_tiles 350 -Wnum_tiles $(TILESETGFXDIR)/secondary/condominiums/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 384 + $(GFX) $< $@ -num_tiles 384 -Wnum_tiles $(TILESETGFXDIR)/secondary/mt_ember/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 288 + $(GFX) $< $@ -num_tiles 288 -Wnum_tiles $(TILESETGFXDIR)/secondary/sevii_islands_123/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 374 + $(GFX) $< $@ -num_tiles 374 -Wnum_tiles $(TILESETGFXDIR)/secondary/island_harbor/tiles.4bpp: %.4bpp: %.png - $(GFX) $< $@ -num_tiles 165 + $(GFX) $< $@ -num_tiles 165 -Wnum_tiles From d055ebad83ed1dd97697a9b81155054e4721e76f Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 27 Oct 2022 14:36:40 -0400 Subject: [PATCH 3/3] Document item_case --- include/item.h | 6 +- include/strings.h | 4 +- include/tm_case.h | 22 +- src/berry_pouch.c | 16 +- src/data/items.json | 750 +++++++++++++------------- src/data/items.json.txt | 2 +- src/item.c | 12 +- src/item_menu.c | 26 +- src/item_use.c | 4 +- src/party_menu.c | 2 +- src/shop.c | 10 +- src/strings.c | 4 +- src/tm_case.c | 1105 +++++++++++++++++++++++---------------- 13 files changed, 1086 insertions(+), 877 deletions(-) diff --git a/include/item.h b/include/item.h index e58348a78..1271e0d00 100644 --- a/include/item.h +++ b/include/item.h @@ -14,7 +14,7 @@ struct Item u8 holdEffectParam; const u8 *description; u8 importance; - u8 exitsBagOnUse; + u8 registrability; u8 pocket; u8 type; // unused for balls ItemUseFunc fieldUseFunc; @@ -69,7 +69,7 @@ ItemUseFunc ItemId_GetFieldFunc(u16 itemId); u8 ItemId_GetBattleUsage(u16 itemId); ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); -u16 itemid_get_market_price(u16 itemId); +u16 ItemId_GetPrice(u16 itemId); void ClearBag(void); void ClearPCItemSlots(void); void TrySetObtainedItemQuestLogEvent(u16 itemId); @@ -79,7 +79,7 @@ void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket); u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 itemId); u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 itemId); u16 BagGetQuantityByItemId(u16 item); -bool8 itemid_is_unique(u16 itemId); +u8 ItemId_GetImportance(u16 itemId); void BagPocketCompaction(struct ItemSlot * slots, u8 capacity); u16 GetPcItemQuantity(u16 *); void SetBagPocketsPointers(void); diff --git a/include/strings.h b/include/strings.h index 222ed935d..c6df3df91 100644 --- a/include/strings.h +++ b/include/strings.h @@ -103,8 +103,8 @@ extern const u8 gText_ItemCantBeHeld[]; extern const u8 gText_TMCase[]; extern const u8 gText_Close[]; extern const u8 gText_TMCaseWillBePutAway[]; -extern const u8 gText_FontSize0[]; -extern const u8 gText_FontSize2[]; +extern const u8 gText_Font0[]; +extern const u8 gText_Font2[]; extern const u8 gText_OhNoICantBuyThat[]; extern const u8 gText_HowManyWouldYouLikeToSell[]; extern const u8 gText_ICanPayThisMuch_WouldThatBeOkay[]; diff --git a/include/tm_case.h b/include/tm_case.h index 22fb021e0..b940596f2 100644 --- a/include/tm_case.h +++ b/include/tm_case.h @@ -1,17 +1,21 @@ #ifndef GUARD_TM_CASE_H #define GUARD_TM_CASE_H -enum TmCaseType -{ - TMCASE_FROMFIELD, - TMCASE_FROMPARTYGIVE, - TMCASE_FROMMARTSELL, - TMCASE_FROMPOKEMONSTORAGEPC, - TMCASE_FROMBATTLE, - TMCASE_NA +// Values for 'type' argument to InitTMCase +enum { + TMCASE_FIELD, + TMCASE_GIVE_PARTY, + TMCASE_SELL, + TMCASE_GIVE_PC, + TMCASE_POKEDUDE, + TMCASE_REOPENING, }; -void InitTMCase(u8 a0, void (* a1)(void), u8 a2); +// Alternative value for 'allowSelectClose' argument to InitTMCase. +// Indicates that the previous value should be preserved +#define TMCASE_KEEP_PREV 0xFF + +void InitTMCase(u8 type, void (* exitCallback)(void), bool8 allowSelectClose); void ResetTMCaseCursorPos(void); void Pokedude_InitTMCase(void); diff --git a/src/berry_pouch.c b/src/berry_pouch.c index b18e0cd4a..2baf367de 100644 --- a/src/berry_pouch.c +++ b/src/berry_pouch.c @@ -684,13 +684,13 @@ static void SetUpListMenuTemplate(void) static void GetBerryNameAndIndexForMenu(u8 * dest, u16 itemId) { - StringCopy(gStringVar4, gText_FontSize0); + StringCopy(gStringVar4, gText_Font0); StringAppend(gStringVar4, gText_NumberClear01); ConvertIntToDecimalStringN(gStringVar1, itemId - FIRST_BERRY_INDEX + 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringAppend(gStringVar4, gStringVar1); CopyItemName(itemId, gStringVar1); StringAppend(gStringVar4, sText_Space); - StringAppend(gStringVar4, gText_FontSize2); + StringAppend(gStringVar4, gText_Font2); StringAppend(gStringVar4, gStringVar1); StringCopy(dest, gStringVar4); } @@ -1265,7 +1265,7 @@ static void Task_ContextMenu_FromPokemonPC(u8 taskId) static void Task_ContextMenu_Sell(u8 taskId) { s16 * data = gTasks[taskId].data; - if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); @@ -1293,7 +1293,7 @@ static void Task_ContextMenu_Sell(u8 taskId) static void Task_AskSellMultiple(u8 taskId) { s16 * data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_SellMultiple_CreateYesNoMenu); } @@ -1323,7 +1323,7 @@ static void Task_Sell_PrintSelectMultipleUI(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); BerryPouchPrint(windowId, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); - SellMultiple_UpdateSellPriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); + SellMultiple_UpdateSellPriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); PrintMoneyInWin2(); CreateScrollIndicatorArrows_SellQuantity(); gTasks[taskId].func = Task_Sell_SelectMultiple; @@ -1340,7 +1340,7 @@ static void Task_Sell_SelectMultiple(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { PrintxQuantityOnWindow(1, data[8], 2); - SellMultiple_UpdateSellPriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); + SellMultiple_UpdateSellPriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); } else if (JOY_NEW(A_BUTTON)) { @@ -1373,7 +1373,7 @@ static void Task_SellYes(u8 taskId) PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); DisplayItemMessageInBerryPouch(taskId, FONT_2, gStringVar4, Task_SellBerries_PlaySfxAndRemoveBerries); } @@ -1383,7 +1383,7 @@ static void Task_SellBerries_PlaySfxAndRemoveBerries(u8 taskId) s16 * data = gTasks[taskId].data; PlaySE(SE_SHOP); RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * data[8]); RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); DestroyListMenuTask(data[0], &sStaticCnt.listMenuScrollOffset, &sStaticCnt.listMenuSelectedRow); SortAndCountBerries(); diff --git a/src/data/items.json b/src/data/items.json index 9527febe7..25c9056ff 100644 --- a/src/data/items.json +++ b/src/data/items.json @@ -8,7 +8,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -24,7 +24,7 @@ "holdEffectParam": 0, "description_english": "The best BALL with the ultimate\\nperformance. It will catch any wild\\nPOKéMON without fail.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 0, "fieldUseFunc": "NULL", @@ -40,7 +40,7 @@ "holdEffectParam": 0, "description_english": "A very high-grade BALL that offers\\na higher POKéMON catch rate than\\na GREAT BALL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 1, "fieldUseFunc": "NULL", @@ -56,7 +56,7 @@ "holdEffectParam": 0, "description_english": "A good, quality BALL that offers\\na higher POKéMON catch rate than\\na standard POKé BALL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 2, "fieldUseFunc": "NULL", @@ -72,7 +72,7 @@ "holdEffectParam": 0, "description_english": "A BALL thrown to catch a wild\\nPOKéMON. It is designed in a\\ncapsule style.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 3, "fieldUseFunc": "NULL", @@ -88,7 +88,7 @@ "holdEffectParam": 0, "description_english": "A special BALL that is used only in\\nthe SAFARI ZONE. It is finished in\\na camouflage pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 4, "fieldUseFunc": "NULL", @@ -104,7 +104,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on WATER- and\\nBUG-type POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 5, "fieldUseFunc": "NULL", @@ -120,7 +120,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on POKéMON\\ndeep in the sea.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 6, "fieldUseFunc": "NULL", @@ -136,7 +136,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on weaker\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 7, "fieldUseFunc": "NULL", @@ -152,7 +152,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on POKéMON\\ncaught before.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 8, "fieldUseFunc": "NULL", @@ -168,7 +168,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nbecomes progressively better the\\nmore turns there are in a battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 9, "fieldUseFunc": "NULL", @@ -184,7 +184,7 @@ "holdEffectParam": 0, "description_english": "A comfortable BALL that makes a\\ncaptured wild POKéMON quickly grow\\nfriendly.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 10, "fieldUseFunc": "NULL", @@ -200,7 +200,7 @@ "holdEffectParam": 0, "description_english": "A rare BALL that has been\\nspecially made to commemorate an\\nevent of some sort.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 11, "fieldUseFunc": "NULL", @@ -216,7 +216,7 @@ "holdEffectParam": 20, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 20 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -232,7 +232,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON from a\\npoisoning.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -248,7 +248,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON of a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -264,7 +264,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt defrosts a frozen POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -280,7 +280,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt awakens a sleeping POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -296,7 +296,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON from\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -312,7 +312,7 @@ "holdEffectParam": 255, "description_english": "A medicine that fully restores the\\nHP and heals any status problems\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -328,7 +328,7 @@ "holdEffectParam": 255, "description_english": "A spray-type wound medicine.\\nIt fully restores the HP of one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -344,7 +344,7 @@ "holdEffectParam": 200, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 200 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -360,7 +360,7 @@ "holdEffectParam": 50, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -376,7 +376,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -392,7 +392,7 @@ "holdEffectParam": 0, "description_english": "A medicine that revives a fainted\\nPOKéMON, restoring HP by half the\\nmaximum amount.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -408,7 +408,7 @@ "holdEffectParam": 0, "description_english": "A medicine that revives a fainted\\nPOKéMON, restoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -424,7 +424,7 @@ "holdEffectParam": 50, "description_english": "Water with a high mineral content.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -440,7 +440,7 @@ "holdEffectParam": 60, "description_english": "A fizzy soda drink.\\nIt restores the HP of one POKéMON\\nby 60 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -456,7 +456,7 @@ "holdEffectParam": 80, "description_english": "A very sweet drink.\\nIt restores the HP of one POKéMON\\nby 80 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -472,7 +472,7 @@ "holdEffectParam": 100, "description_english": "Highly nutritious milk.\\nIt restores the HP of one POKéMON\\nby 100 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -488,7 +488,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicine powder.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -504,7 +504,7 @@ "holdEffectParam": 0, "description_english": "A very bitter root.\\nIt restores the HP of one POKéMON\\nby 200 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -520,7 +520,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicine powder.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -536,7 +536,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicinal herb.\\nIt revives a fainted POKéMON,\\nrestoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -552,7 +552,7 @@ "holdEffectParam": 10, "description_english": "Restores a selected move's PP by\\n10 points for one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -568,7 +568,7 @@ "holdEffectParam": 255, "description_english": "Fully restores a selected move's PP\\nfor one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -584,7 +584,7 @@ "holdEffectParam": 10, "description_english": "Restores the PP of all moves for\\none POKéMON by 10 points each.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -600,7 +600,7 @@ "holdEffectParam": 255, "description_english": "Fully restores the PP of all moves\\nfor one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -616,7 +616,7 @@ "holdEffectParam": 0, "description_english": "LAVARIDGE TOWN's local specialty.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -632,7 +632,7 @@ "holdEffectParam": 0, "description_english": "A blue glass flute that awakens\\na sleeping POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -648,7 +648,7 @@ "holdEffectParam": 0, "description_english": "A yellow glass flute that snaps one\\nPOKéMON out of confusion.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -664,7 +664,7 @@ "holdEffectParam": 0, "description_english": "A red glass flute that snaps one\\nPOKéMON out of infatuation.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -680,7 +680,7 @@ "holdEffectParam": 50, "description_english": "A black glass flute.\\nWhen blown, it makes wild POKéMON\\nless likely to appear.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_BlackWhiteFlute", @@ -696,7 +696,7 @@ "holdEffectParam": 150, "description_english": "A white glass flute.\\nWhen blown, it makes wild POKéMON\\nmore likely to appear.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_BlackWhiteFlute", @@ -712,7 +712,7 @@ "holdEffectParam": 20, "description_english": "A 100% pure juice.\\nIt restores the HP of one POKéMON\\nby 20 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -728,7 +728,7 @@ "holdEffectParam": 0, "description_english": "Revives all fainted POKéMON,\\nrestoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_SacredAsh", @@ -744,7 +744,7 @@ "holdEffectParam": 0, "description_english": "Pure salt obtained from deep inside\\nthe SHOAL CAVE. It is extremely\\nsalty.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -760,7 +760,7 @@ "holdEffectParam": 0, "description_english": "A pretty seashell found deep inside\\nthe SHOAL CAVE. It is striped in\\nblue and white.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -776,7 +776,7 @@ "holdEffectParam": 0, "description_english": "A small red shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -792,7 +792,7 @@ "holdEffectParam": 0, "description_english": "A small blue shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -808,7 +808,7 @@ "holdEffectParam": 0, "description_english": "A small yellow shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -824,7 +824,7 @@ "holdEffectParam": 0, "description_english": "A small green shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -840,7 +840,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -856,7 +856,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -872,7 +872,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -888,7 +888,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -904,7 +904,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -920,7 +920,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -936,7 +936,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -952,7 +952,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -968,7 +968,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -984,7 +984,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1000,7 +1000,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1016,7 +1016,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base HP of one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1032,7 +1032,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base ATTACK stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1048,7 +1048,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base DEFENSE stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1064,7 +1064,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SPEED stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1080,7 +1080,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SP. ATK stat\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1096,7 +1096,7 @@ "holdEffectParam": 0, "description_english": "A candy that is packed with energy.\\nIt raises the level of a POKéMON\\nby one.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_RareCandy", @@ -1112,7 +1112,7 @@ "holdEffectParam": 0, "description_english": "Slightly raises the maximum PP of\\na selected move for one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_PpUp", @@ -1128,7 +1128,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SP. DEF stat\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1144,7 +1144,7 @@ "holdEffectParam": 0, "description_english": "Raises the PP of a selected move\\nto its maximum level for one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_PpUp", @@ -1160,7 +1160,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1176,7 +1176,7 @@ "holdEffectParam": 0, "description_english": "An item that prevents stat reduction\\namong party POKéMON for five turns\\nafter use.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1192,7 +1192,7 @@ "holdEffectParam": 0, "description_english": "Raises the critical-hit ratio of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1208,7 +1208,7 @@ "holdEffectParam": 0, "description_english": "Raises the ATTACK stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1224,7 +1224,7 @@ "holdEffectParam": 0, "description_english": "Raises the DEFENSE stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1240,7 +1240,7 @@ "holdEffectParam": 0, "description_english": "Raises the SPEED stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1256,7 +1256,7 @@ "holdEffectParam": 0, "description_english": "Raises the accuracy stat of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1272,7 +1272,7 @@ "holdEffectParam": 0, "description_english": "Raises the SP. ATK stat of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1288,7 +1288,7 @@ "holdEffectParam": 0, "description_english": "An attractive doll.\\nUse it to flee from any battle with\\na wild POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1304,7 +1304,7 @@ "holdEffectParam": 0, "description_english": "An attractive item.\\nUse it to flee from any battle with\\na wild POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1320,7 +1320,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1336,7 +1336,7 @@ "holdEffectParam": 200, "description_english": "Prevents weak wild POKéMON from\\nappearing for 200 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1352,7 +1352,7 @@ "holdEffectParam": 250, "description_english": "Prevents weak wild POKéMON from\\nappearing for 250 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1368,7 +1368,7 @@ "holdEffectParam": 0, "description_english": "A long, durable rope.\\nUse it to escape instantly from a\\ncave or a dungeon.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "ItemUseOutOfBattle_EscapeRope", @@ -1384,7 +1384,7 @@ "holdEffectParam": 100, "description_english": "Prevents weak wild POKéMON from\\nappearing for 100 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1400,7 +1400,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1416,7 +1416,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1432,7 +1432,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1448,7 +1448,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1464,7 +1464,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1480,7 +1480,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1496,7 +1496,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is as red as the sun.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1512,7 +1512,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is as black as the night sky.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1528,7 +1528,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is colored orange.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1544,7 +1544,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt has a thunderbolt pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1560,7 +1560,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is a clear light blue.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1576,7 +1576,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt has a leaf pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1592,7 +1592,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1608,7 +1608,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1624,7 +1624,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1640,7 +1640,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1656,7 +1656,7 @@ "holdEffectParam": 0, "description_english": "A small and rare mushroom.\\nIt is quite popular among certain\\npeople.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1672,7 +1672,7 @@ "holdEffectParam": 0, "description_english": "A large and rare mushroom.\\nIt is very popular among certain\\npeople.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1688,7 +1688,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1704,7 +1704,7 @@ "holdEffectParam": 0, "description_english": "A relatively small pearl that\\nsparkles in a pretty silver color.\\nIt can be sold cheaply.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1720,7 +1720,7 @@ "holdEffectParam": 0, "description_english": "A quite-large pearl that sparkles\\nin a pretty silver color.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1736,7 +1736,7 @@ "holdEffectParam": 0, "description_english": "A pretty red sand with a loose,\\nsilky feel.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1752,7 +1752,7 @@ "holdEffectParam": 0, "description_english": "A shard of a pretty gem that\\nsparkles in a red color.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1768,7 +1768,7 @@ "holdEffectParam": 0, "description_english": "A nugget of pure gold that gives\\noff a lustrous gleam.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1784,7 +1784,7 @@ "holdEffectParam": 0, "description_english": "A pretty, heart-shaped scale that\\nis extremely rare. It glows faintly\\nin the colors of a rainbow.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1800,7 +1800,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1816,7 +1816,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1832,7 +1832,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1848,7 +1848,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1864,7 +1864,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1880,7 +1880,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1896,7 +1896,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1912,7 +1912,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1928,7 +1928,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1944,7 +1944,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nZIGZAGOON print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1960,7 +1960,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nWINGULL print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1976,7 +1976,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nPIKACHU print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1992,7 +1992,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nMAGNEMITE print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2008,7 +2008,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nSLAKOTH print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2024,7 +2024,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nWAILMER print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2040,7 +2040,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL to be held by a\\nPOKéMON. It will bear the print of\\nthe POKéMON holding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2056,7 +2056,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nDUSKULL print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2072,7 +2072,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nBELLOSSOM print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2088,7 +2088,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL to be held by a\\nPOKéMON. It will bear the print of\\nthe POKéMON holding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2104,7 +2104,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a\\ngorgeous, extravagant print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2120,7 +2120,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a print\\nof three cute POKéMON.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2136,7 +2136,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal paralysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2152,7 +2152,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to wake up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2168,7 +2168,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to cure poison.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2184,7 +2184,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2200,7 +2200,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle for defrosting.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2216,7 +2216,7 @@ "holdEffectParam": 10, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 10 PP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -2232,7 +2232,7 @@ "holdEffectParam": 10, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 10 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2248,7 +2248,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to lift confusion.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2264,7 +2264,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal any problem.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2280,7 +2280,7 @@ "holdEffectParam": 30, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 30 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2296,7 +2296,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2312,7 +2312,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2328,7 +2328,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2344,7 +2344,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2360,7 +2360,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2376,7 +2376,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2392,7 +2392,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2408,7 +2408,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2424,7 +2424,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2440,7 +2440,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2456,7 +2456,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2472,7 +2472,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2488,7 +2488,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2504,7 +2504,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2520,7 +2520,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2536,7 +2536,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2552,7 +2552,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2568,7 +2568,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2584,7 +2584,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2600,7 +2600,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2616,7 +2616,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2632,7 +2632,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2648,7 +2648,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2664,7 +2664,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2680,7 +2680,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2696,7 +2696,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe ATTACK stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2712,7 +2712,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe DEFENSE stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2728,7 +2728,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SPEED stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2744,7 +2744,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SP. ATK stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2760,7 +2760,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SP. DEF stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2776,7 +2776,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe critical-hit ratio in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2792,7 +2792,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it sharply\\nraises one stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2808,7 +2808,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "ItemUseOutOfBattle_EnigmaBerry", @@ -2824,7 +2824,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2840,7 +2840,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2856,7 +2856,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2872,7 +2872,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt casts a tricky glare that lowers\\nthe opponent's accuracy.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2888,7 +2888,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt restores any lowered stat in\\nbattle. It can be used only once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2904,7 +2904,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt promotes strong growth but\\nlowers SPEED while it is held.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2920,7 +2920,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holder gets a share of EXP.\\npoints without having to battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2936,7 +2936,7 @@ "holdEffectParam": 20, "description_english": "An item to be held by a POKéMON.\\nA light and sharp claw. The holder\\nmay be able to strike first.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2952,7 +2952,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA bell with a comforting chime that\\nmakes the holder calm and friendly.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2968,7 +2968,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt snaps the holder out of\\ninfatuation. It can be used once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2984,7 +2984,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt powers up one move, which\\nbecomes the only usable one.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3000,7 +3000,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt may cause the foe to flinch\\nupon taking damage.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3016,7 +3016,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA shiny silver powder that boosts\\nthe power of BUG-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3032,7 +3032,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt doubles the battle money if the\\nholding POKéMON takes part.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3048,7 +3048,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt repels wild POKéMON if the\\nholder is first in the party.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3064,7 +3064,7 @@ "holdEffectParam": 0, "description_english": "An orb to be held by a LATIOS or\\nLATIAS. It raises the SP. ATK\\nand SP. DEF stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3080,7 +3080,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA fang that gleams a sharp silver.\\nIt raises the SP. ATK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3096,7 +3096,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA scale that shines a faint pink.\\nIt raises the SP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3112,7 +3112,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON can flee from\\nany wild POKéMON for sure.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3128,7 +3128,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON is prevented\\nfrom evolving.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3144,7 +3144,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON may endure an\\nattack, leaving just 1 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3160,7 +3160,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nAn egg filled with happiness that\\nearns extra EXP. points in battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3176,7 +3176,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA lens that boosts the critical-hit\\nratio of the holding POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3192,7 +3192,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA special metallic film that boosts\\nthe power of STEEL-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3208,7 +3208,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON gradually\\nregains HP during battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3224,7 +3224,7 @@ "holdEffectParam": 10, "description_english": "A thick and tough scale.\\nA DRAGON-type POKéMON may be\\nholding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3240,7 +3240,7 @@ "holdEffectParam": 0, "description_english": "An orb to be held by a PIKACHU\\nthat raises the SP. ATK stat.\\nTouching it may cause a shock.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3256,7 +3256,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA loose, silky sand that boosts the\\npower of GROUND-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3272,7 +3272,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nAn unbreakable stone that boosts\\nthe power of ROCK-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3288,7 +3288,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA seed imbued with life that boosts\\nthe power of GRASS-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3304,7 +3304,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA shady-looking pair of glasses\\nthat boosts DARK-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3320,7 +3320,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA belt that boosts determination\\nand FIGHTING-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3336,7 +3336,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA powerful magnet that boosts the\\npower of ELECTRIC-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3352,7 +3352,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA teardrop-shaped gem that boosts\\nthe power of WATER-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3368,7 +3368,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA long, sharp beak that boosts the\\npower of FLYING-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3384,7 +3384,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA small, poisonous barb that boosts\\nthe power of POISON-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3400,7 +3400,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA piece of ice that repels heat\\nand boosts ICE-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3416,7 +3416,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA sinister, eerie tag that boosts\\nGHOST-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3432,7 +3432,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA spoon imbued with telekinetic\\npower boosts PSYCHIC-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3448,7 +3448,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA combustible fuel that boosts the\\npower of FIRE-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3464,7 +3464,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA hard and sharp fang that boosts\\nthe power of DRAGON-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3480,7 +3480,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA sumptuous scarf that boosts the\\npower of NORMAL-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3496,7 +3496,7 @@ "holdEffectParam": 0, "description_english": "A transparent device filled with all\\nsorts of data.\\nIt is made by SILPH CO.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3512,7 +3512,7 @@ "holdEffectParam": 8, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON regains some\\nHP upon striking the foe.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3528,7 +3528,7 @@ "holdEffectParam": 5, "description_english": "An item to be held by a POKéMON.\\nIt slightly boosts the power of\\nWATER-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3544,7 +3544,7 @@ "holdEffectParam": 5, "description_english": "An item to be held by a POKéMON.\\nIts tricky aroma slightly reduces\\nthe foe's accuracy.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3560,7 +3560,7 @@ "holdEffectParam": 0, "description_english": "A glove to be held by a CHANSEY.\\nIt raises CHANSEY's critical-hit\\nratio.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3576,7 +3576,7 @@ "holdEffectParam": 0, "description_english": "A fine, hard powder to be held by\\na DITTO.\\nIt raises DITTO's DEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3592,7 +3592,7 @@ "holdEffectParam": 0, "description_english": "A hard bone of some sort to be\\nheld by a CUBONE or MAROWAK.\\nIt raises the ATTACK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3608,7 +3608,7 @@ "holdEffectParam": 0, "description_english": "A stick of leek to be held by a\\nFARFETCH'D. It raises FARFETCH'D's\\ncritical-hit ratio.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3624,7 +3624,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3640,7 +3640,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3656,7 +3656,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3672,7 +3672,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3688,7 +3688,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3704,7 +3704,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3720,7 +3720,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3736,7 +3736,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3752,7 +3752,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3768,7 +3768,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3784,7 +3784,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3800,7 +3800,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3816,7 +3816,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3832,7 +3832,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3848,7 +3848,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3864,7 +3864,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3880,7 +3880,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3896,7 +3896,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3912,7 +3912,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3928,7 +3928,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3944,7 +3944,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3960,7 +3960,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3976,7 +3976,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3992,7 +3992,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4008,7 +4008,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4024,7 +4024,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4040,7 +4040,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4056,7 +4056,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4072,7 +4072,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nCOOL condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4088,7 +4088,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nBEAUTY condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4104,7 +4104,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nCUTE condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4120,7 +4120,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nSMART condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4136,7 +4136,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nTOUGH condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4152,7 +4152,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that is at least\\ntwice as fast as walking.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -4168,7 +4168,7 @@ "holdEffectParam": 0, "description_english": "A case for holding COINS obtained\\nat the GAME CORNER.\\nIt holds up to 9,999 COINS.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_CoinCase", @@ -4184,7 +4184,7 @@ "holdEffectParam": 0, "description_english": "A device used for finding items.\\nIf there is a hidden item nearby\\nwhen it is used, it emits a signal.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "ItemUseOutOfBattle_Itemfinder", @@ -4200,7 +4200,7 @@ "holdEffectParam": 0, "description_english": "An old and beat-up fishing rod.\\nUse it by any body of water to \\nfish for wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4216,7 +4216,7 @@ "holdEffectParam": 0, "description_english": "A new, good-quality fishing rod.\\nUse it by any body of water to \\nfish for wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4232,7 +4232,7 @@ "holdEffectParam": 0, "description_english": "An awesome, high-tech fishing rod.\\nUse it by any body of water to fish\\nfor wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4248,7 +4248,7 @@ "holdEffectParam": 0, "description_english": "The ticket required for sailing on\\nthe ferry S.S. ANNE.\\nIt has a drawing of a ship on it.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4264,7 +4264,7 @@ "holdEffectParam": 0, "description_english": "The pass required for entering\\nPOKéMON CONTESTS. It has a\\ndrawing of an award ribbon on it.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4280,7 +4280,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4296,7 +4296,7 @@ "holdEffectParam": 0, "description_english": "A nifty watering pail.\\nUse it to promote strong growth in\\nBERRIES planted in soft soil.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4312,7 +4312,7 @@ "holdEffectParam": 0, "description_english": "A package that contains mechanical\\nparts of some sort made by the\\nDEVON CORPORATION.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4328,7 +4328,7 @@ "holdEffectParam": 0, "description_english": "A sack used to collect volcanic\\nash automatically during walks\\nover deep ash.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4344,7 +4344,7 @@ "holdEffectParam": 0, "description_english": "The key to NEW MAUVILLE, which\\nwas constructed beneath MAUVILLE\\nCITY.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4360,7 +4360,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that is capable\\nof stunts like jumps and wheelies.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -4376,7 +4376,7 @@ "holdEffectParam": 0, "description_english": "A case for holding {POKEBLOCK}S made\\nwith a BERRY BLENDER. It releases\\none {POKEBLOCK} when shaken.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4392,7 +4392,7 @@ "holdEffectParam": 0, "description_english": "An extremely important letter to\\nSTEVEN from the PRESIDENT of the\\nDEVON CORPORATION.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4408,7 +4408,7 @@ "holdEffectParam": 0, "description_english": "The ticket required for sailing on a\\nferry to a distant southern island.\\nIt features a drawing of an island.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4424,7 +4424,7 @@ "holdEffectParam": 0, "description_english": "An orb that glows red.\\nIt is said to contain an incredible\\npower from ancient times.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4440,7 +4440,7 @@ "holdEffectParam": 0, "description_english": "An orb that glows blue.\\nIt is said to contain an incredible\\npower from ancient times.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4456,7 +4456,7 @@ "holdEffectParam": 0, "description_english": "A device used to search for\\nlife-forms in water.\\nIt looks too difficult to use.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4472,7 +4472,7 @@ "holdEffectParam": 0, "description_english": "A pair of protective goggles.\\nThey enable a TRAINER to travel\\nthrough even desert sandstorms.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4488,7 +4488,7 @@ "holdEffectParam": 0, "description_english": "A meteorite that fell from space\\nonto MT. MOON long ago.\\nIt is very lumpy and hard.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4504,7 +4504,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n1 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4520,7 +4520,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n2 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4536,7 +4536,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n4 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4552,7 +4552,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n6 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4568,7 +4568,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the storage hold\\ninside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4584,7 +4584,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a plant root.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4600,7 +4600,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a claw.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4616,7 +4616,7 @@ "holdEffectParam": 0, "description_english": "A scope that signals the presence\\nof any unseeable POKéMON.\\nIt is made by the DEVON CORP.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4632,7 +4632,7 @@ "holdEffectParam": 0, "description_english": "An extremely powerful attack.\\nHowever, if the user is hit before\\nusing the move, they will flinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4649,7 +4649,7 @@ "holdEffectParam": 0, "description_english": "Sharp, huge claws hook and slash\\nthe foe quickly and with great\\npower.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4666,7 +4666,7 @@ "holdEffectParam": 0, "description_english": "The foe is hit with a pulsing blast\\nof water. It may also confuse the\\ntarget.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4683,7 +4683,7 @@ "holdEffectParam": 0, "description_english": "The user calms its spirit and\\nfocuses its mind to raise its\\nSP. ATK and SP. DEF stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4700,7 +4700,7 @@ "holdEffectParam": 0, "description_english": "A savage roar that causes the foe\\nto switch out of battle. In the\\nwild, ROAR ends the battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4717,7 +4717,7 @@ "holdEffectParam": 0, "description_english": "A move that leaves the foe badly\\npoisoned. Its poison damage worsens\\nevery turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4734,7 +4734,7 @@ "holdEffectParam": 0, "description_english": "Summons a hailstorm that lasts for\\nfive turns. The hailstorm damages\\nall types except the ICE type.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4751,7 +4751,7 @@ "holdEffectParam": 0, "description_english": "The user tightens all its muscles\\nand bulks up, boosting both its\\nATTACK and DEFENSE stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4768,7 +4768,7 @@ "holdEffectParam": 0, "description_english": "The user shoots seeds at the foe\\nin rapid succession. Two to five\\nseeds are shot at once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4785,7 +4785,7 @@ "holdEffectParam": 0, "description_english": "A variable move that changes type\\nand power depending on the POKéMON\\nusing it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4802,7 +4802,7 @@ "holdEffectParam": 0, "description_english": "The weather is turned sunny for\\nfive turns. Over that time, FIRE-\\ntype moves are powered up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4819,7 +4819,7 @@ "holdEffectParam": 0, "description_english": "A taunted foe may become enraged.\\nIt will then only be able to use\\nattack moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4836,7 +4836,7 @@ "holdEffectParam": 0, "description_english": "An icy-cold beam is shot at the\\nfoe. It may leave the target\\nfrozen.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4853,7 +4853,7 @@ "holdEffectParam": 0, "description_english": "A vicious snow-and-wind attack that\\nstrikes all foes in battle. It may\\ncause freezing.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4870,7 +4870,7 @@ "holdEffectParam": 0, "description_english": "A harsh attack that inflicts severe\\ndamage on the foe. However, the\\nuser must rest the next turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4887,7 +4887,7 @@ "holdEffectParam": 0, "description_english": "A wall of light is created over\\nfive turns. It reduces damage from\\nSP. ATK attacks.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4904,7 +4904,7 @@ "holdEffectParam": 0, "description_english": "The user is completely protected\\nfrom attack in the turn it is used.\\nIt may fail if used in succession.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4921,7 +4921,7 @@ "holdEffectParam": 0, "description_english": "A heavy rain is summoned for five\\nturns. Over that time, WATER-type\\nmoves are powered up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4938,7 +4938,7 @@ "holdEffectParam": 0, "description_english": "The user strikes the foe with\\ntentacles or roots, stealing the\\ntarget's HP and healing itself.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4955,7 +4955,7 @@ "holdEffectParam": 0, "description_english": "Protects the party with a shield\\nagainst all status problems over\\nfive turns.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4972,7 +4972,7 @@ "holdEffectParam": 0, "description_english": "This attack move grows more\\npowerful the more the POKéMON\\ndislikes its TRAINER.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4989,7 +4989,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack that uses the first\\nturn for absorbing sunlight, then\\nblasting the foe in the next turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5006,7 +5006,7 @@ "holdEffectParam": 0, "description_english": "The foe is slammed with a sturdy\\ntail of steel. It may lower the\\ntarget's DEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5023,7 +5023,7 @@ "holdEffectParam": 0, "description_english": "A massive jolt of electricity is\\nlaunched at the foe. It may cause\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5040,7 +5040,7 @@ "holdEffectParam": 0, "description_english": "Strikes the foe with a huge\\nthunderbolt. It may cause\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5057,7 +5057,7 @@ "holdEffectParam": 0, "description_english": "Causes an earthquake that strikes\\nall POKéMON in battle, excluding\\nthe user.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5074,7 +5074,7 @@ "holdEffectParam": 0, "description_english": "This attack move grows more\\npowerful the more the POKéMON\\nlikes its TRAINER.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5091,7 +5091,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack in which the user\\ndigs underground, then strikes.\\nIt can be used to exit dungeons.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5108,7 +5108,7 @@ "holdEffectParam": 0, "description_english": "A powerful blast of telekinetic\\nenergy strikes the foe. It may\\nlower the target's SP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5125,7 +5125,7 @@ "holdEffectParam": 0, "description_english": "The foe is attacked with a shadowy\\nlump. It may lower the target's\\nSP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5142,7 +5142,7 @@ "holdEffectParam": 0, "description_english": "Strikes the foe with a rock-hard\\nfist, etc. It shatters barriers such\\nas REFLECT and LIGHT SCREEN.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5159,7 +5159,7 @@ "holdEffectParam": 0, "description_english": "The user begins moving so quickly\\nthat it creates illusory copies to\\nraise its evasiveness.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5176,7 +5176,7 @@ "holdEffectParam": 0, "description_english": "A tough barrier is put up over five\\nturns. It reduces damage from\\nphysical attacks over that time.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5193,7 +5193,7 @@ "holdEffectParam": 0, "description_english": "A rapid jolt of electricity strikes\\nthe foe. This attack is impossible\\nto evade.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5210,7 +5210,7 @@ "holdEffectParam": 0, "description_english": "The foe is roasted with a heavy\\nblast of fire. It may leave the\\ntarget with a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5227,7 +5227,7 @@ "holdEffectParam": 0, "description_english": "Toxic sludge is hurled at the foe\\nwith great force. It may also\\npoison the target.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5244,7 +5244,7 @@ "holdEffectParam": 0, "description_english": "Summons a sandstorm that lasts for\\nfive turns. It damages all types\\nexcept ROCK, GROUND, and STEEL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5261,7 +5261,7 @@ "holdEffectParam": 0, "description_english": "The foe is incinerated with an\\nintense flame. It may leave the\\ntarget with a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5278,7 +5278,7 @@ "holdEffectParam": 0, "description_english": "Boulders are hurled at the foe.\\nIt also lowers the target's SPEED\\nstat if it hits.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5295,7 +5295,7 @@ "holdEffectParam": 0, "description_english": "An extremely fast attack against\\none target. It is impossible to\\nevade.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5312,7 +5312,7 @@ "holdEffectParam": 0, "description_english": "If enraged by this move, the target\\nbecomes incapable of using the same\\nmove twice in a row.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5329,7 +5329,7 @@ "holdEffectParam": 0, "description_english": "An attack move that becomes very\\npowerful if the user is poisoned,\\nburned, or paralyzed.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5346,7 +5346,7 @@ "holdEffectParam": 0, "description_english": "An attack move that may have an\\nadditional effect depending on the\\nbattle terrain.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5363,7 +5363,7 @@ "holdEffectParam": 0, "description_english": "A move that makes the user fall\\nasleep over two turns to restore HP\\nand heal any status problems.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5380,7 +5380,7 @@ "holdEffectParam": 0, "description_english": "The foe, if it is the opposite\\ngender as the user, becomes\\ninfatuated and may not attack.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5397,7 +5397,7 @@ "holdEffectParam": 0, "description_english": "An attack that gives the user an\\nopportunity to steal the foe's hold\\nitem.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5414,7 +5414,7 @@ "holdEffectParam": 0, "description_english": "The foe is struck with steel-hard\\nwings. It may also raise the user's\\nDEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5431,7 +5431,7 @@ "holdEffectParam": 0, "description_english": "A special power is transmitted to\\nthe foe, causing it to switch\\nabilities with the user.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5448,7 +5448,7 @@ "holdEffectParam": 0, "description_english": "A move that steals the effects of\\nany status-changing or healing move\\nthat the foe tries to use.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5465,7 +5465,7 @@ "holdEffectParam": 0, "description_english": "A maximum-power attack of great\\nferocity, but one that also sharply\\nreduces the user's SP. ATK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5482,7 +5482,7 @@ "holdEffectParam": 0, "description_english": "Attacks the foe with sharp blades\\nor claws. It can also cut down thin\\ntrees and grass outside of battle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5499,7 +5499,7 @@ "holdEffectParam": 0, "description_english": "The user flies up on the first turn,\\nthen attacks next turn. It can be\\nused to fly to any known town.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5516,7 +5516,7 @@ "holdEffectParam": 0, "description_english": "Creates a huge wave, then crashes\\nit down on the foe. It can be used\\nfor traveling on water.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5533,7 +5533,7 @@ "holdEffectParam": 0, "description_english": "The user builds enormous power,\\nthen slams the foe. It can be used\\nfor moving large, round boulders.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5550,7 +5550,7 @@ "holdEffectParam": 0, "description_english": "Looses a powerful blast of light\\nthat reduces the foe's accuracy.\\nIt also lights up dark caves.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5567,7 +5567,7 @@ "holdEffectParam": 0, "description_english": "Hits the foe with a rock-crushingly\\ntough attack. It can smash cracked\\nboulders.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5584,7 +5584,7 @@ "holdEffectParam": 0, "description_english": "A powerful charge attack. It can\\nbe used for climbing a torrential\\nwaterfall.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5601,7 +5601,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack in which the user\\ndives underwater on the first turn,\\nthen strikes in the next turn.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5618,7 +5618,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5634,7 +5634,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5650,7 +5650,7 @@ "holdEffectParam": 0, "description_english": "A parcel to be delivered to PROF.\\nOAK from VIRIDIAN CITY's POKéMON\\nMART.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5666,7 +5666,7 @@ "holdEffectParam": 0, "description_english": "A flute that is said to instantly\\nawaken any POKéMON. It has a\\nlovely tone.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_PokeFlute", @@ -5682,7 +5682,7 @@ "holdEffectParam": 0, "description_english": "The key to CINNABAR ISLAND GYM's\\nfront door. It is colored red and\\ndecorated.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5698,7 +5698,7 @@ "holdEffectParam": 0, "description_english": "Take this voucher to the BIKE SHOP\\nin CERULEAN CITY and exchange it\\nfor a bicycle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5714,7 +5714,7 @@ "holdEffectParam": 0, "description_english": "A set of false teeth lost by the\\nSAFARI ZONE'S WARDEN. It makes his\\nsmile sparkle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5730,7 +5730,7 @@ "holdEffectParam": 0, "description_english": "A piece of amber that contains\\nthe genes of an ancient POKéMON.\\nIt is clear with a reddish tint.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5746,7 +5746,7 @@ "holdEffectParam": 0, "description_english": "A card-type key that unlocks doors\\nin SILPH CO.'s HEAD OFFICE in\\nSAFFRON CITY.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5762,7 +5762,7 @@ "holdEffectParam": 0, "description_english": "A key that operates the elevator\\nin TEAM ROCKET's HIDEOUT.\\nIt bears the TEAM ROCKET logo.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5778,7 +5778,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a seashell.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5794,7 +5794,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a shell.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5810,7 +5810,7 @@ "holdEffectParam": 0, "description_english": "A scope that makes unseeable\\nPOKéMON visible.\\nIt is made by SILPH CO.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5826,7 +5826,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that allows\\nfaster movement than the RUNNING\\nSHOES.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -5842,7 +5842,7 @@ "holdEffectParam": 0, "description_english": "A very convenient map that can be\\nviewed anytime. It even shows your \\npresent location.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_TownMap", @@ -5858,7 +5858,7 @@ "holdEffectParam": 0, "description_english": "A device that indicates TRAINERS\\nwho want to battle. The battery\\ncharges while traveling.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_VsSeeker", @@ -5874,7 +5874,7 @@ "holdEffectParam": 0, "description_english": "A device that enables you to\\nrecall what you've heard and seen\\nabout famous people.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_FameChecker", @@ -5890,7 +5890,7 @@ "holdEffectParam": 0, "description_english": "A case that holds TMs and HMs.\\nIt is attached to the BAG's\\ncompartment for important items.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_TmCase", @@ -5906,7 +5906,7 @@ "holdEffectParam": 0, "description_english": "A pouch for carrying BERRIES.\\nIt is attached to the BAG's\\ncompartment for important items.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_BerryPouch", @@ -5922,7 +5922,7 @@ "holdEffectParam": 0, "description_english": "A television set that is tuned to\\na program with useful tips for\\nnovice TRAINERS.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_TeachyTv", @@ -5938,7 +5938,7 @@ "holdEffectParam": 0, "description_english": "A pass for ferries between ONE,\\nTWO, and THREE ISLAND.\\nIt has a drawing of three islands.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5954,7 +5954,7 @@ "holdEffectParam": 0, "description_english": "A pass for ferries between\\nVERMILION and the SEVII ISLANDS.\\nIt features a drawing of a rainbow.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5970,7 +5970,7 @@ "holdEffectParam": 0, "description_english": "An aromatic tea prepared by an old\\nlady. It will slake even the worst\\nthirst.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5986,7 +5986,7 @@ "holdEffectParam": 0, "description_english": "A ticket required to board the ship\\nto NAVEL ROCK.\\nIt glows with a mystic light.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6002,7 +6002,7 @@ "holdEffectParam": 0, "description_english": "A ticket required to board the ship\\nto BIRTH ISLAND.\\nIt glows beautifully.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6018,7 +6018,7 @@ "holdEffectParam": 0, "description_english": "A jar for storing BERRY POWDER\\nmade using a BERRY CRUSHER.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_PowderJar", @@ -6034,7 +6034,7 @@ "holdEffectParam": 0, "description_english": "An exquisitely beautiful gem that\\nhas a red glow.\\nIt symbolizes passion.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6050,7 +6050,7 @@ "holdEffectParam": 0, "description_english": "An exquisitely beautiful gem that\\nhas a blue glow.\\nIt symbolizes honesty.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", diff --git a/src/data/items.json.txt b/src/data/items.json.txt index 0daa783aa..a389a5c83 100644 --- a/src/data/items.json.txt +++ b/src/data/items.json.txt @@ -20,7 +20,7 @@ const struct Item gItems[] = { .description = gItemDescription_{{ item.itemId }}, ## endif .importance = {{ item.importance }}, - .exitsBagOnUse = {{ item.exitsBagOnUse }}, + .registrability = {{ item.registrability }}, .pocket = {{ item.pocket }}, .type = {{ item.type }}, .fieldUseFunc = {{ item.fieldUseFunc }}, diff --git a/src/item.c b/src/item.c index 763838133..e072a5692 100644 --- a/src/item.c +++ b/src/item.c @@ -621,12 +621,13 @@ const u8 * ItemId_GetName(u16 itemId) return gItems[SanitizeItemId(itemId)].name; } -u16 itemid_get_number(u16 itemId) +// Unused +u16 ItemId_GetId(u16 itemId) { return gItems[SanitizeItemId(itemId)].itemId; } -u16 itemid_get_market_price(u16 itemId) +u16 ItemId_GetPrice(u16 itemId) { return gItems[SanitizeItemId(itemId)].price; } @@ -646,14 +647,15 @@ const u8 * ItemId_GetDescription(u16 itemId) return gItems[SanitizeItemId(itemId)].description; } -bool8 itemid_is_unique(u16 itemId) +u8 ItemId_GetImportance(u16 itemId) { return gItems[SanitizeItemId(itemId)].importance; } -u8 itemid_get_x19(u16 itemId) +// Unused +u8 ItemId_GetRegistrability(u16 itemId) { - return gItems[SanitizeItemId(itemId)].exitsBagOnUse; + return gItems[SanitizeItemId(itemId)].registrability; } u8 ItemId_GetPocket(u16 itemId) diff --git a/src/item_menu.c b/src/item_menu.c index 3ee223343..d499d6081 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -714,7 +714,7 @@ static void BagListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y) { bagItemId = BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, itemId); bagItemQuantity = BagGetQuantityByPocketPosition(gBagMenuState.pocket + 1, itemId); - if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(bagItemId)) + if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(bagItemId) == 0) { ConvertIntToDecimalStringN(gStringVar1, bagItemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); @@ -1611,7 +1611,7 @@ static void Task_ItemMenuAction_Give(u8 taskId) CopyWindowToVram(0, COPYWIN_MAP); if (!CanWriteMailHere(itemId)) DisplayItemMessageInBag(taskId, FONT_2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); - else if (!itemid_is_unique(itemId)) + else if (ItemId_GetImportance(itemId) == 0) { if (CalculatePlayerPartyCount() == 0) { @@ -1717,7 +1717,7 @@ static void Task_ItemContext_FieldGive(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_Give); ItemMenu_StartFadeToExitCallback(taskId); } - else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(itemId)) + else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(itemId) == 0) { Bag_BeginCloseWin0Animation(); gTasks[taskId].func = ItemMenu_StartFadeToExitCallback; @@ -1730,7 +1730,7 @@ static void Task_ItemContext_FieldGive(u8 taskId) static void GoToTMCase_Give(void) { - InitTMCase(TMCASE_FROMPARTYGIVE, ReturnToBagMenuFromSubmenu_Give, FALSE); + InitTMCase(TMCASE_GIVE_PARTY, ReturnToBagMenuFromSubmenu_Give, FALSE); } static void GoToBerryPouch_Give(void) @@ -1761,7 +1761,7 @@ static void Task_ItemContext_PcBoxGive(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_PCBox); ItemMenu_StartFadeToExitCallback(taskId); } - else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(itemId)) + else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(itemId) == 0) { Bag_BeginCloseWin0Animation(); gTasks[taskId].func = ItemMenu_StartFadeToExitCallback; @@ -1774,7 +1774,7 @@ static void Task_ItemContext_PcBoxGive(u8 taskId) static void GoToTMCase_PCBox(void) { - InitTMCase(TMCASE_FROMPOKEMONSTORAGEPC, ReturnToBagMenuFromSubmenu_PCBox, FALSE); + InitTMCase(TMCASE_GIVE_PC, ReturnToBagMenuFromSubmenu_PCBox, FALSE); } static void GoToBerryPouch_PCBox(void) @@ -1800,7 +1800,7 @@ static void Task_ItemContext_Sell(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_Sell); ItemMenu_StartFadeToExitCallback(taskId); } - else if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + else if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); @@ -1827,7 +1827,7 @@ static void Task_ItemContext_Sell(u8 taskId) static void GoToTMCase_Sell(void) { - InitTMCase(TMCASE_FROMMARTSELL, ReturnToBagMenuFromSubmenu_Sell, FALSE); + InitTMCase(TMCASE_SELL, ReturnToBagMenuFromSubmenu_Sell, FALSE); } static void GoToBerryPouch_Sell(void) @@ -1843,7 +1843,7 @@ static void ReturnToBagMenuFromSubmenu_Sell(void) static void Task_PrintSaleConfirmationText(u8 taskId) { s16 *data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); DisplayItemMessageInBag(taskId, GetDialogBoxFontId(), gStringVar4, Task_ShowSellYesNoMenu); } @@ -1873,7 +1873,7 @@ static void Task_InitSaleQuantitySelectInterface(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); BagPrintTextOnWindow(r4, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); - UpdateSalePriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); + UpdateSalePriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); BagPrintMoneyAmount(); CreatePocketScrollArrowPair_SellQuantity(); gTasks[taskId].func = Task_SelectQuantityToSell; @@ -1890,7 +1890,7 @@ static void Task_SelectQuantityToSell(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { UpdateQuantityToTossOrDeposit(data[8], 2); - UpdateSalePriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); + UpdateSalePriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); } else if (JOY_NEW(A_BUTTON)) { @@ -1923,7 +1923,7 @@ static void Task_SellItem_Yes(u8 taskId) PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_FinalizeSaleToShop); } @@ -1933,7 +1933,7 @@ static void Task_FinalizeSaleToShop(u8 taskId) s16 *data = gTasks[taskId].data; PlaySE(SE_SHOP); RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * data[8]); RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); DestroyListMenuTask(data[0], &gBagMenuState.cursorPos[gBagMenuState.pocket], &gBagMenuState.itemsAbove[gBagMenuState.pocket]); Pocket_CalculateNItemsAndMaxShowed(gBagMenuState.pocket); diff --git a/src/item_use.c b/src/item_use.c index 7c5091ccd..331aa5656 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -457,7 +457,7 @@ void FieldUseFunc_TmCase(u8 taskId) static void InitTMCaseFromBag(void) { - InitTMCase(0, CB2_BagMenuFromStartMenu, 0); + InitTMCase(TMCASE_FIELD, CB2_BagMenuFromStartMenu, FALSE); } static void Task_InitTMCaseFromField(u8 taskId) @@ -466,7 +466,7 @@ static void Task_InitTMCaseFromField(u8 taskId) { CleanupOverworldWindowsAndTilemaps(); SetFieldCallback2ForItemUse(); - InitTMCase(0, CB2_ReturnToField, 1); + InitTMCase(TMCASE_FIELD, CB2_ReturnToField, TRUE); DestroyTask(taskId); } } diff --git a/src/party_menu.c b/src/party_menu.c index 33293ed9c..4b64d8480 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4258,7 +4258,7 @@ static void CB2_ReturnToBagMenu(void) static void CB2_ReturnToTMCaseMenu(void) { - InitTMCase(TMCASE_NA, NULL, 0xFF); + InitTMCase(TMCASE_REOPENING, NULL, TMCASE_KEEP_PREV); } static void CB2_ReturnToBerryPouchMenu(void) diff --git a/src/shop.c b/src/shop.c index 7327874ca..37c3c7ee0 100644 --- a/src/shop.c +++ b/src/shop.c @@ -614,7 +614,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 item, u8 y) if (item != INDEX_CANCEL) { - ConvertIntToDecimalStringN(gStringVar1, itemid_get_market_price(item), 0, 4); + ConvertIntToDecimalStringN(gStringVar1, ItemId_GetPrice(item), 0, 4); x = 4 - StringLength(gStringVar1); loc = gStringVar4; while (x-- != 0) @@ -902,7 +902,7 @@ static void Task_BuyMenu(u8 taskId) BuyMenuRemoveScrollIndicatorArrows(); BuyMenuPrintCursor(tListTaskId, 2); RecolorItemDescriptionBox(1); - gShopData.itemPrice = itemid_get_market_price(itemId); + gShopData.itemPrice = ItemId_GetPrice(itemId); if (!IsEnoughMoney(&gSaveBlock1Ptr->money, gShopData.itemPrice)) { BuyMenuDisplayMessage(taskId, gText_YouDontHaveMoney, BuyMenuReturnToItemList); @@ -931,7 +931,7 @@ static void Task_BuyHowManyDialogueInit(u8 taskId) BuyMenuQuantityBoxNormalBorder(3, 0); BuyMenuPrintItemQuantityAndPrice(taskId); ScheduleBgCopyTilemapToVram(0); - maxQuantity = GetMoney(&gSaveBlock1Ptr->money) / itemid_get_market_price(tItemId); + maxQuantity = GetMoney(&gSaveBlock1Ptr->money) / ItemId_GetPrice(tItemId); if (maxQuantity > 99) gShopData.maxQuantity = 99; else @@ -949,7 +949,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, gShopData.maxQuantity) == TRUE) { - gShopData.itemPrice = itemid_get_market_price(tItemId) * tItemCount; + gShopData.itemPrice = ItemId_GetPrice(tItemId) * tItemCount; BuyMenuPrintItemQuantityAndPrice(taskId); } else @@ -1102,7 +1102,7 @@ void RecordItemPurchase(u16 item, u16 quantity, u8 a2) if (history->unk0 < 999999) { - history->unk0 += (itemid_get_market_price(item) >> (a2 - 1)) * quantity; + history->unk0 += (ItemId_GetPrice(item) >> (a2 - 1)) * quantity; if (history->unk0 > 999999) history->unk0 = 999999; } diff --git a/src/strings.c b/src/strings.c index 9ce0e031c..e9b40707e 100644 --- a/src/strings.c +++ b/src/strings.c @@ -207,8 +207,8 @@ const u8 gText_PokeFluteAwakenedMon[] = _("The POKé FLUTE awakened sleeping\nPO const u8 gText_TMCase[] = _("TM CASE"); const u8 gText_Close[] = _("CLOSE"); const u8 gText_TMCaseWillBePutAway[] = _("The TM CASE will be\nput away."); -const u8 gText_FontSize0[] = _("{FONT_0}"); -const u8 gText_FontSize2[] = _("{FONT_2}"); +const u8 gText_Font0[] = _("{FONT_0}"); +const u8 gText_Font2[] = _("{FONT_2}"); const u8 gText_EmptySpace[] = _(" "); const u8 gText_BerryPouch[] = _("BERRY POUCH"); const u8 gText_TheBerryPouchWillBePutAway[] = _("The BERRY POUCH will be\nput away."); diff --git a/src/tm_case.c b/src/tm_case.c index 8ef9e7fbb..401a2a57c 100644 --- a/src/tm_case.c +++ b/src/tm_case.c @@ -1,4 +1,5 @@ #include "global.h" +#include "tm_case.h" #include "gflib.h" #include "decompress.h" #include "graphics.h" @@ -23,45 +24,96 @@ #include "constants/items.h" #include "constants/songs.h" -#define TM_CASE_TM_TAG 400 +// Any item in the TM Case with nonzero importance is considered an HM +#define IS_HM(itemId) (ItemId_GetImportance(itemId) != 0) -struct UnkStruct_203B10C -{ - void (* savedCallback)(void); - u8 tmCaseMenuType; - u8 unk_05; - u8 unk_06; - u16 selectedRow; - u16 scrollOffset; +#define TAG_SCROLL_ARROW 110 + +enum { + WIN_LIST, + WIN_DESCRIPTION, + WIN_SELECTED_MSG, + WIN_TITLE, + WIN_MOVE_INFO_LABELS, + WIN_MOVE_INFO, + WIN_MESSAGE, + WIN_SELL_QUANTITY, + WIN_MONEY, }; -struct UnkStruct_203B118 -{ - void (* savedCallback)(void); - u8 tmSpriteId; +// Window IDs for the context menu that opens when a TM/HM is selected +enum { + WIN_USE_GIVE_EXIT, + WIN_GIVE_EXIT, +}; + +// IDs for the actions in the context menu +enum { + ACTION_USE, + ACTION_GIVE, + ACTION_EXIT +}; + +enum { + COLOR_LIGHT, + COLOR_DARK, + COLOR_CURSOR_SELECTED, + COLOR_MOVE_INFO, + COLOR_CURSOR_ERASE = 0xFF +}; + +// Base position for TM/HM disc sprite +#define DISC_BASE_X 41 +#define DISC_BASE_Y 46 + +#define DISC_CASE_DISTANCE 20 // The total number of pixels a disc travels vertically in/out of the case +#define DISC_Y_MOVE 10 // The number of pixels a disc travels vertically per movement step + +#define TAG_DISC 400 + +#define DISC_HIDDEN 0xFF // When no TM/HM is selected, hide the disc sprite + +enum { + ANIM_TM, + ANIM_HM, +}; + +// The "static" resources are preserved even if the TM case is exited. This is +// useful for when its left temporarily (e.g. going to the party menu to teach a TM) +// but also to preserve the selected item when the TM case is fully closed. +static EWRAM_DATA struct { + void (* exitCallback)(void); + u8 menuType; + bool8 allowSelectClose; + u8 unused; + u16 selectedRow; + u16 scrollOffset; +} sTMCaseStaticResources = {}; + +// The "dynamic" resources will be reset any time the TM case is exited, even temporarily. +static EWRAM_DATA struct { + void (* nextScreenCallback)(void); + u8 discSpriteId; u8 maxTMsShown; u8 numTMs; u8 contextMenuWindowId; - u8 scrollIndicatorArrowPairId; + u8 scrollArrowsTaskId; u16 currItem; const u8 * menuActionIndices; u8 numMenuActions; s16 seqId; - u8 filler_14[8]; -}; + u8 unused[8]; +} * sTMCaseDynamicResources = NULL; -struct UnkStruct_203B11C -{ +// Save the player's bag state when the Pokedude's bag is being shown +static EWRAM_DATA struct { struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT]; - u16 unk_160; - u16 unk_162; -}; + u16 selectedRow; + u16 scrollOffset; +} * sPokedudeBagBackup = NULL; -static EWRAM_DATA struct UnkStruct_203B10C sTMCaseStaticResources = {}; -static EWRAM_DATA struct UnkStruct_203B118 * sTMCaseDynamicResources = NULL; -static EWRAM_DATA struct UnkStruct_203B11C * sPokedudePackBackup = NULL; -static EWRAM_DATA void *sTilemapBuffer = NULL; // tilemap buffer +static EWRAM_DATA void *sTilemapBuffer = NULL; static EWRAM_DATA struct ListMenuItem * sListMenuItemsBuffer = NULL; static EWRAM_DATA u8 (* sListMenuStringsBuffer)[29] = NULL; static EWRAM_DATA u16 * sTMSpritePaletteBuffer = NULL; @@ -74,28 +126,29 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void); static void CreateTMCaseListMenuBuffers(void); static void InitTMCaseListMenuItems(void); static void GetTMNumberAndMoveString(u8 * dest, u16 itemId); -static void TMCase_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); -static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y); -static void TMCase_MoveCursor_UpdatePrintedDescription(s32 itemIndex); -static void PrintListMenuCursorAt_WithColorIdx(u8 a0, u8 a1); -static void CreateTMCaseScrollIndicatorArrowPair_Main(void); +static void List_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); +static void List_ItemPrintFunc(u8 windowId, u32 itemId, u8 y); +static void PrintDescription(s32 itemIndex); +static void PrintMoveInfo(u16 itemId); +static void PrintListCursorAtRow(u8 y, u8 colorIdx); +static void CreateListScrollArrows(void); static void TMCaseSetup_GetTMCount(void); static void TMCaseSetup_InitListMenuPositions(void); static void TMCaseSetup_UpdateVisualMenuOffset(void); static void Task_FadeOutAndCloseTMCase(u8 taskId); -static void Task_TMCaseMain(u8 taskId); -static void Task_SelectTMAction_FromFieldBag(u8 taskId); -static void Task_TMContextMenu_HandleInput(u8 taskId); -static void TMHMContextMenuAction_Use(u8 taskId); -static void TMHMContextMenuAction_Give(u8 taskId); +static void Task_HandleListInput(u8 taskId); +static void Task_SelectedTMHM_Field(u8 taskId); +static void Task_ContextMenu_HandleInput(u8 taskId); +static void Action_Use(u8 taskId); +static void Action_Give(u8 taskId); static void PrintError_ThereIsNoPokemon(u8 taskId); static void PrintError_ItemCantBeHeld(u8 taskId); static void Task_WaitButtonAfterErrorPrint(u8 taskId); -static void Subtask_CloseContextMenuAndReturnToMain(u8 taskId); -static void TMHMContextMenuAction_Exit(u8 taskId); -static void Task_SelectTMAction_Type1(u8 taskId); -static void Task_SelectTMAction_Type3(u8 taskId); -static void Task_SelectTMAction_FromSellMenu(u8 taskId); +static void CloseMessageAndReturnToList(u8 taskId); +static void Action_Exit(u8 taskId); +static void Task_SelectedTMHM_GiveParty(u8 taskId); +static void Task_SelectedTMHM_GivePC(u8 taskId); +static void Task_SelectedTMHM_Sell(u8 taskId); static void Task_AskConfirmSaleWithAmount(u8 taskId); static void Task_PlaceYesNoBox(u8 taskId); static void Task_SaleOfTMsCanceled(u8 taskId); @@ -105,28 +158,27 @@ static void Task_QuantitySelect_HandleInput(u8 taskId); static void Task_PrintSaleConfirmedText(u8 taskId); static void Task_DoSaleOfTMs(u8 taskId); static void Task_AfterSale_ReturnToList(u8 taskId); -static void Task_TMCaseDude1(u8 taskId); -static void Task_TMCaseDude_Playback(u8 taskId); +static void Task_Pokedude_Start(u8 taskId); +static void Task_Pokedude_Run(u8 taskId); static void InitWindowTemplatesAndPals(void); -static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx); +static void TMCase_Print(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx); static void TMCase_SetWindowBorder1(u8 windowId); static void TMCase_SetWindowBorder2(u8 windowId); -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func); -static void PrintStringTMCaseOnWindow3(void); -static void DrawMoveInfoUIMarkers(void); -static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId); +static void PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func); +static void PrintTitle(void); +static void DrawMoveInfoLabels(void); static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y); -static void HandlePrintMoneyOnHand(void); +static void PrintPlayersMoney(void); static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable * ptrs); -static u8 AddTMContextMenu(u8 * a0, u8 a1); -static void RemoveTMContextMenu(u8 * a0); -static u8 CreateTMSprite(u16 itemId); -static void SetTMSpriteAnim(struct Sprite *sprite, u8 var); -static void TintTMSpriteByType(u8 type); -static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var); -static void InitSelectedTMSpriteData(u8 a0, u16 itemId); -static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite); -static void LoadTMTypePalettes(void); +static u8 AddContextMenu(u8 * windowId, u8 windowIndex); +static void RemoveContextMenu(u8 * windowId); +static u8 CreateDiscSprite(u16 itemId); +static void SetDiscSpriteAnim(struct Sprite *sprite, u8 tmIdx); +static void TintDiscpriteByType(u8 type); +static void SetDiscSpritePosition(struct Sprite *sprite, u8 tmIdx); +static void SwapDisc(u8 spriteId, u16 itemId); +static void SpriteCB_SwapDisc(struct Sprite *sprite); +static void LoadDiscTypePalettes(void); static const struct BgTemplate sBGTemplates[] = { { @@ -156,21 +208,24 @@ static const struct BgTemplate sBGTemplates[] = { } }; +// The list of functions to run when a TM/HM is selected. +// What happens when one is selected depends on how the player arrived at the TM case static void (*const sSelectTMActionTasks[])(u8 taskId) = { - Task_SelectTMAction_FromFieldBag, - Task_SelectTMAction_Type1, - Task_SelectTMAction_FromSellMenu, - Task_SelectTMAction_Type3 + [TMCASE_FIELD] = Task_SelectedTMHM_Field, + [TMCASE_GIVE_PARTY] = Task_SelectedTMHM_GiveParty, + [TMCASE_SELL] = Task_SelectedTMHM_Sell, + [TMCASE_GIVE_PC] = Task_SelectedTMHM_GivePC }; -static const struct MenuAction sMenuActions_UseGiveExit[] = { - {gOtherText_Use, TMHMContextMenuAction_Use }, - {gOtherText_Give, TMHMContextMenuAction_Give}, - {gOtherText_Exit, TMHMContextMenuAction_Exit}, +static const struct MenuAction sMenuActions[] = { + [ACTION_USE] = {gOtherText_Use, Action_Use }, + [ACTION_GIVE] = {gOtherText_Give, Action_Give}, + [ACTION_EXIT] = {gOtherText_Exit, Action_Exit}, }; -static const u8 sMenuActionIndices_Field[] = {0, 1, 2}; -static const u8 sMenuActionIndices_UnionRoom[] = {1, 2}; +static const u8 sMenuActionIndices_Field[] = {ACTION_USE, ACTION_GIVE, ACTION_EXIT}; +static const u8 sMenuActionIndices_UnionRoom[] = {ACTION_GIVE, ACTION_EXIT}; + static const struct YesNoFuncTable sYesNoFuncTable = {Task_PrintSaleConfirmedText, Task_SaleOfTMsCanceled}; static const u8 sText_ClearTo18[] = _("{CLEAR_TO 18}"); @@ -179,30 +234,126 @@ static const u8 sText_SingleSpace[] = _(" "); static ALIGNED(4) const u16 sPal3Override[] = {RGB(8, 8, 8), RGB(30, 16, 6)}; static const u8 sTextColors[][3] = { - {0, 1, 2}, - {0, 2, 3}, - {0, 3, 6}, - {0, 14, 10} + [COLOR_LIGHT] = {0, 1, 2}, + [COLOR_DARK] = {0, 2, 3}, + [COLOR_CURSOR_SELECTED] = {0, 3, 6}, + [COLOR_MOVE_INFO] = {0, 14, 10}, }; static const struct WindowTemplate sWindowTemplates[] = { - {0x00, 0x0a, 0x01, 0x13, 0x0a, 0x0f, 0x0081}, - {0x00, 0x0c, 0x0c, 0x12, 0x08, 0x0a, 0x013f}, - {0x01, 0x05, 0x0f, 0x0f, 0x04, 0x0d, 0x01f9}, - {0x00, 0x00, 0x01, 0x0a, 0x02, 0x0f, 0x0235}, - {0x00, 0x01, 0x0d, 0x05, 0x06, 0x0c, 0x0249}, - {0x00, 0x07, 0x0d, 0x05, 0x06, 0x0c, 0x0267}, - {0x01, 0x02, 0x0f, 0x1a, 0x04, 0x0b, 0x0285}, - {0x01, 0x11, 0x09, 0x0c, 0x04, 0x0f, 0x02ed}, - {0x01, 0x01, 0x01, 0x08, 0x03, 0x0d, 0x031d}, + [WIN_LIST] = { + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 1, + .width = 19, + .height = 10, + .paletteNum = 15, + .baseBlock = 0x081 + }, + [WIN_DESCRIPTION] = { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 8, + .paletteNum = 10, + .baseBlock = 0x13f + }, + [WIN_SELECTED_MSG] = { + .bg = 1, + .tilemapLeft = 5, + .tilemapTop = 15, + .width = 15, + .height = 4, + .paletteNum = 13, + .baseBlock = 0x1f9 + }, + [WIN_TITLE] = { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 1, + .width = 10, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x235 + }, + [WIN_MOVE_INFO_LABELS] = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 13, + .width = 5, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x249 + }, + [WIN_MOVE_INFO] = { + .bg = 0, + .tilemapLeft = 7, + .tilemapTop = 13, + .width = 5, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x267 + }, + [WIN_MESSAGE] = { + .bg = 1, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 26, + .height = 4, + .paletteNum = 11, + .baseBlock = 0x285 + }, + [WIN_SELL_QUANTITY] = { + .bg = 1, + .tilemapLeft = 17, + .tilemapTop = 9, + .width = 12, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x2ed + }, + [WIN_MONEY] = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 8, + .height = 3, + .paletteNum = 13, + .baseBlock = 0x31d + }, DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate sYesNoWindowTemplate = {0x01, 0x15, 0x09, 0x06, 0x04, 0x0f, 0x0335}; +static const struct WindowTemplate sYesNoWindowTemplate = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 9, + .width = 6, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x335 +}; -static const struct WindowTemplate sTMContextWindowTemplates[] = { - {0x01, 0x16, 0x0d, 0x07, 0x06, 0x0f, 0x01cf}, - {0x01, 0x16, 0x0f, 0x07, 0x04, 0x0f, 0x01cf} +static const struct WindowTemplate sWindowTemplates_ContextMenu[] = { + [WIN_USE_GIVE_EXIT] = { + .bg = 1, + .tilemapLeft = 22, + .tilemapTop = 13, + .width = 7, + .height = 6, + .paletteNum = 15, + .baseBlock = 0x1cf + }, + [WIN_GIVE_EXIT] = { + .bg = 1, + .tilemapLeft = 22, + .tilemapTop = 15, + .width = 7, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x1cf + }, }; static const struct OamData sTMSpriteOamData = { @@ -210,35 +361,35 @@ static const struct OamData sTMSpriteOamData = { .priority = 2 }; -static const union AnimCmd sTMSpriteAnim0[] = { +static const union AnimCmd sAnim_TM[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd sTMSpriteAnim1[] = { +static const union AnimCmd sAnim_HM[] = { ANIMCMD_FRAME(16, 0), ANIMCMD_END }; -static const union AnimCmd *const sTMSpriteAnims[] = { - sTMSpriteAnim0, - sTMSpriteAnim1 +static const union AnimCmd *const sAnims_Disc[] = { + [ANIM_TM] = sAnim_TM, + [ANIM_HM] = sAnim_HM }; -static const struct CompressedSpriteSheet sTMSpriteSheet = { - (const void *)gTMCaseDisc_Gfx, - 0x400, - TM_CASE_TM_TAG +static const struct CompressedSpriteSheet sSpriteSheet_Disc = { + .data = gTMCaseDisc_Gfx, + .size = 0x400, + .tag = TAG_DISC }; -static const struct SpriteTemplate sTMSpriteTemplate = { - TM_CASE_TM_TAG, - TM_CASE_TM_TAG, - &sTMSpriteOamData, - sTMSpriteAnims, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy +static const struct SpriteTemplate sSpriteTemplate_Disc = { + .tileTag = TAG_DISC, + .paletteTag = TAG_DISC, + .oam = &sTMSpriteOamData, + .anims = sAnims_Disc, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy }; static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = { @@ -261,19 +412,19 @@ static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = { [TYPE_DRAGON] = 0x100 }; -void InitTMCase(u8 type, void (* callback)(void), u8 a2) +void InitTMCase(u8 type, void (* exitCallback)(void), bool8 allowSelectClose) { ResetBufferPointers_NoFree(); - sTMCaseDynamicResources = Alloc(sizeof(struct UnkStruct_203B118)); - sTMCaseDynamicResources->savedCallback = 0; - sTMCaseDynamicResources->scrollIndicatorArrowPairId = 0xFF; - sTMCaseDynamicResources->contextMenuWindowId = 0xFF; - if (type != 5) - sTMCaseStaticResources.tmCaseMenuType = type; - if (callback != NULL) - sTMCaseStaticResources.savedCallback = callback; - if (a2 != 0xFF) - sTMCaseStaticResources.unk_05 = a2; + sTMCaseDynamicResources = Alloc(sizeof(*sTMCaseDynamicResources)); + sTMCaseDynamicResources->nextScreenCallback = NULL; + sTMCaseDynamicResources->scrollArrowsTaskId = TASK_NONE; + sTMCaseDynamicResources->contextMenuWindowId = WINDOW_NONE; + if (type != TMCASE_REOPENING) + sTMCaseStaticResources.menuType = type; + if (exitCallback != NULL) + sTMCaseStaticResources.exitCallback = exitCallback; + if (allowSelectClose != TMCASE_KEEP_PREV) + sTMCaseStaticResources.allowSelectClose = allowSelectClose; gTextFlags.autoScroll = FALSE; SetMainCallback2(CB2_SetUpTMCaseUI_Blocking); } @@ -307,6 +458,14 @@ static void CB2_SetUpTMCaseUI_Blocking(void) } } +#define tListTaskId data[0] +#define tSelection data[1] +#define tQuantityOwned data[2] +#define tQuantitySelected data[8] + +#define tPokedudeState data[8] // Re-used +#define tPokedudeTimer data[9] + static bool8 DoSetUpTMCaseUI(void) { u8 taskId; @@ -362,7 +521,7 @@ static bool8 DoSetUpTMCaseUI(void) gMain.state++; break; case 11: - DrawMoveInfoUIMarkers(); + DrawMoveInfoLabels(); gMain.state++; break; case 12: @@ -371,23 +530,23 @@ static bool8 DoSetUpTMCaseUI(void) gMain.state++; break; case 13: - PrintStringTMCaseOnWindow3(); + PrintTitle(); gMain.state++; break; case 14: - if (sTMCaseStaticResources.tmCaseMenuType == 4) - taskId = CreateTask(Task_TMCaseDude1, 0); + if (sTMCaseStaticResources.menuType == TMCASE_POKEDUDE) + taskId = CreateTask(Task_Pokedude_Start, 0); else - taskId = CreateTask(Task_TMCaseMain, 0); - gTasks[taskId].data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + taskId = CreateTask(Task_HandleListInput, 0); + gTasks[taskId].tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); gMain.state++; break; case 15: - CreateTMCaseScrollIndicatorArrowPair_Main(); + CreateListScrollArrows(); gMain.state++; break; case 16: - sTMCaseDynamicResources->tmSpriteId = CreateTMSprite(BagGetItemIdByPocketPosition(POCKET_TM_CASE, sTMCaseStaticResources.scrollOffset + sTMCaseStaticResources.selectedRow)); + sTMCaseDynamicResources->discSpriteId = CreateDiscSprite(BagGetItemIdByPocketPosition(POCKET_TM_CASE, sTMCaseStaticResources.scrollOffset + sTMCaseStaticResources.selectedRow)); gMain.state++; break; case 17: @@ -423,7 +582,7 @@ static void LoadBGTemplates(void) ptr = &sTilemapBuffer; *ptr = AllocZeroed(0x800); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sBGTemplates, NELEMS(sBGTemplates)); + InitBgsFromTemplates(0, sBGTemplates, ARRAY_COUNT(sBGTemplates)); SetBgTilemapBuffer(2, *ptr); ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(2); @@ -462,11 +621,11 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void) sTMCaseDynamicResources->seqId++; break; case 4: - LoadCompressedSpriteSheet(&sTMSpriteSheet); + LoadCompressedSpriteSheet(&sSpriteSheet_Disc); sTMCaseDynamicResources->seqId++; break; default: - LoadTMTypePalettes(); + LoadDiscTypePalettes(); sTMCaseDynamicResources->seqId = 0; return TRUE; } @@ -493,10 +652,11 @@ static void InitTMCaseListMenuItems(void) sListMenuItemsBuffer[i].index = i; } sListMenuItemsBuffer[i].label = gText_Close; - sListMenuItemsBuffer[i].index = -2; + sListMenuItemsBuffer[i].index = LIST_CANCEL; + gMultiuseListMenuTemplate.items = sListMenuItemsBuffer; - gMultiuseListMenuTemplate.totalItems = sTMCaseDynamicResources->numTMs + 1; - gMultiuseListMenuTemplate.windowId = 0; + gMultiuseListMenuTemplate.totalItems = sTMCaseDynamicResources->numTMs + 1; // +1 for Cancel + gMultiuseListMenuTemplate.windowId = WIN_LIST; gMultiuseListMenuTemplate.header_X = 0; gMultiuseListMenuTemplate.item_X = 8; gMultiuseListMenuTemplate.cursor_X = 0; @@ -508,15 +668,15 @@ static void InitTMCaseListMenuItems(void) gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; - gMultiuseListMenuTemplate.moveCursorFunc = TMCase_MoveCursorFunc; - gMultiuseListMenuTemplate.itemPrintFunc = TMCase_ItemPrintFunc; + gMultiuseListMenuTemplate.moveCursorFunc = List_MoveCursorFunc; + gMultiuseListMenuTemplate.itemPrintFunc = List_ItemPrintFunc; gMultiuseListMenuTemplate.cursorKind = 0; gMultiuseListMenuTemplate.scrollMultiple = 0; } static void GetTMNumberAndMoveString(u8 * dest, u16 itemId) { - StringCopy(gStringVar4, gText_FontSize0); + StringCopy(gStringVar4, gText_Font0); if (itemId >= ITEM_HM01) { StringAppend(gStringVar4, sText_ClearTo18); @@ -531,38 +691,38 @@ static void GetTMNumberAndMoveString(u8 * dest, u16 itemId) StringAppend(gStringVar4, gStringVar1); } StringAppend(gStringVar4, sText_SingleSpace); - StringAppend(gStringVar4, gText_FontSize2); + StringAppend(gStringVar4, gText_Font2); StringAppend(gStringVar4, gMoveNames[ItemIdToBattleMoveId(itemId)]); StringCopy(dest, gStringVar4); } -static void TMCase_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list) +static void List_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list) { u16 itemId; - if (itemIndex == -2) - itemId = 0; + if (itemIndex == LIST_CANCEL) + itemId = ITEM_NONE; else itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex); if (onInit != TRUE) { PlaySE(SE_SELECT); - InitSelectedTMSpriteData(sTMCaseDynamicResources->tmSpriteId, itemId); + SwapDisc(sTMCaseDynamicResources->discSpriteId, itemId); } - TMCase_MoveCursor_UpdatePrintedDescription(itemIndex); - TMCase_MoveCursor_UpdatePrintedTMInfo(itemId); + PrintDescription(itemIndex); + PrintMoveInfo(itemId); } -static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) +static void List_ItemPrintFunc(u8 windowId, u32 itemIndex, u8 y) { - if (itemId != -2) + if (itemIndex != LIST_CANCEL) { - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemId))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex))) { - ConvertIntToDecimalStringN(gStringVar1, BagGetQuantityByPocketPosition(POCKET_TM_CASE, itemId), STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar1, BagGetQuantityByPocketPosition(POCKET_TM_CASE, itemIndex), STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(windowId, FONT_0, gStringVar4, 0x7E, y, 0, 0, 0xFF, 1); + TMCase_Print(windowId, FONT_0, gStringVar4, 126, y, 0, 0, TEXT_SKIP_DRAW, COLOR_DARK); } else { @@ -571,62 +731,69 @@ static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) } } -static void TMCase_MoveCursor_UpdatePrintedDescription(s32 itemIndex) +static void PrintDescription(s32 itemIndex) { const u8 * str; - if (itemIndex != -2) - { + if (itemIndex != LIST_CANCEL) str = ItemId_GetDescription(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex)); - } else - { str = gText_TMCaseWillBePutAway; - } - FillWindowPixelBuffer(1, 0); - AddTextPrinterParameterized_ColorByIndex(1, FONT_2, str, 2, 3, 1, 0, 0, 0); + FillWindowPixelBuffer(WIN_DESCRIPTION, 0); + TMCase_Print(WIN_DESCRIPTION, FONT_2, str, 2, 3, 1, 0, 0, COLOR_LIGHT); } -static void FillBG2RowWithPalette_2timesNplus1(s32 a0) +// Darkens (or subsequently lightens) the blue bg tiles around the description window when a TM/HM is selected. +// shade=0: lighten, shade=1: darken +static void SetDescriptionWindowShade(s32 shade) { - SetBgTilemapPalette(2, 0, 12, 30, 8, 2 * a0 + 1); + SetBgTilemapPalette(2, 0, 12, 30, 8, 2 * shade + 1); ScheduleBgCopyTilemapToVram(2); } -static void PrintListMenuCursorByID_WithColorIdx(u8 a0, u8 a1) +static void PrintListCursor(u8 listTaskId, u8 colorIdx) { - PrintListMenuCursorAt_WithColorIdx(ListMenuGetYCoordForPrintingArrowCursor(a0), a1); + PrintListCursorAtRow(ListMenuGetYCoordForPrintingArrowCursor(listTaskId), colorIdx); } -static void PrintListMenuCursorAt_WithColorIdx(u8 a0, u8 a1) +static void PrintListCursorAtRow(u8 y, u8 colorIdx) { - if (a1 == 0xFF) + if (colorIdx == COLOR_CURSOR_ERASE) { - FillWindowPixelRect(0, 0, 0, a0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); - CopyWindowToVram(0, COPYWIN_GFX); + // Never used. Would erase cursor (but also a portion of the list text) + FillWindowPixelRect(WIN_LIST, 0, 0, y, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); + CopyWindowToVram(WIN_LIST, COPYWIN_GFX); } else { - AddTextPrinterParameterized_ColorByIndex(0, FONT_2, gText_SelectorArrow2, 0, a0, 0, 0, 0, a1); + TMCase_Print(WIN_LIST, FONT_2, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIdx); } } -static void CreateTMCaseScrollIndicatorArrowPair_Main(void) +static void CreateListScrollArrows(void) { - sTMCaseDynamicResources->scrollIndicatorArrowPairId = AddScrollIndicatorArrowPairParameterized(2, 0xA0, 0x08, 0x58, sTMCaseDynamicResources->numTMs - sTMCaseDynamicResources->maxTMsShown + 1, 0x6E, 0x6E, &sTMCaseStaticResources.scrollOffset); + sTMCaseDynamicResources->scrollArrowsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, + 160, 8, 88, + sTMCaseDynamicResources->numTMs - sTMCaseDynamicResources->maxTMsShown + 1, + TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, + &sTMCaseStaticResources.scrollOffset); } -static void CreateTMCaseScrollIndicatorArrowPair_SellQuantitySelect(void) +static void CreateQuantityScrollArrows(void) { sTMCaseDynamicResources->currItem = 1; - sTMCaseDynamicResources->scrollIndicatorArrowPairId = AddScrollIndicatorArrowPairParameterized(2, 0x98, 0x48, 0x68, 2, 0x6E, 0x6E, &sTMCaseDynamicResources->currItem); + sTMCaseDynamicResources->scrollArrowsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, + 152, 72, 104, + 2, + TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, + &sTMCaseDynamicResources->currItem); } -static void RemoveTMCaseScrollIndicatorArrowPair(void) +static void RemoveScrollArrows(void) { - if (sTMCaseDynamicResources->scrollIndicatorArrowPairId != 0xFF) + if (sTMCaseDynamicResources->scrollArrowsTaskId != TASK_NONE) { - RemoveScrollIndicatorArrowPair(sTMCaseDynamicResources->scrollIndicatorArrowPairId); - sTMCaseDynamicResources->scrollIndicatorArrowPairId = 0xFF; + RemoveScrollIndicatorArrowPair(sTMCaseDynamicResources->scrollArrowsTaskId); + sTMCaseDynamicResources->scrollArrowsTaskId = TASK_NONE; } } @@ -709,18 +876,18 @@ static void Task_FadeOutAndCloseTMCase(u8 taskId) if (!gPaletteFade.active) { - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - if (sTMCaseDynamicResources->savedCallback != NULL) - SetMainCallback2(sTMCaseDynamicResources->savedCallback); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + if (sTMCaseDynamicResources->nextScreenCallback != NULL) + SetMainCallback2(sTMCaseDynamicResources->nextScreenCallback); else - SetMainCallback2(sTMCaseStaticResources.savedCallback); - RemoveTMCaseScrollIndicatorArrowPair(); + SetMainCallback2(sTMCaseStaticResources.exitCallback); + RemoveScrollArrows(); DestroyTMCaseBuffers(); DestroyTask(taskId); } } -static void Task_TMCaseMain(u8 taskId) +static void Task_HandleListInput(u8 taskId) { s16 * data = gTasks[taskId].data; s32 input; @@ -729,9 +896,9 @@ static void Task_TMCaseMain(u8 taskId) { if (MenuHelpers_CallLinkSomething() != TRUE) { - input = ListMenu_ProcessInput(data[0]); - ListMenuGetScrollAndRow(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - if (JOY_NEW(SELECT_BUTTON) && sTMCaseStaticResources.unk_05 == 1) + input = ListMenu_ProcessInput(tListTaskId); + ListMenuGetScrollAndRow(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + if (JOY_NEW(SELECT_BUTTON) && sTMCaseStaticResources.allowSelectClose == TRUE) { PlaySE(SE_SELECT); gSpecialVar_ItemId = ITEM_NONE; @@ -741,22 +908,22 @@ static void Task_TMCaseMain(u8 taskId) { switch (input) { - case -1: + case LIST_NOTHING_CHOSEN: break; - case -2: + case LIST_CANCEL: PlaySE(SE_SELECT); - gSpecialVar_ItemId = 0; + gSpecialVar_ItemId = ITEM_NONE; Task_BeginFadeOutFromTMCase(taskId); break; default: PlaySE(SE_SELECT); - FillBG2RowWithPalette_2timesNplus1(1); - RemoveTMCaseScrollIndicatorArrowPair(); - PrintListMenuCursorByID_WithColorIdx(data[0], 2); - data[1] = input; - data[2] = BagGetQuantityByPocketPosition(POCKET_TM_CASE, input); + SetDescriptionWindowShade(1); + RemoveScrollArrows(); + PrintListCursor(tListTaskId, COLOR_CURSOR_SELECTED); + tSelection = input; + tQuantityOwned = BagGetQuantityByPocketPosition(POCKET_TM_CASE, input); gSpecialVar_ItemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, input); - gTasks[taskId].func = sSelectTMActionTasks[sTMCaseStaticResources.tmCaseMenuType]; + gTasks[taskId].func = sSelectTMActionTasks[sTMCaseStaticResources.menuType]; break; } } @@ -764,47 +931,67 @@ static void Task_TMCaseMain(u8 taskId) } } -static void Subtask_ReturnToTMCaseMain(u8 taskId) +static void ReturnToList(u8 taskId) { - FillBG2RowWithPalette_2timesNplus1(0); - CreateTMCaseScrollIndicatorArrowPair_Main(); - gTasks[taskId].func = Task_TMCaseMain; + SetDescriptionWindowShade(0); + CreateListScrollArrows(); + gTasks[taskId].func = Task_HandleListInput; } -static void Task_SelectTMAction_FromFieldBag(u8 taskId) +// When a TM/HM in the list is selected in the field, create a context +// menu with a list of actions that can be taken. +static void Task_SelectedTMHM_Field(u8 taskId) { u8 * strbuf; - TMCase_SetWindowBorder2(2); + + // Create context window + TMCase_SetWindowBorder2(WIN_SELECTED_MSG); if (!MenuHelpers_LinkSomething() && InUnionRoom() != TRUE) { - AddTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, 0); + // Regular TM/HM context menu + AddContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, WIN_USE_GIVE_EXIT); sTMCaseDynamicResources->menuActionIndices = sMenuActionIndices_Field; - sTMCaseDynamicResources->numMenuActions = NELEMS(sMenuActionIndices_Field); + sTMCaseDynamicResources->numMenuActions = ARRAY_COUNT(sMenuActionIndices_Field); } else { - AddTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, 1); + // In Union Room, "Use" is removed from the context menu + AddContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, WIN_GIVE_EXIT); sTMCaseDynamicResources->menuActionIndices = sMenuActionIndices_UnionRoom; - sTMCaseDynamicResources->numMenuActions = NELEMS(sMenuActionIndices_UnionRoom); + sTMCaseDynamicResources->numMenuActions = ARRAY_COUNT(sMenuActionIndices_UnionRoom); } - AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, sMenuActions_UseGiveExit, sTMCaseDynamicResources->menuActionIndices); + + // Print context window actions + AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, + FONT_2, + GetMenuCursorDimensionByFont(FONT_2, 0), + 2, + 0, + GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, + sTMCaseDynamicResources->numMenuActions, + sMenuActions, + sTMCaseDynamicResources->menuActionIndices); + Menu_InitCursor(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, 0); + + // Print label text next to the context window strbuf = Alloc(256); GetTMNumberAndMoveString(strbuf, gSpecialVar_ItemId); StringAppend(strbuf, gText_Var1IsSelected + 2); // +2 skips over the stringvar - AddTextPrinterParameterized_ColorByIndex(2, FONT_2, strbuf, 0, 2, 1, 0, 0, 1); + TMCase_Print(WIN_SELECTED_MSG, FONT_2, strbuf, 0, 2, 1, 0, 0, COLOR_DARK); Free(strbuf); - if (itemid_is_unique(gSpecialVar_ItemId)) + if (IS_HM(gSpecialVar_ItemId)) { - PlaceHMTileInWindow(2, 0, 2); - CopyWindowToVram(2, COPYWIN_GFX); + PlaceHMTileInWindow(WIN_SELECTED_MSG, 0, 2); + CopyWindowToVram(WIN_SELECTED_MSG, COPYWIN_GFX); } + ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - gTasks[taskId].func = Task_TMContextMenu_HandleInput; + gTasks[taskId].func = Task_ContextMenu_HandleInput; } -static void Task_TMContextMenu_HandleInput(u8 taskId) +static void Task_ContextMenu_HandleInput(u8 taskId) { s8 input; @@ -813,26 +1000,27 @@ static void Task_TMContextMenu_HandleInput(u8 taskId) input = Menu_ProcessInputNoWrapAround(); switch (input) { - case -1: + case MENU_B_PRESSED: + // Run last action in list (Exit) PlaySE(SE_SELECT); - sMenuActions_UseGiveExit[sTMCaseDynamicResources->menuActionIndices[sTMCaseDynamicResources->numMenuActions - 1]].func.void_u8(taskId); + sMenuActions[sTMCaseDynamicResources->menuActionIndices[sTMCaseDynamicResources->numMenuActions - 1]].func.void_u8(taskId); break; - case -2: + case MENU_NOTHING_CHOSEN: break; default: PlaySE(SE_SELECT); - sMenuActions_UseGiveExit[sTMCaseDynamicResources->menuActionIndices[input]].func.void_u8(taskId); + sMenuActions[sTMCaseDynamicResources->menuActionIndices[input]].func.void_u8(taskId); break; } } } -static void TMHMContextMenuAction_Use(u8 taskId) +static void Action_Use(u8 taskId) { - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(0); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_LIST); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); if (CalculatePlayerPartyCount() == 0) @@ -841,25 +1029,26 @@ static void TMHMContextMenuAction_Use(u8 taskId) } else { + // Chose a TM/HM to use, exit TM case for party menu gItemUseCB = ItemUseCB_TMHM; - sTMCaseDynamicResources->savedCallback = CB2_ShowPartyMenuForItemUse; + sTMCaseDynamicResources->nextScreenCallback = CB2_ShowPartyMenuForItemUse; Task_BeginFadeOutFromTMCase(taskId); } } -static void TMHMContextMenuAction_Give(u8 taskId) +static void Action_Give(u8 taskId) { s16 * data = gTasks[taskId].data; - u16 itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]); - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + u16 itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - if (!itemid_is_unique(itemId)) + if (!IS_HM(itemId)) { if (CalculatePlayerPartyCount() == 0) { @@ -867,7 +1056,7 @@ static void TMHMContextMenuAction_Give(u8 taskId) } else { - sTMCaseDynamicResources->savedCallback = CB2_ChooseMonToGiveItem; + sTMCaseDynamicResources->nextScreenCallback = CB2_ChooseMonToGiveItem; Task_BeginFadeOutFromTMCase(taskId); } } @@ -879,14 +1068,14 @@ static void TMHMContextMenuAction_Give(u8 taskId) static void PrintError_ThereIsNoPokemon(u8 taskId) { - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); + PrintMessageWithFollowupTask(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); } static void PrintError_ItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ItemCantBeHeld); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_WaitButtonAfterErrorPrint); + PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_WaitButtonAfterErrorPrint); } static void Task_WaitButtonAfterErrorPrint(u8 taskId) @@ -894,99 +1083,102 @@ static void Task_WaitButtonAfterErrorPrint(u8 taskId) if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - Subtask_CloseContextMenuAndReturnToMain(taskId); + CloseMessageAndReturnToList(taskId); } } -static void Subtask_CloseContextMenuAndReturnToMain(u8 taskId) +static void CloseMessageAndReturnToList(u8 taskId) { s16 * data = gTasks[taskId].data; - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - ClearWindowTilemap(6); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + PrintListCursor(tListTaskId, COLOR_DARK); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + ClearWindowTilemap(WIN_MESSAGE); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - Subtask_ReturnToTMCaseMain(taskId); + ReturnToList(taskId); } -static void TMHMContextMenuAction_Exit(u8 taskId) +static void Action_Exit(u8 taskId) { s16 * data = gTasks[taskId].data; - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(0); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_LIST); + PrintListCursor(tListTaskId, COLOR_DARK); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - Subtask_ReturnToTMCaseMain(taskId); + ReturnToList(taskId); } -static void Task_SelectTMAction_Type1(u8 taskId) +static void Task_SelectedTMHM_GiveParty(u8 taskId) { s16 * data = gTasks[taskId].data; - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection))) { - sTMCaseDynamicResources->savedCallback = CB2_GiveHoldItem; + sTMCaseDynamicResources->nextScreenCallback = CB2_GiveHoldItem; Task_BeginFadeOutFromTMCase(taskId); } else { + // Can't hold "important" items (e.g. key items) PrintError_ItemCantBeHeld(taskId); } } -static void Task_SelectTMAction_Type3(u8 taskId) +static void Task_SelectedTMHM_GivePC(u8 taskId) { s16 * data = gTasks[taskId].data; - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection))) { - sTMCaseDynamicResources->savedCallback = CB2_ReturnToPokeStorage; + sTMCaseDynamicResources->nextScreenCallback = CB2_ReturnToPokeStorage; Task_BeginFadeOutFromTMCase(taskId); } else { + // Can't hold "important" items (e.g. key items) PrintError_ItemCantBeHeld(taskId); } } -static void Task_SelectTMAction_FromSellMenu(u8 taskId) +static void Task_SelectedTMHM_Sell(u8 taskId) { s16 * data = gTasks[taskId].data; - if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { + // Can't sell TM/HMs with no price (by default this is just the HMs) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, CloseMessageAndReturnToList); } else { - data[8] = 1; - if (data[2] == 1) + tQuantitySelected = 1; + if (tQuantityOwned == 1) { - HandlePrintMoneyOnHand(); + PrintPlayersMoney(); Task_AskConfirmSaleWithAmount(taskId); } else { - if (data[2] > 99) - data[2] = 99; + if (tQuantityOwned > 99) + tQuantityOwned = 99; CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI); } } } @@ -995,9 +1187,9 @@ static void Task_AskConfirmSaleWithAmount(u8 taskId) { s16 * data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox); } static void Task_PlaceYesNoBox(u8 taskId) @@ -1009,30 +1201,30 @@ static void Task_SaleOfTMsCanceled(u8 taskId) { s16 * data = gTasks[taskId].data; - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(0); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - Subtask_ReturnToTMCaseMain(taskId); + PrintListCursor(tListTaskId, COLOR_DARK); + ReturnToList(taskId); } static void Task_InitQuantitySelectUI(u8 taskId) { s16 * data = gTasks[taskId].data; - TMCase_SetWindowBorder1(7); + TMCase_SetWindowBorder1(WIN_SELL_QUANTITY); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); - SellTM_PrintQuantityAndSalePrice(1, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8]); - HandlePrintMoneyOnHand(); - CreateTMCaseScrollIndicatorArrowPair_SellQuantitySelect(); + TMCase_Print(WIN_SELL_QUANTITY, FONT_0, gStringVar4, 4, 10, 1, 0, 0, COLOR_DARK); + SellTM_PrintQuantityAndSalePrice(1, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected); + PrintPlayersMoney(); + CreateQuantityScrollArrows(); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); gTasks[taskId].func = Task_QuantitySelect_HandleInput; @@ -1040,44 +1232,44 @@ static void Task_InitQuantitySelectUI(u8 taskId) static void SellTM_PrintQuantityAndSalePrice(s16 quantity, s32 amount) { - FillWindowPixelBuffer(7, 0x11); + FillWindowPixelBuffer(WIN_SELL_QUANTITY, 0x11); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); - PrintMoneyAmount(7, 0x38, 0x0A, amount, 0); + TMCase_Print(WIN_SELL_QUANTITY, FONT_0, gStringVar4, 4, 10, 1, 0, 0, COLOR_DARK); + PrintMoneyAmount(WIN_SELL_QUANTITY, 0x38, 0x0A, amount, 0); } static void Task_QuantitySelect_HandleInput(u8 taskId) { s16 * data = gTasks[taskId].data; - if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == 1) + if (AdjustQuantityAccordingToDPadInput(&tQuantitySelected, tQuantityOwned) == 1) { - SellTM_PrintQuantityAndSalePrice(data[8], itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8]); + SellTM_PrintQuantityAndSalePrice(tQuantitySelected, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected); } else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(7, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_SELL_QUANTITY, FALSE); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - RemoveTMCaseScrollIndicatorArrowPair(); + RemoveScrollArrows(); Task_AskConfirmSaleWithAmount(taskId); } else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(7, FALSE); - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(3); - PutWindowTilemap(0); - PutWindowTilemap(1); + ClearStdWindowAndFrameToTransparent(WIN_SELL_QUANTITY, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - RemoveTMCaseScrollIndicatorArrowPair(); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - Subtask_ReturnToTMCaseMain(taskId); + RemoveScrollArrows(); + PrintListCursor(tListTaskId, COLOR_DARK); + ReturnToList(taskId); } } @@ -1085,12 +1277,12 @@ static void Task_PrintSaleConfirmedText(u8 taskId) { s16 * data = gTasks[taskId].data; - PutWindowTilemap(0); + PutWindowTilemap(WIN_LIST); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_DoSaleOfTMs); + PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_DoSaleOfTMs); } static void Task_DoSaleOfTMs(u8 taskId) @@ -1098,16 +1290,16 @@ static void Task_DoSaleOfTMs(u8 taskId) s16 * data = gTasks[taskId].data; PlaySE(SE_SHOP); - RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); - RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + RemoveBagItem(gSpecialVar_ItemId, tQuantitySelected); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * tQuantitySelected); + RecordItemPurchase(gSpecialVar_ItemId, tQuantitySelected, 2); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); TMCaseSetup_GetTMCount(); TMCaseSetup_InitListMenuPositions(); InitTMCaseListMenuItems(); - data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); - PrintListMenuCursorByID_WithColorIdx(data[0], 2); - PrintMoneyAmountInMoneyBox(8, GetMoney(&gSaveBlock1Ptr->money), 0); + tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + PrintListCursor(tListTaskId, COLOR_CURSOR_SELECTED); + PrintMoneyAmountInMoneyBox(WIN_MONEY, GetMoney(&gSaveBlock1Ptr->money), 0); gTasks[taskId].func = Task_AfterSale_ReturnToList; } @@ -1116,74 +1308,75 @@ static void Task_AfterSale_ReturnToList(u8 taskId) if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); - Subtask_CloseContextMenuAndReturnToMain(taskId); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); + CloseMessageAndReturnToList(taskId); } } void Pokedude_InitTMCase(void) { - sPokedudePackBackup = AllocZeroed(sizeof(*sPokedudePackBackup)); - memcpy(sPokedudePackBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); - memcpy(sPokedudePackBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); - sPokedudePackBackup->unk_160 = sTMCaseStaticResources.selectedRow; - sPokedudePackBackup->unk_162 = sTMCaseStaticResources.scrollOffset; - ClearItemSlots(gSaveBlock1Ptr->bagPocket_TMHM, NELEMS(gSaveBlock1Ptr->bagPocket_TMHM)); - ClearItemSlots(gSaveBlock1Ptr->bagPocket_KeyItems, NELEMS(gSaveBlock1Ptr->bagPocket_KeyItems)); + sPokedudeBagBackup = AllocZeroed(sizeof(*sPokedudeBagBackup)); + memcpy(sPokedudeBagBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); + memcpy(sPokedudeBagBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); + sPokedudeBagBackup->selectedRow = sTMCaseStaticResources.selectedRow; + sPokedudeBagBackup->scrollOffset = sTMCaseStaticResources.scrollOffset; + ClearItemSlots(gSaveBlock1Ptr->bagPocket_TMHM, ARRAY_COUNT(gSaveBlock1Ptr->bagPocket_TMHM)); + ClearItemSlots(gSaveBlock1Ptr->bagPocket_KeyItems, ARRAY_COUNT(gSaveBlock1Ptr->bagPocket_KeyItems)); ResetTMCaseCursorPos(); AddBagItem(ITEM_TM01, 1); AddBagItem(ITEM_TM03, 1); AddBagItem(ITEM_TM09, 1); AddBagItem(ITEM_TM35, 1); - InitTMCase(4, CB2_ReturnToTeachyTV, 0); + InitTMCase(TMCASE_POKEDUDE, CB2_ReturnToTeachyTV, 0); } -static void Task_TMCaseDude1(u8 taskId) +static void Task_Pokedude_Start(u8 taskId) { s16 * data = gTasks[taskId].data; if (!gPaletteFade.active) { - data[8] = 0; - data[9] = 0; - gTasks[taskId].func = Task_TMCaseDude_Playback; + tPokedudeState = 0; + tPokedudeTimer = 0; + gTasks[taskId].func = Task_Pokedude_Run; } } -static void Task_TMCaseDude_Playback(u8 taskId) +#define POKEDUDE_INPUT_DELAY 101 + +static void Task_Pokedude_Run(u8 taskId) { s16 * data = gTasks[taskId].data; if (JOY_NEW(B_BUTTON)) { - if (data[8] < 21) + if (tPokedudeState < 21) { - data[8] = 21; + tPokedudeState = 21; SetTeachyTvControllerModeToResume(); } } - switch (data[8]) + switch (tPokedudeState) { case 0: BeginNormalPaletteFade(0xFFFF8405, 4, 0, 6, 0); - FillBG2RowWithPalette_2timesNplus1(1); - data[8]++; + SetDescriptionWindowShade(1); + tPokedudeState++; break; case 1: case 11: if (!gPaletteFade.active) { - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } } break; @@ -1193,17 +1386,16 @@ static void Task_TMCaseDude_Playback(u8 taskId) case 12: case 13: case 14: - if (data[9] == 0) + if (tPokedudeTimer == 0) { gMain.newKeys = 0; gMain.newAndRepeatedKeys = DPAD_DOWN; - ListMenu_ProcessInput(data[0]); + ListMenu_ProcessInput(tListTaskId); } - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } break; case 5: @@ -1212,71 +1404,71 @@ static void Task_TMCaseDude_Playback(u8 taskId) case 15: case 16: case 17: - if (data[9] == 0) + if (tPokedudeTimer == 0) { gMain.newKeys = 0; gMain.newAndRepeatedKeys = DPAD_UP; - ListMenu_ProcessInput(data[0]); + ListMenu_ProcessInput(tListTaskId); } - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } break; case 8: - FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_TMTypes, 0); - gTasks[taskId].func = Task_TMCaseDude_Playback; - data[8]++; + SetDescriptionWindowShade(1); + PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_TMTypes, NULL); + gTasks[taskId].func = Task_Pokedude_Run; + tPokedudeState++; break; case 9: case 19: RunTextPrinters(); - if (!IsTextPrinterActive(6)) - data[8]++; + if (!IsTextPrinterActive(WIN_MESSAGE)) + tPokedudeState++; break; case 10: if (JOY_NEW(A_BUTTON | B_BUTTON)) { - FillBG2RowWithPalette_2timesNplus1(0); + SetDescriptionWindowShade(0); BeginNormalPaletteFade(0x00000400, 0, 6, 0, 0); - ClearDialogWindowAndFrameToTransparent(6, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); ScheduleBgCopyTilemapToVram(1); - data[8]++; + tPokedudeState++; } break; case 18: - FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_ReadTMDescription, NULL); - gTasks[taskId].func = Task_TMCaseDude_Playback; // this function - data[8]++; + SetDescriptionWindowShade(1); + PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_ReadTMDescription, NULL); + gTasks[taskId].func = Task_Pokedude_Run; // this function + tPokedudeState++; break; case 20: if (JOY_NEW(A_BUTTON | B_BUTTON)) - data[8]++; + tPokedudeState++; break; case 21: if (!gPaletteFade.active) { - memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokedudePackBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); - memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokedudePackBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); - DestroyListMenuTask(data[0], NULL, NULL); - sTMCaseStaticResources.selectedRow = sPokedudePackBackup->unk_160; - sTMCaseStaticResources.scrollOffset = sPokedudePackBackup->unk_162; - Free(sPokedudePackBackup); + // Restore the player's bag + memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokedudeBagBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); + memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokedudeBagBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); + DestroyListMenuTask(tListTaskId, NULL, NULL); + sTMCaseStaticResources.selectedRow = sPokedudeBagBackup->selectedRow; + sTMCaseStaticResources.scrollOffset = sPokedudeBagBackup->scrollOffset; + Free(sPokedudeBagBackup); CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); CB2_SetUpReshowBattleScreenAfterMenu(); BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, 0); - data[8]++; + tPokedudeState++; } break; default: if (!gPaletteFade.active) { - SetMainCallback2(sTMCaseStaticResources.savedCallback); - RemoveTMCaseScrollIndicatorArrowPair(); + SetMainCallback2(sTMCaseStaticResources.exitCallback); + RemoveScrollArrows(); DestroyTMCaseBuffers(); DestroyTask(taskId); } @@ -1298,17 +1490,17 @@ static void InitWindowTemplatesAndPals(void) LoadPalette(sPal3Override, 0xF6, 0x04); LoadPalette(sPal3Override, 0xD6, 0x04); ListMenuLoadStdPalAt(0xc0, 0x01); - for (i = 0; i < 9; i++) + for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, 0x00); - PutWindowTilemap(0); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); } -static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx) +static void TMCase_Print(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx) { AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, sTextColors[colorIdx], speed, str); } @@ -1323,46 +1515,47 @@ static void TMCase_SetWindowBorder2(u8 windowId) DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x78, 0x0D); } -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func) +static void PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func) { - DisplayMessageAndContinueTask(taskId, 6, 0x64, 0x0B, fontId, GetTextSpeedSetting(), str, func); + DisplayMessageAndContinueTask(taskId, WIN_MESSAGE, 0x64, 0x0B, fontId, GetTextSpeedSetting(), str, func); ScheduleBgCopyTilemapToVram(1); } -static void PrintStringTMCaseOnWindow3(void) +static void PrintTitle(void) { u32 distance = 72 - GetStringWidth(FONT_1, gText_TMCase, 0); - AddTextPrinterParameterized3(3, FONT_1, distance / 2, 1, sTextColors[0], 0, gText_TMCase); + AddTextPrinterParameterized3(WIN_TITLE, FONT_1, distance / 2, 1, sTextColors[COLOR_LIGHT], 0, gText_TMCase); } -static void DrawMoveInfoUIMarkers(void) +static void DrawMoveInfoLabels(void) { - BlitMoveInfoIcon(4, 19, 0, 0); - BlitMoveInfoIcon(4, 20, 0, 12); - BlitMoveInfoIcon(4, 21, 0, 24); - BlitMoveInfoIcon(4, 22, 0, 36); - CopyWindowToVram(4, COPYWIN_GFX); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 19, 0, 0); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 20, 0, 12); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 21, 0, 24); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 22, 0, 36); + CopyWindowToVram(WIN_MOVE_INFO_LABELS, COPYWIN_GFX); } -static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) +static void PrintMoveInfo(u16 itemId) { u8 i; u16 move; const u8 * str; - FillWindowPixelRect(5, 0, 0, 0, 40, 48); + FillWindowPixelRect(WIN_MOVE_INFO, 0, 0, 0, 40, 48); if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - { - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gText_ThreeHyphens, 7, 12 * i, 0, 0, 0xFF, 3); - } - CopyWindowToVram(5, COPYWIN_GFX); + TMCase_Print(WIN_MOVE_INFO, FONT_3, gText_ThreeHyphens, 7, 12 * i, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + CopyWindowToVram(WIN_MOVE_INFO, COPYWIN_GFX); } else { + // Draw type icon move = ItemIdToBattleMoveId(itemId); - BlitMoveInfoIcon(5, gBattleMoves[move].type + 1, 0, 0); + BlitMoveInfoIcon(WIN_MOVE_INFO, gBattleMoves[move].type + 1, 0, 0); + + // Print power if (gBattleMoves[move].power < 2) str = gText_ThreeHyphens; else @@ -1370,7 +1563,9 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].power, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 12, 0, 0, 0xFF, 3); + TMCase_Print(WIN_MOVE_INFO, FONT_3, str, 7, 12, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + // Print accuracy if (gBattleMoves[move].accuracy == 0) str = gText_ThreeHyphens; else @@ -1378,10 +1573,13 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 24, 0, 0, 0xFF, 3); + TMCase_Print(WIN_MOVE_INFO, FONT_3, str, 7, 24, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + // Print PP ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gStringVar1, 7, 36, 0, 0, 0xFF, 3); - CopyWindowToVram(5, COPYWIN_GFX); + TMCase_Print(WIN_MOVE_INFO, FONT_3, gStringVar1, 7, 36, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + CopyWindowToVram(WIN_MOVE_INFO, COPYWIN_GFX); } } @@ -1390,144 +1588,149 @@ static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y) BlitBitmapToWindow(windowId, gTMCaseHM_Gfx, x, y, 16, 12); } -static void HandlePrintMoneyOnHand(void) +static void PrintPlayersMoney(void) { - PrintMoneyAmountInMoneyBoxWithBorder(8, 0x78, 0xD, GetMoney(&gSaveBlock1Ptr->money)); + PrintMoneyAmountInMoneyBoxWithBorder(WIN_MONEY, 120, 13, GetMoney(&gSaveBlock1Ptr->money)); } static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable *ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, FONT_2, 0, 2, 0x5B, 0x0E, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, FONT_2, 0, 2, 91, 14, ptrs); } -static u8 AddTMContextMenu(u8 * a0, u8 a1) +static u8 AddContextMenu(u8 * windowId, u8 windowIndex) { - if (*a0 == 0xFF) + if (*windowId == WINDOW_NONE) { - *a0 = AddWindow(&sTMContextWindowTemplates[a1]); - TMCase_SetWindowBorder1(*a0); + *windowId = AddWindow(&sWindowTemplates_ContextMenu[windowIndex]); + TMCase_SetWindowBorder1(*windowId); ScheduleBgCopyTilemapToVram(0); } - return *a0; + return *windowId; } -static void RemoveTMContextMenu(u8 * a0) +static void RemoveContextMenu(u8 * windowId) { - ClearStdWindowAndFrameToTransparent(*a0, FALSE); - ClearWindowTilemap(*a0); - RemoveWindow(*a0); + ClearStdWindowAndFrameToTransparent(*windowId, FALSE); + ClearWindowTilemap(*windowId); + RemoveWindow(*windowId); ScheduleBgCopyTilemapToVram(0); - *a0 = 0xFF; + *windowId = WINDOW_NONE; } -static u8 CreateTMSprite(u16 itemId) +static u8 CreateDiscSprite(u16 itemId) { - u8 spriteId = CreateSprite(&sTMSpriteTemplate, 0x29, 0x2E, 0); + u8 spriteId = CreateSprite(&sSpriteTemplate_Disc, DISC_BASE_X, DISC_BASE_Y, 0); u8 tmIdx; if (itemId == ITEM_NONE) { - UpdateTMSpritePosition(&gSprites[spriteId], 0xFF); + SetDiscSpritePosition(&gSprites[spriteId], DISC_HIDDEN); return spriteId; } else { tmIdx = itemId - ITEM_TM01; - SetTMSpriteAnim(&gSprites[spriteId], tmIdx); - TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type); - UpdateTMSpritePosition(&gSprites[spriteId], tmIdx); + SetDiscSpriteAnim(&gSprites[spriteId], tmIdx); + TintDiscpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type); + SetDiscSpritePosition(&gSprites[spriteId], tmIdx); return spriteId; } } -static void SetTMSpriteAnim(struct Sprite *sprite, u8 idx) +static void SetDiscSpriteAnim(struct Sprite *sprite, u8 tmIdx) { - if (idx >= NUM_TECHNICAL_MACHINES) - StartSpriteAnim(sprite, 1); + if (tmIdx >= NUM_TECHNICAL_MACHINES) + StartSpriteAnim(sprite, ANIM_HM); else - StartSpriteAnim(sprite, 0); + StartSpriteAnim(sprite, ANIM_TM); } -static void TintTMSpriteByType(u8 type) +static void TintDiscpriteByType(u8 type) { - u8 palIndex = IndexOfSpritePaletteTag(TM_CASE_TM_TAG) << 4; + u8 palIndex = IndexOfSpritePaletteTag(TAG_DISC) << 4; LoadPalette(sTMSpritePaletteBuffer + sTMSpritePaletteOffsetByType[type], 0x100 | palIndex, 0x20); - if (sTMCaseStaticResources.tmCaseMenuType == 4) - { + if (sTMCaseStaticResources.menuType == TMCASE_POKEDUDE) BlendPalettes(1 << (0x10 + palIndex), 4, RGB_BLACK); - } } -static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var) +static void SetDiscSpritePosition(struct Sprite *sprite, u8 tmIdx) { s32 x, y; - if (var == 0xFF) + if (tmIdx == DISC_HIDDEN) { - x = 0x1B; - y = 0x36; - sprite->y2 = 0x14; + x = 27; + y = 54; + sprite->y2 = DISC_CASE_DISTANCE; } else { - if (var >= 50) - var -= 50; + if (tmIdx >= NUM_TECHNICAL_MACHINES) + tmIdx -= NUM_TECHNICAL_MACHINES; else - var += 8; - x = 0x29 - (((0xE00 * var) / 58) >> 8); - y = 0x2E + (((0x800 * var) / 58) >> 8); + tmIdx += NUM_HIDDEN_MACHINES; + + x = DISC_BASE_X - Q_24_8_TO_INT(Q_24_8(14 * tmIdx) / (NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES)); + y = DISC_BASE_Y + Q_24_8_TO_INT(Q_24_8(8 * tmIdx) / (NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES)); } sprite->x = x; sprite->y = y; } -static void InitSelectedTMSpriteData(u8 spriteId, u16 itemId) +#define sItemId data[0] +#define sState data[1] + +static void SwapDisc(u8 spriteId, u16 itemId) { - gSprites[spriteId].data[0] = itemId; - gSprites[spriteId].data[1] = 0; - gSprites[spriteId].callback = SpriteCB_MoveTMSpriteInCase; + gSprites[spriteId].sItemId = itemId; + gSprites[spriteId].sState = 0; + gSprites[spriteId].callback = SpriteCB_SwapDisc; } -static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite) +static void SpriteCB_SwapDisc(struct Sprite *sprite) { - switch (sprite->data[1]) + switch (sprite->sState) { case 0: - if (sprite->y2 >= 20) + // Lower old disc back into case + if (sprite->y2 >= DISC_CASE_DISTANCE) { - if (sprite->data[0] != ITEM_NONE) + // Old disc is hidden, set up new disc + if (sprite->sItemId != ITEM_NONE) { - sprite->data[1]++; - TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(sprite->data[0])].type); - sprite->data[0] -= ITEM_TM01; - SetTMSpriteAnim(sprite, sprite->data[0]); - UpdateTMSpritePosition(sprite, sprite->data[0]); + sprite->sState++; + TintDiscpriteByType(gBattleMoves[ItemIdToBattleMoveId(sprite->sItemId)].type); + sprite->sItemId -= ITEM_TM01; + SetDiscSpriteAnim(sprite, sprite->sItemId); + SetDiscSpritePosition(sprite, sprite->sItemId); } else sprite->callback = SpriteCallbackDummy; } else { - sprite->y2 += 10; + sprite->y2 += DISC_Y_MOVE; } break; case 1: + // Raise new disc out of case if (sprite->y2 <= 0) sprite->callback = SpriteCallbackDummy; else - sprite->y2 -= 10; + sprite->y2 -= DISC_Y_MOVE; } } // - 1 excludes TYPE_MYSTERY -#define NUM_TM_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16) +#define NUM_DISC_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16) -static void LoadTMTypePalettes(void) +static void LoadDiscTypePalettes(void) { struct SpritePalette spritePalette; - sTMSpritePaletteBuffer = Alloc(NUM_TM_COLORS * sizeof(u16)); + sTMSpritePaletteBuffer = Alloc(NUM_DISC_COLORS * sizeof(u16)); LZDecompressWram(gTMCaseDiscTypes1_Pal, sTMSpritePaletteBuffer); // Decompress the first 16 LZDecompressWram(gTMCaseDiscTypes2_Pal, sTMSpritePaletteBuffer + 0x100); // Decompress the rest (Only 17 total, this is just Dragon type) - spritePalette.data = sTMSpritePaletteBuffer + NUM_TM_COLORS; - spritePalette.tag = TM_CASE_TM_TAG; + spritePalette.data = sTMSpritePaletteBuffer + NUM_DISC_COLORS; + spritePalette.tag = TAG_DISC; LoadSpritePalette(&spritePalette); }