summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);