diff --git a/include/battle.h b/include/battle.h index 20a6cf1b8..0169dde7c 100644 --- a/include/battle.h +++ b/include/battle.h @@ -4,6 +4,7 @@ // should they be included here or included individually by every file? #include "constants/battle.h" #include "battle_main.h" +#include "battle_message.h" #include "battle_util.h" #include "battle_script_commands.h" #include "battle_ai_switch_items.h" @@ -719,7 +720,11 @@ struct MonSpritesGfx void *field_17C; }; -// all battle variables are declared in battle_main.c +// All battle variables are declared in battle_main.c +extern u8 gDisplayedStringBattle[300]; +extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT]; +extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT]; +extern u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT]; extern u32 gBattleTypeFlags; extern u8 gBattleTerrain; extern u32 gUnknown_02022FF4; diff --git a/include/battle_message.h b/include/battle_message.h index f792ff7b0..cccbae841 100644 --- a/include/battle_message.h +++ b/include/battle_message.h @@ -1,8 +1,9 @@ #ifndef GUARD_BATTLE_MESSAGE_H #define GUARD_BATTLE_MESSAGE_H -// for 0xFD +#define TEXT_BUFF_ARRAY_COUNT 16 +// for 0xFD #define B_TXT_BUFF1 0x0 #define B_TXT_BUFF2 0x1 #define B_TXT_COPY_VAR_1 0x2 @@ -194,7 +195,7 @@ textVar[4] = B_BUFF_EOS; \ } -struct StringInfoBattle +struct BattleMsgData { u16 currentMove; u16 originallyUsedMove; @@ -203,10 +204,10 @@ struct StringInfoBattle u8 scrActive; u8 unk1605E; u8 hpScale; - u8 StringBank; + u8 itemEffectBattler; u8 moveType; - u8 abilities[4]; - u8 textBuffs[3][0x10]; + u8 abilities[MAX_BATTLERS_COUNT]; + u8 textBuffs[3][TEXT_BUFF_ARRAY_COUNT]; }; void BufferStringBattle(u16 stringID); @@ -216,12 +217,7 @@ void BattlePutTextOnWindow(const u8* text, u8 arg1); void SetPpNumbersPaletteInMoveSelection(void); u8 GetCurrentPpToMaxPpState(u8 currentPp, u8 maxPp); -#define TEXT_BUFF_ARRAY_COUNT 16 - -extern u8 gDisplayedStringBattle[300]; -extern u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT]; -extern u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT]; -extern u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT]; +extern struct BattleMsgData *gBattleMsgDataPtr; extern const u8* const gBattleStringsTable[]; extern const u8* const gStatNamesTable[]; diff --git a/src/battle_main.c b/src/battle_main.c index a846f5769..487e11993 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -190,6 +190,10 @@ static void HandleAction_NothingIsFainted(void); static void HandleAction_ActionFinished(void); // EWRAM vars +EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; +EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; +EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; EWRAM_DATA static u32 sUnusedUnknownArray[25] = {0}; EWRAM_DATA u32 gBattleTypeFlags = 0; EWRAM_DATA u8 gBattleTerrain = 0; diff --git a/src/battle_message.c b/src/battle_message.c index 41b36ae13..9dcd4aaf1 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -31,9 +31,7 @@ struct BattleWindowText u8 shadowColor; }; -extern u8 gBattlerAbilities[MAX_BATTLERS_COUNT]; extern u8 gUnknown_0203C7B4; -extern struct StringInfoBattle *gStringInfo; extern const u8 gMoveNames[LAST_MOVE_INDEX + 1][13]; extern const u8 gTrainerClassNames[][13]; @@ -61,11 +59,9 @@ static void ChooseMoveUsedParticle(u8 *textPtr); static void ChooseTypeOfMoveUsedString(u8 *dst); static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst); -// ewram variables -EWRAM_DATA u8 gDisplayedStringBattle[300] = {0}; -EWRAM_DATA u8 gBattleTextBuff1[TEXT_BUFF_ARRAY_COUNT] = {0}; -EWRAM_DATA u8 gBattleTextBuff2[TEXT_BUFF_ARRAY_COUNT] = {0}; -EWRAM_DATA u8 gBattleTextBuff3[TEXT_BUFF_ARRAY_COUNT] = {0}; +// EWRAM vars +static EWRAM_DATA u8 sBattlerAbilities[MAX_BATTLERS_COUNT] = {0}; +EWRAM_DATA struct BattleMsgData *gBattleMsgDataPtr = NULL; // const rom data // todo: make some of those names less vague: attacker/target vs pkmn, etc. @@ -1949,24 +1945,24 @@ void BufferStringBattle(u16 stringID) s32 i; const u8 *stringPtr = NULL; - gStringInfo = (struct StringInfoBattle*)(&gBattleBufferA[gActiveBattler][4]); - gLastUsedItem = gStringInfo->lastItem; - gLastUsedAbility = gStringInfo->lastAbility; - gBattleScripting.battler = gStringInfo->scrActive; - *(&gBattleStruct->field_52) = gStringInfo->unk1605E; - *(&gBattleStruct->hpScale) = gStringInfo->hpScale; - gPotentialItemEffectBattler = gStringInfo->StringBank; - *(&gBattleStruct->stringMoveType) = gStringInfo->moveType; + gBattleMsgDataPtr = (struct BattleMsgData*)(&gBattleBufferA[gActiveBattler][4]); + gLastUsedItem = gBattleMsgDataPtr->lastItem; + gLastUsedAbility = gBattleMsgDataPtr->lastAbility; + gBattleScripting.battler = gBattleMsgDataPtr->scrActive; + *(&gBattleStruct->field_52) = gBattleMsgDataPtr->unk1605E; + *(&gBattleStruct->hpScale) = gBattleMsgDataPtr->hpScale; + gPotentialItemEffectBattler = gBattleMsgDataPtr->itemEffectBattler; + *(&gBattleStruct->stringMoveType) = gBattleMsgDataPtr->moveType; for (i = 0; i < MAX_BATTLERS_COUNT; i++) { - gBattlerAbilities[i] = gStringInfo->abilities[i]; + sBattlerAbilities[i] = gBattleMsgDataPtr->abilities[i]; } for (i = 0; i < TEXT_BUFF_ARRAY_COUNT; i++) { - gBattleTextBuff1[i] = gStringInfo->textBuffs[0][i]; - gBattleTextBuff2[i] = gStringInfo->textBuffs[1][i]; - gBattleTextBuff3[i] = gStringInfo->textBuffs[2][i]; + gBattleTextBuff1[i] = gBattleMsgDataPtr->textBuffs[0][i]; + gBattleTextBuff2[i] = gBattleMsgDataPtr->textBuffs[1][i]; + gBattleTextBuff3[i] = gBattleMsgDataPtr->textBuffs[2][i]; } switch (stringID) @@ -2143,10 +2139,10 @@ void BufferStringBattle(u16 stringID) case STRINGID_USEDMOVE: // pokemon used a move msg ChooseMoveUsedParticle(gBattleTextBuff1); // buff1 doesn't appear in the string, leftover from japanese move names - if (gStringInfo->currentMove > LAST_MOVE_INDEX) + if (gBattleMsgDataPtr->currentMove > LAST_MOVE_INDEX) StringCopy(gBattleTextBuff2, sATypeMove_Table[*(&gBattleStruct->stringMoveType)]); else - StringCopy(gBattleTextBuff2, gMoveNames[gStringInfo->currentMove]); + StringCopy(gBattleTextBuff2, gMoveNames[gBattleMsgDataPtr->currentMove]); ChooseTypeOfMoveUsedString(gBattleTextBuff2); stringPtr = sText_AttackerUsedX; @@ -2431,16 +2427,16 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) HANDLE_NICKNAME_STRING_CASE(gBattleScripting.battler, gBattlerPartyIndexes[gBattleScripting.battler]) break; case B_TXT_CURRENT_MOVE: // current move name - if (gStringInfo->currentMove > LAST_MOVE_INDEX) + if (gBattleMsgDataPtr->currentMove > LAST_MOVE_INDEX) toCpy = sATypeMove_Table[gBattleStruct->stringMoveType]; else - toCpy = gMoveNames[gStringInfo->currentMove]; + toCpy = gMoveNames[gBattleMsgDataPtr->currentMove]; break; case B_TXT_LAST_MOVE: // originally used move name - if (gStringInfo->originallyUsedMove > LAST_MOVE_INDEX) + if (gBattleMsgDataPtr->originallyUsedMove > LAST_MOVE_INDEX) toCpy = sATypeMove_Table[gBattleStruct->stringMoveType]; else - toCpy = gMoveNames[gStringInfo->originallyUsedMove]; + toCpy = gMoveNames[gBattleMsgDataPtr->originallyUsedMove]; break; case B_TXT_LAST_ITEM: // last used item if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) @@ -2489,16 +2485,16 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) toCpy = gAbilityNames[gLastUsedAbility]; break; case B_TXT_ATK_ABILITY: // attacker ability - toCpy = gAbilityNames[gBattlerAbilities[gBattlerAttacker]]; + toCpy = gAbilityNames[sBattlerAbilities[gBattlerAttacker]]; break; case B_TXT_DEF_ABILITY: // target ability - toCpy = gAbilityNames[gBattlerAbilities[gBattlerTarget]]; + toCpy = gAbilityNames[sBattlerAbilities[gBattlerTarget]]; break; case B_TXT_SCR_ACTIVE_ABILITY: // scripting active ability - toCpy = gAbilityNames[gBattlerAbilities[gBattleScripting.battler]]; + toCpy = gAbilityNames[sBattlerAbilities[gBattleScripting.battler]]; break; case B_TXT_EFF_ABILITY: // effect battlerId ability - toCpy = gAbilityNames[gBattlerAbilities[gEffectBattler]]; + toCpy = gAbilityNames[sBattlerAbilities[gEffectBattler]]; break; case B_TXT_TRAINER1_CLASS: // trainer class name if (gBattleTypeFlags & BATTLE_TYPE_SECRET_BASE) @@ -2866,7 +2862,7 @@ static void ChooseMoveUsedParticle(u8* textBuff) { if (sGrammarMoveUsedTable[i] == 0) counter++; - if (sGrammarMoveUsedTable[i++] == gStringInfo->currentMove) + if (sGrammarMoveUsedTable[i++] == gBattleMsgDataPtr->currentMove) break; } @@ -2909,7 +2905,7 @@ static void ChooseTypeOfMoveUsedString(u8* dst) { if (sGrammarMoveUsedTable[i] == MOVE_NONE) counter++; - if (sGrammarMoveUsedTable[i++] == gStringInfo->currentMove) + if (sGrammarMoveUsedTable[i++] == gBattleMsgDataPtr->currentMove) break; } diff --git a/src/battle_setup.c b/src/battle_setup.c index ccc36b7c2..b11083929 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -1088,14 +1088,14 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) switch (sTrainerBattleMode) { - case 3: + case TRAINER_BATTLE_NORMAL_NO_INTRO_TEXT: TrainerBattleLoadArgs(sOrdinaryNoIntroBattleParams, data); return EventScript_2713C2; - case 4: + case TRAINER_BATTLE_DOUBLE: TrainerBattleLoadArgs(sDoubleBattleParams, data); SetMapVarsToTrainer(); return EventScript_TryDoDoubleTrainerBattle; - case 2: + case TRAINER_BATTLE_CONTINUE_SCRIPT: if (gApproachingTrainerId == 0) { TrainerBattleLoadArgs(sContinueScriptBattleParams, data); @@ -1106,26 +1106,26 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) TrainerBattleLoadArgs(sTrainerBContinueScriptBattleParams, data); } return EventScript_271362; - case 1: + case TRAINER_BATTLE_CONTINUE_SCRIPT_NO_MUSIC: TrainerBattleLoadArgs(sContinueScriptBattleParams, data); SetMapVarsToTrainer(); return EventScript_271362; - case 6: - case 8: + case TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE: + case TRAINER_BATTLE_CONTINUE_SCRIPT_DOUBLE_NO_MUSIC: TrainerBattleLoadArgs(sContinueScriptDoubleBattleParams, data); SetMapVarsToTrainer(); return EventScript_TryDoDoubleTrainerBattle; - case 7: + case TRAINER_BATTLE_REMATCH_DOUBLE: TrainerBattleLoadArgs(sDoubleBattleParams, data); SetMapVarsToTrainer(); gTrainerBattleOpponent_A = GetRematchTrainerId(gTrainerBattleOpponent_A); return EventScript_TryDoDoubleRematchBattle; - case 5: + case TRAINER_BATTLE_REMATCH: TrainerBattleLoadArgs(sOrdinaryBattleParams, data); SetMapVarsToTrainer(); gTrainerBattleOpponent_A = GetRematchTrainerId(gTrainerBattleOpponent_A); return EventScript_2713D1; - case 9: + case TRAINER_BATTLE_9: if (gApproachingTrainerId == 0) { TrainerBattleLoadArgs(sOrdinaryBattleParams, data); @@ -1138,13 +1138,13 @@ const u8 *BattleSetup_ConfigureTrainerBattle(const u8 *data) gTrainerBattleOpponent_B = sub_81A9AA8(gSpecialVar_LastTalked); } return EventScript_271362; - case 10: + case TRAINER_BATTLE_SET_TRAINER_A: TrainerBattleLoadArgs(sOrdinaryBattleParams, data); return NULL; - case 11: + case TRAINER_BATTLE_SET_TRAINER_B: TrainerBattleLoadArgs(sTrainerBOrdinaryBattleParams, data); return NULL; - case 12: + case TRAINER_BATTLE_12: if (gApproachingTrainerId == 0) { TrainerBattleLoadArgs(sOrdinaryBattleParams, data); @@ -1591,11 +1591,11 @@ static bool32 UpdateRandomTrainerRematches(const struct RematchTrainer *table, u { if (gSaveBlock1Ptr->trainerRematches[i] != 0) { - // Trainer already wants a rematch. Don't bother updating it + // Trainer already wants a rematch. Don't bother updating it. ret = TRUE; } else if (FlagGet(FLAG_MATCH_CALL_REGISTERED + i) - && (Random() % 100) <= 30) // 31% chance of getting a rematch + && (Random() % 100) <= 30) // 31% chance of getting a rematch. { SetRematchIdForTrainer(table, i); ret = TRUE; diff --git a/src/battle_tv.c b/src/battle_tv.c index e5d97be30..cd0490a1b 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -9,8 +9,6 @@ #include "battle_message.h" #include "tv.h" -extern struct StringInfoBattle *gStringInfo; - // this file's functions static bool8 sub_817E0B8(u16 stringId); static void AddMovePoints(u8 caseId, u16 arg1, u8 arg2, u8 arg3); @@ -223,7 +221,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) atkSide = GetBattlerSide(gBattlerAttacker); defSide = GetBattlerSide(gBattlerTarget); effSide = GetBattlerSide(gEffectBattler); - scriptingSide = GetBattlerSide(gStringInfo->scrActive); + scriptingSide = GetBattlerSide(gBattleMsgDataPtr->scrActive); if (atkSide == B_SIDE_PLAYER) atkMon = &gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]]; @@ -235,7 +233,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId) else defMon = &gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]]; - moveSlot = GetBattlerMoveSlotId(gBattlerAttacker, gStringInfo->currentMove); + moveSlot = GetBattlerMoveSlotId(gBattlerAttacker, gBattleMsgDataPtr->currentMove); if (moveSlot >= 4 && sub_817E0B8(stringId) && stringId > BATTLESTRINGS_ID_ADDER) { @@ -480,8 +478,8 @@ void BattleTv_SetDataBasedOnString(u16 stringId) break; case STRINGID_PKMNFASTASLEEP: if (tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMonId != 0 - && gStringInfo->currentMove != MOVE_SNORE - && gStringInfo->currentMove != MOVE_SLEEP_TALK) + && gBattleMsgDataPtr->currentMove != MOVE_SNORE + && gBattleMsgDataPtr->currentMove != MOVE_SLEEP_TALK) AddMovePoints(9, 3, tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMonId - 1, tvPtr->mon[atkSide][gBattlerPartyIndexes[gBattlerAttacker]].slpMoveSlot); break; case STRINGID_PKMNWASFROZEN: diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 35277fe87..91fcf8c46 100644 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -14,7 +14,6 @@ extern void SetCameraPanningCallback(void ( *callback)()); // field_camera extern void InstallCameraPanAheadCallback(void); extern void SetCameraPanning(s16 x, s16 y); extern u8 GetCursorSelectionMonId(void); -extern void FieldEffectActiveListRemove(u8 id); // field_effect extern u8 oei_task_add(void); // why do this, GF? @@ -24,7 +23,8 @@ enum FLY_PUZZLE }; -extern u8 gBraillePuzzleCallbackFlag; +EWRAM_DATA static u8 sBraillePuzzleCallbackFlag = 0; + extern const u8 gUnknown_085EFE74[][2]; void SealedChamberShakingEffect(u8); @@ -208,11 +208,11 @@ bool8 ShouldDoBrailleStrengthEffect(void) if (!FlagGet(FLAG_SYS_BRAILLE_STRENGTH) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x06)) { if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23) - { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + { sBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } else if (gSaveBlock1Ptr->pos.x == 5 && gSaveBlock1Ptr->pos.y == 23) - { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + { sBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } else if (gSaveBlock1Ptr->pos.x == 7 && gSaveBlock1Ptr->pos.y == 23) - { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + { sBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } } return FALSE; @@ -249,7 +249,7 @@ bool8 ShouldDoBrailleFlyEffect(void) if (!FlagGet(FLAG_SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44)) { if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25) - { gBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; } + { sBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; } } return FALSE; } @@ -362,7 +362,7 @@ bool8 FldEff_UsePuzzleEffect(void) { u8 taskId = oei_task_add(); - if (gBraillePuzzleCallbackFlag == FLY_PUZZLE) + if (sBraillePuzzleCallbackFlag == FLY_PUZZLE) { gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16; gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback; diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 78b615407..0ed22c1e1 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -33,7 +33,7 @@ struct HallofFameMon u32 personality; u16 species:9; u16 lvl:7; - u8 nick[10]; + u8 nick[POKEMON_NAME_LENGTH]; }; struct HallofFameTeam @@ -49,11 +49,11 @@ struct HofGfx u8 tilemap2[0x1000]; }; +static EWRAM_DATA u32 sUnknown_0203BCD4 = 0; static EWRAM_DATA struct HallofFameTeam *sHofMonPtr = NULL; static EWRAM_DATA struct HofGfx *sHofGfxPtr = NULL; extern bool8 gHasHallOfFameRecords; -extern u32 gUnknown_0203BCD4; extern struct MusicPlayerInfo gMPlayInfo_BGM; extern MainCallback gGameContinueCallback; extern u32 gDamagedSaveSectors; @@ -490,7 +490,7 @@ static void Task_Hof_InitMonData(u8 taskId) } } - gUnknown_0203BCD4 = 0; + sUnknown_0203BCD4 = 0; gTasks[taskId].tDisplayedMonId = 0; gTasks[taskId].tPlayerSpriteID = 0xFF; @@ -648,11 +648,11 @@ static void Task_Hof_TryDisplayAnotherMon(u8 taskId) } else { - gUnknown_0203BCD4 |= (0x10000 << gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.paletteNum); + sUnknown_0203BCD4 |= (0x10000 << gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.paletteNum); if (gTasks[taskId].tDisplayedMonId <= 4 && currMon[1].species != SPECIES_NONE) // there is another pokemon to display { gTasks[taskId].tDisplayedMonId++; - BeginNormalPaletteFade(gUnknown_0203BCD4, 0, 12, 12, 0x63B0); + BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0); gSprites[gTasks[taskId].tMonSpriteId(currPokeID)].oam.priority = 1; gTasks[taskId].func = Task_Hof_DisplayMon; } @@ -696,7 +696,7 @@ static void sub_8173DC0(u8 taskId) if (gTasks[taskId].tMonSpriteId(i) != 0xFF) gSprites[gTasks[taskId].tMonSpriteId(i)].oam.priority = 1; } - BeginNormalPaletteFade(gUnknown_0203BCD4, 0, 12, 12, 0x63B0); + BeginNormalPaletteFade(sUnknown_0203BCD4, 0, 12, 12, 0x63B0); FillWindowPixelBuffer(0, 0); CopyWindowToVram(0, 3); gTasks[taskId].tFrameCount = 7; @@ -923,7 +923,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId) savedTeams++; currMon = &savedTeams->mon[0]; - gUnknown_0203BCD4 = 0; + sUnknown_0203BCD4 = 0; gTasks[taskId].tCurrMonId = 0; gTasks[taskId].tMonNo = 0; @@ -998,8 +998,8 @@ static void Task_HofPC_PrintMonInfo(u8 taskId) currMonID = gTasks[taskId].tMonSpriteId(gTasks[taskId].tCurrMonId); gSprites[currMonID].oam.priority = 0; - gUnknown_0203BCD4 = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000; - BlendPalettesUnfaded(gUnknown_0203BCD4, 0xC, 0x63B0); + sUnknown_0203BCD4 = (0x10000 << gSprites[currMonID].oam.paletteNum) ^ 0xFFFF0000; + BlendPalettesUnfaded(sUnknown_0203BCD4, 0xC, 0x63B0); currMon = &savedTeams->mon[gTasks[taskId].tCurrMonId]; if (currMon->species != SPECIES_EGG) diff --git a/sym_ewram.txt b/sym_ewram.txt index 7ea9bef79..4dff894f8 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -174,9 +174,7 @@ gBattle_WIN1H: @ 2022E28 gBattle_WIN1V: @ 2022E2A .space 0x2 - .include "src/battle_message.o" .include "src/battle_main.o" - .include "src/pokemon.o" .include "src/random.o" .include "src/daycare.o" @@ -288,9 +286,6 @@ gUnknown_02038BC6: @ 2038BC6 .include "src/field_effect.o" .include "src/scanline_effect.o" .include "src/option_menu.o" - - .align 2 - .include "src/pokedex.o" gTrainerCards: @ 2039B58 @@ -684,12 +679,7 @@ gUnknown_0203AB98: @ 203AB98 .include "src/coins.o" .include "src/battle_transition.o" - -gBattlerAbilities: @ 203ABA4 - .space 0x4 - -gStringInfo: @ 203ABA8 - .space 0x4 + .include "src/battle_message.o" gUnknown_0203ABAC: @ 203ABAC .space 0x4 @@ -740,10 +730,6 @@ gUnknown_0203BC8C: @ 203BC8C .include "src/player_pc.o" .include "src/intro.o" .include "src/field_region_map.o" - -gUnknown_0203BCD4: @ 203BCD4 - .space 0x4 - .include "src/hall_of_fame.o" .include "src/credits.o" .include "src/lottery_corner.o" @@ -751,10 +737,7 @@ gUnknown_0203BCD4: @ 203BCD4 .include "src/berry_tag_screen.o" .include "src/mystery_event_menu.o" .include "src/save_failed_screen.o" - -gBraillePuzzleCallbackFlag: @ 203BD14 - .space 0x4 - + .include "src/braille_puzzles.o" .include "src/pokeblock_feed.o" .include "src/intro_credits_graphics.o" .include "src/recorded_battle.o"