From d29b9d268fe46322c740fe5ac440641834686f9d Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 28 Feb 2018 00:18:59 +0100 Subject: [PATCH] make it compile --- include/tv.h | 6 ++++++ src/battle_controllers.c | 9 ++++----- src/battle_tv.c | 3 +-- src/tv.c | 1 - 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/include/tv.h b/include/tv.h index 8c7c4701e..19c900ba8 100644 --- a/include/tv.h +++ b/include/tv.h @@ -3,6 +3,7 @@ extern u8 *const gTVStringVarPtrs[3]; +void ClearTVShowData(void); void sub_80EE184(void); void sub_80EE35C(u16 foeSpecies, u16 species, u8 moveIdx, const u16 *movePtr, u16 betterMove); void sub_80EE8C8(u16 winStreak, u8 facility); @@ -38,6 +39,11 @@ void sub_80EECC8(void); void sub_80EECEC(void); void sub_80F1208(TVShow *shows); void sub_80EE44C(u8 nMonsCaught, u8 nPkblkUsed); +void SetPokemonAnglerSpecies(u16 species); +void UpdateTVShowsPerDay(u16 days); +void PutPokemonTodayCaughtOnAir(void); +void TV_PutSecretBaseVisitOnTheAir(void); +bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language); void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent); #endif //GUARD_TV_H diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 3d5ffeb3a..97f82ed0c 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -97,7 +97,6 @@ void SetUpBattleVarsAndBirchZigzagoon(void) void sub_8032768(void) { s32 i; - u8 *data; if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) sub_8184DA4(1); @@ -120,11 +119,11 @@ void sub_8032768(void) sub_81B8D64(i, 0); } - for (i = 0; i < sizeof(gBattleStruct->field_1A4); i++) - *((u8*)(&gBattleStruct->field_1A4) + i) = 0; + for (i = 0; i < sizeof(gBattleStruct->tvMovePoints); i++) + *((u8*)(&gBattleStruct->tvMovePoints) + i) = 0; - for (i = 0; i < sizeof(gBattleStruct->field_204); i++) - *((u8*)(&gBattleStruct->field_204) + i) = 0; + for (i = 0; i < sizeof(gBattleStruct->tv); i++) + *((u8*)(&gBattleStruct->tv) + i) = 0; } static void InitSinglePlayerBtlControllers(void) diff --git a/src/battle_tv.c b/src/battle_tv.c index bd3de548b..e23fba2c4 100644 --- a/src/battle_tv.c +++ b/src/battle_tv.c @@ -766,9 +766,8 @@ void TryPutLinkBattleTvShowOnAir(void) species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES, NULL); if (species != SPECIES_NONE && !GetMonData(&gEnemyParty[i], MON_DATA_IS_EGG, NULL)) { - s32 id = 1; for (sum = 0, j = 0; j < 4; j++) - sum += movePoints->points[id][i * 4 + j]; + sum += movePoints->points[1][i * 4 + j]; if (opponentBestSum == sum) { diff --git a/src/tv.c b/src/tv.c index fbbc10801..b7c2812fe 100644 --- a/src/tv.c +++ b/src/tv.c @@ -1789,7 +1789,6 @@ void EndMassOutbreak(void) void UpdateTVShowsPerDay(u16 days) { - sub_80ED8B4(days); UpdateMassOutbreakTimeLeft(days); sub_80EF120(days);