Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up remaining Castform hack stuff #3063

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions asm/macros/battle_script.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1186,11 +1186,11 @@
.byte 0xe5
.endm

.macro doweatherformchangeanimation
.macro unused3
.byte 0xe6
.endm

.macro tryweatherformdatachange
.macro unused4
.byte 0xe7
.endm

Expand Down
29 changes: 6 additions & 23 deletions data/battle_anim_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,6 @@ gBattleAnims_StatusConditions::

.align 2
gBattleAnims_General::
.4byte General_WeatherFormChange @ B_ANIM_CASTFORM_CHANGE
.4byte General_StatsChange @ B_ANIM_STATS_CHANGE
.4byte General_SubstituteFade @ B_ANIM_SUBSTITUTE_FADE
.4byte General_SubstituteAppear @ B_ANIM_SUBSTITUTE_APPEAR
Expand Down Expand Up @@ -24281,7 +24280,7 @@ Move_TRANSFORM:
monbg ANIM_ATTACKER
playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER
waitplaysewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER, 48
createvisualtask AnimTask_TransformMon, 2, 0, 0, 1
createvisualtask AnimTask_TransformMon, 2, 0, 1
waitforvisualfinish
clearmonbg ANIM_ATTACKER
end
Expand Down Expand Up @@ -26363,22 +26362,6 @@ Status_Nightmare:
Status_Powder:
end

General_WeatherFormChange:
createvisualtask AnimTask_IsMonInvisible, 2
jumpreteq TRUE, WeatherFormChangeSkipAnim
goto WeatherFormChangeContinue
WeatherFormChangeContinue:
monbg ANIM_ATTACKER
playsewithpan SE_M_TELEPORT, SOUND_PAN_ATTACKER
waitplaysewithpan SE_M_MINIMIZE, SOUND_PAN_ATTACKER, 48
createvisualtask AnimTask_TransformMon, 2, 1, 0, 0
waitforvisualfinish
clearmonbg ANIM_ATTACKER
end
WeatherFormChangeSkipAnim:
createvisualtask AnimTask_CastformGfxDataChange, 2, 1
end

General_StatsChange:
createvisualtask AnimTask_StatsChange, 5
waitforvisualfinish
Expand Down Expand Up @@ -26797,14 +26780,14 @@ General_WishHeal:

General_IllusionOff:
monbg ANIM_TARGET
createvisualtask AnimTask_TransformMon, 2, 0, 1, 0
createvisualtask AnimTask_TransformMon, 2, 1, 0
waitforvisualfinish
clearmonbg ANIM_TARGET
end

