summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-05-20 11:19:34 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-05-20 11:19:34 -0400
commit39b15cb589dde612854ba1e0ea1365daccbfc7a2 (patch)
treeb5e93819395304d6be41371807670e3af193a1b1 /src
parentdf3197f80818e7953c0572c6f23b2dd1ba7baf6b (diff)
sub_80C004C
Diffstat (limited to 'src')
-rw-r--r--src/tv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tv.c b/src/tv.c
index 6e6ffdf29..994db4dfc 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -1613,6 +1613,20 @@ _080C0048: .4byte gUnknown_03000722\n\
}
#endif
+u8 sub_80C004C(TVShow *tv1, TVShow *tv2, u8 idx) {
+ u32 linkTrainerId = GetLinkPlayerTrainerId(idx);
+ if ((linkTrainerId & 0xFF) == tv2->common.trainerIdLo && ((linkTrainerId >> 8) & 0xFF) == tv2->common.trainerIdHi) {
+ return FALSE;
+ }
+ tv2->common.trainerIdLo = tv2->common.srcTrainerIdLo;
+ tv2->common.trainerIdHi = tv2->common.srcTrainerIdHi;
+ tv2->common.srcTrainerIdLo = linkTrainerId & 0xFF;
+ tv2->common.srcTrainerIdHi = linkTrainerId >> 8;
+ *tv1 = *tv2;
+ tv1->common.var01 = 1;
+ return TRUE;
+}
+
asm(".section .dotvshow\n");
void DoTVShowPokemonFanClubLetter(void);