mirror of
https://github.com/pret/pokeheartgold.git
synced 2025-02-26 08:09:06 +00:00
OPTIONS -> Options
This commit is contained in:
parent
66b7574ecb
commit
b19121fff3
@ -549,7 +549,7 @@ struct BattleSystem {
|
||||
FontID *hpFont;
|
||||
FontID *levelFont;
|
||||
void *msgIcon;
|
||||
OPTIONS *options;
|
||||
Options *options;
|
||||
u32 *unk1B8;
|
||||
void *unk1BC;
|
||||
u32 *unk1C0;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -57,7 +57,7 @@ struct UseItemInPartyTaskEnv {
|
||||
Party *party;
|
||||
Bag *bag;
|
||||
MAILBOX *mailbox;
|
||||
OPTIONS *options;
|
||||
Options *options;
|
||||
struct UnkStruct_0202E474 *unk10;
|
||||
u32 unk14;
|
||||
void *unk18;
|
||||
|
@ -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
|
||||
|
@ -10,7 +10,7 @@
|
||||
typedef struct UnkStruct_ov55_021E5B08 {
|
||||
u16 unk0;
|
||||
u8 mailMessageIdx;
|
||||
OPTIONS *options;
|
||||
Options *options;
|
||||
u32 *unk8;
|
||||
u32 mailOTID;
|
||||
u8 unk10;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "save.h"
|
||||
|
||||
typedef struct VoltorbFlipAppArgs {
|
||||
OPTIONS *options;
|
||||
Options *options;
|
||||
u16 *coins;
|
||||
u32 *unk8;
|
||||
PlayerProfile *profile;
|
||||
|
@ -28,7 +28,7 @@ typedef struct Ov122_021E7888 {
|
||||
|
||||
typedef struct VoltorbFlipAppWork {
|
||||
HeapID heapId;
|
||||
OPTIONS *options;
|
||||
Options *options;
|
||||
u16 *coins;
|
||||
u32 *unkC;
|
||||
PlayerProfile *profile;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user