Document and rename some TV-related structs (#1075)
Some checks are pending
build / build (push) Waiting to run

This commit is contained in:
VicSevenT
2026-04-09 23:38:08 -05:00
committed by GitHub
parent f8b5d346cf
commit 4c3a3f18c6
50 changed files with 1065 additions and 1154 deletions

View File

@@ -1,16 +0,0 @@
#ifndef POKEPLATINUM_OV6_02246444_H
#define POKEPLATINUM_OV6_02246444_H
#include "field/field_system_decl.h"
#include "overlay006/struct_ov6_022465F4_decl.h"
void ov6_0224647C(UnkStruct_ov6_022465F4 *param0);
int ov6_0224648C(const UnkStruct_ov6_022465F4 *param0);
int ov6_02246490(const UnkStruct_ov6_022465F4 *param0);
const u16 *ov6_02246494(const UnkStruct_ov6_022465F4 *param0);
void *ov6_02246498(UnkStruct_ov6_022465F4 *param0);
int ov6_022464A4(const UnkStruct_ov6_022465F4 *param0);
UnkStruct_ov6_022465F4 *ov6_022465A0(FieldSystem *fieldSystem, int param1, int param2);
void ov6_022465F4(UnkStruct_ov6_022465F4 *param0);
#endif // POKEPLATINUM_OV6_02246444_H

View File

@@ -8,7 +8,7 @@
void FieldSystem_SetTVProgramFinished(FieldSystem *fieldSystem);
int TVBroadcast_GetPendingBroadcastType(FieldSystem *fieldSystem);
int ov6_022468B0(FieldSystem *fieldSystem, BOOL param1, BOOL param2);
int ov6_02246920(FieldSystem *fieldSystem);
int TVBroadcast_GetNextSegmentID(FieldSystem *fieldSystem);
int TVBroadcast_GetProgramFramingMessage(FieldSystem *fieldSystem, int framingMessageType);
BOOL TVBroadcast_LoadSegmentMessage(FieldSystem *fieldSystem, StringTemplate *template, int segmentID, u16 *bankDestVar, u16 *messageDestVar);

View File

@@ -1,6 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_OV6_022465F4_DECL_H
#define POKEPLATINUM_STRUCT_OV6_022465F4_DECL_H
typedef struct UnkStruct_ov6_022465F4_t UnkStruct_ov6_022465F4;
#endif // POKEPLATINUM_STRUCT_OV6_022465F4_DECL_H

View File

@@ -0,0 +1,17 @@
#ifndef POKEPLATINUM_OV6_TV_EPISODE_H
#define POKEPLATINUM_OV6_TV_EPISODE_H
#include "struct_defs/struct_0202440C.h"
#include "field/field_system_decl.h"
void TVEpisode_IncrementTimesPlayed(TVEpisode *episode);
int TVEpisode_GetGender(const TVEpisode *episode);
int TVEpisode_GetLanguage(const TVEpisode *episode);
const u16 *TVEpisode_GetTrainerName(const TVEpisode *episode);
void *TVEpisode_GetSegment(TVEpisode *episode);
int TVEpisode_GetSegmentID(const TVEpisode *episode);
TVEpisode *TVEpisode_New(FieldSystem *fieldSystem, int programType, int segmentID);
void TVEpisode_Free(TVEpisode *episode);
#endif // POKEPLATINUM_OV6_TV_EPISODE_H

View File

@@ -2,19 +2,19 @@
#define POKEPLATINUM_OV59_021D2B44_H
#include "struct_decls/struct_0202440C_decl.h"
#include "struct_decls/struct_0202E794_decl.h"
#include "struct_defs/struct_0202440C.h"
#include "savedata.h"
u32 ov59_021D2B44(const SaveData *saveData);
u32 ov59_021D2B4C(const SaveData *saveData);
u32 ov59_021D2B54(const SaveData *saveData);
UnkStruct_0202E794 *ov59_021D2C28(SaveData *saveData, enum HeapID heapID, u32 param2);
UnkStruct_0202E794 *ov59_021D2C70(SaveData *saveData, enum HeapID heapID, u32 param2);
UnkStruct_0202E794 *ov59_021D2CB4(SaveData *saveData, enum HeapID heapID, u32 param2);
UnkStruct_0202E794 *ov59_021D2CF8(SaveData *saveData, enum HeapID heapID, u32 param2);
UnkStruct_0202E794 *ov59_021D2D3C(SaveData *saveData, enum HeapID heapID, u32 param2);
UnkStruct_0202E794 *ov59_021D2D80(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2C28(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2C70(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2CB4(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2CF8(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2D3C(SaveData *saveData, enum HeapID heapID, u32 param2);
TVWifiEpisode *ov59_021D2D80(SaveData *saveData, enum HeapID heapID, u32 param2);
void ov59_021D2F10(TVBroadcast *broadcast, int param1, int param2, const void **param3, const void **param4);
void ov59_021D2F38(TVBroadcast *broadcast, int param1, int param2, const void **param3, const void **param4);
void ov59_021D2F60(TVBroadcast *broadcast, int param1, int param2, const void **param3, const void **param4);

View File

@@ -1,6 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E4D4_DECL_H
#define POKEPLATINUM_STRUCT_0202E4D4_DECL_H
typedef struct UnkStruct_0202E4D4_t UnkStruct_0202E4D4;
#endif // POKEPLATINUM_STRUCT_0202E4D4_DECL_H

View File

@@ -1,6 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E768_DECL_H
#define POKEPLATINUM_STRUCT_0202E768_DECL_H
typedef struct UnkStruct_0202E768_t UnkStruct_0202E768;
#endif // POKEPLATINUM_STRUCT_0202E768_DECL_H

View File

@@ -1,6 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E794_DECL_H
#define POKEPLATINUM_STRUCT_0202E794_DECL_H
typedef struct UnkStruct_0202E794_t UnkStruct_0202E794;
#endif // POKEPLATINUM_STRUCT_0202E794_DECL_H

View File

@@ -3,8 +3,6 @@
#include "constants/tv_broadcast.h"
#include "struct_defs/struct_0202E768.h"
#include "struct_defs/struct_0202E794.h"
#include "struct_defs/struct_0202E7E4.h"
#include "struct_defs/struct_0202E7F0.h"
#include "struct_defs/struct_0202E7FC.h"
@@ -13,21 +11,46 @@
#include "struct_defs/struct_0202E81C.h"
#include "struct_defs/struct_0202E828.h"
#include "struct_defs/struct_0202E834.h"
#include "struct_defs/tv_episode_segment_contest_hall_showcased_pokemon.h"
#include "struct_defs/tv_segment_contest_hall_showcased_pokemon.h"
#define TV_BROADCAST_MAX_PLAYED_SEGMENTS 4
typedef struct TVSegmentInstance {
u8 segmentID;
u8 timesPlayed;
u32 timestamp;
u8 segment[40];
} TVSegmentInstance;
typedef struct TVEpisode {
u8 segmentID;
u8 gameVersion;
u8 language;
u8 gender;
u16 name[8];
TVSegmentInstance *details;
} TVEpisode;
typedef struct TVWifiEpisode {
u32 trainerID;
u8 gender;
u8 gameVersion;
u8 language;
u16 name[8];
TVSegmentInstance details;
} TVWifiEpisode;
typedef struct TVBroadcast {
u8 playedSegments[TV_BROADCAST_MAX_PLAYED_SEGMENTS];
int timeSlotMinutesRemaining;
u8 programFinished;
UnkStruct_0202E768 unk_0C[4];
UnkStruct_0202E768 unk_C4[4];
UnkStruct_0202E768 unk_17C[4];
UnkStruct_0202E794 unk_234[16];
UnkStruct_0202E794 unk_684[8];
UnkStruct_0202E794 unk_8AC[8];
TVEpisodeSegment_ContestHall_ShowcasedPokemon showcasedPokemon;
TVSegmentInstance unk_0C[4];
TVSegmentInstance unk_C4[4];
TVSegmentInstance unk_17C[4];
TVWifiEpisode unk_234[16];
TVWifiEpisode unk_684[8];
TVWifiEpisode unk_8AC[8];
TVSegment_ContestHall_ShowcasedPokemon showcasedPokemon;
UnkStruct_0202E7E4 unk_ADE;
UnkStruct_0202E7F0 unk_B02;
UnkStruct_0202E7FC unk_B04;

View File

@@ -1,11 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E4D4_H
#define POKEPLATINUM_STRUCT_0202E4D4_H
typedef struct UnkStruct_0202E4D4_t {
u8 unk_00;
u8 unk_01;
u32 unk_04;
u8 unk_08[40];
} UnkStruct_0202E4D4;
#endif // POKEPLATINUM_STRUCT_0202E4D4_H

View File

@@ -1,10 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E768_H
#define POKEPLATINUM_STRUCT_0202E768_H
#include "struct_defs/struct_0202E4D4.h"
typedef struct UnkStruct_0202E768_t {
UnkStruct_0202E4D4 unk_00;
} UnkStruct_0202E768;
#endif // POKEPLATINUM_STRUCT_0202E768_H

View File

@@ -1,15 +0,0 @@
#ifndef POKEPLATINUM_STRUCT_0202E794_H
#define POKEPLATINUM_STRUCT_0202E794_H
#include "struct_defs/struct_0202E4D4.h"
typedef struct UnkStruct_0202E794_t {
u32 unk_00;
u8 unk_04;
u8 unk_05;
u8 language;
u16 unk_08[8];
UnkStruct_0202E4D4 unk_18;
} UnkStruct_0202E794;
#endif // POKEPLATINUM_STRUCT_0202E794_H

View File

@@ -1,9 +1,8 @@
#ifndef POKEPLATINUM_TV_EPISODE_SEGMENT_CONTEST_HALL_SHOWCASED_POKEMON_H
#define POKEPLATINUM_TV_EPISODE_SEGMENT_CONTEST_HALL_SHOWCASED_POKEMON_H
typedef struct TVEpisodeSegment_ContestHall_ShowcasedPokemon {
typedef struct TVSegment_ContestHall_ShowcasedPokemon {
u8 unk_00;
u8 padding_01;
u16 species;
u8 gender;
u8 language;
@@ -11,6 +10,6 @@ typedef struct TVEpisodeSegment_ContestHall_ShowcasedPokemon {
u8 contestRank;
u8 contestType;
u8 contestPlacement;
} TVEpisodeSegment_ContestHall_ShowcasedPokemon;
} TVSegment_ContestHall_ShowcasedPokemon;
#endif // POKEPLATINUM_TV_EPISODE_SEGMENT_CONTEST_HALL_SHOWCASED_POKEMON_H

View File

@@ -1,80 +0,0 @@
#ifndef POKEPLATINUM_TV_EPISODE_SEGMENT_H
#define POKEPLATINUM_TV_EPISODE_SEGMENT_H
#include "generated/pokemon_contest_ranks.h"
#include "generated/pokemon_contest_types.h"
#include "struct_decls/struct_0202440C_decl.h"
#include "field/field_system_decl.h"
#include "overlay006/struct_ov6_022465F4_decl.h"
#include "field_battle_data_transfer.h"
#include "pokemon.h"
#include "savedata.h"
#include "string_template.h"
#include "trainer_info.h"
int TVEpisodeSegment_LoadMessage(int programTypeID, FieldSystem *fieldSystem, StringTemplate *template, UnkStruct_ov6_022465F4 *param3, u16 *bankDestVar);
BOOL TVEpisodeSegment_IsEligible(int programTypeID, FieldSystem *fieldSystem, UnkStruct_ov6_022465F4 *param2);
void TVBroadcast_SetContestHallShowInfo(TVBroadcast *broadcast, Pokemon *mon, enum PokemonContestType contestType, enum PokemonContestRank contestRank, int contestPlacement);
void sub_0206CF48(TVBroadcast *broadcast, Pokemon *param1, enum HeapID heapID);
void FieldSystem_SaveTVEpisodeSegment_PlantingAndWateringShow(FieldSystem *fieldSystem, u16 berryItemID, u8 yieldRating, u16 yieldAmount);
void sub_0206CF9C(TVBroadcast *broadcast, int param1);
void sub_0206CFB4(TVBroadcast *broadcast, int param1);
void sub_0206CFCC(TVBroadcast *broadcast, int param1);
void sub_0206CFE4(TVBroadcast *broadcast, BOOL param1, u16 param2);
void TVBroadcast_ResetSafariGameData(TVBroadcast *broadcast);
void TVBroadcast_UpdateSafariGameData(TVBroadcast *broadcast, Pokemon *param1);
void sub_0206D048(TVBroadcast *broadcast, Pokemon *param1);
void sub_0206D088(TVBroadcast *broadcast, u8 param1, const TrainerInfo *param2);
void sub_0206D0C8(TVBroadcast *broadcast, u16 param1);
void sub_0206D0F0(TVBroadcast *broadcast);
void sub_0206D104(TVBroadcast *broadcast);
void sub_0206D12C(TVBroadcast *broadcast);
CaptureAttempt *CaptureAttempt_New(enum HeapID heapID);
void CaptureAttempt_Free(CaptureAttempt *captureAttempt);
void CaptureAttempt_Init(CaptureAttempt *captureAttempt, Pokemon *mon, int resultMask, int ballsThrown, enum HeapID heapID);
void FieldSystem_SaveTVEpisodeSegment_CatchThatPokemonShow(FieldSystem *fieldSystem, const CaptureAttempt *captureAttempt, int resultMask);
void FieldSystem_SaveTVEpisodeSegment_WhatsFishing(FieldSystem *fieldSystem, BOOL caughtFish, u16 fishingRodItemID, Pokemon *mon);
void FieldSystem_SaveTVEpisodeSegment_LoveThatGroupCorner_NewGroup(FieldSystem *fieldSystem);
void FieldSystem_SaveTVEpisodeSegment_LoveThatGroupCorner_SwitchGroup(FieldSystem *fieldSystem);
void FieldSystem_SaveTVEpisodeSegment_HiddenItemBreakingNews(FieldSystem *fieldSystem, u16 item);
void FieldSystem_SaveTVEpisodeSegment_SinnohShoppingChampCorner(SaveData *saveData, u16 item, u8 amount);
void FieldSystem_SaveTVEpisodeSegment_HappyHappyEggClub(FieldSystem *fieldSystem, Pokemon *mon);
void FieldSystem_SaveTVEpisodeSegment_RateThatNameChange(FieldSystem *fieldSystem, Pokemon *mon);
void FieldSystem_SaveTVEpisodeSegment_UndergroundTreasuresCorner(FieldSystem *fieldSystem, int item, int amount);
void FieldSystem_SaveTVEpisodeSegment_SafariGameSpecialNewsBulletin(FieldSystem *fieldSystem);
void FieldSystem_SaveTVEpisodeSegment_PokemonStorageSpecialNewsBulletin(FieldSystem *fieldSystem);
void FieldSystem_SaveTVEpisodeSegment_HerbalMedicineTrainerSightingDummy(TVBroadcast *broadcast, Pokemon *mon, u16 item);
void FieldSystem_SaveTVEpisodeSegment_PlantingAndWateringShow(FieldSystem *fieldSystem, u16 berryItemID, u8 yieldRating, u16 yieldAmount);
void FieldSystem_SaveTVEpisodeSegment_SealClubShow(TVBroadcast *broadcast, Pokemon *mon, u8 ballSeal);
void FieldSystem_SaveTVEpisodeSegment_CaptureTheFlagDigest_TakeFlag(FieldSystem *fieldSystem, const TrainerInfo *trainerInfo);
void FieldSystem_SaveTVEpisodeSegment_CaptureTheFlagDigest_LoseFlag(FieldSystem *fieldSystem, const TrainerInfo *trainerInfo);
void FieldSystem_SaveTVEpisodeSegment_HomeAndManor_NoFurniture(FieldSystem *fieldSystem);
void FieldSystem_SaveTVEpisodeSegment_HomeAndManor(FieldSystem *fieldSystem, u8 furniture);
void sub_0206DBB0(SaveData *saveData, u32 param1, Pokemon *param2, BOOL param3);
void sub_0206DC6C(FieldSystem *fieldSystem, u32 param1, Pokemon *param2);
void sub_0206DD38(FieldSystem *fieldSystem, u32 param1, u32 param2, u32 param3);
void sub_0206DDB8(SaveData *saveData, Pokemon *mon, u32 monDataParam);
void sub_0206DEEC(FieldSystem *fieldSystem, u16 param1, u16 param2);
void sub_0206DF60(FieldSystem *fieldSystem, u16 param1);
void sub_0206DFE0(SaveData *saveData);
void sub_0206E060(SaveData *saveData);
void FieldSystem_SaveTVEpisodeSegment_BattleTowerCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_YourPokemonCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_ThePoketchWatch(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_ContestHall(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_RightOnPhotoCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_StreetCornerPersonalityCheckup(FieldSystem *fieldSystem, u16 pokemonType);
void FieldSystem_SaveTVEpisodeSegment_ThreeCheersForPoffinCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_AmitySquareWatch(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_BattleFrontierFrontlineNews_Single(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question1(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question2(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question3(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question4(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVEpisodeSegment_BattleFrontierFrontlineNews_Multi(FieldSystem *fieldSystem, u16 customMessageWord);
void sub_0206F2F0(SaveData *saveData);
#endif // POKEPLATINUM_TV_EPISODE_SEGMENT_H

83
include/tv_segment.h Normal file
View File

@@ -0,0 +1,83 @@
#ifndef POKEPLATINUM_TV_SEGMENT_H
#define POKEPLATINUM_TV_SEGMENT_H
#include "generated/pokemon_contest_ranks.h"
#include "generated/pokemon_contest_types.h"
#include "struct_decls/struct_0202440C_decl.h"
#include "struct_defs/struct_0202440C.h"
#include "field/field_system_decl.h"
#include "field_battle_data_transfer.h"
#include "pokemon.h"
#include "savedata.h"
#include "string_template.h"
#include "trainer_info.h"
int TVSegment_LoadMessage(int programTypeID, FieldSystem *fieldSystem, StringTemplate *template, TVEpisode *episode, u16 *bankDestVar);
BOOL TVSegment_IsEligible(int programTypeID, FieldSystem *fieldSystem, TVEpisode *episode);
void TVBroadcast_SetContestHallShowInfo(TVBroadcast *broadcast, Pokemon *mon, enum PokemonContestType contestType, enum PokemonContestRank contestRank, int contestPlacement);
void sub_0206CF48(TVBroadcast *broadcast, Pokemon *param1, enum HeapID heapID);
void sub_0206CF9C(TVBroadcast *broadcast, int param1);
void sub_0206CFB4(TVBroadcast *broadcast, int param1);
void sub_0206CFCC(TVBroadcast *broadcast, int param1);
void sub_0206CFE4(TVBroadcast *broadcast, BOOL param1, u16 param2);
void TVBroadcast_ResetSafariGameData(TVBroadcast *broadcast);
void TVBroadcast_UpdateSafariGameData(TVBroadcast *broadcast, Pokemon *mon);
void sub_0206D048(TVBroadcast *broadcast, Pokemon *mon);
void sub_0206D088(TVBroadcast *broadcast, u8 param1, const TrainerInfo *param2);
void sub_0206D0C8(TVBroadcast *broadcast, u16 param1);
void sub_0206D0F0(TVBroadcast *broadcast);
void sub_0206D104(TVBroadcast *broadcast);
void sub_0206D12C(TVBroadcast *broadcast);
CaptureAttempt *CaptureAttempt_New(enum HeapID heapID);
void CaptureAttempt_Free(CaptureAttempt *captureAttempt);
void CaptureAttempt_Init(CaptureAttempt *captureAttempt, Pokemon *mon, int resultMask, int ballsThrown, enum HeapID heapID);
void FieldSystem_SaveTVSegment_PlantingAndWateringShow(FieldSystem *fieldSystem, u16 berryItemID, u8 yieldRating, u16 yieldAmount);
void FieldSystem_SaveTVSegment_CatchThatPokemonShow(FieldSystem *fieldSystem, const CaptureAttempt *captureAttempt, int resultMask);
void FieldSystem_SaveTVSegment_WhatsFishing(FieldSystem *fieldSystem, BOOL caughtFish, u16 fishingRodItemID, Pokemon *mon);
void FieldSystem_SaveTVSegment_LoveThatGroupCorner_NewGroup(FieldSystem *fieldSystem);
void FieldSystem_SaveTVSegment_LoveThatGroupCorner_SwitchGroup(FieldSystem *fieldSystem);
void FieldSystem_SaveTVSegment_HiddenItemBreakingNews(FieldSystem *fieldSystem, u16 item);
void FieldSystem_SaveTVSegment_SinnohShoppingChampCorner(SaveData *saveData, u16 item, u8 amount);
void FieldSystem_SaveTVSegment_HappyHappyEggClub(FieldSystem *fieldSystem, Pokemon *mon);
void FieldSystem_SaveTVSegment_RateThatNameChange(FieldSystem *fieldSystem, Pokemon *mon);
void FieldSystem_SaveTVSegment_UndergroundTreasuresCorner(FieldSystem *fieldSystem, int item, int amount);
void FieldSystem_SaveTVSegment_SafariGameSpecialNewsBulletin(FieldSystem *fieldSystem);
void FieldSystem_SaveTVSegment_PokemonStorageSpecialNewsBulletin(FieldSystem *fieldSystem);
void FieldSystem_SaveTVSegment_HerbalMedicineTrainerSightingDummy(TVBroadcast *broadcast, Pokemon *mon, u16 item);
void FieldSystem_SaveTVSegment_PlantingAndWateringShow(FieldSystem *fieldSystem, u16 berryItemID, u8 yieldRating, u16 yieldAmount);
void FieldSystem_SaveTVSegment_SealClubShow(TVBroadcast *broadcast, Pokemon *param1, u8 ballSeal);
void FieldSystem_SaveTVSegment_CaptureTheFlagDigest_TakeFlag(FieldSystem *fieldSystem, const TrainerInfo *trainerInfo);
void FieldSystem_SaveTVSegment_CaptureTheFlagDigest_LoseFlag(FieldSystem *fieldSystem, const TrainerInfo *trainerInfo);
void FieldSystem_SaveTVSegment_HomeAndManor_NoFurniture(FieldSystem *fieldSystem);
void FieldSystem_SaveTVSegment_HomeAndManor(FieldSystem *fieldSystem, u8 furniture);
void sub_0206DBB0(SaveData *saveData, u32 param1, Pokemon *param2, BOOL param3);
void sub_0206DC6C(FieldSystem *fieldSystem, u32 param1, Pokemon *param2);
void sub_0206DD38(FieldSystem *fieldSystem, u32 param1, u32 param2, u32 param3);
void sub_0206DDB8(SaveData *saveData, Pokemon *mon, u32 monDataParam);
void sub_0206DEEC(FieldSystem *fieldSystem, u16 param1, u16 param2);
void sub_0206DF60(FieldSystem *fieldSystem, u16 param1);
void sub_0206DFE0(SaveData *saveData);
void sub_0206E060(SaveData *saveData);
void FieldSystem_SaveTVSegment_BattleTowerCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_YourPokemonCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_ThePoketchWatch(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_ContestHall(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_RightOnPhotoCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_StreetCornerPersonalityCheckup(FieldSystem *fieldSystem, u16 pokemonType);
void FieldSystem_SaveTVSegment_ThreeCheersForPoffinCorner(FieldSystem *fieldSystem, u16 customMessageWord);
void FieldSystem_SaveTVSegment_AmitySquareWatch(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_BattleFrontierFrontlineNews_Single(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_InYourFaceInterview_Question1(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_InYourFaceInterview_Question2(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_InYourFaceInterview_Question3(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_InYourFaceInterview_Question4(FieldSystem *fieldSystem, u16 customWordMessage);
void FieldSystem_SaveTVSegment_BattleFrontierFrontlineNews_Multi(FieldSystem *fieldSystem, u16 customWordMessage);
void sub_0206F2F0(SaveData *saveData);
#endif // POKEPLATINUM_TV_SEGMENT_H

View File

@@ -2,9 +2,7 @@
#define POKEPLATINUM_UNK_0202E2CC_H
#include "struct_decls/struct_0202440C_decl.h"
#include "struct_decls/struct_0202E4D4_decl.h"
#include "struct_decls/struct_0202E768_decl.h"
#include "struct_decls/struct_0202E794_decl.h"
#include "struct_defs/struct_0202440C.h"
#include "struct_defs/struct_0202E7E4.h"
#include "struct_defs/struct_0202E7F0.h"
#include "struct_defs/struct_0202E7FC.h"
@@ -13,7 +11,7 @@
#include "struct_defs/struct_0202E81C.h"
#include "struct_defs/struct_0202E828.h"
#include "struct_defs/struct_0202E834.h"
#include "struct_defs/tv_episode_segment_contest_hall_showcased_pokemon.h"
#include "struct_defs/tv_segment_contest_hall_showcased_pokemon.h"
int TVBroadcast_SaveSize(void);
void TVBroadcast_Init(TVBroadcast *broadcast);
@@ -26,21 +24,21 @@ void TVBroadcast_SetPlayedSegment(TVBroadcast *broadcast, int segmentID);
BOOL TVBroadcast_IsPlayedSegment(const TVBroadcast *broadcast, int segmentID);
int TVBroadcast_CountPlayedSegments(const TVBroadcast *broadcast);
BOOL TVBroadcast_SaveSegmentData(TVBroadcast *broadcast, int param1, int param2, const u8 *param3);
const u16 *sub_0202E4C8(const UnkStruct_0202E794 *param0);
int sub_0202E4CC(const UnkStruct_0202E794 *param0);
int sub_0202E4D0(const UnkStruct_0202E794 *param0);
UnkStruct_0202E4D4 *sub_0202E4D4(UnkStruct_0202E794 *param0);
UnkStruct_0202E4D4 *sub_0202E4D8(UnkStruct_0202E768 *param0);
int sub_0202E55C(const UnkStruct_0202E4D4 *param0);
void sub_0202E560(UnkStruct_0202E4D4 *param0);
void *sub_0202E574(UnkStruct_0202E4D4 *param0);
const u16 *sub_0202E4C8(const TVWifiEpisode *param0);
int sub_0202E4CC(const TVWifiEpisode *param0);
int sub_0202E4D0(const TVWifiEpisode *param0);
TVSegmentInstance *sub_0202E4D4(TVWifiEpisode *param0);
TVSegmentInstance *sub_0202E4D8(TVSegmentInstance *param0);
int sub_0202E55C(const TVSegmentInstance *param0);
void sub_0202E560(TVSegmentInstance *param0);
void *sub_0202E574(TVSegmentInstance *param0);
int sub_0202E614(const TVBroadcast *broadcast, int param1, int param2, BOOL param3, BOOL param4, u8 *param5);
BOOL sub_0202E6B0(TVBroadcast *broadcast, int param1, int param2);
UnkStruct_0202E768 *sub_0202E768(TVBroadcast *broadcast, int param1, int param2);
UnkStruct_0202E794 *sub_0202E794(TVBroadcast *broadcast, int param1, int param2);
TVSegmentInstance *sub_0202E768(TVBroadcast *broadcast, int param1, int param2);
TVWifiEpisode *sub_0202E794(TVBroadcast *broadcast, int param1, int param2);
BOOL sub_0202E7C0(int param0);
int sub_0202E7D0(int param0);
TVEpisodeSegment_ContestHall_ShowcasedPokemon *TVBroadcast_GetShowcasedPokemon(TVBroadcast *broadcast);
TVSegment_ContestHall_ShowcasedPokemon *TVBroadcast_GetShowcasedPokemon(TVBroadcast *broadcast);
UnkStruct_0202E7E4 *sub_0202E7E4(TVBroadcast *broadcast);
UnkStruct_0202E7F0 *sub_0202E7F0(TVBroadcast *broadcast);
UnkStruct_0202E7FC *sub_0202E7FC(TVBroadcast *broadcast);

View File

@@ -272,7 +272,7 @@ Static main
Object main.nef.p/src_roaming_pokemon.c.o
Object main.nef.p/src_npc_trade_task.c.o
Object main.nef.p/src_cutscenes_boat_cutscene_boat_cutscene.c.o
Object main.nef.p/src_tv_episode_segment.c.o
Object main.nef.p/src_tv_segment.c.o
Object main.nef.p/src_rankings_machine.c.o
Object main.nef.p/src_unk_02070428.c.o
Object main.nef.p/src_field_move_tasks.c.o
@@ -571,7 +571,7 @@ Overlay overlay6
Object main.nef.p/src_overlay006_hm_cut_in.c.o
Object main.nef.p/src_overlay006_roamer_after_battle.c.o
Object main.nef.p/src_overlay006_npc_trade.c.o
Object main.nef.p/src_overlay006_ov6_02246444.c.o
Object main.nef.p/src_overlay006_tv_episode.c.o
Object main.nef.p/src_overlay006_ov6_022465FC.c.o
Object main.nef.p/src_overlay006_tv_commercials.c.o
Object main.nef.p/src_overlay006_special_dates.c.o

View File

@@ -59,7 +59,7 @@
#include "text.h"
#include "touch_pad.h"
#include "touch_screen.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0206B9D8.h"
#include "vram_transfer.h"
@@ -2714,7 +2714,7 @@ static int ApplyItemEffectOnPokemon(PartyMenuApplication *app)
if ((Item_IsHerbalMedicine(app->partyMenu->usedItemID) == 1) && (app->partyMenu->broadcast != NULL)) {
Pokemon *v2 = Party_GetPokemonBySlotIndex(app->partyMenu->party, app->currPartySlot);
FieldSystem_SaveTVEpisodeSegment_HerbalMedicineTrainerSightingDummy(app->partyMenu->broadcast, v2, app->partyMenu->usedItemID);
FieldSystem_SaveTVSegment_HerbalMedicineTrainerSightingDummy(app->partyMenu->broadcast, v2, app->partyMenu->usedItemID);
}
sub_020852B8(app);

View File

@@ -69,7 +69,7 @@
#include "text.h"
#include "trainer_data.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_02014A84.h"
#include "unk_0202F1D4.h"

View File

@@ -26,7 +26,7 @@
#include "sys_task_manager.h"
#include "system.h"
#include "terrain_collision_manager.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_020655F4.h"
typedef struct BerryWateringTask {
@@ -157,7 +157,7 @@ BOOL BerryPatches_HarvestBerry(FieldSystem *fieldSystem, MapObject *mapObject)
berryID = BerryPatches_GetPatchBerryID(berryPatches, patchID);
yieldAmount = BerryPatches_GetPatchYield(berryPatches, patchID);
FieldSystem_SaveTVEpisodeSegment_PlantingAndWateringShow(fieldSystem, BerryPatches_ConvertTagNumberToItemID(berryID), BerryPatches_GetPatchYieldRating(berryPatches, patchID), yieldAmount);
FieldSystem_SaveTVSegment_PlantingAndWateringShow(fieldSystem, BerryPatches_ConvertTagNumberToItemID(berryID), BerryPatches_GetPatchYieldRating(berryPatches, patchID), yieldAmount);
BerryPatches_HarvestPatch(berryPatches, patchID);
BerryPatchGraphics_MarkForUpdate(mapObject);

View File

@@ -39,7 +39,7 @@
#include "system.h"
#include "terrain_collision_manager.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_020366A0.h"
#include "unk_0205F180.h"

View File

@@ -54,7 +54,7 @@
#include "sys_task_manager.h"
#include "system_flags.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_020298BC.h"
#include "unk_020363E8.h"
#include "unk_02094EDC.h"

View File

@@ -44,7 +44,7 @@
#include "system_flags.h"
#include "system_vars.h"
#include "trainer_data.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202F1D4.h"
#include "unk_0203D1B8.h"
#include "unk_020528D0.h"
@@ -186,7 +186,7 @@ static BOOL FieldTask_Encounter(FieldTask *task)
if (encounter->dto->battleType == BATTLE_TYPE_WILD_MON
|| encounter->dto->battleType == BATTLE_TYPE_ROAMER
|| encounter->dto->battleType == BATTLE_TYPE_AI_PARTNER) {
FieldSystem_SaveTVEpisodeSegment_CatchThatPokemonShow(fieldSystem, encounter->dto->captureAttempt, encounter->dto->resultMask);
FieldSystem_SaveTVSegment_CatchThatPokemonShow(fieldSystem, encounter->dto->captureAttempt, encounter->dto->resultMask);
}
if (CheckPlayerWonEncounter(encounter) == FALSE) {
@@ -386,7 +386,7 @@ static BOOL FieldTask_WildEncounter(FieldTask *task)
case 3:
UpdateFieldSystemFromDTO(encounter->dto, fieldSystem);
FieldSystem_SaveTVEpisodeSegment_CatchThatPokemonShow(fieldSystem, encounter->dto->captureAttempt, encounter->dto->resultMask);
FieldSystem_SaveTVSegment_CatchThatPokemonShow(fieldSystem, encounter->dto->captureAttempt, encounter->dto->resultMask);
if (CheckPlayerWonBattle(encounter->dto->resultMask) == 0) {
FreeWildEncounter(encounter);

View File

@@ -50,7 +50,7 @@
#include "system_vars.h"
#include "terrain_collision_manager.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0203266C.h"
#include "unk_020366A0.h"
#include "unk_020559DC.h"

View File

@@ -258,7 +258,7 @@ pokeplatinum_c = files(
'roaming_pokemon.c',
'npc_trade_task.c',
'cutscenes/boat_cutscene/boat_cutscene.c',
'tv_episode_segment.c',
'tv_segment.c',
'rankings_machine.c',
'unk_02070428.c',
'field_move_tasks.c',
@@ -459,7 +459,7 @@ pokeplatinum_c = files(
'overlay006/hm_cut_in.c',
'overlay006/roamer_after_battle.c',
'overlay006/npc_trade.c',
'overlay006/ov6_02246444.c',
'overlay006/tv_episode.c',
'overlay006/ov6_022465FC.c',
'overlay006/tv_commercials.c',
'overlay006/special_dates.c',

View File

@@ -34,7 +34,7 @@
#include "sys_task.h"
#include "sys_task_manager.h"
#include "system.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_020655F4.h"
#include "res/text/bank/common_strings.h"
@@ -137,7 +137,7 @@ BOOL FieldTask_Fishing(FieldTask *taskMan)
if (caughtFish == TRUE) {
Pokemon *wildFish = Party_GetPokemonBySlotIndex(fishingContext->fishEncounterDTO->parties[1], 0);
FieldSystem_SaveTVEpisodeSegment_WhatsFishing(fieldSystem, TRUE, fishingContext->fishingRodItemID, wildFish);
FieldSystem_SaveTVSegment_WhatsFishing(fieldSystem, TRUE, fishingContext->fishingRodItemID, wildFish);
GameRecords_IncrementRecordValue(SaveData_GetGameRecords(fieldSystem->saveData), RECORD_CAUGHT_FISH);
@@ -365,7 +365,7 @@ static BOOL FishingTask_FishGotAway(FishingTask *fishingTask, PlayerAvatar *play
GameRecords_IncrementRecordValue(SaveData_GetGameRecords(fishingTask->fieldSystem->saveData), RECORD_FISH_GOT_AWAY);
FieldSystem_SaveTVEpisodeSegment_WhatsFishing(fishingTask->fieldSystem, FALSE, ConvertRodTypeToRodItem(fishingTask->rodType), NULL);
FieldSystem_SaveTVSegment_WhatsFishing(fishingTask->fieldSystem, FALSE, ConvertRodTypeToRodItem(fishingTask->rodType), NULL);
return TRUE;
}

View File

@@ -15,7 +15,7 @@
#include "string_gf.h"
#include "string_template.h"
#include "system_vars.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "vars_flags.h"
#define MM_TO_TENTH_OF_INCH(length) (((length * 1000) / 254 + 5) / 10)

View File

@@ -1,159 +0,0 @@
#include "overlay006/ov6_02246444.h"
#include <nitro.h>
#include <string.h>
#include "constants/tv_broadcast.h"
#include "struct_decls/struct_0202440C_decl.h"
#include "struct_decls/struct_0202E4D4_decl.h"
#include "struct_decls/struct_0202E768_decl.h"
#include "struct_decls/struct_0202E794_decl.h"
#include "field/field_system.h"
#include "savedata/save_table.h"
#include "charcode_util.h"
#include "field_battle_data_transfer.h"
#include "heap.h"
#include "save_player.h"
#include "trainer_info.h"
#include "unk_0202E2CC.h"
struct UnkStruct_ov6_022465F4_t {
u8 unk_00;
u8 unk_01;
u8 language;
u8 unk_03;
u16 unk_04[8];
UnkStruct_0202E4D4 *unk_14;
};
static void ov6_02246444(UnkStruct_ov6_022465F4 *param0)
{
MI_CpuClear8(param0, sizeof(UnkStruct_ov6_022465F4));
}
static void ov6_02246450(UnkStruct_ov6_022465F4 *param0, int param1)
{
param0->unk_03 = param1;
}
static void ov6_02246454(UnkStruct_ov6_022465F4 *param0, int language)
{
param0->language = language;
}
static void ov6_02246458(UnkStruct_ov6_022465F4 *param0, int param1)
{
param0->unk_01 = param1;
}
static void ov6_0224645C(UnkStruct_ov6_022465F4 *param0, const u16 *param1)
{
CharCode_CopyNumChars(param0->unk_04, param1, 7 + 1);
}
static void ov6_02246468(UnkStruct_ov6_022465F4 *param0, UnkStruct_0202E4D4 *param1)
{
param0->unk_00 = sub_0202E55C(param1);
param0->unk_14 = param1;
}
void ov6_0224647C(UnkStruct_ov6_022465F4 *param0)
{
if (param0->unk_14 != NULL) {
sub_0202E560(param0->unk_14);
}
}
int ov6_0224648C(const UnkStruct_ov6_022465F4 *param0)
{
return param0->unk_03;
}
int ov6_02246490(const UnkStruct_ov6_022465F4 *param0)
{
return param0->language;
}
const u16 *ov6_02246494(const UnkStruct_ov6_022465F4 *param0)
{
return param0->unk_04;
}
void *ov6_02246498(UnkStruct_ov6_022465F4 *param0)
{
return sub_0202E574(param0->unk_14);
}
int ov6_022464A4(const UnkStruct_ov6_022465F4 *param0)
{
return param0->unk_00;
}
static UnkStruct_ov6_022465F4 *ov6_022464A8(FieldSystem *fieldSystem, UnkStruct_0202E794 *param1)
{
UnkStruct_ov6_022465F4 *v0 = Heap_Alloc(HEAP_ID_FIELD1, sizeof(UnkStruct_ov6_022465F4));
ov6_02246444(v0);
ov6_0224645C(v0, sub_0202E4C8(param1));
ov6_02246454(v0, sub_0202E4CC(param1));
ov6_02246458(v0, sub_0202E4D0(param1));
ov6_02246468(v0, sub_0202E4D4(param1));
return v0;
}
static UnkStruct_ov6_022465F4 *ov6_022464F8(FieldSystem *fieldSystem, UnkStruct_0202E768 *param1)
{
TrainerInfo *v0 = SaveData_GetTrainerInfo(fieldSystem->saveData);
UnkStruct_ov6_022465F4 *v1 = Heap_Alloc(HEAP_ID_FIELD1, sizeof(UnkStruct_ov6_022465F4));
ov6_02246444(v1);
ov6_0224645C(v1, TrainerInfo_Name(v0));
ov6_02246450(v1, TrainerInfo_Gender(v0));
ov6_02246454(v1, GAME_LANGUAGE);
ov6_02246458(v1, GAME_VERSION);
ov6_02246468(v1, sub_0202E4D8(param1));
return v1;
}
static UnkStruct_ov6_022465F4 *ov6_02246550(FieldSystem *fieldSystem, int param1)
{
TrainerInfo *v0 = SaveData_GetTrainerInfo(fieldSystem->saveData);
UnkStruct_ov6_022465F4 *v1 = Heap_Alloc(HEAP_ID_FIELD1, sizeof(UnkStruct_ov6_022465F4));
ov6_02246444(v1);
v1->unk_00 = param1;
ov6_0224645C(v1, TrainerInfo_Name(v0));
ov6_02246450(v1, TrainerInfo_Gender(v0));
ov6_02246454(v1, GAME_LANGUAGE);
ov6_02246458(v1, GAME_VERSION);
v1->unk_14 = NULL;
return v1;
}
UnkStruct_ov6_022465F4 *ov6_022465A0(FieldSystem *fieldSystem, int programType, int param2)
{
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
if ((programType == TV_PROGRAM_TYPE_SINNOH_NOW) || (programType == TV_PROGRAM_TYPE_VARIETY_HOUR)) {
return ov6_02246550(fieldSystem, param2);
}
if (sub_0202E7C0(param2) == 0) {
UnkStruct_0202E794 *v1 = sub_0202E794(broadcast, programType, param2);
return ov6_022464A8(fieldSystem, v1);
} else {
UnkStruct_0202E768 *v2 = sub_0202E768(broadcast, programType, param2);
return ov6_022464F8(fieldSystem, v2);
}
}
void ov6_022465F4(UnkStruct_ov6_022465F4 *param0)
{
Heap_Free(param0);
}

View File

@@ -1,21 +1,19 @@
#include "overlay006/ov6_022465FC.h"
#include <nitro.h>
#include <string.h>
#include "constants/tv_broadcast.h"
#include "struct_decls/struct_0202440C_decl.h"
#include "field/field_system.h"
#include "overlay006/ov6_02246444.h"
#include "overlay006/tv_episode.h"
#include "savedata/save_table.h"
#include "field_battle_data_transfer.h"
#include "math_util.h"
#include "narc.h"
#include "rtc.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202E2CC.h"
#include "unk_020559DC.h"
@@ -132,14 +130,13 @@ void FieldSystem_SetTVProgramFinished(FieldSystem *fieldSystem)
int TVBroadcast_GetPendingBroadcastType(FieldSystem *fieldSystem)
{
int playedCount;
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
if (TVBroadcast_IsProgramFinished(broadcast) == TRUE) {
return TV_BROADCAST_STATUS_FINISHED;
}
playedCount = TVBroadcast_CountPlayedSegments(broadcast);
int playedCount = TVBroadcast_CountPlayedSegments(broadcast);
if (playedCount == 0) {
return TV_BROADCAST_STATUS_BEGIN;
@@ -154,18 +151,14 @@ int TVBroadcast_GetPendingBroadcastType(FieldSystem *fieldSystem)
static int TVBroadcast_GetScheduledProgramID(FieldSystem *fieldSystem)
{
u8 tvProgramID;
int dayOfWeek = (FieldSystem_GetWeek(fieldSystem) + (RTC_WEEK_MAX - 1)) % RTC_WEEK_MAX;
int hour = FieldSystem_GetHour(fieldSystem);
int minute = FieldSystem_GetMinute(fieldSystem);
int offset = (((19 + hour) % HOURS_PER_DAY) * TV_BROADCAST_PROGRAMS_PER_HOUR + (minute / TV_BROADCAST_MINUTES_PER_PROGRAM)) * RTC_WEEK_MAX;
u8 weekTimeSlot[RTC_WEEK_MAX];
int dayOfWeek, hour, minute;
int offset;
dayOfWeek = (FieldSystem_GetWeek(fieldSystem) + (RTC_WEEK_MAX - 1)) % RTC_WEEK_MAX;
hour = FieldSystem_GetHour(fieldSystem);
minute = FieldSystem_GetMinute(fieldSystem);
offset = (((19 + hour) % HOURS_PER_DAY) * TV_BROADCAST_PROGRAMS_PER_HOUR + (minute / TV_BROADCAST_MINUTES_PER_PROGRAM)) * RTC_WEEK_MAX;
NARC_ReadFromMemberByIndexPair(weekTimeSlot, NARC_INDEX_ARC__TV, 0, offset, sizeof(weekTimeSlot));
tvProgramID = weekTimeSlot[dayOfWeek];
u8 tvProgramID = weekTimeSlot[dayOfWeek];
GF_ASSERT(0 < tvProgramID && tvProgramID < TV_BROADCAST_MAX_PROGRAM);
return tvProgramID;
@@ -198,13 +191,12 @@ static BOOL TVBroadcast_IsValidProgramSegmentDummy(FieldSystem *fieldSystem, int
static void TVBroadcast_LoadProgramSegmentIDs(int programID, FieldSystem *fieldSystem, u8 *programSegmentIDs)
{
u8 loadedSegmentIDs[TV_BROADCAST_MAX_PROGRAM_SEGMENTS];
int loadedIndex, copiedIndex;
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
TVBroadcast_LoadProgramSegmentIDsFromNarc(programID, loadedSegmentIDs);
MI_CpuClear8(programSegmentIDs, sizeof(u8) * TV_BROADCAST_MAX_PROGRAM_SEGMENTS);
for (loadedIndex = 0, copiedIndex = 0; loadedIndex < TV_BROADCAST_MAX_PROGRAM_SEGMENTS; loadedIndex++) {
for (int loadedIndex = 0, copiedIndex = 0; loadedIndex < TV_BROADCAST_MAX_PROGRAM_SEGMENTS; loadedIndex++) {
if (loadedSegmentIDs[loadedIndex] == NULL) {
break;
}
@@ -261,18 +253,17 @@ static int ov6_0224678C(TVBroadcast *broadcast, int programType, int param2, BOO
return 0;
}
static int TVBroadcast_GetPendingEpisodeSegments(int programType, FieldSystem *fieldSystem, BOOL param2, BOOL param3, const u8 *programSegmentIDs, u8 *pendingSegmentIDs)
static int TVBroadcast_GetPendingSegments(int programType, FieldSystem *fieldSystem, BOOL param2, BOOL param3, const u8 *programSegmentIDs, u8 *pendingSegmentIDs)
{
u8 loadedPendingSegments[TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS];
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
int v2, loadedIndex;
int pendingCount = 0;
while (*programSegmentIDs != NULL) {
MI_CpuClear8(loadedPendingSegments, TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS);
if (ov6_0224678C(broadcast, programType, *programSegmentIDs, param2, param3, loadedPendingSegments)) {
for (loadedIndex = 0; loadedPendingSegments[loadedIndex] != 0 && loadedIndex < TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS; loadedIndex++) {
for (int loadedIndex = 0; loadedPendingSegments[loadedIndex] != 0 && loadedIndex < TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS; loadedIndex++) {
pendingSegmentIDs[pendingCount] = loadedPendingSegments[loadedIndex];
pendingCount++;
}
@@ -284,32 +275,29 @@ static int TVBroadcast_GetPendingEpisodeSegments(int programType, FieldSystem *f
return pendingCount;
}
static void ov6_02246844(FieldSystem *fieldSystem, int programType, u8 *pendingSegmentIDs)
static void TVBroadcast_ExcludeIneligibleSegments(FieldSystem *fieldSystem, int programType, u8 *pendingSegmentIDs)
{
int segmentIndex;
UnkStruct_ov6_022465F4 *v1;
for (int segmentIndex = 0; *pendingSegmentIDs != NULL && segmentIndex < TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS; pendingSegmentIDs++, segmentIndex++) {
TVEpisode *episode = TVEpisode_New(fieldSystem, programType, *pendingSegmentIDs);
for (segmentIndex = 0; *pendingSegmentIDs != NULL && segmentIndex < TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS; pendingSegmentIDs++, segmentIndex++) {
v1 = ov6_022465A0(fieldSystem, programType, *pendingSegmentIDs);
if (!TVEpisodeSegment_IsEligible(programType, fieldSystem, v1)) {
if (!TVSegment_IsEligible(programType, fieldSystem, episode)) {
*pendingSegmentIDs = NULL;
}
ov6_022465F4(v1);
TVEpisode_Free(episode);
}
}
static void TVBroadcast_ExcludePlayedSegments(FieldSystem *fieldSystem, u8 *param1)
static void TVBroadcast_ExcludePlayedSegments(FieldSystem *fieldSystem, u8 *pendingSegmentIDs)
{
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
while (*param1 != 0) {
if (TVBroadcast_IsPlayedSegment(broadcast, *param1)) {
*param1 = NULL;
while (*pendingSegmentIDs != NULL) {
if (TVBroadcast_IsPlayedSegment(broadcast, *pendingSegmentIDs)) {
*pendingSegmentIDs = NULL;
}
param1++;
pendingSegmentIDs++;
}
}
@@ -317,25 +305,22 @@ int ov6_022468B0(FieldSystem *fieldSystem, BOOL param1, BOOL param2)
{
u8 programSegmentIDs[TV_BROADCAST_MAX_PROGRAM_SEGMENTS];
u8 pendingSegmentIDs[TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS];
int result;
int programID;
int programType;
programID = TVBroadcast_GetScheduledProgramID(fieldSystem);
programType = TVBroadcast_GetProgramType(programID);
int programID = TVBroadcast_GetScheduledProgramID(fieldSystem);
int programType = TVBroadcast_GetProgramType(programID);
MI_CpuClear8(programSegmentIDs, TV_BROADCAST_MAX_PROGRAM_SEGMENTS);
MI_CpuClear8(pendingSegmentIDs, TV_BROADCAST_MAX_UNFILTERED_PENDING_SEGMENTS);
TVBroadcast_LoadProgramSegmentIDs(programID, fieldSystem, programSegmentIDs);
result = TVBroadcast_GetPendingEpisodeSegments(programType, fieldSystem, param1, param2, programSegmentIDs, pendingSegmentIDs);
int result = TVBroadcast_GetPendingSegments(programType, fieldSystem, param1, param2, programSegmentIDs, pendingSegmentIDs);
if (result == NULL) {
return NULL;
}
ov6_02246844(fieldSystem, programType, pendingSegmentIDs);
TVBroadcast_ExcludeIneligibleSegments(fieldSystem, programType, pendingSegmentIDs);
TVBroadcast_ExcludePlayedSegments(fieldSystem, pendingSegmentIDs);
result = TVBroadcast_RandomPendingSegment(fieldSystem, pendingSegmentIDs);
@@ -343,28 +328,28 @@ int ov6_022468B0(FieldSystem *fieldSystem, BOOL param1, BOOL param2)
return result;
}
int ov6_02246920(FieldSystem *fieldSystem)
int TVBroadcast_GetNextSegmentID(FieldSystem *fieldSystem)
{
int v0 = ov6_022468B0(fieldSystem, FALSE, FALSE);
int segmentID = ov6_022468B0(fieldSystem, FALSE, FALSE);
if (v0) {
return v0;
if (segmentID) {
return segmentID;
}
v0 = ov6_022468B0(fieldSystem, TRUE, FALSE);
segmentID = ov6_022468B0(fieldSystem, TRUE, FALSE);
if (v0) {
return v0;
if (segmentID) {
return segmentID;
}
v0 = ov6_022468B0(fieldSystem, FALSE, TRUE);
segmentID = ov6_022468B0(fieldSystem, FALSE, TRUE);
if (v0) {
return v0;
if (segmentID) {
return segmentID;
}
v0 = ov6_022468B0(fieldSystem, TRUE, TRUE);
return v0;
segmentID = ov6_022468B0(fieldSystem, TRUE, TRUE);
return segmentID;
}
static const TVProgramFramingMessages *TVBroadcast_GetScheduledProgramMessages(FieldSystem *fieldSystem)
@@ -410,15 +395,14 @@ BOOL TVBroadcast_LoadSegmentMessage(FieldSystem *fieldSystem, StringTemplate *te
int programID = TVBroadcast_GetScheduledProgramID(fieldSystem);
int programType = TVBroadcast_GetProgramType(programID);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
UnkStruct_ov6_022465F4 *segment;
TVBroadcast_SetPlayedSegment(broadcast, segmentID);
segment = ov6_022465A0(fieldSystem, programType, segmentID);
TVEpisode *episode = TVEpisode_New(fieldSystem, programType, segmentID);
ov6_0224647C(segment);
*messageDestVar = TVEpisodeSegment_LoadMessage(programType, fieldSystem, template, segment, bankDestVar);
ov6_022465F4(segment);
TVEpisode_IncrementTimesPlayed(episode);
*messageDestVar = TVSegment_LoadMessage(programType, fieldSystem, template, episode, bankDestVar);
TVEpisode_Free(episode);
return TRUE;
}

145
src/overlay006/tv_episode.c Normal file
View File

@@ -0,0 +1,145 @@
#include "overlay006/tv_episode.h"
#include <nitro.h>
#include "constants/tv_broadcast.h"
#include "struct_decls/struct_0202440C_decl.h"
#include "field/field_system.h"
#include "savedata/save_table.h"
#include "charcode_util.h"
#include "heap.h"
#include "save_player.h"
#include "trainer_info.h"
#include "unk_0202E2CC.h"
static void TVEpisode_Clear(TVEpisode *episode)
{
MI_CpuClear8(episode, sizeof(TVEpisode));
}
static void TVEpisode_SetGender(TVEpisode *episode, int gender)
{
episode->gender = gender;
}
static void TVEpisode_SetLanguage(TVEpisode *episode, int language)
{
episode->language = language;
}
static void TVEpisode_SetGameVersion(TVEpisode *episode, int gameVersion)
{
episode->gameVersion = gameVersion;
}
static void TVEpisode_SetTrainerName(TVEpisode *episode, const u16 *name)
{
CharCode_CopyNumChars(episode->name, name, TRAINER_NAME_LEN + 1);
}
static void TVEpisode_SetDetails(TVEpisode *episode, TVSegmentInstance *segmentInstance)
{
episode->segmentID = sub_0202E55C(segmentInstance);
episode->details = segmentInstance;
}
void TVEpisode_IncrementTimesPlayed(TVEpisode *episode)
{
if (episode->details != NULL) {
sub_0202E560(episode->details);
}
}
int TVEpisode_GetGender(const TVEpisode *episode)
{
return episode->gender;
}
int TVEpisode_GetLanguage(const TVEpisode *episode)
{
return episode->language;
}
const u16 *TVEpisode_GetTrainerName(const TVEpisode *episode)
{
return episode->name;
}
void *TVEpisode_GetSegment(TVEpisode *episode)
{
return sub_0202E574(episode->details);
}
int TVEpisode_GetSegmentID(const TVEpisode *episode)
{
return episode->segmentID;
}
static TVEpisode *CreateTVEpisodeFromWifiEpisode(FieldSystem *fieldSystem, TVWifiEpisode *wifiEpisode)
{
TVEpisode *episode = Heap_Alloc(HEAP_ID_FIELD1, sizeof(TVEpisode));
TVEpisode_Clear(episode);
TVEpisode_SetTrainerName(episode, sub_0202E4C8(wifiEpisode));
TVEpisode_SetLanguage(episode, sub_0202E4CC(wifiEpisode));
TVEpisode_SetGameVersion(episode, sub_0202E4D0(wifiEpisode));
TVEpisode_SetDetails(episode, sub_0202E4D4(wifiEpisode));
return episode;
}
static TVEpisode *CreateTVEpisodeFromSegmentInstance(FieldSystem *fieldSystem, TVSegmentInstance *instance)
{
TrainerInfo *playerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
TVEpisode *episode = Heap_Alloc(HEAP_ID_FIELD1, sizeof(TVEpisode));
TVEpisode_Clear(episode);
TVEpisode_SetTrainerName(episode, TrainerInfo_Name(playerInfo));
TVEpisode_SetGender(episode, TrainerInfo_Gender(playerInfo));
TVEpisode_SetLanguage(episode, GAME_LANGUAGE);
TVEpisode_SetGameVersion(episode, GAME_VERSION);
TVEpisode_SetDetails(episode, sub_0202E4D8(instance));
return episode;
}
static TVEpisode *CreateEmptyTVEpisode(FieldSystem *fieldSystem, int segmentID)
{
TrainerInfo *playerInfo = SaveData_GetTrainerInfo(fieldSystem->saveData);
TVEpisode *episode = Heap_Alloc(HEAP_ID_FIELD1, sizeof(TVEpisode));
TVEpisode_Clear(episode);
episode->segmentID = segmentID;
TVEpisode_SetTrainerName(episode, TrainerInfo_Name(playerInfo));
TVEpisode_SetGender(episode, TrainerInfo_Gender(playerInfo));
TVEpisode_SetLanguage(episode, GAME_LANGUAGE);
TVEpisode_SetGameVersion(episode, GAME_VERSION);
episode->details = NULL;
return episode;
}
TVEpisode *TVEpisode_New(FieldSystem *fieldSystem, int programType, int segmentID)
{
TVBroadcast *broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
if (programType == TV_PROGRAM_TYPE_SINNOH_NOW || programType == TV_PROGRAM_TYPE_VARIETY_HOUR) {
return CreateEmptyTVEpisode(fieldSystem, segmentID);
}
if (sub_0202E7C0(segmentID) == 0) {
TVWifiEpisode *wifiEpisode = sub_0202E794(broadcast, programType, segmentID);
return CreateTVEpisodeFromWifiEpisode(fieldSystem, wifiEpisode);
} else {
TVSegmentInstance *instance = sub_0202E768(broadcast, programType, segmentID);
return CreateTVEpisodeFromSegmentInstance(fieldSystem, instance);
}
}
void TVEpisode_Free(TVEpisode *episode)
{
Heap_Free(episode);
}

View File

@@ -52,7 +52,7 @@
#include "system_vars.h"
#include "text.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_0202C9F4.h"
#include "unk_0202D05C.h"
@@ -1217,7 +1217,7 @@ static u8 Shop_ConfirmItemPurchase(ShopMenu *shopMenu)
if (shopMenu->martType == MART_TYPE_NORMAL) {
Bag_TryAddItem(shopMenu->destInventory, shopMenu->itemId, shopMenu->itemAmount, HEAP_ID_FIELD2);
FieldSystem_SaveTVEpisodeSegment_SinnohShoppingChampCorner(shopMenu->saveData, shopMenu->itemId, shopMenu->itemAmount);
FieldSystem_SaveTVSegment_SinnohShoppingChampCorner(shopMenu->saveData, shopMenu->itemId, shopMenu->itemAmount);
} else if (shopMenu->martType == MART_TYPE_FRONTIER) {
Bag_TryAddItem(shopMenu->destInventory, shopMenu->itemId, shopMenu->itemAmount, HEAP_ID_FIELD2);
} else if (shopMenu->martType == MART_TYPE_DECOR) {

View File

@@ -4,8 +4,6 @@
#include <string.h>
#include "struct_defs/struct_0202440C.h"
#include "struct_defs/struct_0202E768.h"
#include "struct_defs/struct_0202E794.h"
#include "savedata/save_table.h"
@@ -121,17 +119,17 @@ static const u8 *const Unk_ov59_021D33E4[] = {
u32 ov59_021D2B44(const SaveData *saveData)
{
return sizeof(UnkStruct_0202E794) * 4;
return sizeof(TVWifiEpisode) * 4;
}
u32 ov59_021D2B4C(const SaveData *saveData)
{
return sizeof(UnkStruct_0202E794) * 4;
return sizeof(TVWifiEpisode) * 4;
}
u32 ov59_021D2B54(const SaveData *saveData)
{
return sizeof(UnkStruct_0202E794) * 4;
return sizeof(TVWifiEpisode) * 4;
}
static BOOL ov59_021D2B5C(int param0, int param1)
@@ -147,33 +145,33 @@ static BOOL ov59_021D2B5C(int param0, int param1)
return 0;
}
static void ov59_021D2B90(SaveData *saveData, UnkStruct_0202E794 *param1, UnkStruct_0202E768 *param2, int param3, int param4, int param5)
static void ov59_021D2B90(SaveData *saveData, TVWifiEpisode *param1, TVSegmentInstance *param2, int param3, int param4, int param5)
{
int v0;
TrainerInfo *v1 = SaveData_GetTrainerInfo(saveData);
for (v0 = 0; v0 < param3; v0++, param1++) {
MI_CpuClearFast(param1, sizeof(UnkStruct_0202E794));
MI_CpuClearFast(param1, sizeof(TVWifiEpisode));
param1->unk_00 = TrainerInfo_ID(v1);
param1->unk_04 = TrainerInfo_Gender(v1);
param1->unk_05 = GAME_VERSION;
param1->trainerID = TrainerInfo_ID(v1);
param1->gender = TrainerInfo_Gender(v1);
param1->gameVersion = GAME_VERSION;
param1->language = GAME_LANGUAGE;
CharCode_CopyNumChars(param1->unk_08, TrainerInfo_Name(v1), 7 + 1);
CharCode_CopyNumChars(param1->name, TrainerInfo_Name(v1), 7 + 1);
param1->unk_18 = param2[v0].unk_00;
param1->unk_18.unk_01 = 0;
param1->details = param2[v0];
param1->details.timesPlayed = 0;
if ((param4 == 1) && (ov59_021D2B5C(param5, param1->unk_18.unk_00) == 0)) {
param1->unk_18.unk_00 = 0;
if ((param4 == 1) && (ov59_021D2B5C(param5, param1->details.segmentID) == 0)) {
param1->details.segmentID = 0;
}
}
}
UnkStruct_0202E794 *ov59_021D2C28(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2C28(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B44(saveData));
@@ -182,9 +180,9 @@ UnkStruct_0202E794 *ov59_021D2C28(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
UnkStruct_0202E794 *ov59_021D2C70(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2C70(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B4C(saveData));
@@ -193,9 +191,9 @@ UnkStruct_0202E794 *ov59_021D2C70(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
UnkStruct_0202E794 *ov59_021D2CB4(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2CB4(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B54(saveData));
@@ -204,9 +202,9 @@ UnkStruct_0202E794 *ov59_021D2CB4(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
UnkStruct_0202E794 *ov59_021D2CF8(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2CF8(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B44(saveData));
@@ -215,9 +213,9 @@ UnkStruct_0202E794 *ov59_021D2CF8(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
UnkStruct_0202E794 *ov59_021D2D3C(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2D3C(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B4C(saveData));
@@ -226,9 +224,9 @@ UnkStruct_0202E794 *ov59_021D2D3C(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
UnkStruct_0202E794 *ov59_021D2D80(SaveData *saveData, enum HeapID heapID, u32 param2)
TVWifiEpisode *ov59_021D2D80(SaveData *saveData, enum HeapID heapID, u32 param2)
{
UnkStruct_0202E794 *v0 = Heap_AllocAtEnd(heapID, param2);
TVWifiEpisode *v0 = Heap_AllocAtEnd(heapID, param2);
TVBroadcast *broadcast = SaveData_GetTVBroadcast(saveData);
GF_ASSERT(param2 == ov59_021D2B54(saveData));
@@ -237,27 +235,27 @@ UnkStruct_0202E794 *ov59_021D2D80(SaveData *saveData, enum HeapID heapID, u32 pa
return v0;
}
static BOOL ov59_021D2DC4(UnkStruct_0202E794 *param0, int param1, const UnkStruct_0202E794 *param2, int param3)
static BOOL ov59_021D2DC4(TVWifiEpisode *param0, int param1, const TVWifiEpisode *param2, int param3)
{
int v0;
if (param2->unk_18.unk_00 == 0) {
if (param2->details.segmentID == 0) {
return 0;
}
if (ov59_021D2B5C(param3, param2->unk_18.unk_00) == 0) {
if (ov59_021D2B5C(param3, param2->details.segmentID) == 0) {
return -1;
}
for (v0 = 0; v0 < param1; v0++) {
if (param0[v0].unk_18.unk_00 == 0) {
if (param0[v0].details.segmentID == 0) {
param0[v0] = *param2;
return 1;
}
}
for (v0 = 0; v0 < param1; v0++) {
if (param0[v0].unk_18.unk_01 >= 3) {
if (param0[v0].details.timesPlayed >= 3) {
param0[v0] = *param2;
return 1;
}
@@ -281,7 +279,7 @@ static const void **ov59_021D2E40(int param0, const void **param1, const void **
return param1;
}
static void ov59_021D2E60(UnkStruct_0202E794 *param0, int param1, int param2, int param3, const void **param4, const void **param5, int param6)
static void ov59_021D2E60(TVWifiEpisode *param0, int param1, int param2, int param3, const void **param4, const void **param5, int param6)
{
u8 v0[16];
int v1, v2, v3;
@@ -312,7 +310,7 @@ static void ov59_021D2E60(UnkStruct_0202E794 *param0, int param1, int param2, in
v4 = ov59_021D2E40(v1, param4, param5);
if (v4 != NULL) {
ov59_021D2DC4(param0, param1, &((UnkStruct_0202E794 *)v4[v1])[v3], param6);
ov59_021D2DC4(param0, param1, &((TVWifiEpisode *)v4[v1])[v3], param6);
}
}
}

View File

@@ -36,7 +36,7 @@
#include "sound_playback.h"
#include "sprite.h"
#include "system.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202ACE0.h"
#include "unk_020363E8.h"
#include "unk_020366A0.h"

View File

@@ -44,7 +44,7 @@
#include "string_template.h"
#include "system_vars.h"
#include "text.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202F180.h"
#include "unk_020366A0.h"
#include "unk_02038F8C.h"

View File

@@ -82,7 +82,7 @@
#include "system.h"
#include "text.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202ACE0.h"
#include "unk_0202D05C.h"
#include "unk_0202F1D4.h"

View File

@@ -22,7 +22,7 @@
#include "party.h"
#include "pokemon.h"
#include "sound.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_02030108.h"
#include "unk_0209B6F8.h"
#include "unk_0209BA80.h"

View File

@@ -26,7 +26,7 @@
#include "pokemon.h"
#include "savedata.h"
#include "sound.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_020363E8.h"
#include "unk_02049D08.h"
#include "unk_0209B6F8.h"

View File

@@ -181,7 +181,7 @@
#include "trainer_case.h"
#include "trainer_data.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_02014D38.h"
#include "unk_020298BC.h"
@@ -5291,7 +5291,7 @@ static BOOL ScrCmd_StartEndSafariGame(ScriptContext *ctx)
break;
case SAFARI_GAME_INACTIVE:
SystemFlag_ClearSafariGameActive(varsFlags);
FieldSystem_SaveTVEpisodeSegment_SafariGameSpecialNewsBulletin(ctx->fieldSystem);
FieldSystem_SaveTVSegment_SafariGameSpecialNewsBulletin(ctx->fieldSystem);
void *journalEntryLocationEvent = JournalEntry_CreateEventSafariGame(HEAP_ID_FIELD1);
JournalEntry_SaveData(ctx->fieldSystem->journalEntry, journalEntryLocationEvent, JOURNAL_LOCATION);

View File

@@ -21,7 +21,7 @@
#include "pokemon.h"
#include "ribbon.h"
#include "save_player.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_02017038.h"
#include "unk_02054884.h"
#include "unk_0205DFC4.h"

View File

@@ -14,7 +14,7 @@
#include "struct_defs/struct_0202E808.h"
#include "struct_defs/struct_0202E810.h"
#include "struct_defs/struct_0202E81C.h"
#include "struct_defs/tv_episode_segment_contest_hall_showcased_pokemon.h"
#include "struct_defs/tv_segment_contest_hall_showcased_pokemon.h"
#include "applications/poketch/poketch_system.h"
#include "field/field_system.h"
@@ -33,7 +33,7 @@
#include "script_manager.h"
#include "string_gf.h"
#include "string_template.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_020298BC.h"
#include "unk_0202E2CC.h"
#include "unk_02054884.h"
@@ -96,7 +96,7 @@ BOOL ScrCmd_CallTVBroadcast(ScriptContext *ctx)
} break;
case TV_BROADCAST_CALL_GET_NEXT_SEGMENT_ID: {
u16 *segmentDestVar = ScriptContext_GetVarPointer(ctx);
*segmentDestVar = ov6_02246920(ctx->fieldSystem);
*segmentDestVar = TVBroadcast_GetNextSegmentID(ctx->fieldSystem);
} break;
}
@@ -105,7 +105,7 @@ BOOL ScrCmd_CallTVBroadcast(ScriptContext *ctx)
BOOL ScrCmd_236(ScriptContext *param0)
{
FieldSystem_SaveTVEpisodeSegment_HiddenItemBreakingNews(param0->fieldSystem, ScriptContext_GetVar(param0));
FieldSystem_SaveTVSegment_HiddenItemBreakingNews(param0->fieldSystem, ScriptContext_GetVar(param0));
return 0;
}
@@ -114,19 +114,19 @@ BOOL ScrCmd_2B8(ScriptContext *param0)
Party *v0 = SaveData_GetParty(param0->fieldSystem->saveData);
Pokemon *v1 = Party_GetPokemonBySlotIndex(v0, ScriptContext_GetVar(param0));
FieldSystem_SaveTVEpisodeSegment_RateThatNameChange(param0->fieldSystem, v1);
FieldSystem_SaveTVSegment_RateThatNameChange(param0->fieldSystem, v1);
return 0;
}
BOOL ScrCmd_30B(ScriptContext *param0)
{
FieldSystem_SaveTVEpisodeSegment_PokemonStorageSpecialNewsBulletin(param0->fieldSystem);
FieldSystem_SaveTVSegment_PokemonStorageSpecialNewsBulletin(param0->fieldSystem);
return 0;
}
BOOL ScrCmd_30C(ScriptContext *param0)
{
FieldSystem_SaveTVEpisodeSegment_HomeAndManor_NoFurniture(param0->fieldSystem);
FieldSystem_SaveTVSegment_HomeAndManor_NoFurniture(param0->fieldSystem);
return 0;
}
@@ -134,7 +134,7 @@ BOOL ScrCmd_30D(ScriptContext *param0)
{
u16 v0 = ScriptContext_GetVar(param0);
FieldSystem_SaveTVEpisodeSegment_HomeAndManor(param0->fieldSystem, v0);
FieldSystem_SaveTVSegment_HomeAndManor(param0->fieldSystem, v0);
return 0;
}
@@ -321,7 +321,7 @@ static BOOL sub_02049358(FieldSystem *fieldSystem)
static BOOL sub_02049368(FieldSystem *fieldSystem)
{
TVEpisodeSegment_ContestHall_ShowcasedPokemon *v0 = TVBroadcast_GetShowcasedPokemon(SaveData_GetTVBroadcast(fieldSystem->saveData));
TVSegment_ContestHall_ShowcasedPokemon *v0 = TVBroadcast_GetShowcasedPokemon(SaveData_GetTVBroadcast(fieldSystem->saveData));
return v0->unk_00;
}
@@ -357,24 +357,24 @@ static BOOL sub_020493B8(FieldSystem *fieldSystem)
static const TVInterview sInterviews[TV_PROGRAM_TYPE_INTERVIEWS_NUM_SEGMENTS] = {
{ NULL, NULL, NULL, 0x3 },
{ FieldSystem_SaveTVEpisodeSegment_BattleTowerCorner, NULL, sub_02049348, 0x4 },
{ FieldSystem_SaveTVSegment_BattleTowerCorner, NULL, sub_02049348, 0x4 },
{ NULL, NULL, NULL, 0x5 },
{ FieldSystem_SaveTVEpisodeSegment_YourPokemonCorner, sub_02049268, NULL, 0x6 },
{ FieldSystem_SaveTVSegment_YourPokemonCorner, sub_02049268, NULL, 0x6 },
{ NULL, NULL, NULL, 0x7 },
{ FieldSystem_SaveTVEpisodeSegment_ThePoketchWatch, sub_02049288, sub_02049358, 0x8 },
{ FieldSystem_SaveTVEpisodeSegment_ContestHall, NULL, sub_02049368, 0x9 },
{ FieldSystem_SaveTVSegment_ThePoketchWatch, sub_02049288, sub_02049358, 0x8 },
{ FieldSystem_SaveTVSegment_ContestHall, NULL, sub_02049368, 0x9 },
{ NULL, NULL, NULL, 0xA },
{ FieldSystem_SaveTVEpisodeSegment_RightOnPhotoCorner, NULL, sub_02049378, 0xB },
{ FieldSystem_SaveTVEpisodeSegment_StreetCornerPersonalityCheckup, NULL, NULL, 0xC },
{ FieldSystem_SaveTVEpisodeSegment_ThreeCheersForPoffinCorner, NULL, sub_02049388, 0xD },
{ FieldSystem_SaveTVSegment_RightOnPhotoCorner, NULL, sub_02049378, 0xB },
{ FieldSystem_SaveTVSegment_StreetCornerPersonalityCheckup, NULL, NULL, 0xC },
{ FieldSystem_SaveTVSegment_ThreeCheersForPoffinCorner, NULL, sub_02049388, 0xD },
{ NULL, NULL, NULL, 0xE },
{ FieldSystem_SaveTVEpisodeSegment_AmitySquareWatch, sub_020492A0, sub_02049398, 0xF },
{ FieldSystem_SaveTVEpisodeSegment_BattleFrontierFrontlineNews_Single, sub_020492D4, sub_020493A8, 0x10 },
{ FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question1, NULL, NULL, 0x11 },
{ FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question2, NULL, NULL, 0x12 },
{ FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question3, NULL, NULL, 0x13 },
{ FieldSystem_SaveTVEpisodeSegment_InYourFaceInterview_Question4, NULL, NULL, 0x14 },
{ FieldSystem_SaveTVEpisodeSegment_BattleFrontierFrontlineNews_Multi, sub_02049308, sub_020493B8, 0x15 }
{ FieldSystem_SaveTVSegment_AmitySquareWatch, sub_020492A0, sub_02049398, 0xF },
{ FieldSystem_SaveTVSegment_BattleFrontierFrontlineNews_Single, sub_020492D4, sub_020493A8, 0x10 },
{ FieldSystem_SaveTVSegment_InYourFaceInterview_Question1, NULL, NULL, 0x11 },
{ FieldSystem_SaveTVSegment_InYourFaceInterview_Question2, NULL, NULL, 0x12 },
{ FieldSystem_SaveTVSegment_InYourFaceInterview_Question3, NULL, NULL, 0x13 },
{ FieldSystem_SaveTVSegment_InYourFaceInterview_Question4, NULL, NULL, 0x14 },
{ FieldSystem_SaveTVSegment_BattleFrontierFrontlineNews_Multi, sub_02049308, sub_020493B8, 0x15 }
};
BOOL ScrCmd_GetCurrentSafariGameCaughtNum(ScriptContext *ctx)

File diff suppressed because it is too large Load Diff

View File

@@ -62,7 +62,7 @@
#include "terrain_collision_manager.h"
#include "text.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "vars_flags.h"
#include "vram_transfer.h"
@@ -2637,7 +2637,7 @@ static BOOL Mining_ProcessNextDugUpItem(MiningGameContext *ctx)
if (Spheres_IsMiningItemSphere(itemID)) {
UndergroundRecord_AddNumSpheresDug(undergroundRecord, 1);
} else {
FieldSystem_SaveTVEpisodeSegment_UndergroundTreasuresCorner(sMiningEnv->fieldSystem, itemID, 1);
FieldSystem_SaveTVSegment_UndergroundTreasuresCorner(sMiningEnv->fieldSystem, itemID, 1);
// possible bug: rare bones count toward the fossil total
if ((itemID >= MINING_TREASURE_HELIX_FOSSIL) && ((MINING_TREASURE_RARE_BONE + 1) > itemID) || (itemID == MINING_TREASURE_ARMOR_FOSSIL) || (itemID == MINING_TREASURE_SKULL_FOSSIL)) {

View File

@@ -37,7 +37,7 @@
#include "system_flags.h"
#include "system_vars.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "vars_flags.h"
@@ -480,7 +480,7 @@ void UndergroundPlayer_ProcessFlagEvent(int unused0, int unused1, void *data, vo
SystemFlag_SetDeliveredStolenFlag(SaveData_GetVarsFlags(commPlayerMan->fieldSystem->saveData));
if (commPlayerMan->heldFlagOwnerInfo[event->netID]) {
FieldSystem_SaveTVEpisodeSegment_CaptureTheFlagDigest_TakeFlag(commPlayerMan->fieldSystem, commPlayerMan->heldFlagOwnerInfo[event->netID]);
FieldSystem_SaveTVSegment_CaptureTheFlagDigest_TakeFlag(commPlayerMan->fieldSystem, commPlayerMan->heldFlagOwnerInfo[event->netID]);
if (commPlayerMan->flagsRegisteredInCurrentSession != USHRT_MAX) {
commPlayerMan->flagsRegisteredInCurrentSession++;
@@ -501,7 +501,7 @@ void UndergroundPlayer_ProcessFlagEvent(int unused0, int unused1, void *data, vo
if (commPlayerMan->heldFlagOwnerInfo[event->netID]) {
if (TrainerInfo_Equals(commPlayerMan->heldFlagOwnerInfo[event->netID], CommInfo_TrainerInfo(CommSys_CurNetId())) == TRUE) {
FieldSystem_SaveTVEpisodeSegment_CaptureTheFlagDigest_LoseFlag(commPlayerMan->fieldSystem, CommInfo_TrainerInfo(event->netID));
FieldSystem_SaveTVSegment_CaptureTheFlagDigest_LoseFlag(commPlayerMan->fieldSystem, CommInfo_TrainerInfo(event->netID));
}
}

View File

@@ -53,7 +53,7 @@
#include "system_vars.h"
#include "terrain_collision_manager.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_020366A0.h"
#include "vars_flags.h"

View File

@@ -6,9 +6,6 @@
#include "constants/tv_broadcast.h"
#include "struct_defs/struct_0202440C.h"
#include "struct_defs/struct_0202E4D4.h"
#include "struct_defs/struct_0202E768.h"
#include "struct_defs/struct_0202E794.h"
#include "struct_defs/struct_0202E7E4.h"
#include "struct_defs/struct_0202E7F0.h"
#include "struct_defs/struct_0202E7FC.h"
@@ -17,14 +14,14 @@
#include "struct_defs/struct_0202E81C.h"
#include "struct_defs/struct_0202E828.h"
#include "struct_defs/struct_0202E834.h"
#include "struct_defs/tv_episode_segment_contest_hall_showcased_pokemon.h"
#include "struct_defs/tv_segment_contest_hall_showcased_pokemon.h"
#include "inlines.h"
#include "rtc.h"
#include "savedata.h"
static void TVBroadcast_ClearPlayedSegments(TVBroadcast *broadcast);
static UnkStruct_0202E768 *sub_0202E4DC(TVBroadcast *broadcast, int param1);
static TVSegmentInstance *sub_0202E4DC(TVBroadcast *broadcast, int param1);
int TVBroadcast_SaveSize(void)
{
@@ -39,9 +36,9 @@ void TVBroadcast_Init(TVBroadcast *broadcast)
void sub_0202E2EC(TVBroadcast *broadcast)
{
MI_CpuClearFast(broadcast->unk_0C, sizeof(UnkStruct_0202E768) * 4);
MI_CpuClearFast(broadcast->unk_C4, sizeof(UnkStruct_0202E768) * 4);
MI_CpuClearFast(broadcast->unk_17C, sizeof(UnkStruct_0202E768) * 4);
MI_CpuClearFast(broadcast->unk_0C, sizeof(TVSegmentInstance) * 4);
MI_CpuClearFast(broadcast->unk_C4, sizeof(TVSegmentInstance) * 4);
MI_CpuClearFast(broadcast->unk_17C, sizeof(TVSegmentInstance) * 4);
TVBroadcast_ClearWatchProgress(broadcast);
SaveData_SetChecksum(SAVE_TABLE_ENTRY_TV_BROADCAST);
@@ -142,29 +139,28 @@ int TVBroadcast_CountPlayedSegments(const TVBroadcast *broadcast)
return playedCount;
}
static void sub_0202E3F4(UnkStruct_0202E4D4 *param0, int param1, const u8 *param2)
static void sub_0202E3F4(TVSegmentInstance *param0, int segmentID, const u8 *param2)
{
RTCDate v0;
RTCDate time;
GetCurrentDate(&time);
GetCurrentDate(&v0);
param0->timestamp = Date_Encode(&time);
param0->segmentID = segmentID;
param0->timesPlayed = 0;
param0->unk_04 = Date_Encode(&v0);
param0->unk_00 = param1;
param0->unk_01 = 0;
MI_CpuCopyFast(param2, param0->unk_08, 40);
MI_CpuCopyFast(param2, param0->segment, 40);
SaveData_SetChecksum(SAVE_TABLE_ENTRY_TV_BROADCAST);
}
BOOL TVBroadcast_SaveSegmentData(TVBroadcast *broadcast, int param1, int param2, const u8 *param3)
{
int i;
UnkStruct_0202E768 *v1 = sub_0202E4DC(broadcast, param1);
TVSegmentInstance *v1 = sub_0202E4DC(broadcast, param1);
for (i = 0; i < 4; i++) {
if (v1[i].unk_00.unk_00 == param2) {
if (v1[i].unk_00.unk_01 >= 3) {
sub_0202E3F4(&v1[i].unk_00, param2, param3);
if (v1[i].segmentID == param2) {
if (v1[i].timesPlayed >= 3) {
sub_0202E3F4(&v1[i], param2, param3);
return 1;
}
@@ -173,15 +169,15 @@ BOOL TVBroadcast_SaveSegmentData(TVBroadcast *broadcast, int param1, int param2,
}
for (i = 0; i < 4; i++) {
if (v1[i].unk_00.unk_00 == 0) {
sub_0202E3F4(&v1[i].unk_00, param2, param3);
if (v1[i].segmentID == 0) {
sub_0202E3F4(&v1[i], param2, param3);
return 1;
}
}
for (i = 0; i < 4; i++) {
if (v1[i].unk_00.unk_01 >= 3) {
sub_0202E3F4(&v1[i].unk_00, param2, param3);
if (v1[i].timesPlayed >= 3) {
sub_0202E3F4(&v1[i], param2, param3);
return 1;
}
}
@@ -191,34 +187,34 @@ BOOL TVBroadcast_SaveSegmentData(TVBroadcast *broadcast, int param1, int param2,
return 0;
}
const u16 *sub_0202E4C8(const UnkStruct_0202E794 *param0)
const u16 *sub_0202E4C8(const TVWifiEpisode *param0)
{
return param0->unk_08;
return param0->name;
}
int sub_0202E4CC(const UnkStruct_0202E794 *param0)
int sub_0202E4CC(const TVWifiEpisode *param0)
{
return param0->language;
}
int sub_0202E4D0(const UnkStruct_0202E794 *param0)
int sub_0202E4D0(const TVWifiEpisode *param0)
{
return param0->unk_05;
return param0->gameVersion;
}
UnkStruct_0202E4D4 *sub_0202E4D4(UnkStruct_0202E794 *param0)
TVSegmentInstance *sub_0202E4D4(TVWifiEpisode *param0)
{
return &param0->unk_18;
return &param0->details;
}
UnkStruct_0202E4D4 *sub_0202E4D8(UnkStruct_0202E768 *param0)
TVSegmentInstance *sub_0202E4D8(TVSegmentInstance *param0)
{
return &param0->unk_00;
return param0;
}
static UnkStruct_0202E768 *sub_0202E4DC(TVBroadcast *broadcast, int param1)
static TVSegmentInstance *sub_0202E4DC(TVBroadcast *broadcast, int param1)
{
UnkStruct_0202E768 *v0 = NULL;
TVSegmentInstance *v0 = NULL;
switch (param1) {
case 1:
@@ -238,9 +234,9 @@ static UnkStruct_0202E768 *sub_0202E4DC(TVBroadcast *broadcast, int param1)
return v0;
}
static UnkStruct_0202E794 *sub_0202E518(TVBroadcast *broadcast, int param1)
static TVWifiEpisode *sub_0202E518(TVBroadcast *broadcast, int param1)
{
UnkStruct_0202E794 *v0 = NULL;
TVWifiEpisode *v0 = NULL;
switch (param1) {
case 2:
@@ -260,32 +256,32 @@ static UnkStruct_0202E794 *sub_0202E518(TVBroadcast *broadcast, int param1)
return v0;
}
int sub_0202E55C(const UnkStruct_0202E4D4 *param0)
int sub_0202E55C(const TVSegmentInstance *param0)
{
return param0->unk_00;
return param0->segmentID;
}
void sub_0202E560(UnkStruct_0202E4D4 *param0)
void sub_0202E560(TVSegmentInstance *param0)
{
if (param0->unk_01 < 3) {
param0->unk_01++;
if (param0->timesPlayed < 3) {
param0->timesPlayed++;
}
SaveData_SetChecksum(SAVE_TABLE_ENTRY_TV_BROADCAST);
}
void *sub_0202E574(UnkStruct_0202E4D4 *param0)
void *sub_0202E574(TVSegmentInstance *param0)
{
return param0->unk_08;
return param0->segment;
}
static int sub_0202E578(const UnkStruct_0202E768 *param0, int param1, int param2, BOOL param3, u8 *param4)
static int sub_0202E578(const TVSegmentInstance *param0, int param1, int param2, BOOL param3, u8 *param4)
{
int v0, v1;
for (v1 = 0, v0 = 0; v0 < param1; v0++) {
if (param0[v0].unk_00.unk_00 == param2) {
int v2 = param0[v0].unk_00.unk_01;
if (param0[v0].segmentID == param2) {
int v2 = param0[v0].timesPlayed;
if (param3 && v2) {
param4[v1] = v0 + 1;
@@ -300,14 +296,14 @@ static int sub_0202E578(const UnkStruct_0202E768 *param0, int param1, int param2
return v1;
}
static int sub_0202E5B8(const UnkStruct_0202E794 *param0, int param1, int param2, BOOL param3, u8 *param4)
static int sub_0202E5B8(const TVWifiEpisode *param0, int param1, int param2, BOOL param3, u8 *param4)
{
int v0, v1;
for (v1 = 0, v0 = 0; v0 < param1; v0++) {
int v2 = param0[v0].unk_18.unk_01;
int v2 = param0[v0].details.timesPlayed;
if (param0[v0].unk_18.unk_00 == param2) {
if (param0[v0].details.segmentID == param2) {
if (param3 && v2) {
param4[v1] = sub_0202E7D0(v0 + 1);
v1++;
@@ -356,7 +352,7 @@ BOOL sub_0202E6B0(TVBroadcast *broadcast, int param1, int param2)
int v0;
int i;
u8 v2[4];
UnkStruct_0202E768 *v3;
TVSegmentInstance *v3;
MI_CpuClear8(v2, 4);
@@ -372,7 +368,7 @@ BOOL sub_0202E6B0(TVBroadcast *broadcast, int param1, int param2)
for (i = 0; i < 4 & v2[i] != 0; i++) {
v3 = sub_0202E768(broadcast, param1, v2[i]);
if (v3->unk_00.unk_01 >= 3) {
if (v3->timesPlayed >= 3) {
return 1;
}
}
@@ -383,7 +379,7 @@ BOOL sub_0202E6B0(TVBroadcast *broadcast, int param1, int param2)
for (i = 1; i <= 4; i++) {
v3 = sub_0202E768(broadcast, param1, i);
if ((v3->unk_00.unk_00 == 0) || (v3->unk_00.unk_01 >= 3)) {
if ((v3->segmentID == 0) || (v3->timesPlayed >= 3)) {
return 1;
}
}
@@ -391,9 +387,9 @@ BOOL sub_0202E6B0(TVBroadcast *broadcast, int param1, int param2)
return 0;
}
UnkStruct_0202E768 *sub_0202E768(TVBroadcast *broadcast, int param1, int param2)
TVSegmentInstance *sub_0202E768(TVBroadcast *broadcast, int param1, int param2)
{
UnkStruct_0202E768 *v0;
TVSegmentInstance *v0;
GF_ASSERT(sub_0202E7C0(param2) == 1);
@@ -403,9 +399,9 @@ UnkStruct_0202E768 *sub_0202E768(TVBroadcast *broadcast, int param1, int param2)
return &v0[param2 - 1];
}
UnkStruct_0202E794 *sub_0202E794(TVBroadcast *broadcast, int param1, int param2)
TVWifiEpisode *sub_0202E794(TVBroadcast *broadcast, int param1, int param2)
{
UnkStruct_0202E794 *v0;
TVWifiEpisode *v0;
GF_ASSERT(sub_0202E7C0(param2) == 0);
@@ -429,7 +425,7 @@ int sub_0202E7D0(int param0)
return param0 | 0x80;
}
TVEpisodeSegment_ContestHall_ShowcasedPokemon *TVBroadcast_GetShowcasedPokemon(TVBroadcast *broadcast)
TVSegment_ContestHall_ShowcasedPokemon *TVBroadcast_GetShowcasedPokemon(TVBroadcast *broadcast)
{
return &broadcast->showcasedPokemon;
}

View File

@@ -115,7 +115,7 @@
#include "trainer_case.h"
#include "trainer_case_save_data.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_02017498.h"
#include "unk_020298BC.h"
#include "unk_0202C858.h"
@@ -1489,7 +1489,7 @@ void FieldSystem_HatchEgg(FieldSystem *fieldSystem)
Pokemon *eggMon = Party_GetFirstEgg(party);
GF_ASSERT(eggMon != NULL);
FieldSystem_SaveTVEpisodeSegment_HappyHappyEggClub(fieldSystem, eggMon);
FieldSystem_SaveTVSegment_HappyHappyEggClub(fieldSystem, eggMon);
EggHatchArgs args;
args.mon = eggMon;

View File

@@ -15,7 +15,7 @@
#include "string_gf.h"
#include "string_template.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0203D1B8.h"
BOOL ScrCmd_21D(ScriptContext *param0)
@@ -75,7 +75,7 @@ BOOL ScrCmd_21D(ScriptContext *param0)
RecordMixedRNG_CopyEntry(v1, v12, 1);
if (v13) {
FieldSystem_SaveTVEpisodeSegment_LoveThatGroupCorner_SwitchGroup(param0->fieldSystem);
FieldSystem_SaveTVSegment_LoveThatGroupCorner_SwitchGroup(param0->fieldSystem);
}
}
return 0;
@@ -90,7 +90,7 @@ BOOL ScrCmd_21D(ScriptContext *param0)
RecordMixedRNG_SetEntrySeed(v1, 0, MTRNG_Next());
String_Free(v14);
RecordMixedRNG_CopyEntry(v1, 0, 1);
FieldSystem_SaveTVEpisodeSegment_LoveThatGroupCorner_NewGroup(param0->fieldSystem);
FieldSystem_SaveTVSegment_LoveThatGroupCorner_NewGroup(param0->fieldSystem);
} break;
}

View File

@@ -37,7 +37,7 @@
#include "system_flags.h"
#include "system_vars.h"
#include "trainer_info.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_0202D05C.h"
#include "unk_0204AEE8.h"

View File

@@ -20,7 +20,7 @@
#include "system_data.h"
#include "system_vars.h"
#include "trainer_case_badge_dirt.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "underground.h"
#include "unk_0202C858.h"
#include "unk_0202E2CC.h"

View File

@@ -40,7 +40,7 @@
#include "system.h"
#include "touch_pad.h"
#include "touch_screen_actions.h"
#include "tv_episode_segment.h"
#include "tv_segment.h"
#include "unk_0202C9F4.h"
#include "vram_transfer.h"
@@ -388,7 +388,7 @@ static BOOL sub_02097F38(FieldTask *param0)
v12 = sub_02098164(v12);
broadcast = SaveData_GetTVBroadcast(fieldSystem->saveData);
FieldSystem_SaveTVEpisodeSegment_SealClubShow(broadcast, v8, v12);
FieldSystem_SaveTVSegment_SealClubShow(broadcast, v8, v12);
}
}
v0->unk_14 = 1;