General_FormChange:
monbg ANIM_ATTACKER
createvisualtask AnimTask_TransformMon, 2, 0, 1, 0
createvisualtask AnimTask_TransformMon, 2, 1, 0
waitforvisualfinish
clearmonbg ANIM_ATTACKER
end
Expand Down Expand Up @@ -26833,7 +26816,7 @@ General_MegaEvolution:
delay 20
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA
waitforvisualfinish
createvisualtask AnimTask_TransformMon, 2, 0, 1, 0
createvisualtask AnimTask_TransformMon, 2, 1, 0
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14
waitforvisualfinish
Expand Down Expand Up @@ -26979,7 +26962,7 @@ General_PrimalReversion_Alpha:
delay 20
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA
waitforvisualfinish
createvisualtask AnimTask_TransformMon, 2, 0, 1, 0
createvisualtask AnimTask_TransformMon, 2, 1, 0
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14
waitforvisualfinish
Expand All @@ -27006,7 +26989,7 @@ General_PrimalReversion_Omega:
delay 20
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 0, 16, RGB_WHITEALPHA
waitforvisualfinish
createvisualtask AnimTask_TransformMon, 2, 0, 1, 0
createvisualtask AnimTask_TransformMon, 2, 1, 0
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
createvisualtask AnimTask_HorizontalShake, 5, 1, 5, 14
waitforvisualfinish
Expand Down
Binary file added graphics/pokemon/castform/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/pokemon/castform/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JASC-PAL
0100
16
248 160 176
197 197 148
90 82 82
205 189 189
Expand All @@ -12,7 +13,6 @@ JASC-PAL
0 0 0
0 0 0
0 0 0
0 0 0
148 148 148
74 82 74
255 255 255
Expand Down
Binary file removed graphics/pokemon/castform/normal/anim_front.png
Binary file not shown.
Binary file removed graphics/pokemon/castform/normal/back.png
Binary file not shown.
Binary file removed graphics/pokemon/castform/normal/front.png
Binary file not shown.
Binary file removed graphics/pokemon/castform/rainy/anim_front.png
Binary file not shown.
Binary file modified graphics/pokemon/castform/rainy/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/castform/rainy/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/rainy/normal.pal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
JASC-PAL
0100
16
248 160 176
197 197 148
57 65 90
98 115 189
115 139 213
148 180 205
0 0 0
205 238 246
180 197 222
139 205 222
Expand Down
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/rainy/shiny.pal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
JASC-PAL
0100
16
248 160 176
197 197 148
57 65 90
98 115 189
115 139 213
148 180 205
0 0 0
205 238 246
180 197 222
139 205 222
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JASC-PAL
0100
16
248 160 176
197 197 148
98 90 90
205 164 189
Expand All @@ -12,7 +13,6 @@ JASC-PAL
0 0 0
0 0 0
0 0 0
0 0 0
148 148 148
74 82 74
255 255 255
Expand Down
Binary file removed graphics/pokemon/castform/snowy/anim_front.png
Binary file not shown.
Binary file modified graphics/pokemon/castform/snowy/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/castform/snowy/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/snowy/normal.pal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
JASC-PAL
0100
16
248 160 176
197 197 148
41 82 57
123 82 189
139 115 213
148 180 205
0 0 0
197 180 255
156 156 197
139 205 172
Expand Down
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/snowy/shiny.pal
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
JASC-PAL
0100
16
248 160 176
197 197 148
41 82 57
123 82 189
139 115 213
148 180 205
0 0 0
197 180 255
156 156 197
139 205 172
Expand Down
Binary file removed graphics/pokemon/castform/sunny/anim_front.png
Binary file not shown.
Binary file modified graphics/pokemon/castform/sunny/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified graphics/pokemon/castform/sunny/front.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/sunny/normal.pal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JASC-PAL
0100
16
248 160 176
197 197 148
98 49 41
205 90 74
Expand All @@ -13,7 +14,6 @@ JASC-PAL
213 131 74
148 90 65
213 205 230
0 0 0
90 90 82
255 255 255
24 24 24
2 changes: 1 addition & 1 deletion graphics/pokemon/castform/sunny/shiny.pal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JASC-PAL
0100
16
248 160 176
197 197 148
98 49 41
205 90 74
Expand All @@ -13,7 +14,6 @@ JASC-PAL
213 131 74
148 90 65
213 205 230
0 0 0
90 90 82
255 255 255
24 24 24
56 changes: 0 additions & 56 deletions graphics_file_rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CASTFORMGFXDIR := graphics/pokemon/castform
CHERRIMGFXDIR := graphics/pokemon/cherrim
TILESETGFXDIR := data/tilesets
FONTGFXDIR := graphics/fonts
INTERFACEGFXDIR := graphics/interface
Expand Down Expand Up @@ -27,60 +25,6 @@ SPINDAGFXDIR := graphics/spinda_spots
types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark fairy
contest_types := cool beauty cute smart tough

### Cherrim ###

$(CHERRIMGFXDIR)/front.4bpp: $(CHERRIMGFXDIR)/normal/front.4bpp \
$(CHERRIMGFXDIR)/sunshine/front.4bpp
@cat $^ >$@

$(CHERRIMGFXDIR)/back.4bpp: $(CHERRIMGFXDIR)/normal/back.4bpp \
$(CHERRIMGFXDIR)/sunshine/back.4bpp
@cat $^ >$@

$(CHERRIMGFXDIR)/anim_front.4bpp: $(CHERRIMGFXDIR)/normal/anim_front.4bpp \
$(CHERRIMGFXDIR)/sunshine/anim_front.4bpp
@cat $^ >$@

$(CHERRIMGFXDIR)/normal.gbapal: $(CHERRIMGFXDIR)/normal/normal.gbapal \
$(CHERRIMGFXDIR)/sunshine/normal.gbapal
@cat $^ >$@

$(CHERRIMGFXDIR)/shiny.gbapal: $(CHERRIMGFXDIR)/normal/shiny.gbapal \
$(CHERRIMGFXDIR)/sunshine/shiny.gbapal
@cat $^ >$@

### Castform ###

$(CASTFORMGFXDIR)/front.4bpp: $(CASTFORMGFXDIR)/normal/front.4bpp \
$(CASTFORMGFXDIR)/sunny/front.4bpp \
$(CASTFORMGFXDIR)/rainy/front.4bpp \
$(CASTFORMGFXDIR)/snowy/front.4bpp
@cat $^ >$@

