diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-03-12 14:03:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 14:03:39 -0500 |
commit | 665dffe048bfbdbd53057beefb9a09acbd6f048a (patch) | |
tree | 7263d3ba3860bda717808dd59766963b6591d444 /src | |
parent | 6c297d19e85b08c09e43b69ef5cb138f4a9880eb (diff) | |
parent | e6b1b97aa12ae683afbaa5b46cb27b8cdbe1448e (diff) |
Merge pull request #1373 from PikalaxALT/fix_nonmatchings
Nonmatching resoltuion
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_ai_script_commands.c | 7 | ||||
-rw-r--r-- | src/battle_main.c | 3 | ||||
-rw-r--r-- | src/item.c | 3 | ||||
-rw-r--r-- | src/trade.c | 3 | ||||
-rw-r--r-- | src/tv.c | 3 |
5 files changed, 1 insertions, 18 deletions
diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 8dc939919..9fdd4d0c3 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -2089,12 +2089,7 @@ static void Cmd_get_used_held_item(void) else battlerId = gBattlerTarget; - // This is likely a leftover from Ruby's code and its ugly ewram access. - #ifdef NONMATCHING - AI_THINKING_STRUCT->funcResult = gBattleStruct->usedHeldItems[battlerId]; - #else - AI_THINKING_STRUCT->funcResult = *(u8*)((u8*)(gBattleStruct) + offsetof(struct BattleStruct, usedHeldItems) + (battlerId * 2)); - #endif // NONMATCHING + AI_THINKING_STRUCT->funcResult = *(u8 *)&gBattleStruct->usedHeldItems[battlerId]; gAIScriptPtr += 2; } diff --git a/src/battle_main.c b/src/battle_main.c index a1bc6ae7b..2a39a17e1 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -68,9 +68,6 @@ extern const struct BgTemplate gBattleBgTemplates[]; extern const struct WindowTemplate *const gBattleWindowTemplates[]; // this file's functions -#if !defined(NONMATCHING) && MODERN -#define static -#endif static void CB2_InitBattleInternal(void); static void CB2_PreInitMultiBattle(void); static void CB2_PreInitIngamePlayerPartnerBattle(void); diff --git a/src/item.c b/src/item.c index 91d2f1a0a..892092184 100644 --- a/src/item.c +++ b/src/item.c @@ -19,9 +19,6 @@ extern u16 gUnknown_0203CF30[]; // this file's functions -#if !defined(NONMATCHING) && MODERN -#define static -#endif static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count); static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count); diff --git a/src/trade.c b/src/trade.c index 436da66b0..a42c9c805 100644 --- a/src/trade.c +++ b/src/trade.c @@ -165,9 +165,6 @@ static EWRAM_DATA struct { /*0xFE*/ u8 wirelessWinBottom; } *sTradeData = {NULL}; -#if !defined(NONMATCHING) && MODERN -#define static -#endif static bool32 IsWirelessTrade(void); static void CB2_CreateTradeMenu(void); static void VBlankCB_TradeMenu(void); @@ -75,9 +75,6 @@ EWRAM_DATA ALIGNED(4) u8 sTVShowState = 0; EWRAM_DATA u8 sTVSecretBaseSecretsRandomValues[3] = {}; // Static ROM declarations -#if !defined(NONMATCHING) && MODERN -#define static -#endif void ClearPokemonNews(void); u8 GetTVChannelByShowType(u8 kind); u8 FindFirstActiveTVShowThatIsNotAMassOutbreak(void); |