From 33b3feeaae66283b1ccdb1a790d70dbb92873705 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 17 May 2017 10:09:51 -0400 Subject: sub_80BF588 --- src/tv.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src') diff --git a/src/tv.c b/src/tv.c index 490b904ce..8958a003c 100644 --- a/src/tv.c +++ b/src/tv.c @@ -341,6 +341,35 @@ void sub_80BF55C(TVShow tvShow[], u8 showidx) } } +void sub_80BF588(TVShow tvShow[]) +{ + u8 showidx; + u8 showidx2; + for (showidx=0; showidx<4; showidx++) { + if (tvShow[showidx].common.var00 == 0) { + for (showidx2=showidx+1; showidx2<5; showidx2++) { + if (tvShow[showidx2].common.var00 != 0) { + tvShow[showidx] = tvShow[showidx2]; + sub_80BF55C(tvShow, showidx2); + break; + } + } + } + } + for (showidx=5; showidx<24; showidx++) { + if (tvShow[showidx].common.var00 == 0) { + for (showidx2=showidx+1; showidx2<24; showidx2++) { + if (tvShow[showidx2].common.var00 != 0) { + tvShow[showidx] = tvShow[showidx2]; + sub_80BF55C(gSaveBlock1.tvShows, showidx2); + break; + } + } + } + } + +} + asm(".section .text_c"); -- cgit v1.2.3