diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-23 12:25:04 -0500 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-01-23 12:25:04 -0500 |
commit | 49ff4ad4e8f5cf8cea984e255ba3bb5051ff91e6 (patch) | |
tree | 8fbdd739bdb2586c62c8a057135ebe165e00cdba /src/battle/contest_link_80C2020.c | |
parent | 0ec2cb85de36a636a96f24101cd5a20ffb53f5ea (diff) |
through sub_80C2340
Diffstat (limited to 'src/battle/contest_link_80C2020.c')
-rw-r--r-- | src/battle/contest_link_80C2020.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/battle/contest_link_80C2020.c b/src/battle/contest_link_80C2020.c index 5e3cc3cce..27f3f8ea3 100644 --- a/src/battle/contest_link_80C2020.c +++ b/src/battle/contest_link_80C2020.c @@ -3,6 +3,7 @@ #include "palette.h" #include "graphics.h" #include "text.h" +#include "string_util.h" #include "menu.h" #include "battle.h" #include "contest.h" @@ -14,6 +15,9 @@ void sub_80C37E4(void); u8 sub_80C3990(u8 a0, u8 a5); s8 sub_80C39E4(u8 a0, u8 a5); +extern const u8 gUnknown_083D17DC[]; +extern const u8 gUnknown_083D17E0[]; + void sub_80C2020(void) { REG_DISPCNT = DISPCNT_OBJ_1D_MAP; @@ -95,3 +99,36 @@ void sub_80C2144(void) } } } + +void sub_80C226C(u8 a0) +{ + u8 *strbuf; + + if (a0 == gContestPlayerMonIndex) + strbuf = StringCopy(gDisplayedStringBattle, gUnknown_083D17DC); + else + strbuf = gDisplayedStringBattle; + strbuf[0] = EXT_CTRL_CODE_BEGIN; + strbuf[1] = 0x06; + strbuf[2] = 0x04; + strbuf += 3; + strbuf = StringCopy(strbuf, gContestMons[a0].nickname); + strbuf[0] = EXT_CTRL_CODE_BEGIN; + strbuf[1] = 0x13; + strbuf[2] = 0x32; + strbuf += 3; + strbuf = StringCopy(strbuf, gUnknown_083D17E0); + if (gIsLinkContest & 1) + StringCopy(strbuf, gLinkPlayers[a0].name); + else + StringCopy(strbuf, gContestMons[a0].trainerName); + Text_InitWindowAndPrintText(&gMenuWindow, gDisplayedStringBattle, a0 * 36 + 770, 7, a0 * 3 + 4); +} + +void sub_80C2340(void) +{ + int i; + + for (i = 0; i < 4; i++) + sub_80C226C(i); +} |