From 907492fd6e724d8dc2e5d2eff372be85e6f0d30c Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 4 Mar 2019 23:26:51 -0500 Subject: Split rom asm file in half The first half is ui/menu stuff, while the second half is link-related stuff. --- src/battle_script_commands.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index a53fa30f2..89c2baca9 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -54,9 +54,9 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM; extern const u8* const gBattleScriptsForMoveEffects[]; // functions -extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s -extern void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s -extern void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s +extern void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); // pokenav.s +extern void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s +extern void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s extern u8 sub_813B21C(void); #define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED)) @@ -6321,16 +6321,16 @@ static void sub_804F100(void) { struct StatsArray currentStats; - sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], ¤tStats); - sub_81D3640(0xD, gBattleResources->statsBeforeLvlUp, ¤tStats, 0xE, 0xD, 0xF); + GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], ¤tStats); + DrawLevelUpWindowPg1(0xD, gBattleResources->statsBeforeLvlUp, ¤tStats, 0xE, 0xD, 0xF); } static void sub_804F144(void) { struct StatsArray currentStats; - sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], ¤tStats); - sub_81D3784(0xD, ¤tStats, 0xE, 0xD, 0xF); + GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], ¤tStats); + DrawLevelUpWindowPg2(0xD, ¤tStats, 0xE, 0xD, 0xF); } static void sub_804F17C(void) -- cgit v1.2.3 From 9848f84b9ec2d5950cb5dc4600b7651486ff986a Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Mar 2019 03:12:15 -0400 Subject: Use constants for Oam .shape and .size fields Also some general formatting fixes for constants. --- src/battle_script_commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ac9fb3073..025d694e4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -733,10 +733,10 @@ static const struct OamData sOamData_MonIconOnLvlUpBox = .objMode = 0, .mosaic = 0, .bpp = 0, - .shape = 0, + .shape = SPRITE_SHAPE(32x32), .x = 0, .matrixNum = 0, - .size = 2, + .size = SPRITE_SIZE(32x32), .tileNum = 0, .priority = 0, .paletteNum = 0, -- cgit v1.2.3 From 35cffea9874a8b135eddade958b62ee2ecf441c1 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 30 Mar 2019 12:37:18 +0100 Subject: Helpful macros for atk49 --- src/battle_script_commands.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'src/battle_script_commands.c') diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 0eb6dfec0..0a0c34ad2 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -4480,28 +4480,6 @@ static void atk48_playstatchangeanimation(void) } } -enum -{ - ATK49_RAGE, - ATK49_DEFROST, - ATK49_SYNCHRONIZE_TARGET, - ATK49_MOVE_END_ABILITIES, - ATK49_STATUS_IMMUNITY_ABILITIES, - ATK49_SYNCHRONIZE_ATTACKER, - ATK49_CHOICE_MOVE, - ATK49_CHANGED_ITEMS, - ATK49_ATTACKER_INVISIBLE, - ATK49_ATTACKER_VISIBLE, - ATK49_TARGET_VISIBLE, - ATK49_ITEM_EFFECTS_ALL, - ATK49_KINGSROCK_SHELLBELL, - ATK49_SUBSTITUTE, - ATK49_UPDATE_LAST_MOVES, - ATK49_MIRROR_MOVE, - ATK49_NEXT_TARGET, - ATK49_COUNT, -}; - static void atk49_moveend(void) { s32 i; @@ -7210,6 +7188,9 @@ static void atk88_negativedamage(void) gBattlescriptCurrInstr++; } +#define STAT_CHANGE_WORKED 0 +#define STAT_CHANGE_DIDNT_WORK 1 + static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr) { bool8 certain = FALSE; -- cgit v1.2.3