summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/easy_chat.s28
-rw-r--r--asm/tv.s29
-rw-r--r--include/easy_chat.h1
-rw-r--r--include/global.h1
-rw-r--r--src/easy_chat.c6
-rw-r--r--src/tv.c13
6 files changed, 21 insertions, 57 deletions
diff --git a/asm/easy_chat.s b/asm/easy_chat.s
index b9f27b895..466d371a1 100644
--- a/asm/easy_chat.s
+++ b/asm/easy_chat.s
@@ -11165,32 +11165,4 @@ _080EB6F4: .4byte gSaveBlock1 + 0x273A
_080EB6F8: .4byte 0x0000ffff
thumb_func_end unref_sub_80EB684
- thumb_func_start sub_80EB6FC
-sub_80EB6FC: @ 80EB6FC
- push {lr}
- adds r2, r0, 0
- lsls r1, 16
- ldr r0, _080EB724 @ =0xffff0000
- adds r1, r0
- lsrs r0, r1, 16
- ldr r1, _080EB728 @ =0x0000ffff
- cmp r0, r1
- beq _080EB71E
- adds r3, r1, 0
-_080EB710:
- strh r3, [r2]
- adds r2, 0x2
- subs r0, 0x1
- lsls r0, 16
- lsrs r0, 16
- cmp r0, r1
- bne _080EB710
-_080EB71E:
- pop {r0}
- bx r0
- .align 2, 0
-_080EB724: .4byte 0xffff0000
-_080EB728: .4byte 0x0000ffff
- thumb_func_end sub_80EB6FC
-
.align 2, 0 @ Don't pad with nop.
diff --git a/asm/tv.s b/asm/tv.s
index f4c6c2564..15c9ea3f8 100644
--- a/asm/tv.s
+++ b/asm/tv.s
@@ -2878,35 +2878,6 @@ _080BF4B4: .4byte gUnknown_03005D38
_080BF4B8: .4byte gSaveBlock1 + 0x2738
thumb_func_end sub_80BF484
- thumb_func_start sub_80BF4BC
-sub_80BF4BC: @ 80BF4BC
- push {lr}
- movs r0, 0x7
- bl sub_80BF25C
- ldr r0, _080BF4E8 @ =gScriptResult
- ldrh r0, [r0]
- cmp r0, 0
- bne _080BF4E4
- ldr r0, _080BF4EC @ =gUnknown_03005D38
- movs r1, 0
- ldrsb r1, [r0, r1]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- ldr r1, _080BF4F0 @ =gSaveBlock1 + 0x2738
- adds r0, r1
- adds r0, 0x18
- movs r1, 0x1
- bl sub_80EB6FC
-_080BF4E4:
- pop {r0}
- bx r0
- .align 2, 0
-_080BF4E8: .4byte gScriptResult
-_080BF4EC: .4byte gUnknown_03005D38
-_080BF4F0: .4byte gSaveBlock1 + 0x2738
- thumb_func_end sub_80BF4BC
-
.section .text_80BF544
thumb_func_start sub_80BFF68
diff --git a/include/easy_chat.h b/include/easy_chat.h
index ee5ac4138..dca6b80c2 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -28,5 +28,6 @@ enum {
u16 sub_80EB72C(u16 group);
+void sub_80EB6FC(u16 *, u16);
#endif // GUARD_EASYCHAT_H
diff --git a/include/global.h b/include/global.h
index 4b70d3283..73a826dd2 100644
--- a/include/global.h
+++ b/include/global.h
@@ -227,6 +227,7 @@ struct TVShowFanclubOpinions {
/*0x0E*/ u8 var0E;
/*0x0F*/ u8 var0F;
/*0x10*/ u8 var10[8];
+ /*0x18*/ u16 var18[6];
};
struct TVShowNameRaterShow {
diff --git a/src/easy_chat.c b/src/easy_chat.c
index 380fe6e4d..ee1e37b9b 100644
--- a/src/easy_chat.c
+++ b/src/easy_chat.c
@@ -23,6 +23,11 @@ extern const u8 gEasyChatGroupSizes[];
extern u16 gSpecialVar_0x8004;
+void sub_80EB6FC(u16 *arg0, u16 arg1) {
+ for (arg1--; arg1!=0xffff; arg1--)
+ *(arg0++) = 0xffff;
+}
+
u16 sub_80EB72C(u16 group) {
u16 local1;
@@ -260,3 +265,4 @@ static u16 sub_80EB9D8(void) {
return -1;
}
+
diff --git a/src/tv.c b/src/tv.c
index ad466c7d0..12bd70ac9 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -13,6 +13,7 @@
#include "map_constants.h"
#include "strings.h"
#include "link.h"
+#include "easy_chat.h"
enum
{
@@ -453,6 +454,18 @@ void sub_80BEA88(void)
asm(".section .text_b");
+void sub_80BF25C(u8);
+
+void sub_80BF4BC(void)
+{
+ TVShow *show;
+ sub_80BF25C(7);
+ if (gScriptResult == 0) {
+ show = &gSaveBlock1.tvShows.shows[gUnknown_03005D38.var0];
+ sub_80EB6FC(show->fanclubOpinions.var18, 1);
+ }
+}
+
u8 sub_80BF4F4(u8 arg0)
{
u32 species;