$(CASTFORMGFXDIR)/back.4bpp: $(CASTFORMGFXDIR)/normal/back.4bpp \
$(CASTFORMGFXDIR)/sunny/back.4bpp \
$(CASTFORMGFXDIR)/rainy/back.4bpp \
$(CASTFORMGFXDIR)/snowy/back.4bpp
@cat $^ >$@

$(CASTFORMGFXDIR)/anim_front.4bpp: $(CASTFORMGFXDIR)/normal/anim_front.4bpp \
$(CASTFORMGFXDIR)/sunny/anim_front.4bpp \
$(CASTFORMGFXDIR)/rainy/anim_front.4bpp \
$(CASTFORMGFXDIR)/snowy/anim_front.4bpp
@cat $^ >$@

$(CASTFORMGFXDIR)/normal.gbapal: $(CASTFORMGFXDIR)/normal/normal.gbapal \
$(CASTFORMGFXDIR)/sunny/normal.gbapal \
$(CASTFORMGFXDIR)/rainy/normal.gbapal \
$(CASTFORMGFXDIR)/snowy/normal.gbapal
@cat $^ >$@

$(CASTFORMGFXDIR)/shiny.gbapal: $(CASTFORMGFXDIR)/normal/shiny.gbapal \
$(CASTFORMGFXDIR)/sunny/shiny.gbapal \
$(CASTFORMGFXDIR)/rainy/shiny.gbapal \
$(CASTFORMGFXDIR)/snowy/shiny.gbapal
@cat $^ >$@

### Tilesets ###

$(TILESETGFXDIR)/secondary/petalburg/tiles.4bpp: %.4bpp: %.png
Expand Down
2 changes: 0 additions & 2 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ struct BattleStruct
u8 turnSideTracker;
u8 givenExpMons; // Bits for enemy party's pokemon that gave exp to player's party.
u16 lastTakenMoveFrom[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT]; // a 2-D array [target][attacker]
u16 castformPalette[NUM_CASTFORM_FORMS][16];
union {
struct LinkBattlerHeader linkBattlerHeader;
u32 battleVideo[2];
Expand Down Expand Up @@ -988,7 +987,6 @@ extern struct BattleHealthboxInfo *gBattleControllerOpponentHealthboxData;
extern struct BattleHealthboxInfo *gBattleControllerOpponentFlankHealthboxData;
extern u16 gBattleMovePower;
extern u16 gMoveToLearn;
extern u8 gBattleMonForms[MAX_BATTLERS_COUNT];
extern u32 gFieldStatuses;
extern struct FieldTimer gFieldTimers;
extern u8 gBattlerAbility;
Expand Down
2 changes: 1 addition & 1 deletion include/battle_gfx_sfx_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bool8 BattleInitAllSprites(u8 *state1, u8 *battlerId);
void ClearSpritesHealthboxAnimData(void);
void CopyAllBattleSpritesInvisibilities(void);
void CopyBattleSpriteInvisibility(u8 battlerId);
void HandleSpeciesGfxDataChange(u8 attacker, u8 target, bool8 castform, bool32 megaEvo, bool8 trackEnemyPersonality);
void HandleSpeciesGfxDataChange(u8 attacker, u8 target, bool32 megaEvo, bool8 trackEnemyPersonality);
void BattleLoadSubstituteOrMonSpriteGfx(u8 battlerId, bool8 loadMonSprite);
void LoadBattleMonGfxAndAnimate(u8 battlerId, bool8 loadMonSprite, u8 spriteId);
void TrySetBehindSubstituteSpriteBit(u8 battlerId, u16 move);
Expand Down
10 changes: 0 additions & 10 deletions include/constants/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,16 +423,6 @@
#define B_WAIT_TIME_SHORT (B_WAIT_TIME_MULTIPLIER * 2)
#define B_WAIT_TIME_SHORTEST (B_WAIT_TIME_MULTIPLIER)

#define CHERRIM_OVERCAST 0
#define CHERRIM_SUNSHINE 1

#define CASTFORM_NORMAL 0
#define CASTFORM_FIRE 1
#define CASTFORM_WATER 2
#define CASTFORM_ICE 3
#define NUM_CASTFORM_FORMS 4
#define CASTFORM_SUBSTITUTE (1 << 7)

#define FLEE_ITEM 1
#define FLEE_ABILITY 2

Expand Down
Loading