Fix FREE_LINK_BATTLE_RECORDS
This commit is contained in:
parent
a1c17a1de7
commit
dedba114be
2 changed files with 11 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
#define FREE_MATCH_CALL FALSE // Frees up match call and rematch data. (104 bytes).
|
||||
#define FREE_UNION_ROOM_CHAT FALSE // Frees up union room chat (212 bytes).
|
||||
#define FREE_ENIGMA_BERRY FALSE // Frees up E-Reader Enigma Berry data (52 bytes).
|
||||
#define FREE_LINK_BATTLE_RECORDS FALSE //frees link battle record data. 88 bytes
|
||||
#define FREE_LINK_BATTLE_RECORDS FALSE // Frees up link battle record data (88 bytes).
|
||||
// saveblock1 total: 1846 bytes
|
||||
//free saveblock 2 defines
|
||||
#define FREE_BATTLE_TOWER_E_READER FALSE //frees up battle tower e reader trainer data. 188 bytes. WARNING THIS HAS BEEN SHOWN TO BREAK THE POKÉ MARTS' QUESTIONNAIRE
|
||||
|
|
|
@ -88,6 +88,7 @@ static const u8 sText_DashesNoPlayer[] = _("-------");
|
|||
static const u8 sText_DashesNoScore[] = _("----");
|
||||
|
||||
// code
|
||||
#if FREE_LINK_BATTLE_RECORDS == FALSE
|
||||
static void ClearLinkBattleRecord(struct LinkBattleRecord *record)
|
||||
{
|
||||
CpuFill16(0, record, sizeof(struct LinkBattleRecord));
|
||||
|
@ -219,6 +220,7 @@ static void UpdateLinkBattleRecords(struct LinkBattleRecords *records, const u8
|
|||
UpdateLinkBattleRecord(&records->entries[index], battleOutcome);
|
||||
SortLinkBattleRecords(records);
|
||||
}
|
||||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
|
||||
void ClearPlayerLinkBattleRecords(void)
|
||||
{
|
||||
|
@ -227,6 +229,7 @@ void ClearPlayerLinkBattleRecords(void)
|
|||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
}
|
||||
|
||||
#if FREE_LINK_BATTLE_RECORDS == FALSE
|
||||
static void IncTrainerCardWins(s32 battlerId)
|
||||
{
|
||||
u16 *wins = &gTrainerCards[battlerId].linkBattleWins;
|
||||
|
@ -257,6 +260,7 @@ static void UpdateTrainerCardWinsLosses(s32 battlerId)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
|
||||
void UpdatePlayerLinkBattleRecords(s32 battlerId)
|
||||
{
|
||||
|
@ -274,6 +278,7 @@ void UpdatePlayerLinkBattleRecords(s32 battlerId)
|
|||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
}
|
||||
|
||||
#if FREE_LINK_BATTLE_RECORDS == FALSE
|
||||
static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records)
|
||||
{
|
||||
s32 x;
|
||||
|
@ -315,10 +320,14 @@ static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 lan
|
|||
AddTextPrinterParameterized(gRecordsWindowId, FONT_NORMAL, gStringVar1, 176, (y * 8) + 1, 0, NULL);
|
||||
}
|
||||
}
|
||||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
|
||||
void ShowLinkBattleRecords(void)
|
||||
{
|
||||
s32 i, x;
|
||||
s32 x;
|
||||
#if FREE_LINK_BATTLE_RECORDS == FALSE
|
||||
s32 i;
|
||||
#endif //FREE_LINK_BATTLE_RECORDS
|
||||
|
||||
gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
|
||||
DrawStdWindowFrame(gRecordsWindowId, FALSE);
|
||||
|
|
Loading…
Reference in a new issue