diff --git a/graphics/pokemon/castform/anim_front.png b/graphics/pokemon/castform/anim_front.png new file mode 100644 index 0000000000..b737a1d49b Binary files /dev/null and b/graphics/pokemon/castform/anim_front.png differ diff --git a/graphics/pokemon/castform/back.png b/graphics/pokemon/castform/back.png index 4a0a4f59d7..c63a11df99 100644 Binary files a/graphics/pokemon/castform/back.png and b/graphics/pokemon/castform/back.png differ diff --git a/graphics/pokemon/castform/front.png b/graphics/pokemon/castform/front.png deleted file mode 100644 index c21ab589bc..0000000000 Binary files a/graphics/pokemon/castform/front.png and /dev/null differ diff --git a/graphics/pokemon/castform/normal.pal b/graphics/pokemon/castform/normal.pal index c88edafd24..39574e3b2d 100644 --- a/graphics/pokemon/castform/normal.pal +++ b/graphics/pokemon/castform/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 -90 82 82 -205 189 189 -230 222 222 -246 246 238 +81 81 93 +176 183 186 +210 217 219 +221 232 233 0 0 0 255 255 255 222 222 246 -0 0 0 +245 153 185 +200 65 142 0 0 0 0 0 0 148 148 148 -74 82 74 +75 76 83 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/rainy/anim_front.png b/graphics/pokemon/castform/rainy/anim_front.png new file mode 100644 index 0000000000..b73f29d971 Binary files /dev/null and b/graphics/pokemon/castform/rainy/anim_front.png differ diff --git a/graphics/pokemon/castform/rainy/back.png b/graphics/pokemon/castform/rainy/back.png index bd7ac7d7ce..9fa76ba8af 100644 Binary files a/graphics/pokemon/castform/rainy/back.png and b/graphics/pokemon/castform/rainy/back.png differ diff --git a/graphics/pokemon/castform/rainy/front.png b/graphics/pokemon/castform/rainy/front.png deleted file mode 100644 index acfcca96bf..0000000000 Binary files a/graphics/pokemon/castform/rainy/front.png and /dev/null differ diff --git a/graphics/pokemon/castform/rainy/normal.pal b/graphics/pokemon/castform/rainy/normal.pal index f844fdf1ff..2b4089982b 100644 --- a/graphics/pokemon/castform/rainy/normal.pal +++ b/graphics/pokemon/castform/rainy/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 57 65 90 -98 115 189 -115 139 213 -148 180 205 -205 238 246 -180 197 222 -139 205 222 -131 180 197 -82 98 131 -197 197 197 -148 139 148 -90 90 82 +82 101 183 +98 146 208 +120 182 232 +238 160 209 +203 238 246 +173 196 230 +167 217 230 +130 167 196 +82 90 132 +191 200 202 +138 138 147 +82 83 91 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/rainy/shiny.pal b/graphics/pokemon/castform/rainy/shiny.pal index f844fdf1ff..04f8babf69 100644 --- a/graphics/pokemon/castform/rainy/shiny.pal +++ b/graphics/pokemon/castform/rainy/shiny.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 -57 65 90 -98 115 189 -115 139 213 -148 180 205 -205 238 246 -180 197 222 -139 205 222 -131 180 197 -82 98 131 -197 197 197 -148 139 148 -90 90 82 +58 77 90 +66 133 158 +59 186 164 +170 228 208 +238 160 209 +148 251 101 +67 203 125 +123 220 239 +112 158 194 +72 88 142 +175 213 218 +110 136 175 +77 79 96 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/shiny.pal b/graphics/pokemon/castform/shiny.pal index 4fc9b290d8..ccdba42666 100644 --- a/graphics/pokemon/castform/shiny.pal +++ b/graphics/pokemon/castform/shiny.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 -98 90 90 -205 164 189 -230 197 222 +88 74 115 +192 163 204 +226 198 231 255 222 255 0 0 0 -255 246 65 -230 180 32 +242 236 110 +235 196 76 +245 153 185 +200 65 151 0 0 0 0 0 0 -0 0 0 -148 148 148 -74 82 74 +161 116 180 +75 66 92 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/snowy/anim_front.png b/graphics/pokemon/castform/snowy/anim_front.png new file mode 100644 index 0000000000..eec3816595 Binary files /dev/null and b/graphics/pokemon/castform/snowy/anim_front.png differ diff --git a/graphics/pokemon/castform/snowy/back.png b/graphics/pokemon/castform/snowy/back.png index 6b8946b351..d8ab4e38af 100644 Binary files a/graphics/pokemon/castform/snowy/back.png and b/graphics/pokemon/castform/snowy/back.png differ diff --git a/graphics/pokemon/castform/snowy/front.png b/graphics/pokemon/castform/snowy/front.png deleted file mode 100644 index 54f338d1f7..0000000000 Binary files a/graphics/pokemon/castform/snowy/front.png and /dev/null differ diff --git a/graphics/pokemon/castform/snowy/normal.pal b/graphics/pokemon/castform/snowy/normal.pal index e05641ab1a..a32ac8fa02 100644 --- a/graphics/pokemon/castform/snowy/normal.pal +++ b/graphics/pokemon/castform/snowy/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 41 82 57 123 82 189 139 115 213 -148 180 205 +222 84 195 +242 156 214 197 180 255 156 156 197 -139 205 172 -115 164 139 +172 221 198 +124 182 168 98 74 115 -189 230 230 -82 115 106 -74 82 74 +214 245 229 +83 113 116 +75 83 81 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/snowy/shiny.pal b/graphics/pokemon/castform/snowy/shiny.pal index e05641ab1a..95eba60731 100644 --- a/graphics/pokemon/castform/snowy/shiny.pal +++ b/graphics/pokemon/castform/snowy/shiny.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 -41 82 57 -123 82 189 -139 115 213 -148 180 205 -197 180 255 -156 156 197 -139 205 172 -115 164 139 -98 74 115 -189 230 230 -82 115 106 +41 41 81 +88 81 189 +103 164 224 +222 84 195 +242 156 214 +246 255 178 +211 198 141 +170 201 212 +153 160 168 +74 74 115 +200 234 234 +110 120 135 74 82 74 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/sunny/anim_front.png b/graphics/pokemon/castform/sunny/anim_front.png new file mode 100644 index 0000000000..5f4a9ea788 Binary files /dev/null and b/graphics/pokemon/castform/sunny/anim_front.png differ diff --git a/graphics/pokemon/castform/sunny/back.png b/graphics/pokemon/castform/sunny/back.png index a3fa23260d..53e5a4b60f 100644 Binary files a/graphics/pokemon/castform/sunny/back.png and b/graphics/pokemon/castform/sunny/back.png differ diff --git a/graphics/pokemon/castform/sunny/front.png b/graphics/pokemon/castform/sunny/front.png deleted file mode 100644 index fe37e1867d..0000000000 Binary files a/graphics/pokemon/castform/sunny/front.png and /dev/null differ diff --git a/graphics/pokemon/castform/sunny/normal.pal b/graphics/pokemon/castform/sunny/normal.pal index 2468b2cfb2..11c6423859 100644 --- a/graphics/pokemon/castform/sunny/normal.pal +++ b/graphics/pokemon/castform/sunny/normal.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 98 49 41 -205 90 74 -238 123 74 -255 156 65 -0 0 0 +206 75 75 +238 101 73 +255 163 77 +245 151 182 255 246 106 -230 213 106 -255 156 98 -213 131 74 -148 90 65 -213 205 230 -90 90 82 +234 196 83 +255 192 66 +222 128 33 +135 76 59 +206 210 222 +228 238 242 +87 82 91 255 255 255 24 24 24 diff --git a/graphics/pokemon/castform/sunny/shiny.pal b/graphics/pokemon/castform/sunny/shiny.pal index 2468b2cfb2..bc0fdb44e2 100644 --- a/graphics/pokemon/castform/sunny/shiny.pal +++ b/graphics/pokemon/castform/sunny/shiny.pal @@ -1,19 +1,19 @@ JASC-PAL 0100 16 -248 160 176 197 197 148 98 49 41 -205 90 74 -238 123 74 -255 156 65 -0 0 0 -255 246 106 -230 213 106 -255 156 98 -213 131 74 +191 64 100 +238 73 103 +255 122 122 +245 151 182 +255 165 133 +230 107 107 +255 206 107 +222 138 63 148 90 65 -213 205 230 +213 174 214 +238 211 231 90 90 82 255 255 255 24 24 24 diff --git a/graphics/pokemon/cherrim/normal/front.png b/graphics/pokemon/cherrim/normal/front.png deleted file mode 100644 index ffbd96c7d9..0000000000 Binary files a/graphics/pokemon/cherrim/normal/front.png and /dev/null differ diff --git a/graphics/pokemon/cherrim/sunshine/anim_front.png b/graphics/pokemon/cherrim/sunshine/anim_front.png index fe8ac9e465..f9530f0e07 100644 Binary files a/graphics/pokemon/cherrim/sunshine/anim_front.png and b/graphics/pokemon/cherrim/sunshine/anim_front.png differ diff --git a/graphics/pokemon/cherrim/sunshine/front.png b/graphics/pokemon/cherrim/sunshine/front.png deleted file mode 100644 index 686ca0d1a6..0000000000 Binary files a/graphics/pokemon/cherrim/sunshine/front.png and /dev/null differ diff --git a/graphics/pokemon/spheal/anim_front.png b/graphics/pokemon/spheal/anim_front.png index 677d8651cd..5ea0504180 100644 Binary files a/graphics/pokemon/spheal/anim_front.png and b/graphics/pokemon/spheal/anim_front.png differ diff --git a/graphics/pokemon/spinda/anim_front.png b/graphics/pokemon/spinda/anim_front.png index 14dd77f9d5..fb794df1d8 100644 Binary files a/graphics/pokemon/spinda/anim_front.png and b/graphics/pokemon/spinda/anim_front.png differ diff --git a/graphics/pokemon/spinda/back.png b/graphics/pokemon/spinda/back.png index fb529d2d24..4b4bc7ad3d 100644 Binary files a/graphics/pokemon/spinda/back.png and b/graphics/pokemon/spinda/back.png differ diff --git a/graphics/pokemon/spinda/normal.pal b/graphics/pokemon/spinda/normal.pal index 9b0ad5bfc4..3c347b1a36 100644 --- a/graphics/pokemon/spinda/normal.pal +++ b/graphics/pokemon/spinda/normal.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 49 164 82 -246 230 172 -230 213 164 -197 180 131 -172 148 106 -222 139 74 +251 245 223 +231 218 192 +209 186 158 +172 131 108 +242 136 54 222 106 57 -180 90 41 -156 57 24 +179 66 41 +154 35 24 115 65 16 -172 65 90 -255 255 0 +170 65 119 +242 115 166 255 255 0 123 98 74 90 65 49 diff --git a/graphics/pokemon/spinda/shiny.pal b/graphics/pokemon/spinda/shiny.pal index 6aa7481296..e44ef51816 100644 --- a/graphics/pokemon/spinda/shiny.pal +++ b/graphics/pokemon/spinda/shiny.pal @@ -2,17 +2,17 @@ JASC-PAL 0100 16 49 164 82 -246 230 172 -230 213 164 -197 180 131 -172 148 106 +251 245 223 +231 218 192 +209 186 158 +172 131 108 180 197 90 -148 164 57 -115 131 24 -82 98 0 +134 162 57 +87 129 24 +46 97 0 49 65 0 -172 65 90 -255 255 0 +170 65 119 +242 115 166 255 255 0 123 98 74 90 65 49 diff --git a/include/pokemon.h b/include/pokemon.h index 0a4e160e27..aa4f26a4cb 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -543,7 +543,7 @@ u16 NationalToHoennOrder(u16 nationalNum); u16 SpeciesToNationalPokedexNum(u16 species); u16 SpeciesToHoennPokedexNum(u16 species); u16 HoennToNationalOrder(u16 hoennNum); -void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic); +void DrawSpindaSpots(u32 personality, u8 *dest, bool32 isSecondFrame); void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies); u8 GetPlayerFlankId(void); u16 GetLinkTrainerFlankId(u8 id); diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index aaf9c91afb..63d65079e2 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -404,7 +404,7 @@ const u32 gMonFrontPic_Anorith[] = INCBIN_U32("graphics/pokemon/anorith/anim_fro const u32 gMonFrontPic_Armaldo[] = INCBIN_U32("graphics/pokemon/armaldo/anim_front.4bpp.lz"); const u32 gMonFrontPic_Feebas[] = INCBIN_U32("graphics/pokemon/feebas/anim_front.4bpp.lz"); const u32 gMonFrontPic_Milotic[] = INCBIN_U32("graphics/pokemon/milotic/anim_front.4bpp.lz"); -const u32 gMonFrontPic_Castform[] = INCBIN_U32("graphics/pokemon/castform/front.4bpp.lz"); +const u32 gMonFrontPic_Castform[] = INCBIN_U32("graphics/pokemon/castform/anim_front.4bpp.lz"); const u32 gMonFrontPic_Kecleon[] = INCBIN_U32("graphics/pokemon/kecleon/anim_front.4bpp.lz"); const u32 gMonFrontPic_Shuppet[] = INCBIN_U32("graphics/pokemon/shuppet/anim_front.4bpp.lz"); const u32 gMonFrontPic_Banette[] = INCBIN_U32("graphics/pokemon/banette/anim_front.4bpp.lz"); @@ -1148,9 +1148,9 @@ const u32 gMonFrontPic_UnownY[] = INCBIN_U32("graphics/pokemon/unown/y/anim_fron const u32 gMonFrontPic_UnownZ[] = INCBIN_U32("graphics/pokemon/unown/z/anim_front.4bpp.lz"); const u32 gMonFrontPic_UnownExclamationMark[] = INCBIN_U32("graphics/pokemon/unown/exclamation_mark/anim_front.4bpp.lz"); const u32 gMonFrontPic_UnownQuestionMark[] = INCBIN_U32("graphics/pokemon/unown/question_mark/anim_front.4bpp.lz"); -const u32 gMonFrontPic_CastformSunny[] = INCBIN_U32("graphics/pokemon/castform/sunny/front.4bpp.lz"); -const u32 gMonFrontPic_CastformRainy[] = INCBIN_U32("graphics/pokemon/castform/rainy/front.4bpp.lz"); -const u32 gMonFrontPic_CastformSnowy[] = INCBIN_U32("graphics/pokemon/castform/snowy/front.4bpp.lz"); +const u32 gMonFrontPic_CastformSunny[] = INCBIN_U32("graphics/pokemon/castform/sunny/anim_front.4bpp.lz"); +const u32 gMonFrontPic_CastformRainy[] = INCBIN_U32("graphics/pokemon/castform/rainy/anim_front.4bpp.lz"); +const u32 gMonFrontPic_CastformSnowy[] = INCBIN_U32("graphics/pokemon/castform/snowy/anim_front.4bpp.lz"); const u32 gMonFrontPic_DeoxysAttack[] = INCBIN_U32("graphics/pokemon/deoxys/attack/anim_front.4bpp.lz"); const u32 gMonFrontPic_DeoxysDefense[] = INCBIN_U32("graphics/pokemon/deoxys/defense/anim_front.4bpp.lz"); const u32 gMonFrontPic_DeoxysSpeed[] = INCBIN_U32("graphics/pokemon/deoxys/speed/anim_front.4bpp.lz"); @@ -1159,7 +1159,7 @@ const u32 gMonFrontPic_BurmySandyCloak[] = INCBIN_U32("graphics/pokemon/burmy/sa const u32 gMonFrontPic_BurmyTrashCloak[] = INCBIN_U32("graphics/pokemon/burmy/trash_cloak/anim_front.4bpp.lz"); const u32 gMonFrontPic_WormadamSandyCloak[] = INCBIN_U32("graphics/pokemon/wormadam/sandy_cloak/anim_front.4bpp.lz"); const u32 gMonFrontPic_WormadamTrashCloak[] = INCBIN_U32("graphics/pokemon/wormadam/trash_cloak/anim_front.4bpp.lz"); -const u32 gMonFrontPic_CherrimSunshine[] = INCBIN_U32("graphics/pokemon/cherrim/sunshine/front.4bpp.lz"); +const u32 gMonFrontPic_CherrimSunshine[] = INCBIN_U32("graphics/pokemon/cherrim/sunshine/anim_front.4bpp.lz"); const u32 gMonFrontPic_ShellosEastSea[] = INCBIN_U32("graphics/pokemon/shellos/east_sea/anim_front.4bpp.lz"); const u32 gMonFrontPic_GastrodonEastSea[] = INCBIN_U32("graphics/pokemon/gastrodon/east_sea/anim_front.4bpp.lz"); const u32 gMonFrontPic_RotomHeat[] = INCBIN_U32("graphics/pokemon/rotom/heat/anim_front.4bpp.lz"); diff --git a/src/data/pokemon_graphics/front_pic_anims.h b/src/data/pokemon_graphics/front_pic_anims.h index d30dc4266e..309e14e896 100644 --- a/src/data/pokemon_graphics/front_pic_anims.h +++ b/src/data/pokemon_graphics/front_pic_anims.h @@ -3264,6 +3264,16 @@ static const union AnimCmd sAnim_Breloom_1[] = ANIMCMD_END, }; +static const union AnimCmd sAnim_Spinda_1[] = +{ + ANIMCMD_FRAME(0, 17), + ANIMCMD_FRAME(1, 23), + ANIMCMD_FRAME(0, 17), + ANIMCMD_FRAME(1, 23), + ANIMCMD_FRAME(0, 13), + ANIMCMD_END, +}; + static const union AnimCmd sAnim_Wingull_1[] = { ANIMCMD_FRAME(0, 17), @@ -4153,27 +4163,45 @@ static const union AnimCmd sAnim_Aggron_1[] = ANIMCMD_END, }; -static const union AnimCmd sAnim_Castform_0[] = -{ - ANIMCMD_FRAME(0, 1), - ANIMCMD_END, -}; - static const union AnimCmd sAnim_Castform_1[] = { - ANIMCMD_FRAME(1, 1), + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(1, 24), + ANIMCMD_FRAME(0, 24), + ANIMCMD_FRAME(1, 24), + ANIMCMD_FRAME(0, 24), ANIMCMD_END, }; -static const union AnimCmd sAnim_Castform_2[] = +static const union AnimCmd sAnim_CastformSunny_1[] = { - ANIMCMD_FRAME(2, 1), + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(1, 12), + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(1, 12), + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(1, 12), + ANIMCMD_FRAME(0, 12), ANIMCMD_END, }; -static const union AnimCmd sAnim_Castform_3[] = +static const union AnimCmd sAnim_CastformRainy_1[] = { - ANIMCMD_FRAME(3, 1), + ANIMCMD_FRAME(0, 22), + ANIMCMD_FRAME(1, 22), + ANIMCMD_FRAME(0, 22), + ANIMCMD_FRAME(1, 22), + ANIMCMD_FRAME(0, 11), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_CastformSnowy_1[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_FRAME(1, 12), + ANIMCMD_FRAME(0, 12), + ANIMCMD_FRAME(1, 29), + ANIMCMD_FRAME(0, 12), ANIMCMD_END, }; @@ -5134,15 +5162,12 @@ static const union AnimCmd sAnim_CherrimOvercast_2[] = static const union AnimCmd sAnim_CherrimSunshine_1[] = { - ANIMCMD_FRAME(0, 10), - ANIMCMD_FRAME(1, 10), - ANIMCMD_FRAME(0, 10), - ANIMCMD_FRAME(1, 10), - ANIMCMD_FRAME(0, 10), - ANIMCMD_FRAME(1, 10), - ANIMCMD_FRAME(0, 10), - ANIMCMD_FRAME(1, 10), - ANIMCMD_FRAME(0, 10), + ANIMCMD_FRAME(1, 6), + ANIMCMD_FRAME(0, 28), + ANIMCMD_FRAME(1, 12), + ANIMCMD_FRAME(0, 28), + ANIMCMD_FRAME(1, 7), + ANIMCMD_FRAME(0, 8), ANIMCMD_END, }; @@ -10821,9 +10846,7 @@ SINGLE_ANIMATION(Taillow); SINGLE_ANIMATION(Swellow); SINGLE_ANIMATION(Shroomish); SINGLE_ANIMATION(Breloom); -static const union AnimCmd *const sAnims_Spinda[] ={ - sAnim_GeneralFrame0, -}; +SINGLE_ANIMATION(Spinda); SINGLE_ANIMATION(Wingull); SINGLE_ANIMATION(Pelipper); DOUBLE_ANIMATION(Surskit); @@ -10900,12 +10923,10 @@ SINGLE_ANIMATION(Relicanth); SINGLE_ANIMATION(Aron); SINGLE_ANIMATION(Lairon); SINGLE_ANIMATION(Aggron); -static const union AnimCmd *const sAnims_Castform[] ={ - sAnim_Castform_0, - sAnim_Castform_1, - sAnim_Castform_2, - sAnim_Castform_3, -}; +SINGLE_ANIMATION(Castform); +SINGLE_ANIMATION(CastformSunny); +SINGLE_ANIMATION(CastformRainy); +SINGLE_ANIMATION(CastformSnowy); SINGLE_ANIMATION(Volbeat); SINGLE_ANIMATION(Illumise); SINGLE_ANIMATION(Lileep); @@ -12742,9 +12763,9 @@ const union AnimCmd *const *const gMonFrontAnimsPtrTable[NUM_SPECIES + 1] = [SPECIES_UNOWN_Z] = sAnims_UnownZ, [SPECIES_UNOWN_EMARK] = sAnims_UnownEMark, [SPECIES_UNOWN_QMARK] = sAnims_UnownQMark, - [SPECIES_CASTFORM_SUNNY] = sAnims_Castform, - [SPECIES_CASTFORM_RAINY] = sAnims_Castform, - [SPECIES_CASTFORM_SNOWY] = sAnims_Castform, + [SPECIES_CASTFORM_SUNNY] = sAnims_CastformSunny, + [SPECIES_CASTFORM_RAINY] = sAnims_CastformRainy, + [SPECIES_CASTFORM_SNOWY] = sAnims_CastformSnowy, [SPECIES_DEOXYS_ATTACK] = sAnims_DeoxysAttack, [SPECIES_DEOXYS_DEFENSE] = sAnims_DeoxysDefense, [SPECIES_DEOXYS_SPEED] = sAnims_DeoxysSpeed, diff --git a/src/decompress.c b/src/decompress.c index 54e7200be4..b4de99efc3 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -109,7 +109,11 @@ void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontP LZ77UnCompWram(gMonBackPicTable[SPECIES_NONE].data, dest); } - DrawSpindaSpots(species, personality, dest, isFrontPic); + if (species == SPECIES_SPINDA && isFrontPic) + { + DrawSpindaSpots(personality, dest, FALSE); + DrawSpindaSpots(personality, dest, TRUE); + } } void Unused_LZDecompressWramIndirect(const void **src, void *dest) diff --git a/src/pokemon.c b/src/pokemon.c index 23edee9a7a..cf2c8f5cc8 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2289,7 +2289,7 @@ const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = [SPECIES_TORKOAL - 1] = ANIM_V_STRETCH, [SPECIES_SPOINK - 1] = ANIM_H_JUMPS_V_STRETCH_TWICE, [SPECIES_GRUMPIG - 1] = ANIM_H_JUMPS_V_STRETCH, - [SPECIES_SPINDA - 1] = ANIM_H_JUMPS, + [SPECIES_SPINDA - 1] = ANIM_CIRCLE_INTO_BG, [SPECIES_TRAPINCH - 1] = ANIM_V_SHAKE, [SPECIES_VIBRAVA - 1] = ANIM_H_SHAKE, [SPECIES_FLYGON - 1] = ANIM_ZIGZAG_SLOW, @@ -2314,9 +2314,6 @@ const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = [SPECIES_FEEBAS - 1] = ANIM_BOUNCE_ROTATE_TO_SIDES_SLOW, [SPECIES_MILOTIC - 1] = ANIM_CIRCULAR_STRETCH_TWICE, [SPECIES_CASTFORM - 1] = ANIM_H_SLIDE_WOBBLE, - [SPECIES_CASTFORM_SUNNY - 1] = ANIM_H_SLIDE_WOBBLE, - [SPECIES_CASTFORM_RAINY - 1] = ANIM_H_SLIDE_WOBBLE, - [SPECIES_CASTFORM_SNOWY - 1] = ANIM_H_SLIDE_WOBBLE, [SPECIES_KECLEON - 1] = ANIM_FLICKER_INCREASING, [SPECIES_SHUPPET - 1] = ANIM_V_SLIDE_WOBBLE, [SPECIES_BANETTE - 1] = ANIM_CIRCULAR_STRETCH_TWICE, @@ -2328,7 +2325,7 @@ const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = [SPECIES_WYNAUT - 1] = ANIM_H_JUMPS_V_STRETCH, [SPECIES_SNORUNT - 1] = ANIM_V_SQUISH_AND_BOUNCE_SLOW, [SPECIES_GLALIE - 1] = ANIM_ZIGZAG_FAST, - [SPECIES_SPHEAL - 1] = ANIM_V_STRETCH, + [SPECIES_SPHEAL - 1] = ANIM_SPIN_LONG, [SPECIES_SEALEO - 1] = ANIM_V_STRETCH, [SPECIES_WALREIN - 1] = ANIM_H_SHAKE, [SPECIES_CLAMPERL - 1] = ANIM_TWIST, @@ -2880,16 +2877,20 @@ const u8 sMonFrontAnimIdsTable[NUM_SPECIES - 1] = [SPECIES_SNEASLER - 1] = ANIM_V_SQUISH_AND_BOUNCE, [SPECIES_OVERQWIL - 1] = ANIM_V_SQUISH_AND_BOUNCE, [SPECIES_ENAMORUS - 1] = ANIM_V_SQUISH_AND_BOUNCE, - [SPECIES_DEOXYS_ATTACK - 1] = ANIM_GROW_VIBRATE, - [SPECIES_DEOXYS_DEFENSE - 1] = ANIM_GROW_VIBRATE, - [SPECIES_DEOXYS_SPEED - 1] = ANIM_GROW_VIBRATE, + //Gen 3 Forms + [SPECIES_CASTFORM_SUNNY - 1] = ANIM_GROW_VIBRATE, + [SPECIES_CASTFORM_RAINY - 1] = ANIM_SWING_CONVEX_FAST, + [SPECIES_CASTFORM_SNOWY - 1] = ANIM_V_STRETCH, + [SPECIES_DEOXYS_ATTACK - 1] = ANIM_GROW_VIBRATE, + [SPECIES_DEOXYS_DEFENSE - 1] = ANIM_GROW_VIBRATE, + [SPECIES_DEOXYS_SPEED - 1] = ANIM_GROW_VIBRATE, //Gen 4 Forms [SPECIES_BURMY_SANDY_CLOAK - 1] = ANIM_V_STRETCH, [SPECIES_BURMY_TRASH_CLOAK - 1] = ANIM_V_STRETCH, [SPECIES_WORMADAM_SANDY_CLOAK - 1] = ANIM_SWING_CONVEX_FAST_SHORT, [SPECIES_WORMADAM_TRASH_CLOAK - 1] = ANIM_SWING_CONVEX_FAST_SHORT, - [SPECIES_CHERRIM_SUNSHINE - 1] = ANIM_RAPID_H_HOPS, + [SPECIES_CHERRIM_SUNSHINE - 1] = ANIM_H_JUMPS_V_STRETCH, [SPECIES_SHELLOS_EAST_SEA - 1] = ANIM_V_STRETCH, [SPECIES_GASTRODON_EAST_SEA - 1] = ANIM_CIRCULAR_STRETCH_TWICE, [SPECIES_ROTOM_HEAT - 1] = ANIM_V_SQUISH_AND_BOUNCE, @@ -6807,7 +6808,7 @@ u16 HoennToNationalOrder(u16 hoennNum) // To draw a spot pixel, add 4 to the color index #define SPOT_COLOR_ADJUSTMENT 4 /* - The macro below handles drawing the randomly-placed spots on Spinda's front sprite. + The function below handles drawing the randomly-placed spots on Spinda's front sprite. Spinda has 4 spots, each with an entry in gSpindaSpotGraphics. Each entry contains a base x and y coordinate for the spot and a 16x16 binary image. Each bit in the image determines whether that pixel should be considered part of the spot. @@ -6819,85 +6820,80 @@ u16 HoennToNationalOrder(u16 hoennNum) coordinate is calculated as (baseCoord + (given 4 bits of personality) - 8). In effect this means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities). - The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if + The function then loops over the 16x16 spot image. For each bit in the spot's binary image, if the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the pixel on Spinda satisfies the following formula: ((u8)(colorIndex - 1) <= 2). The -1 excludes transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. - The above is done two different ways in the macro: one with << 4, and one without. This + The above is done two different ways in the function: one with << 4, and one without. This is because Spinda's sprite is a 4 bits per pixel image, but the pointer to Spinda's pixels (destPixels) is an 8 bit pointer, so it addresses two pixels. Shifting by 4 accesses the 2nd of these pixels, so this is done every other time. */ -#define DRAW_SPINDA_SPOTS(personality, dest) \ -{ \ - s32 i; \ - for (i = 0; i < (s32)ARRAY_COUNT(gSpindaSpotGraphics); i++) \ - { \ - s32 row; \ - u8 x = gSpindaSpotGraphics[i].x + ((personality & 0x0F) - 8); \ - u8 y = gSpindaSpotGraphics[i].y + (((personality & 0xF0) >> 4) - 8); \ - \ - for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) \ - { \ - s32 column; \ - s32 spotPixelRow = gSpindaSpotGraphics[i].image[row]; \ - \ - for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) \ - { \ - /* Get target pixels on Spinda's sprite */ \ - u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + \ - ((column % 8) / 2) + \ - ((y / 8) * TILE_SIZE_4BPP * 8) + \ - ((y % 8) * 4); \ - \ - /* Is this pixel in the 16x16 spot image part of the spot? */ \ - if (spotPixelRow & 1) \ - { \ - /* destPixels addressess two pixels, alternate which */ \ - /* of the two pixels is being considered for drawing */ \ - if (column & 1) \ - { \ - /* Draw spot pixel if this is Spinda's body color */ \ - if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\ - <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\ - *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \ - } \ - else \ - { \ - /* Draw spot pixel if this is Spinda's body color */ \ - if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \ - <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \ - *destPixels += SPOT_COLOR_ADJUSTMENT; \ - } \ - } \ - \ - spotPixelRow >>= 1; \ - } \ - \ - y++; \ - } \ - \ - personality >>= 8; \ - } \ -} - -// Same as DrawSpindaSpots but attempts to discern for itself whether or -// not it's the front pic. -static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest) +void DrawSpindaSpots(u32 personality, u8 *dest, bool32 isSecondFrame) { - if (species == SPECIES_SPINDA - && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_LEFT] - && dest != gMonSpritesGfxPtr->sprites.ptr[B_POSITION_PLAYER_RIGHT]) - DRAW_SPINDA_SPOTS(personality, dest); -} + s32 i; + for (i = 0; i < (s32)ARRAY_COUNT(gSpindaSpotGraphics); i++) + { + s32 row; + u8 x = gSpindaSpotGraphics[i].x + (personality & 0x0F); + u8 y = gSpindaSpotGraphics[i].y + ((personality & 0xF0) >> 4); -void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic) -{ - if (species == SPECIES_SPINDA && isFrontPic) - DRAW_SPINDA_SPOTS(personality, dest); + if (isSecondFrame) + { + x -= 12; + y += 56; + } + else + { + x -= 8; + y -= 8; + } + + for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) + { + s32 column; + s32 spotPixelRow = gSpindaSpotGraphics[i].image[row]; + + for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) + { + /* Get target pixels on Spinda's sprite */ + u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + + ((column % 8) / 2) + + ((y / 8) * TILE_SIZE_4BPP * 8) + + ((y % 8) * 4); + + /* Is this pixel in the 16x16 spot image part of the spot? */ + if (spotPixelRow & 1) + { + /* destPixels addressess two pixels, alternate which */ + /* of the two pixels is being considered for drawing */ + if (column & 1) + { + /* Draw spot pixel if this is Spinda's body color */ + if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4)) + <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4)) + *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); + } + else + { + /* Draw spot pixel if this is Spinda's body color */ + if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) + <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) + *destPixels += SPOT_COLOR_ADJUSTMENT; + } + } + + spotPixelRow >>= 1; + } + + y++; + } + + personality >>= 8; + } } void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) @@ -8109,13 +8105,7 @@ const u8 *GetTrainerNameFromId(u16 trainerId) bool8 HasTwoFramesAnimation(u16 species) { - return (species != SPECIES_CASTFORM - && species != SPECIES_SPINDA - && species != SPECIES_UNOWN - && species != SPECIES_CHERRIM - && species != SPECIES_CASTFORM_SUNNY - && species != SPECIES_CASTFORM_RAINY - && species != SPECIES_CASTFORM_SNOWY); + return species != SPECIES_UNOWN; } static bool8 ShouldSkipFriendshipChange(void) diff --git a/src/pokemon_animation.c b/src/pokemon_animation.c index c9f6a04899..57b3d5b303 100644 --- a/src/pokemon_animation.c +++ b/src/pokemon_animation.c @@ -575,9 +575,9 @@ static const u8 sSpeciesToBackAnimSet[NUM_SPECIES] = [SPECIES_LAIRON] = BACK_ANIM_V_SHAKE, [SPECIES_AGGRON] = BACK_ANIM_V_SHAKE_LOW, [SPECIES_CASTFORM] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_CASTFORM_SUNNY] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_CASTFORM_RAINY] = BACK_ANIM_CONVEX_DOUBLE_ARC, - [SPECIES_CASTFORM_SNOWY] = BACK_ANIM_CONVEX_DOUBLE_ARC, + [SPECIES_CASTFORM_SUNNY] = BACK_ANIM_SHAKE_GLOW_RED, + [SPECIES_CASTFORM_RAINY] = BACK_ANIM_SHRINK_GROW_VIBRATE, + [SPECIES_CASTFORM_SNOWY] = BACK_ANIM_TRIANGLE_DOWN, [SPECIES_VOLBEAT] = BACK_ANIM_CONVEX_DOUBLE_ARC, [SPECIES_ILLUMISE] = BACK_ANIM_CONVEX_DOUBLE_ARC, [SPECIES_LILEEP] = BACK_ANIM_H_STRETCH, @@ -722,7 +722,7 @@ static const u8 sSpeciesToBackAnimSet[NUM_SPECIES] = [SPECIES_BURMY_TRASH_CLOAK] = BACK_ANIM_H_SHAKE, [SPECIES_WORMADAM_SANDY_CLOAK] = BACK_ANIM_V_SHAKE, [SPECIES_WORMADAM_TRASH_CLOAK] = BACK_ANIM_V_SHAKE, - [SPECIES_CHERRIM_SUNSHINE] = BACK_ANIM_CONCAVE_ARC_SMALL, + [SPECIES_CHERRIM_SUNSHINE] = BACK_ANIM_CONCAVE_ARC_SMALL, [SPECIES_SHELLOS_EAST_SEA] = BACK_ANIM_H_SPRING, [SPECIES_GASTRODON_EAST_SEA] = BACK_ANIM_SHRINK_GROW_VIBRATE, [SPECIES_ROTOM_HEAT] = BACK_ANIM_SHAKE_GLOW_RED,