summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xasm/tv.s59
-rwxr-xr-xsrc/tv.c18
2 files changed, 18 insertions, 59 deletions
diff --git a/asm/tv.s b/asm/tv.s
index f4ac052e0..5955a9bbb 100755
--- a/asm/tv.s
+++ b/asm/tv.s
@@ -7,65 +7,6 @@
.text
- thumb_func_start sub_80BDA0C
-sub_80BDA0C: @ 80BDA0C
- ldr r2, _080BDA24 @ =gSaveBlock1
- ldr r0, _080BDA28 @ =gSpecialVar_0x8004
- ldrh r1, [r0]
- lsls r0, r1, 3
- adds r0, r1
- lsls r0, 2
- adds r0, r2
- ldr r1, _080BDA2C @ =0x00002738
- adds r0, r1
- ldrb r0, [r0]
- bx lr
- .align 2, 0
-_080BDA24: .4byte gSaveBlock1
-_080BDA28: .4byte gSpecialVar_0x8004
-_080BDA2C: .4byte 0x00002738
- thumb_func_end sub_80BDA0C
-
- thumb_func_start sub_80BDA30
-sub_80BDA30: @ 80BDA30
- push {r4,lr}
- movs r2, 0
- ldr r3, _080BDA5C @ =gSaveBlock1
-_080BDA36:
- lsls r0, r2, 3
- adds r0, r2
- lsls r0, 2
- adds r1, r0, r3
- ldr r4, _080BDA60 @ =0x00002738
- adds r0, r1, r4
- ldrb r0, [r0]
- cmp r0, 0
- beq _080BDA64
- cmp r0, 0x29
- beq _080BDA64
- adds r4, 0x1
- adds r0, r1, r4
- ldrb r0, [r0]
- cmp r0, 0x1
- bne _080BDA64
- adds r0, r2, 0
- b _080BDA70
- .align 2, 0
-_080BDA5C: .4byte gSaveBlock1
-_080BDA60: .4byte 0x00002738
-_080BDA64:
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- cmp r2, 0x17
- bls _080BDA36
- movs r0, 0xFF
-_080BDA70:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_80BDA30
-
thumb_func_start special_0x4a
special_0x4a: @ 80BDA78
push {lr}
diff --git a/src/tv.c b/src/tv.c
index 5e9314353..af86a335b 100755
--- a/src/tv.c
+++ b/src/tv.c
@@ -347,6 +347,24 @@ void TurnOffTVScreen(void)
DrawWholeMapView();
}
+u8 sub_80BDA0C(void)
+{
+ return gSaveBlock1.tvShows[gSpecialVar_0x8004].common.var00;
+}
+
+u8 sub_80BDA30(void)
+{
+ u8 showIdx;
+ for (showIdx=0; showIdx<24; showIdx++)
+ {
+ if (gSaveBlock1.tvShows[showIdx].common.var00 != 0 && gSaveBlock1.tvShows[showIdx].common.var00 != TVSHOW_MASS_OUTBREAK && gSaveBlock1.tvShows[showIdx].common.var01 == 1)
+ {
+ return showIdx;
+ }
+ }
+ return 0xff;
+}
+
asm(".section .text_a");
s8 sub_80BF74C(TVShow tvShow[]);