From b19121fff31ff6157acd881334713f64ee90f8ca Mon Sep 17 00:00:00 2001 From: Adrienn Tindall <33725376+adrienntindall@users.noreply.github.com> Date: Tue, 22 Aug 2023 04:11:56 -0400 Subject: [PATCH] OPTIONS -> Options --- include/battle/battle.h | 2 +- include/battle/battle_system.h | 2 +- include/battle_arcade_game_board.h | 2 +- include/field_blackthorn_tutors.h | 2 +- include/field_use_item.h | 2 +- include/options.h | 36 +++++++++++----------- include/overlay_55.h | 2 +- include/player_data.h | 4 +-- include/sound.h | 2 +- include/text_0205B4EC.h | 4 +-- include/trade_anim.h | 2 +- include/unk_0203E348.h | 6 ++-- include/unk_02088288.h | 2 +- include/voltorb_flip/voltorb_flip.h | 2 +- include/voltorb_flip/voltorb_flip_work.h | 2 +- src/alph_puzzle.c | 2 +- src/battle/battle_system.c | 2 +- src/field_use_item.c | 2 +- src/game_clear.c | 4 +-- src/options.c | 38 ++++++++++++------------ src/player_data.c | 2 +- src/sound.c | 2 +- 22 files changed, 62 insertions(+), 62 deletions(-) diff --git a/include/battle/battle.h b/include/battle/battle.h index 043cbfa40..c10abf967 100644 --- a/include/battle/battle.h +++ b/include/battle/battle.h @@ -549,7 +549,7 @@ struct BattleSystem { FontID *hpFont; FontID *levelFont; void *msgIcon; - OPTIONS *options; + Options *options; u32 *unk1B8; void *unk1BC; u32 *unk1C0; diff --git a/include/battle/battle_system.h b/include/battle/battle_system.h index 0e4524991..665a0da17 100644 --- a/include/battle/battle_system.h +++ b/include/battle/battle_system.h @@ -68,7 +68,7 @@ u8 ov12_0223B688(BattleSystem *bsys); u8 ov12_0223B694(BattleSystem *bsys); int BattleSystem_GetSafariBallCount(BattleSystem *bsys); void BattleSystem_SetSafariBallCount(BattleSystem *bsys, int item); -OPTIONS *BattleSystem_GetOptions(BattleSystem *bsys); +Options *BattleSystem_GetOptions(BattleSystem *bsys); BOOL BattleSystem_AreBattleAnimationsOn(BattleSystem *bsys); u16 BattleSystem_GetFrame(BattleSystem *bsys); u8 BattleSystem_GetTextFrameDelay(BattleSystem *bsys); diff --git a/include/battle_arcade_game_board.h b/include/battle_arcade_game_board.h index 43800e09e..d606f8529 100644 --- a/include/battle_arcade_game_board.h +++ b/include/battle_arcade_game_board.h @@ -112,7 +112,7 @@ typedef struct GAME_BOARD_WORK { void *unk3C0; GAME_BOARD_SUB_3C4 unk3C4[2]; void *unk3D4; - OPTIONS *options; + Options *options; SaveData *savedata; void *arcadeSavedata; void *arcadeScoreSavedata; diff --git a/include/field_blackthorn_tutors.h b/include/field_blackthorn_tutors.h index b548bf52a..fb7b96da3 100644 --- a/include/field_blackthorn_tutors.h +++ b/include/field_blackthorn_tutors.h @@ -6,7 +6,7 @@ typedef struct MoveRelearner { //todo: move to unk_0203E348? rename to MoveRelearnerAppData? Pokemon *mon; PlayerProfile *profile; - OPTIONS *options; + Options *options; u8 filler_0C[4]; u16 *eligibleMoves; u8 filler_14[5]; diff --git a/include/field_use_item.h b/include/field_use_item.h index 0a536bfc2..05234ea8f 100644 --- a/include/field_use_item.h +++ b/include/field_use_item.h @@ -57,7 +57,7 @@ struct UseItemInPartyTaskEnv { Party *party; Bag *bag; MAILBOX *mailbox; - OPTIONS *options; + Options *options; struct UnkStruct_0202E474 *unk10; u32 unk14; void *unk18; diff --git a/include/options.h b/include/options.h index 5cf4db22c..cdbbe8d95 100644 --- a/include/options.h +++ b/include/options.h @@ -4,7 +4,7 @@ #include "heap.h" #include "save.h" -typedef struct OPTIONS { +typedef struct Options { u16 textSpeed:4; u16 soundMethod:2; u16 battleStyle:1; @@ -12,24 +12,24 @@ typedef struct OPTIONS { u16 buttonMode:2; u16 frame:5; u16 dummy:1; -} OPTIONS; +} Options; -OPTIONS* Options_New(HeapID heapId); -void Options_Copy(OPTIONS* src, OPTIONS* dest); -void Options_Init(OPTIONS* options); +Options* Options_New(HeapID heapId); +void Options_Copy(Options* src, Options* dest); +void Options_Init(Options* options); void Options_SetButtonModeOnMain(SaveData* savedata, u32 buttonMode); -u16 Options_GetTextSpeed(OPTIONS* options); -void Options_SetTextSpeed(OPTIONS* options, u32 textSpeed); -u8 Options_GetTextFrameDelay(OPTIONS* options); -u16 Options_GetSoundMethod(OPTIONS* options); -void Options_SetSoundMethod(OPTIONS* options, u32 soundMethod); -u16 Options_GetBattleScene(OPTIONS* options); -void Options_SetBattleScene(OPTIONS* options, u32 battleScene); -u16 Options_GetBattleStyle(OPTIONS* options); -void Options_SetBattleStyle(OPTIONS* options, u32 battleStyle); -u16 Options_GetButtonMode(OPTIONS* options); -void Options_SetButtonMode(OPTIONS* options, u32 buttonMode); -u16 Options_GetFrame(OPTIONS* options); -void Options_SetFrame(OPTIONS* options, u32 frame); +u16 Options_GetTextSpeed(Options* options); +void Options_SetTextSpeed(Options* options, u32 textSpeed); +u8 Options_GetTextFrameDelay(Options* options); +u16 Options_GetSoundMethod(Options* options); +void Options_SetSoundMethod(Options* options, u32 soundMethod); +u16 Options_GetBattleScene(Options* options); +void Options_SetBattleScene(Options* options, u32 battleScene); +u16 Options_GetBattleStyle(Options* options); +void Options_SetBattleStyle(Options* options, u32 battleStyle); +u16 Options_GetButtonMode(Options* options); +void Options_SetButtonMode(Options* options, u32 buttonMode); +u16 Options_GetFrame(Options* options); +void Options_SetFrame(Options* options, u32 frame); #endif //POKEHEARTGOLD_OPTIONS_H diff --git a/include/overlay_55.h b/include/overlay_55.h index f1f244e51..33d305c9a 100644 --- a/include/overlay_55.h +++ b/include/overlay_55.h @@ -10,7 +10,7 @@ typedef struct UnkStruct_ov55_021E5B08 { u16 unk0; u8 mailMessageIdx; - OPTIONS *options; + Options *options; u32 *unk8; u32 mailOTID; u8 unk10; diff --git a/include/player_data.h b/include/player_data.h index 82a942805..1ad0652b8 100644 --- a/include/player_data.h +++ b/include/player_data.h @@ -25,7 +25,7 @@ typedef struct PlayerProfile { } PlayerProfile; typedef struct PLAYERDATA { - OPTIONS options; + Options options; PlayerProfile profile; u16 coins; IGT igt; @@ -34,7 +34,7 @@ typedef struct PLAYERDATA { u32 Save_PlayerData_sizeof(void); void Save_PlayerData_Init(PLAYERDATA* player); PlayerProfile* Save_PlayerData_GetProfileAddr(SaveData* savedata); -OPTIONS* Save_PlayerData_GetOptionsAddr(SaveData* savedata); +Options* Save_PlayerData_GetOptionsAddr(SaveData* savedata); u16* Save_PlayerData_GetCoinsAddr(SaveData* savedata); IGT* Save_PlayerData_GetIGTAddr(SaveData* savedata); u32 PlayerProfile_sizeof(void); diff --git a/include/sound.h b/include/sound.h index 921c45f5f..ed81d8697 100644 --- a/include/sound.h +++ b/include/sound.h @@ -37,7 +37,7 @@ void GF_SndStopPlayerField(void); void PlayBGM(u16 seqno); void GF_SndStartFadeInBGM(u32, u32, u32); u32 GF_SndPlayerCountPlayingSeqByPlayerNo(u32 playerno); -void InitSoundData(SOUND_CHATOT *chatot, OPTIONS *options); +void InitSoundData(SOUND_CHATOT *chatot, Options *options); void GF_SndCallback(void); BOOL GF_SndIsFanfarePlaying(void); int GF_Snd_SaveState(int *level_p); diff --git a/include/text_0205B4EC.h b/include/text_0205B4EC.h index 7803b028b..81be90f30 100644 --- a/include/text_0205B4EC.h +++ b/include/text_0205B4EC.h @@ -6,8 +6,8 @@ #include "bg_window.h" void sub_0205B514(BgConfig *bgConfig, Window *window, int a2); -void sub_0205B564(Window *window, OPTIONS *options); -u8 sub_0205B5B4(Window *window, String *string, OPTIONS *options, BOOL speedupFlag); +void sub_0205B564(Window *window, Options *options); +u8 sub_0205B5B4(Window *window, String *string, Options *options, BOOL speedupFlag); BOOL IsPrintFinished(u8 printerId); void sub_0205B5A8(Window *window); u32 sub_0205B5EC(Window *window, String *message, FontID fontId, u32 textFrame, u8 speedUpEnabled, u32 a4); diff --git a/include/trade_anim.h b/include/trade_anim.h index 6458be6d9..bb578bef6 100644 --- a/include/trade_anim.h +++ b/include/trade_anim.h @@ -10,7 +10,7 @@ typedef struct TRADE_ANIM_WORK { PlayerProfile *trade_profile; int time_of_day; int is_ingame; - OPTIONS *options; + Options *options; } TRADE_ANIM_WORK; #endif //POKEHEARTGOLD_TRADE_ANIM_H diff --git a/include/unk_0203E348.h b/include/unk_0203E348.h index bbcc6025c..110abaaf1 100644 --- a/include/unk_0203E348.h +++ b/include/unk_0203E348.h @@ -22,7 +22,7 @@ typedef struct PartyMenuAppData { Party *party; Bag *bag; MAILBOX *mailbox; - OPTIONS *options; + Options *options; u8 filler_10[0xC]; FieldSystem *fsys; void *fsys_unk_10C; @@ -40,7 +40,7 @@ typedef struct PartyMenuAppData { struct ChooseStarterAppArgs { int cursorPos; - OPTIONS *options; + Options *options; Pokemon starters[3]; }; @@ -63,7 +63,7 @@ struct UnkStruct_ScrCmd230 { struct UnkStruct_ScrCmd627 { void *unk_0; - OPTIONS *options; + Options *options; SaveData *saveData; void *unk_0C; u8 filler_10[0x8]; diff --git a/include/unk_02088288.h b/include/unk_02088288.h index a6ba3440d..adf0e0d4a 100644 --- a/include/unk_02088288.h +++ b/include/unk_02088288.h @@ -5,7 +5,7 @@ extern struct OVY_MGR_TEMPLATE _02103A1C; typedef struct UnkStruct_0204F448 { Party *party; - OPTIONS *options; + Options *options; u8 filler08[9]; u8 unk11; u8 unk12; diff --git a/include/voltorb_flip/voltorb_flip.h b/include/voltorb_flip/voltorb_flip.h index 23ee65b82..104ed5fc8 100644 --- a/include/voltorb_flip/voltorb_flip.h +++ b/include/voltorb_flip/voltorb_flip.h @@ -7,7 +7,7 @@ #include "save.h" typedef struct VoltorbFlipAppArgs { - OPTIONS *options; + Options *options; u16 *coins; u32 *unk8; PlayerProfile *profile; diff --git a/include/voltorb_flip/voltorb_flip_work.h b/include/voltorb_flip/voltorb_flip_work.h index 764d5efff..a825a6ff6 100644 --- a/include/voltorb_flip/voltorb_flip_work.h +++ b/include/voltorb_flip/voltorb_flip_work.h @@ -28,7 +28,7 @@ typedef struct Ov122_021E7888 { typedef struct VoltorbFlipAppWork { HeapID heapId; - OPTIONS *options; + Options *options; u16 *coins; u32 *unkC; PlayerProfile *profile; diff --git a/src/alph_puzzle.c b/src/alph_puzzle.c index 57eb8d9b0..cd00f798e 100644 --- a/src/alph_puzzle.c +++ b/src/alph_puzzle.c @@ -123,7 +123,7 @@ void ov110_021E5A24(void) { void ov110_021E5A74(AlphPuzzleData *data) { data->unk4 = sub_020183F0(data->unk10->unk8); - OPTIONS *options = Save_PlayerData_GetOptionsAddr(data->unk10->savedata); + Options *options = Save_PlayerData_GetOptionsAddr(data->unk10->savedata); data->textFrameDelay = Options_GetTextFrameDelay(options); data->frame = Options_GetFrame(options); data->unk19 = data->unk10->unk5; diff --git a/src/battle/battle_system.c b/src/battle/battle_system.c index 2c45f9352..e8e45605f 100644 --- a/src/battle/battle_system.c +++ b/src/battle/battle_system.c @@ -709,7 +709,7 @@ void BattleSystem_SetSafariBallCount(BattleSystem *bsys, int cnt) { bsys->safariBallCnt = cnt; } -OPTIONS *BattleSystem_GetOptions(BattleSystem *bsys) { +Options *BattleSystem_GetOptions(BattleSystem *bsys) { return bsys->options; } diff --git a/src/field_use_item.c b/src/field_use_item.c index 8a12e71d7..d170c3207 100644 --- a/src/field_use_item.c +++ b/src/field_use_item.c @@ -485,7 +485,7 @@ static BOOL ItemFieldUseFunc_Generic(struct ItemFieldUseData *data) { static BOOL Task_PrintRegisteredKeyItemUseMessage(TaskManager *taskManager) { FieldSystem *fsys = TaskManager_GetFieldSystem(taskManager); struct RegisteredKeyItemUseMessagePrintTaskData *env = TaskManager_GetEnv(taskManager); - OPTIONS *options; + Options *options; switch (env->state) { case 0: diff --git a/src/game_clear.c b/src/game_clear.c index dc94908c0..7f5e62ffd 100644 --- a/src/game_clear.c +++ b/src/game_clear.c @@ -311,7 +311,7 @@ static void GameClearSave_InitGraphics(FieldSystem *fsys, GameClearWork *env) { } static void GameClearSave_PrintSaving(FieldSystem *fsys, GameClearWork *env) { - OPTIONS *options = Save_PlayerData_GetOptionsAddr(fsys->savedata); + Options *options = Save_PlayerData_GetOptionsAddr(fsys->savedata); env->windowText = ReadMsgData_NewNarc_NewString(NARC_msgdata_msg, NARC_msg_msg_0040_bin, msg_0040_00015, HEAP_ID_32); sub_0205B514(env->bgConfig, &env->window, 3); sub_0205B564(&env->window, options); @@ -341,7 +341,7 @@ static void GameClearSave_PrintSaveStatus(FieldSystem *fsys, GameClearWork *env, env->windowText = NewString_ReadMsgData(msgData, msg_0040_00018); } DestroyMsgData(msgData); - OPTIONS *options = Save_PlayerData_GetOptionsAddr(fsys->savedata); + Options *options = Save_PlayerData_GetOptionsAddr(fsys->savedata); env->printerId = sub_0205B5B4(&env->window, env->windowText, options, 1); } diff --git a/src/options.c b/src/options.c index 583d6c14e..cd0bf4503 100644 --- a/src/options.c +++ b/src/options.c @@ -3,18 +3,18 @@ #include "options.h" #include "player_data.h" -OPTIONS* Options_New(HeapID heapId) { - OPTIONS* ret = AllocFromHeap(heapId, sizeof(OPTIONS)); +Options* Options_New(HeapID heapId) { + Options* ret = AllocFromHeap(heapId, sizeof(Options)); Options_Init(ret); return ret; } -void Options_Copy(OPTIONS* src, OPTIONS* dest) { - MI_CpuCopy8(src, dest, sizeof(OPTIONS)); +void Options_Copy(Options* src, Options* dest) { + MI_CpuCopy8(src, dest, sizeof(Options)); } -void Options_Init(OPTIONS* options) { - MI_CpuClear8(options, sizeof(OPTIONS)); +void Options_Init(Options* options) { + MI_CpuClear8(options, sizeof(Options)); options->textSpeed = 1; // mid speed options->soundMethod = 0; // stereo @@ -40,15 +40,15 @@ void Options_SetButtonModeOnMain(SaveData* savedata, u32 buttonMode) { } } -u16 Options_GetTextSpeed(OPTIONS* options) { +u16 Options_GetTextSpeed(Options* options) { return options->textSpeed; } -void Options_SetTextSpeed(OPTIONS* options, u32 textSpeed) { +void Options_SetTextSpeed(Options* options, u32 textSpeed) { options->textSpeed = textSpeed; } -u8 Options_GetTextFrameDelay(OPTIONS* options) { +u8 Options_GetTextFrameDelay(Options* options) { u16 textSpeed = Options_GetTextSpeed(options); if (textSpeed == 0) { @@ -62,42 +62,42 @@ u8 Options_GetTextFrameDelay(OPTIONS* options) { return 1; } -u16 Options_GetSoundMethod(OPTIONS* options) { +u16 Options_GetSoundMethod(Options* options) { return options->soundMethod; } -void Options_SetSoundMethod(OPTIONS* options, u32 soundMethod) { +void Options_SetSoundMethod(Options* options, u32 soundMethod) { options->soundMethod = soundMethod; } -u16 Options_GetBattleScene(OPTIONS* options) { +u16 Options_GetBattleScene(Options* options) { return options->battleScene; } -void Options_SetBattleScene(OPTIONS* options, u32 battleScene) { +void Options_SetBattleScene(Options* options, u32 battleScene) { options->battleScene = battleScene; } -u16 Options_GetBattleStyle(OPTIONS* options) { +u16 Options_GetBattleStyle(Options* options) { return options->battleStyle; } -void Options_SetBattleStyle(OPTIONS* options, u32 battleStyle) { +void Options_SetBattleStyle(Options* options, u32 battleStyle) { options->battleStyle = battleStyle; } -u16 Options_GetButtonMode(OPTIONS* options) { +u16 Options_GetButtonMode(Options* options) { return options->buttonMode; } -void Options_SetButtonMode(OPTIONS* options, u32 buttonMode) { +void Options_SetButtonMode(Options* options, u32 buttonMode) { options->buttonMode = buttonMode; } -u16 Options_GetFrame(OPTIONS* options) { +u16 Options_GetFrame(Options* options) { return options->frame; } -void Options_SetFrame(OPTIONS* options, u32 frame) { +void Options_SetFrame(Options* options, u32 frame) { options->frame = frame; } diff --git a/src/player_data.c b/src/player_data.c index 89ca975d7..9897988a5 100644 --- a/src/player_data.c +++ b/src/player_data.c @@ -19,7 +19,7 @@ PlayerProfile* Save_PlayerData_GetProfileAddr(SaveData* savedata) { return &player->profile; } -OPTIONS* Save_PlayerData_GetOptionsAddr(SaveData* savedata) { +Options* Save_PlayerData_GetOptionsAddr(SaveData* savedata) { PLAYERDATA* player = SaveArray_Get(savedata, SAVE_PLAYERDATA); return &player->options; } diff --git a/src/sound.c b/src/sound.c index d1b1272a1..377695d8b 100644 --- a/src/sound.c +++ b/src/sound.c @@ -77,7 +77,7 @@ void GF_SndCallback(void); BOOL GF_SndIsFanfarePlaying(void); BOOL GF_SndWorkMicCounterFull(void); -void InitSoundData(SOUND_CHATOT *chatot, OPTIONS *options) { +void InitSoundData(SOUND_CHATOT *chatot, Options *options) { SND_WORK *work = GetSoundDataPointer(); NNS_SndInit(); GF_SoundDataInit(work);