From 93e9b9fe5d207a99c798bd48de9a37ff1c533cde Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 18 Feb 2019 01:33:41 -0500 Subject: [PATCH] Fix some names --- common_syms/pokedex.txt | 2 +- include/global.h | 2 +- include/pokedex.h | 2 +- src/link_rfu.c | 10 +++++----- src/new_game.c | 4 ++-- src/pokedex.c | 4 ++-- src/save_location.c | 14 +++++++------- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/common_syms/pokedex.txt b/common_syms/pokedex.txt index 4f5f162e9..9aa48a74d 100644 --- a/common_syms/pokedex.txt +++ b/common_syms/pokedex.txt @@ -1,2 +1,2 @@ -gUnusedU8 +gUnusedPokedexU8 gUnknown_030060B4 diff --git a/include/global.h b/include/global.h index 82f31ad53..cc308c3c9 100644 --- a/include/global.h +++ b/include/global.h @@ -446,7 +446,7 @@ struct SaveBlock2 /*0x90*/ u8 filler_90[0x8]; /*0x98*/ struct Time localTimeOffset; /*0xA0*/ struct Time lastBerryTreeUpdate; - /*0xA8*/ u32 unusedFlagField; // Written to, but never read. + /*0xA8*/ u32 field_A8; // Written to, but never read. /*0xAC*/ u32 encryptionKey; /*0xB0*/ struct PlayersApprentice playerApprentice; /*0xDC*/ struct Apprentice apprentices[4]; // From record mixing. diff --git a/include/pokedex.h b/include/pokedex.h index c1eba62b2..6136f7786 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -1,7 +1,7 @@ #ifndef GUARD_POKEDEX_H #define GUARD_POKEDEX_H -extern u8 gUnusedU8; +extern u8 gUnusedPokedexU8; extern void (*gUnknown_030060B4)(void); #define HOENN_DEX_COUNT 202 diff --git a/src/link_rfu.c b/src/link_rfu.c index 122ffd243..9ad6a1cd6 100644 --- a/src/link_rfu.c +++ b/src/link_rfu.c @@ -2376,18 +2376,18 @@ void RecordMixTrainerNames(void) s32 i; s32 j; s32 nextSpace; - s32 connectedTrainerRecordIndecies[5]; + s32 connectedTrainerRecordIndicies[5]; struct TrainerNameRecord *newRecords = calloc(20, sizeof(struct TrainerNameRecord)); // Check if we already have a record saved for connected trainers. for (i = 0; i < GetLinkPlayerCount(); i++) { - connectedTrainerRecordIndecies[i] = -1; + connectedTrainerRecordIndicies[i] = -1; for (j = 0; j < 20; j++) { if ((u16)gLinkPlayers[i].trainerId == gSaveBlock1Ptr->trainerNameRecords[j].trainerId && StringCompare(gLinkPlayers[i].name, gSaveBlock1Ptr->trainerNameRecords[j].trainerName) == 0) { - connectedTrainerRecordIndecies[i] = j; + connectedTrainerRecordIndicies[i] = j; } } } @@ -2401,9 +2401,9 @@ void RecordMixTrainerNames(void) CopyTrainerRecord(&newRecords[nextSpace], (u16)gLinkPlayers[i].trainerId, gLinkPlayers[i].name); // If we already had a record for this trainer, wipe it so that the next step doesn't duplicate it. - if (connectedTrainerRecordIndecies[i] >= 0) + if (connectedTrainerRecordIndicies[i] >= 0) { - memset(gSaveBlock1Ptr->trainerNameRecords[connectedTrainerRecordIndecies[i]].trainerName, 0, 8); + memset(gSaveBlock1Ptr->trainerNameRecords[connectedTrainerRecordIndicies[i]].trainerName, 0, 8); } nextSpace++; } diff --git a/src/new_game.c b/src/new_game.c index be84445bf..2e8930f7c 100644 --- a/src/new_game.c +++ b/src/new_game.c @@ -106,7 +106,7 @@ static void SetDefaultOptions(void) static void ClearPokedexFlags(void) { - gUnusedU8 = 0; + gUnusedPokedexU8 = 0; memset(&gSaveBlock2Ptr->pokedex.owned, 0, sizeof(gSaveBlock2Ptr->pokedex.owned)); memset(&gSaveBlock2Ptr->pokedex.seen, 0, sizeof(gSaveBlock2Ptr->pokedex.seen)); } @@ -164,7 +164,7 @@ void NewGameInitData(void) ClearSav1(); ClearMailData(); gSaveBlock2Ptr->specialSaveWarpFlags = 0; - gSaveBlock2Ptr->unusedFlagField = 0; + gSaveBlock2Ptr->field_A8 = 0; InitPlayerTrainerId(); PlayTimeCounter_Reset(); ClearPokedexFlags(); diff --git a/src/pokedex.c b/src/pokedex.c index b2eba6836..b8c3e93f9 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -38,7 +38,7 @@ static EWRAM_DATA struct PokedexListItem *sPokedexListItem = NULL; // IWRAM common // This is written to, but never read. -u8 gUnusedU8; +u8 gUnusedPokedexU8; void (*gUnknown_030060B4)(void); struct PokedexOption @@ -1226,7 +1226,7 @@ void ResetPokedex(void) gUnknown_02039B50 = 0; gUnknown_02039B52 = 64; - gUnusedU8 = 0; + gUnusedPokedexU8 = 0; gSaveBlock2Ptr->pokedex.mode = DEX_MODE_HOENN; gSaveBlock2Ptr->pokedex.order = 0; gSaveBlock2Ptr->pokedex.nationalMagic = 0; diff --git a/src/save_location.c b/src/save_location.c index 20972873c..2443b3161 100644 --- a/src/save_location.c +++ b/src/save_location.c @@ -120,13 +120,13 @@ void TrySetMapSaveWarpStatus(void) void sub_81AFDA0(void) { - gSaveBlock2Ptr->unusedFlagField |= 0x8000; - gSaveBlock2Ptr->unusedFlagField |= 0x1; - gSaveBlock2Ptr->unusedFlagField |= 0x2; - gSaveBlock2Ptr->unusedFlagField |= 0x4; - gSaveBlock2Ptr->unusedFlagField |= 0x10; - gSaveBlock2Ptr->unusedFlagField |= 0x20; - gSaveBlock2Ptr->unusedFlagField |= 0x8; + gSaveBlock2Ptr->field_A8 |= 0x8000; + gSaveBlock2Ptr->field_A8 |= 0x1; + gSaveBlock2Ptr->field_A8 |= 0x2; + gSaveBlock2Ptr->field_A8 |= 0x4; + gSaveBlock2Ptr->field_A8 |= 0x10; + gSaveBlock2Ptr->field_A8 |= 0x20; + gSaveBlock2Ptr->field_A8 |= 0x8; } void sub_81AFDD0(void)