From 64412ee4c45a53712dd94410966ec68771b83fdd Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Mon, 8 May 2017 22:23:56 +0200 Subject: Decompile ShowLinkBattleRecords --- src/battle_records.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/battle_records.c (limited to 'src') diff --git a/src/battle_records.c b/src/battle_records.c new file mode 100644 index 000000000..3290bbebe --- /dev/null +++ b/src/battle_records.c @@ -0,0 +1,27 @@ +#include "global.h" +#include "menu.h" + +extern const u8 gOtherText_BattleResults[]; +extern const u8 gOtherText_WinLoseDraw[]; + +void PrintLinkBattleWinsLossesDraws(void *); + +void PrintLinkBattleRecord(void *, u8); + +void ShowLinkBattleRecords(void) { + s32 i; + MenuDrawTextWindow(1, 0, 28, 18); + sub_8072BD8((u8 *) gOtherText_BattleResults, 0, 1, 240); + + PrintLinkBattleWinsLossesDraws(gSaveBlock1.linkBattleRecords); +#if ENGLISH + MenuPrint(gOtherText_WinLoseDraw, 12, 6); +#elif GERMAN + MenuPrint_PixelCoords((u8 *) gOtherText_WinLoseDraw, 88, 48, 1); +#endif + + for (i = 0; i < 5; i++) + { + PrintLinkBattleRecord(gSaveBlock1.linkBattleRecords[i], 6 + (i + 1) * 2); + } +} -- cgit v1.2.3