diff options
author | PikalaxALT <PikalaxALT@users.noreply.github.com> | 2019-08-28 14:56:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 14:56:08 -0400 |
commit | 6c0fd9884cfa7eca6c2b2f0394efea1140d0feb1 (patch) | |
tree | a8743c0093dee3a30b0f4624bd690183620bc0d8 /src/battle_records.c | |
parent | 634fe80e9dcaffc9b1cf622b3132e686e926e97f (diff) | |
parent | 1e8b809ff231a255837dbf711d976895354062e1 (diff) |
Merge pull request #95 from PikalaxALT/no_struct_textcolor
Eliminate `struct TextColor` definition and use
Diffstat (limited to 'src/battle_records.c')
-rw-r--r-- | src/battle_records.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/battle_records.c b/src/battle_records.c index 79f29eb8a..3c2032641 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -58,7 +58,7 @@ static const struct WindowTemplate sWindowTemplates[] = { }, DUMMY_WIN_TEMPLATE }; -static const struct TextColor sTextColor = { +static const u8 sTextColor[3] = { 0, 2, 3 }; @@ -494,7 +494,7 @@ static void PrintTotalRecord(struct LinkBattleRecords * records) } StringExpandPlaceholders(gStringVar4, gString_BattleRecords_TotalRecord); - AddTextPrinterParameterized4(0, 2, 12, 24, 0, 2, &sTextColor, 0, gStringVar4); + AddTextPrinterParameterized4(0, 2, 12, 24, 0, 2, sTextColor, 0, gStringVar4); } static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) @@ -504,7 +504,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) if (record->wins == 0 && record->losses == 0 && record->draws == 0) { - AddTextPrinterParameterized4(0, 2, 0, y, 0, 2, &sTextColor, 0, gString_BattleRecords_7Dashes); + AddTextPrinterParameterized4(0, 2, 0, y, 0, 2, sTextColor, 0, gString_BattleRecords_7Dashes); for (i = 0; i < 3; i++) { if (i == 0) @@ -513,7 +513,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) x = 0x84; else x = 0xB4; - AddTextPrinterParameterized4(0, 2, x, y, 0, 2, &sTextColor, 0, gString_BattleRecords_4Dashes); + AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gString_BattleRecords_4Dashes); } } else @@ -541,7 +541,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) x = 0xB4; ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4); } - AddTextPrinterParameterized4(0, 2, x, y, 0, 2, &sTextColor, 0, gStringVar1); + AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gStringVar1); } } } @@ -554,9 +554,9 @@ static void PrintBattleRecords(void) FillWindowPixelRect(0, PIXEL_FILL(0), 0, 0, 0xD8, 0x90); StringExpandPlaceholders(gStringVar4, gString_BattleRecords_PlayersBattleResults); left = 0xD0 - GetStringWidth(2, gStringVar4, -1); - AddTextPrinterParameterized4(0, 2, left / 2, 4, 0, 2, &sTextColor, 0, gStringVar4); + AddTextPrinterParameterized4(0, 2, left / 2, 4, 0, 2, sTextColor, 0, gStringVar4); PrintTotalRecord(&gSaveBlock2Ptr->linkBattleRecords); - AddTextPrinterParameterized4(0, 2, 0x54, 0x30, 0, 2, &sTextColor, 0, gString_BattleRecords_ColumnHeaders); + AddTextPrinterParameterized4(0, 2, 0x54, 0x30, 0, 2, sTextColor, 0, gString_BattleRecords_ColumnHeaders); for (i = 0; i < LINK_B_RECORDS_COUNT; i++) PrintOpponentBattleRecord(&gSaveBlock2Ptr->linkBattleRecords.entries[i], 0x3D + 14 * i); CommitWindow(0); |