summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-05-20 11:36:08 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2017-05-20 11:36:08 -0400
commit37e3c21eb38449690f995b7e5258bf00ce9a77c2 (patch)
tree050dc9928da5ddb2c5c312027f295f67bb7da05c /src
parentdc229fe94ad23c057aae619ec429a073a00a8508 (diff)
sub_80C0134
Diffstat (limited to 'src')
-rw-r--r--src/tv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tv.c b/src/tv.c
index 053dbfb57..2784b0cd1 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -1644,6 +1644,21 @@ u8 sub_80C00B4(TVShow *tv1, TVShow *tv2, u8 idx) {
return TRUE;
}
+u8 sub_80C0134(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;
+ tv1->common.var16[0] = 1;
+ return TRUE;
+}
+
asm(".section .dotvshow\n");
void DoTVShowPokemonFanClubLetter(void);