diff --git a/include/battle/btlcmd.h b/include/battle/btlcmd.h index ef41fbab9f..72940b27e9 100644 --- a/include/battle/btlcmd.h +++ b/include/battle/btlcmd.h @@ -99,4 +99,14 @@ enum BattleScriptVars { #define BTLSCR_SWITCHED_MON_AFTER 22 #define BTLSCR_MSG_TEMP (0xFF) +enum IfOp { + IFOP_EQU = 0, + IFOP_NEQ, + IFOP_LTE, + IFOP_GT, + IFOP_FLAG_SET, + IFOP_FLAG_NOT, + IFOP_AND, +}; + #endif // POKEPLATINUM_BATTLE_BTLCMD_H \ No newline at end of file diff --git a/include/struct_defs/struct_021BF67C.h b/include/coresys.h similarity index 80% rename from include/struct_defs/struct_021BF67C.h rename to include/coresys.h index 32c6b7dcce..9d163e8dc1 100644 --- a/include/struct_defs/struct_021BF67C.h +++ b/include/coresys.h @@ -1,11 +1,11 @@ -#ifndef POKEPLATINUM_STRUCT_021BF67C_H -#define POKEPLATINUM_STRUCT_021BF67C_H +#ifndef POKEPLATINUM_CORESYS_H +#define POKEPLATINUM_CORESYS_H #include "functypes/funcptr_02017798.h" #include "struct_decls/struct_0201CD88_decl.h" #include "overlay023/funcptr_ov23_022537D4.h" -typedef struct { +typedef struct CoreSys { UnkFuncPtr_02017798 unk_00; void * unk_04; UnkFuncPtr_02017798 unk_08; @@ -24,14 +24,14 @@ typedef struct { int unk_3C; int unk_40; int unk_44; - int unk_48; + int padInput; int unk_4C; int unk_50; int unk_54; int unk_58; u16 unk_5C; u16 unk_5E; - u16 unk_60; + u16 touchInput; u16 unk_62; u8 unk_64; u8 unk_65; @@ -41,6 +41,8 @@ typedef struct { u8 padding_69[3]; BOOL unk_6C; u32 * unk_70; -} UnkStruct_021BF67C; +} CoreSys; -#endif // POKEPLATINUM_STRUCT_021BF67C_H +extern CoreSys coresys; + +#endif // POKEPLATINUM_CORESYS_H diff --git a/include/data_021BF67C.h b/include/data_021BF67C.h deleted file mode 100644 index 0f2118241b..0000000000 --- a/include/data_021BF67C.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef POKEPLATINUM_DATA_021BF67C_H -#define POKEPLATINUM_DATA_021BF67C_H - -#include "struct_defs/struct_021BF67C.h" - -extern UnkStruct_021BF67C Unk_021BF67C; - -#endif // POKEPLATINUM_DATA_021BF67C_H diff --git a/include/overlay016/ov16_0226485C.h b/include/overlay016/ov16_0226485C.h index fe78628e9a..38654b203d 100644 --- a/include/overlay016/ov16_0226485C.h +++ b/include/overlay016/ov16_0226485C.h @@ -40,8 +40,8 @@ void BattleIO_FlickerBattler(BattleSystem * param0, int param1, u32 param2); void BattleIO_UpdateHPGauge(BattleSystem * param0, BattleContext * param1, int param2); void ov16_02265D14(BattleSystem * param0, BattleContext * param1, int param2, int param3); void BattleIO_PlayFaintingSequence(BattleSystem * param0, BattleContext * param1, int param2); -void ov16_02265EAC(BattleSystem * param0, BattleContext * param1, int param2, int param3); -void ov16_02265ECC(BattleSystem * param0, BattleContext * param1); +void BattleIO_PlaySound(BattleSystem * param0, BattleContext * param1, int param2, int param3); +void BattleIO_FadeOut(BattleSystem * param0, BattleContext * param1); void ov16_02265EE8(BattleSystem * param0, int param1, int param2); void ov16_02265FB8(BattleSystem * param0, int param1, int param2); void ov16_02265FD8(BattleSystem * param0, int param1, int param2); diff --git a/include/unk_02022594.h b/include/unk_02022594.h index f34f375647..b2cac5b915 100644 --- a/include/unk_02022594.h +++ b/include/unk_02022594.h @@ -10,7 +10,13 @@ int sub_020226DC(const UnkUnion_020225E0 * param0); BOOL sub_02022734(const UnkUnion_020225E0 * param0); BOOL sub_02022760(const UnkUnion_020225E0 * param0); BOOL sub_0202278C(void); -BOOL sub_02022798(void); + +/** + * @brief Check if the touch screen is tapped. + * + * @return TRUE if the touch screen is tapped, FALSE otherwise. + */ +BOOL TouchScreen_Tapped(void); BOOL sub_020227A4(u32 * param0, u32 * param1); BOOL sub_020227C0(u32 * param0, u32 * param1); int sub_020227DC(const UnkUnion_020225E0 * param0, u32 param1, u32 param2); diff --git a/src/error_message_reset.c b/src/error_message_reset.c index f259852eda..4e04e2f9ad 100644 --- a/src/error_message_reset.c +++ b/src/error_message_reset.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02018340_decl.h" @@ -128,7 +128,7 @@ void ErrorMessageReset_PrintErrorAndReset (void) GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); diff --git a/src/gx_layers.c b/src/gx_layers.c index d7345546f0..3cd90e71c4 100644 --- a/src/gx_layers.c +++ b/src/gx_layers.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_defs/struct_02099F80.h" @@ -98,7 +98,7 @@ void GXLayers_TurnBothDispOn (void) void GXLayers_SwapDisplay (void) { - if (Unk_021BF67C.unk_65 == 0) { + if (coresys.unk_65 == 0) { GX_SetDispSelect(GX_DISP_SELECT_MAIN_SUB); } else { GX_SetDispSelect(GX_DISP_SELECT_SUB_MAIN); diff --git a/src/main.c b/src/main.c index 7f560ad6d3..45af0e42c2 100644 --- a/src/main.c +++ b/src/main.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "assert.h" #include "struct_decls/struct_020067E8_decl.h" @@ -108,8 +108,8 @@ void NitroMain (void) } } - Unk_021BF67C.unk_6C = 1; - Unk_021BF67C.unk_30 = 0; + coresys.unk_6C = 1; + coresys.unk_30 = 0; sub_02001028(); sub_0200AB84(); @@ -122,8 +122,8 @@ void NitroMain (void) sub_0200106C(); sub_02017B9C(); - if ((Unk_021BF67C.unk_38 & (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) == (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) { - if (Unk_021BF67C.unk_68 == 0) { + if ((coresys.unk_38 & (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) == (PAD_BUTTON_START | PAD_BUTTON_SELECT | PAD_BUTTON_L | PAD_BUTTON_R)) { + if (coresys.unk_68 == 0) { sub_02000F60(0); } } @@ -131,34 +131,34 @@ void NitroMain (void) if (sub_020349EC()) { sub_02000F30(); sub_02000E54(); - sub_0201CDD4(Unk_021BF67C.unk_18); - sub_0201CDD4(Unk_021BF67C.unk_24); + sub_0201CDD4(coresys.unk_18); + sub_0201CDD4(coresys.unk_24); - if (!Unk_021BF67C.unk_30) { + if (!coresys.unk_30) { OS_WaitIrq(1, OS_IE_V_BLANK); - Unk_021BF67C.unk_2C++; + coresys.unk_2C++; } } sub_020137C4(); sub_02017458(); sub_020241CC(); - sub_0201CDD4(Unk_021BF67C.unk_24); + sub_0201CDD4(coresys.unk_24); OS_WaitIrq(1, OS_IE_V_BLANK); - Unk_021BF67C.unk_2C++; - Unk_021BF67C.unk_30 = 0; + coresys.unk_2C++; + coresys.unk_30 = 0; sub_0200ABF0(); sub_0200F27C(); - if (Unk_021BF67C.unk_00 != NULL) { - Unk_021BF67C.unk_00(Unk_021BF67C.unk_04); + if (coresys.unk_00 != NULL) { + coresys.unk_00(coresys.unk_04); } sub_02003BD8(); - sub_0201CDD4(Unk_021BF67C.unk_20); + sub_0201CDD4(coresys.unk_20); } } @@ -215,11 +215,11 @@ static void sub_02000EE4 (void) OS_WaitIrq(1, OS_IE_V_BLANK); - Unk_021BF67C.unk_2C++; - Unk_021BF67C.unk_30 = 0; + coresys.unk_2C++; + coresys.unk_30 = 0; - if (Unk_021BF67C.unk_00 != NULL) { - Unk_021BF67C.unk_00(Unk_021BF67C.unk_04); + if (coresys.unk_00 != NULL) { + coresys.unk_00(coresys.unk_04); } } @@ -298,7 +298,7 @@ static void sub_02000F94 (int param0, int param1) sub_02017B9C(); if (v0 >= 30) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { break; } } @@ -321,7 +321,7 @@ void sub_02001028 (void) sub_0201384C(&v0, &v1); - v2 = v0.year + v0.month * 0x100 * v0.day * 0x10000 + v1.hour * 0x10000 + (v1.minute + v1.second) * 0x1000000 + Unk_021BF67C.unk_2C; + v2 = v0.year + v0.month * 0x100 * v0.day * 0x10000 + v1.hour * 0x10000 + (v1.minute + v1.second) * 0x1000000 + coresys.unk_2C; MTRNG_SetSeed(v2); LCRNG_SetSeed(v2); @@ -333,7 +333,7 @@ void sub_0200106C (void) PMWakeUpTrigger v2; if (PAD_DetectFold()) { - if (Unk_021BF67C.unk_67 == 0) { + if (coresys.unk_67 == 0) { sub_0201E630(); if (CTRDG_IsPulledOut() == TRUE) { @@ -343,7 +343,7 @@ void sub_0200106C (void) GOTOLABEL: v2 = PM_TRIGGER_COVER_OPEN | PM_TRIGGER_CARD; - if (Unk_021BF67C.unk_66 && (Unk_02101D24 == FALSE)) { + if (coresys.unk_66 && (Unk_02101D24 == FALSE)) { v2 |= PM_TRIGGER_CARTRIDGE; } diff --git a/src/overlay005/ov5_021D0D80.c b/src/overlay005/ov5_021D0D80.c index 36fd71c5bf..6c237a8c12 100644 --- a/src/overlay005/ov5_021D0D80.c +++ b/src/overlay005/ov5_021D0D80.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "data_02100844.h" #include "struct_decls/struct_020067E8_decl.h" @@ -539,7 +539,7 @@ static void ov5_021D134C (UnkStruct_0203CDB0 * param0, u8 param1) ov5_021D15F4(param0); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { (void)0; } } diff --git a/src/overlay005/ov5_021DC018.c b/src/overlay005/ov5_021DC018.c index ae6e4ce8a5..8540ebf9df 100644 --- a/src/overlay005/ov5_021DC018.c +++ b/src/overlay005/ov5_021DC018.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -560,7 +560,7 @@ static void ov5_021DC95C (UnkStruct_0201CD38 * param0, void * param1) sub_02005748(1500); } - if ((Unk_021BF67C.unk_4C & PAD_KEY_UP) || (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) || (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) || (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT)) { + if ((coresys.unk_4C & PAD_KEY_UP) || (coresys.unk_4C & PAD_KEY_DOWN) || (coresys.unk_4C & PAD_KEY_LEFT) || (coresys.unk_4C & PAD_KEY_RIGHT)) { ov5_021DCAF4(v2); } diff --git a/src/overlay005/ov5_021DFB54.c b/src/overlay005/ov5_021DFB54.c index e603ac26e3..61e9f59df4 100644 --- a/src/overlay005/ov5_021DFB54.c +++ b/src/overlay005/ov5_021DFB54.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_020216E0_decl.h" @@ -878,7 +878,7 @@ static BOOL ov5_021E0560 (UnkStruct_020508D4 * param0) case 2: { int v2 = sub_0205EA78(v0->unk_0C); - u32 v3, v4 = Unk_021BF67C.unk_48, v5 = Unk_021BF67C.unk_44; + u32 v3, v4 = coresys.padInput, v5 = coresys.unk_44; int v6 = sub_02061308(v0->unk_0C, v4, v5); if ((v6 == -1) || (v6 == v2)) { diff --git a/src/overlay005/ov5_021F08CC.c b/src/overlay005/ov5_021F08CC.c index 2ae8725998..7c52ebe629 100644 --- a/src/overlay005/ov5_021F08CC.c +++ b/src/overlay005/ov5_021F08CC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -489,7 +489,7 @@ static void * ov5_021F0D1C (u32 param0) static int ov5_021F0D40 (void) { - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if ((coresys.padInput & PAD_BUTTON_A)) { return 1; } @@ -498,7 +498,7 @@ static int ov5_021F0D40 (void) static int ov5_021F0D54 (void) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { return 1; } diff --git a/src/overlay006/ov6_0223E140.c b/src/overlay006/ov6_0223E140.c index e87b381a31..964d1f0c2b 100644 --- a/src/overlay006/ov6_0223E140.c +++ b/src/overlay006/ov6_0223E140.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -2194,12 +2194,12 @@ static BOOL ov6_02240364 (UnkStruct_ov6_022401B8 * param0, int param1, int param BOOL v1[2] = {0, 0}; UnkStruct_ov6_02240260 * v2 = ¶m0->unk_34; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v2->unk_00++; v2->unk_00 %= 32; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (v2->unk_00) { v2->unk_00--; } else { @@ -2207,12 +2207,12 @@ static BOOL ov6_02240364 (UnkStruct_ov6_022401B8 * param0, int param1, int param } } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { v2->unk_04++; v2->unk_04 %= 32; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (v2->unk_04) { v2->unk_04--; } else { diff --git a/src/overlay006/ov6_022477B8.c b/src/overlay006/ov6_022477B8.c index c3c6b1148a..16af9a4a44 100644 --- a/src/overlay006/ov6_022477B8.c +++ b/src/overlay006/ov6_022477B8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "overlay006/struct_ov6_02242634.h" @@ -13,7 +13,7 @@ void ov6_022477B8 (const UnkStruct_ov6_02242634 * param0, const BOOL param1, int return; } - switch (Unk_021BF67C.unk_66) { + switch (coresys.unk_66) { case 1: (*param2) = param0->unk_88[0]; (*param3) = param0->unk_88[1]; diff --git a/src/overlay006/ov6_02247A0C.c b/src/overlay006/ov6_02247A0C.c index 6c5070cd62..52d9709ccd 100644 --- a/src/overlay006/ov6_02247A0C.c +++ b/src/overlay006/ov6_02247A0C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -116,7 +116,7 @@ static BOOL ov6_02247A34 (UnkStruct_020508D4 * param0) v1->unk_04++; break; case 1: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov6_02247CC8(v1->unk_00); v1->unk_04++; } diff --git a/src/overlay007/ov7_02249960.c b/src/overlay007/ov7_02249960.c index b4e6893edd..eb75302ccb 100644 --- a/src/overlay007/ov7_02249960.c +++ b/src/overlay007/ov7_02249960.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -655,7 +655,7 @@ static void ov7_0224A34C (UnkStruct_0201CD38 * param0, void * param1) if (ov7_0224A244(param0, param1)) { (void)0; - } else if (( PAD_BUTTON_B )&Unk_021BF67C.unk_48) { + } else if (( PAD_BUTTON_B )&coresys.padInput) { ov7_02249960(3, 0); ov7_0224A530(ov7_0224A394); } @@ -1119,7 +1119,7 @@ static void ov7_0224AB64 (UnkStruct_0201CD38 * param0, void * param1) UnkStruct_ov7_02249C2C * v0 = (UnkStruct_ov7_02249C2C *)param1; if (sub_0205DA04(Unk_ov7_0224F5A0->unk_94)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov7_0224AFD8(param0, v0); ov7_0224A528(); Unk_ov7_0224F5A0->unk_88 = 4; @@ -1135,7 +1135,7 @@ static void ov7_0224ABA4 (UnkStruct_0201CD38 * param0, void * param1) ov7_0224A64C(v0); if (sub_0205DA04(Unk_ov7_0224F5A0->unk_94)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov7_0224A5D0(); ov7_0224A530(ov7_0224ABE0); } @@ -1307,7 +1307,7 @@ static void ov7_0224AD68 (UnkStruct_0201CD38 * param0, void * param1) static void ov7_0224ADD8 (UnkStruct_0201CD38 * param0, void * param1) { if (sub_0205DA04(Unk_ov7_0224F5A0->unk_94)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { Unk_ov7_0224F5A0->unk_88 = 1; sub_0200DA58(param0); } @@ -1587,7 +1587,7 @@ static void ov7_0224B2A0 (UnkStruct_0201CD38 * param0, void * param1) UnkStruct_ov7_02249C2C * v0 = (UnkStruct_ov7_02249C2C *)param1; if (sub_0205DA04(Unk_ov7_0224F5A0->unk_94)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200DA58(param0); ov7_0224A528(); Unk_ov7_0224F5A0->unk_88 = 1; @@ -1637,7 +1637,7 @@ static void ov7_0224B370 (UnkStruct_0201CD38 * param0, void * param1) UnkStruct_ov7_02249C2C * v0 = (UnkStruct_ov7_02249C2C *)param1; if (sub_0205DA04(Unk_ov7_0224F5A0->unk_94)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov7_02249E0C(v0); sub_0200DA58(param0); } diff --git a/src/overlay007/ov7_0224B4E8.c b/src/overlay007/ov7_0224B4E8.c index 9669afee91..31c8055ca9 100644 --- a/src/overlay007/ov7_0224B4E8.c +++ b/src/overlay007/ov7_0224B4E8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "message.h" @@ -513,7 +513,7 @@ static BOOL ov7_0224BC74 (UnkStruct_020508D4 * param0) break; case 6: if (sub_0205DA04(v1->unk_74)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v1->unk_7C = 0; } } @@ -524,7 +524,7 @@ static BOOL ov7_0224BC74 (UnkStruct_020508D4 * param0) v1->unk_7C++; break; case 8: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov7_0224BBA0(v1); ov7_0224B4E8(v1, 106); ov7_0224B5A8(v1); diff --git a/src/overlay007/ov7_0224BE9C.c b/src/overlay007/ov7_0224BE9C.c index 84f06ae6f1..f27be54237 100644 --- a/src/overlay007/ov7_0224BE9C.c +++ b/src/overlay007/ov7_0224BE9C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -350,7 +350,7 @@ BOOL ov7_0224BF2C (UnkStruct_ov7_0224BEFC * param0) break; case 11: if (ov7_0224C4B8(¶m0->unk_1B8)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { param0->unk_00 = param0->unk_04; } } diff --git a/src/overlay007/ov7_0224CD28.c b/src/overlay007/ov7_0224CD28.c index 1491cf504a..880c2ad36e 100644 --- a/src/overlay007/ov7_0224CD28.c +++ b/src/overlay007/ov7_0224CD28.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -400,7 +400,7 @@ static u8 ov7_0224D250 (UnkStruct_0203CDB0 * param0, UnkStruct_ov7_0224D008 * pa return 0; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { void * v0; sub_0200E084(¶m1->unk_08[1], 0); @@ -971,7 +971,7 @@ static u8 ov7_0224DFB0 (UnkStruct_ov7_0224D008 * param0) return 6; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02021CAC(param0->unk_25C[0], 0); sub_02021CAC(param0->unk_25C[1], 0); sub_0200DC9C(¶m0->unk_08[4], 1); @@ -982,7 +982,7 @@ static u8 ov7_0224DFB0 (UnkStruct_ov7_0224D008 * param0) return ov7_0224E098(param0); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_0200DC9C(¶m0->unk_08[4], 1); sub_0200DC9C(¶m0->unk_08[3], 1); sub_0200E084(¶m0->unk_08[5], 0); @@ -1224,7 +1224,7 @@ static u8 ov7_0224E6B8 (UnkStruct_ov7_0224D008 * param0) return 10; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { if (param0->unk_28C == 1) { sub_0206B3B4(param0->unk_288); } @@ -1267,7 +1267,7 @@ static u8 ov7_0224E7C8 (UnkStruct_ov7_0224D008 * param0) return 11; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_08[5], 0); ov7_0224EB38(param0, 0); sub_02021CAC(param0->unk_25C[0], param0->unk_26C[0]); diff --git a/src/overlay008/ov8_02249960.c b/src/overlay008/ov8_02249960.c index 14ce46ac03..adf684a0d0 100644 --- a/src/overlay008/ov8_02249960.c +++ b/src/overlay008/ov8_02249960.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -2953,7 +2953,7 @@ static BOOL ov8_0224B3D4 (UnkStruct_020508D4 * param0) v2->unk_00++; case 12: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { int v9 = sub_0205EABC(v1->unk_3C); int v10 = sub_0205EAC8(v1->unk_3C); diff --git a/src/overlay010/ov10_0221F800.c b/src/overlay010/ov10_0221F800.c index 8635d48c1e..fb969f77f9 100644 --- a/src/overlay010/ov10_0221F800.c +++ b/src/overlay010/ov10_0221F800.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02002F38_decl.h" @@ -492,7 +492,7 @@ static void ov10_0221F930 (UnkStruct_ov10_0221FB28 * param0) break; case 2: if (param0->unk_BBC == 1) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { param0->unk_BB0 = 3; } } diff --git a/src/overlay012/ov12_0221FC20.c b/src/overlay012/ov12_0221FC20.c index cbfd0cf59c..bd4150cabc 100644 --- a/src/overlay012/ov12_0221FC20.c +++ b/src/overlay012/ov12_0221FC20.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -1047,9 +1047,9 @@ static void ov12_0222048C (UnkStruct_ov12_0221FCDC * param0) { param0->unk_89 = 1; - if (Unk_021BF67C.unk_44 & PAD_BUTTON_L) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_R) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.unk_44 & PAD_BUTTON_L) { + if (coresys.unk_44 & PAD_BUTTON_R) { + if (coresys.padInput & PAD_BUTTON_X) { param0->unk_18 += 1; param0->unk_89 = 0; } diff --git a/src/overlay013/ov13_0221FC20.c b/src/overlay013/ov13_0221FC20.c index 2fd2915345..e39339ae59 100644 --- a/src/overlay013/ov13_0221FC20.c +++ b/src/overlay013/ov13_0221FC20.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -861,7 +861,7 @@ static u8 ov13_02220848 (UnkStruct_ov13_022213F0 * param0) static u8 ov13_02220864 (UnkStruct_ov13_022213F0 * param0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || (sub_02022798() == 1)) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || (TouchScreen_Tapped() == 1)) { return param0->unk_2075; } diff --git a/src/overlay013/ov13_022264F4.c b/src/overlay013/ov13_022264F4.c index 2fe07d6d1d..dc9df3facb 100644 --- a/src/overlay013/ov13_022264F4.c +++ b/src/overlay013/ov13_022264F4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -526,7 +526,7 @@ static u8 ov13_02226C7C (UnkStruct_ov13_02227244 * param0) static u8 ov13_02226C94 (UnkStruct_ov13_02227244 * param0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || (sub_02022798() == 1)) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || (TouchScreen_Tapped() == 1)) { return param0->unk_114B; } diff --git a/src/overlay013/ov13_02228A38.c b/src/overlay013/ov13_02228A38.c index 860be3db92..e3989a74f5 100644 --- a/src/overlay013/ov13_02228A38.c +++ b/src/overlay013/ov13_02228A38.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "overlay013/struct_ov13_02228A50_decl.h" #include "overlay016/struct_ov16_0226DC24_decl.h" @@ -93,7 +93,7 @@ static u8 ov13_02228ACC (UnkStruct_ov13_02228A50 * param0) return 1; } - if (Unk_021BF67C.unk_48 & ((PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT) | PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & ((PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT) | PAD_BUTTON_B | PAD_BUTTON_A)) { param0->unk_08 = 1; ov16_0226DD7C(param0->unk_00, param0->unk_04[param0->unk_09].unk_00, param0->unk_04[param0->unk_09].unk_02, param0->unk_04[param0->unk_09].unk_01, param0->unk_04[param0->unk_09].unk_03); @@ -141,16 +141,16 @@ u32 ov13_02228B64 (UnkStruct_ov13_02228A50 * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v4 = sub_0201E028(param0->unk_04, NULL, NULL, NULL, NULL, param0->unk_09, 0); v5 = 0; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { v4 = sub_0201E028(param0->unk_04, NULL, NULL, NULL, NULL, param0->unk_09, 1); v5 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { v4 = sub_0201E028(param0->unk_04, NULL, NULL, NULL, NULL, param0->unk_09, 2); v5 = 2; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v4 = sub_0201E028(param0->unk_04, NULL, NULL, NULL, NULL, param0->unk_09, 3); v5 = 3; } else { @@ -205,11 +205,11 @@ u32 ov13_02228B64 (UnkStruct_ov13_02228A50 * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { return param0->unk_09; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); return 0xfffffffe; } diff --git a/src/overlay016/battle_script.c b/src/overlay016/battle_script.c index 42fe05faf1..1a3dc0d049 100644 --- a/src/overlay016/battle_script.c +++ b/src/overlay016/battle_script.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "constants/abilities.h" #include "constants/items.h" @@ -132,13 +132,13 @@ static BOOL BtlCmd_UpdateHPValue(BattleSystem *battleSys, BattleContext *battleC static BOOL BtlCmd_UpdateHPGauge(BattleSystem *battleSys, BattleContext *battleCtx); static BOOL BtlCmd_FaintBattler(BattleSystem *battleSys, BattleContext *battleCtx); static BOOL BtlCmd_PlayFaintingSequence(BattleSystem *battleSys, BattleContext *battleCtx); -static BOOL ov16_02241984(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241A20(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241A58(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241B08(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241BC0(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241BDC(BattleSystem * param0, BattleContext * param1); -static BOOL ov16_02241BFC(BattleSystem * param0, BattleContext * param1); +static BOOL BtlCmd_WaitFrames(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_PlaySound(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_If(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_IfMonData(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_FadeOut(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_JumpToSub(BattleSystem *battleSys, BattleContext *battleCtx); +static BOOL BtlCmd_JumpToBattleEffect(BattleSystem *battleSys, BattleContext *battleCtx); static BOOL ov16_02241C28(BattleSystem * param0, BattleContext * param1); static BOOL ov16_02241CD0(BattleSystem * param0, BattleContext * param1); static BOOL ov16_02241D34(BattleSystem * param0, BattleContext * param1); @@ -392,13 +392,13 @@ static const BtlCmd sBattleCommands[] = { BtlCmd_UpdateHPGauge, BtlCmd_FaintBattler, BtlCmd_PlayFaintingSequence, - ov16_02241984, - ov16_02241A20, - ov16_02241A58, - ov16_02241B08, - ov16_02241BC0, - ov16_02241BDC, - ov16_02241BFC, + BtlCmd_WaitFrames, + BtlCmd_PlaySound, + BtlCmd_If, + BtlCmd_IfMonData, + BtlCmd_FadeOut, + BtlCmd_JumpToSub, + BtlCmd_JumpToBattleEffect, ov16_02241C28, ov16_02241CD0, ov16_02241D34, @@ -2040,216 +2040,282 @@ static BOOL BtlCmd_PlayFaintingSequence(BattleSystem *battleSys, BattleContext * return FALSE; } -static BOOL ov16_02241984 (BattleSystem * param0, BattleContext * param1) +/** + * @brief Wait a specified number of frames. + * + * Non-Link battles can skip the wait with a button press. + * + * Inputs: + * 1. The number of frames to wait at this instruction + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_WaitFrames(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; - int v1; - - BattleScript_Iter(param1, 1); - v0 = BattleScript_Read(param1); + BattleScript_Iter(battleCtx, 1); + int frames = BattleScript_Read(battleCtx); - if ((BattleSystem_BattleType(param0) & 0x4) == 0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) || (sub_02022798())) { - param1->waitCounter = v0; + if ((BattleSystem_BattleType(battleSys) & BATTLE_TYPE_LINK) == FALSE) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) || TouchScreen_Tapped()) { + battleCtx->waitCounter = frames; } } - if ((param0->battleType & 0x4) && ((param0->battleStatusMask & 0x10) == 0)) { - v1 = 2; + int inc; + if ((battleSys->battleType & BATTLE_TYPE_LINK) && (battleSys->battleStatusMask & BATTLE_STATUS_RECORDING) == FALSE) { + inc = 2; } else { - v1 = 1; + inc = 1; } - if (v0 > param1->waitCounter) { - BattleScript_Iter(param1, -2); - param1->waitCounter += v1; + // Go back through this command until the specified number of frames have elapsed + if (frames > battleCtx->waitCounter) { + BattleScript_Iter(battleCtx, -2); // jump back to the instruction + battleCtx->waitCounter += inc; } else { - param1->waitCounter = 0; + battleCtx->waitCounter = 0; } - param1->battleProgressFlag = 1; - - return 0; + battleCtx->battleProgressFlag = TRUE; + return FALSE; } -static BOOL ov16_02241A20 (BattleSystem * param0, BattleContext * param1) +/** + * @brief Play a sound originating from a particular battler. + * + * Inputs: + * 1. The battler from which the sound originates. This is used for determining + * from which of the DS's stereo speakers to pan the sound. Enemies will have + * their sounds pan from the right, while allies will have their sounds pan from + * the left. + * 2. The SDAT sequence to play. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_PlaySound(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; - int v1; - int v2; - - BattleScript_Iter(param1, 1); - - v0 = BattleScript_Read(param1); - v1 = BattleScript_Read(param1); - v2 = BattleScript_Battler(param0, param1, v0); + BattleScript_Iter(battleCtx, 1); + int battler = BattleScript_Read(battleCtx); + int sdatSeq = BattleScript_Read(battleCtx); - ov16_02265EAC(param0, param1, v1, v2); + BattleIO_PlaySound(battleSys, battleCtx, sdatSeq, BattleScript_Battler(battleSys, battleCtx, battler)); - return 0; + return FALSE; } -static BOOL ov16_02241A58 (BattleSystem * param0, BattleContext * param1) +/** + * @brief Compare a given data-value from a variable to a target static value. + * + * Inputs: + * 1. The operation mode. See enum IfOp for possible values. + * 2. The variable whose data should be retrieved for the comparison. + * 3. The static value to compare against. + * 4. The jump-ahead value if the comparison yields TRUE. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_If(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; - int v1; - int v2; - int v3; - int * v4; + BattleScript_Iter(battleCtx, 1); + int op = BattleScript_Read(battleCtx); + int srcVar = BattleScript_Read(battleCtx); + int compareTo = BattleScript_Read(battleCtx); + int jump = BattleScript_Read(battleCtx); - BattleScript_Iter(param1, 1); + int *data = BattleScript_VarAddress(battleSys, battleCtx, srcVar); - v0 = BattleScript_Read(param1); - v1 = BattleScript_Read(param1); - v2 = BattleScript_Read(param1); - v3 = BattleScript_Read(param1); - v4 = BattleScript_VarAddress(param0, param1, v1); - - switch (v0) { - case 0: - if (v4[0] != v2) { - v3 = 0; + switch (op) { + case IFOP_EQU: + if (*data != compareTo) { + jump = 0; } break; - case 1: - if (v4[0] == v2) { - v3 = 0; + + case IFOP_NEQ: + if (*data == compareTo) { + jump = 0; } break; - case 2: - if (v4[0] <= v2) { - v3 = 0; + + case IFOP_LTE: + if (*data <= compareTo) { + jump = 0; } break; - case 3: - if (v4[0] > v2) { - v3 = 0; + + case IFOP_GT: + if (*data > compareTo) { + jump = 0; } break; - case 4: - if ((v4[0] & v2) == 0) { - v3 = 0; - } + case IFOP_FLAG_SET: + if ((*data & compareTo) == FALSE) { + jump = 0; + } break; - case 5: - if (v4[0] & v2) { - v3 = 0; + + case IFOP_FLAG_NOT: + if (*data & compareTo) { + jump = 0; } break; - case 6: - if ((v4[0] & v2) != v2) { - v3 = 0; + + case IFOP_AND: + if ((*data & compareTo) != compareTo) { + jump = 0; } break; + default: - GF_ASSERT(1); + GF_ASSERT(TRUE); break; } - if (v3) { - BattleScript_Iter(param1, v3); + if (jump) { + BattleScript_Iter(battleCtx, jump); } - return 0; + return FALSE; } -static BOOL ov16_02241B08 (BattleSystem * param0, BattleContext * param1) +/** + * @brief Compare a given data-value from a battler to a target static value. + * + * Inputs: + * 1. The operation mode. See enum IfOp for possible values. + * 2. The battler whose data should be retrieved for the comparison. + * 3. The parameter to retrieve for the comparison. + * 4. The static value to compare against. + * 5. The jump-ahead value if the comparison yields TRUE. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_IfMonData(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; - int v1; - int v2; - int v3; - int v4; - int v5; - int v6; - - BattleScript_Iter(param1, 1); + BattleScript_Iter(battleCtx, 1); + int op = BattleScript_Read(battleCtx); + int inBattler = BattleScript_Read(battleCtx); + int srcParam = BattleScript_Read(battleCtx); + int compareTo = BattleScript_Read(battleCtx); + int jump = BattleScript_Read(battleCtx); - v0 = BattleScript_Read(param1); - v1 = BattleScript_Read(param1); - v2 = BattleScript_Read(param1); - v3 = BattleScript_Read(param1); - v4 = BattleScript_Read(param1); - v6 = BattleScript_Battler(param0, param1, v1); - v5 = BattleMon_Get(param1, v6, v2, NULL); + int battler = BattleScript_Battler(battleSys, battleCtx, inBattler); + int data = BattleMon_Get(battleCtx, battler, srcParam, NULL); - switch (v0) { - case 0: - if (v5 != v3) { - v4 = 0; + switch (op) { + case IFOP_EQU: + if (data != compareTo) { + jump = 0; } break; - case 1: - if (v5 == v3) { - v4 = 0; + + case IFOP_NEQ: + if (data == compareTo) { + jump = 0; } break; - case 2: - if (v5 <= v3) { - v4 = 0; + + case IFOP_LTE: + if (data <= compareTo) { + jump = 0; } break; - case 3: - if (v5 > v3) { - v4 = 0; + + case IFOP_GT: + if (data > compareTo) { + jump = 0; } break; - case 4: - if ((v5 & v3) == 0) { - v4 = 0; + + case IFOP_FLAG_SET: + if ((data & compareTo) == FALSE) { + jump = 0; } break; - case 5: - if (v5 & v3) { - v4 = 0; + + case IFOP_FLAG_NOT: + if (data & compareTo) { + jump = 0; } break; - case 6: - if ((v5 & v3) != v3) { - v4 = 0; + + case IFOP_AND: + if ((data & compareTo) != compareTo) { + jump = 0; } break; + default: - GF_ASSERT(1); + GF_ASSERT(TRUE); break; } - if (v4) { - BattleScript_Iter(param1, v4); + if (jump) { + BattleScript_Iter(battleCtx, jump); } - return 0; + return FALSE; } -static BOOL ov16_02241BC0 (BattleSystem * param0, BattleContext * param1) +/** + * @brief Perform a screen fade at the end of a battle to transition out of + * the battle UI. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_FadeOut(BattleSystem *battleSys, BattleContext *battleCtx) { - BattleScript_Iter(param1, 1); - ov16_02265ECC(param0, param1); + BattleScript_Iter(battleCtx, 1); + BattleIO_FadeOut(battleSys, battleCtx); - return 0; + return FALSE; } -static BOOL ov16_02241BDC (BattleSystem * param0, BattleContext * param1) +/** + * @brief Jump to a subroutine sequence, abandoning the current script. + * + * Inputs: + * 1. The subroutine sequence to jump to. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_JumpToSub(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; + BattleScript_Iter(battleCtx, 1); + int subseq = BattleScript_Read(battleCtx); - BattleScript_Iter(param1, 1); - v0 = BattleScript_Read(param1); - BattleScript_Jump(param1, 1, v0); + BattleScript_Jump(battleCtx, NARC_INDEX_BATTLE__SKILL__SUB_SEQ, subseq); - return 0; + return FALSE; } -static BOOL ov16_02241BFC (BattleSystem * param0, BattleContext * param1) +/** + * @brief Jump to the battle effect sequence for the current move. + * + * @param battleSys + * @param battleCtx + * @return FALSE + */ +static BOOL BtlCmd_JumpToBattleEffect(BattleSystem *battleSys, BattleContext *battleCtx) { - int v0; + BattleScript_Iter(battleCtx, 1); - BattleScript_Iter(param1, 1); - v0 = param1->aiContext.moveTable[param1->moveCur].effect; - BattleScript_Jump(param1, 30, v0); + BattleScript_Jump(battleCtx, NARC_INDEX_BATTLE__SKILL__BE_SEQ, CURRENT_MOVE_DATA.effect); - return 0; + return FALSE; } static BOOL ov16_02241C28 (BattleSystem * param0, BattleContext * param1) @@ -8344,7 +8410,7 @@ static void ov16_02248E74 (UnkStruct_0201CD38 * param0, void * param1) break; case 11: case 13: - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) || (sub_02022798())) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) || (TouchScreen_Tapped())) { sub_02005748(1500); v2->unk_28++; } @@ -8880,9 +8946,9 @@ static void ov16_02249B80 (UnkStruct_0201CD38 * param0, void * param1) break; case 13: if (ov21_021E8DEC(v2->unk_50[0])) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v2->unk_28 = 14; - } else if (sub_02022798()) { + } else if (TouchScreen_Tapped()) { sub_02005748(1500); v2->unk_28 = 14; } diff --git a/src/overlay016/ov16_0225CBB8.c b/src/overlay016/ov16_0225CBB8.c index 62061e5895..69007e8ef4 100644 --- a/src/overlay016/ov16_0225CBB8.c +++ b/src/overlay016/ov16_0225CBB8.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "assert.h" #include "struct_decls/struct_02002F38_decl.h" @@ -3078,7 +3078,7 @@ static void ov16_022604C8 (UnkStruct_0201CD38 * param0, void * param1) v0->unk_0A = 5; break; case 5: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_START) { + if (coresys.padInput & PAD_BUTTON_START) { BattlerData * v14; int v15; diff --git a/src/overlay016/ov16_0226485C.c b/src/overlay016/ov16_0226485C.c index e22107cdd5..2be9d56cfd 100644 --- a/src/overlay016/ov16_0226485C.c +++ b/src/overlay016/ov16_0226485C.c @@ -101,8 +101,8 @@ void BattleIO_FlickerBattler(BattleSystem * param0, int param1, u32 param2); void BattleIO_UpdateHPGauge(BattleSystem * param0, BattleContext * param1, int param2); void ov16_02265D14(BattleSystem * param0, BattleContext * param1, int param2, int param3); void BattleIO_PlayFaintingSequence(BattleSystem * param0, BattleContext * param1, int param2); -void ov16_02265EAC(BattleSystem * param0, BattleContext * param1, int param2, int param3); -void ov16_02265ECC(BattleSystem * param0, BattleContext * param1); +void BattleIO_PlaySound(BattleSystem * param0, BattleContext * param1, int param2, int param3); +void BattleIO_FadeOut(BattleSystem * param0, BattleContext * param1); void ov16_02265EE8(BattleSystem * param0, int param1, int param2); void ov16_02265FB8(BattleSystem * param0, int param1, int param2); void ov16_02265FD8(BattleSystem * param0, int param1, int param2); @@ -1071,7 +1071,7 @@ void BattleIO_PlayFaintingSequence (BattleSystem * param0, BattleContext * param ov16_02264A04(param0, 1, param2, &v0, sizeof(UnkStruct_ov16_0225C384)); } -void ov16_02265EAC (BattleSystem * param0, BattleContext * param1, int param2, int param3) +void BattleIO_PlaySound (BattleSystem * param0, BattleContext * param1, int param2, int param3) { UnkStruct_ov16_0225C398 v0; @@ -1081,7 +1081,7 @@ void ov16_02265EAC (BattleSystem * param0, BattleContext * param1, int param2, i ov16_02264A04(param0, 1, param3, &v0, sizeof(UnkStruct_ov16_0225C398)); } -void ov16_02265ECC (BattleSystem * param0, BattleContext * param1) +void BattleIO_FadeOut (BattleSystem * param0, BattleContext * param1) { int v0 = 28; diff --git a/src/overlay016/ov16_0226871C.c b/src/overlay016/ov16_0226871C.c index a2f6145d5c..f668c144b4 100644 --- a/src/overlay016/ov16_0226871C.c +++ b/src/overlay016/ov16_0226871C.c @@ -3,7 +3,7 @@ #include "inlines.h" #include "assert.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "enums.h" #include "struct_decls/struct_02002F38_decl.h" @@ -3768,7 +3768,7 @@ static void ov16_0226BD74 (UnkStruct_0201CD38 * param0, void * param1) v2 = sub_0200316C(v1, 1); v3 = (16 - 8) * 2; - if (Unk_021BF67C.unk_62 && ((v4 == 1) || (v5 == 1))) { + if (coresys.unk_62 && ((v4 == 1) || (v5 == 1))) { if (memcmp(&v2[8], &v0->unk_5C[8], v3) == 0) { if (BattleSystem_BattleType(v0->unk_00) & 0x80) { MI_CpuCopy16(&v0->unk_60[0], &v2[0], 0x20); @@ -3802,7 +3802,7 @@ static int ov16_0226BE48 (UnkStruct_ov16_02268A14 * param0) } if (v0->unk_00 == 0) { - if ((param0->unk_6C0 == 1) || (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_KEY_RIGHT | PAD_KEY_LEFT | PAD_KEY_UP | PAD_KEY_DOWN))) { + if ((param0->unk_6C0 == 1) || (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_KEY_RIGHT | PAD_KEY_LEFT | PAD_KEY_UP | PAD_KEY_DOWN))) { if (param0->unk_6C0 == 0) { sub_02005748(1500); } @@ -3847,18 +3847,18 @@ static int ov16_0226BEC0 (UnkStruct_ov16_02268A14 * param0, int param1) default: v4 = Unk_ov16_022701EC[v0->unk_01][v0->unk_02]; - if ((v4 == 3) && (Unk_021BF67C.unk_48 & PAD_KEY_UP)) { + if ((v4 == 3) && (coresys.padInput & PAD_KEY_UP)) { (void)0; } else { v1 = ov16_0226CB10(v0, 3, 2, Unk_ov16_022701EC[0]); if ((v1 == 0) && (v4 == 0)) { - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { v0->unk_02 = 0; v0->unk_01 = 1; sub_02005748(1500); v1 = PAD_KEY_LEFT; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v0->unk_02 = 2; v0->unk_01 = 1; sub_02005748(1500); @@ -4369,7 +4369,7 @@ static u32 ov16_0226CB10 (UnkStruct_ov16_0226CB10 * param0, int param1, int para v1 = param0->unk_02; v0 = param0->unk_01; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_01--; if (param0->unk_01 < 0) { @@ -4388,7 +4388,7 @@ static u32 ov16_0226CB10 (UnkStruct_ov16_0226CB10 * param0, int param1, int para } v2 = PAD_KEY_UP; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_01++; if (param0->unk_01 >= param2) { @@ -4407,7 +4407,7 @@ static u32 ov16_0226CB10 (UnkStruct_ov16_0226CB10 * param0, int param1, int para } v2 = PAD_KEY_DOWN; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { param0->unk_02--; if (param0->unk_02 < 0) { @@ -4426,7 +4426,7 @@ static u32 ov16_0226CB10 (UnkStruct_ov16_0226CB10 * param0, int param1, int para } v2 = PAD_KEY_LEFT; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { param0->unk_02++; if (param0->unk_02 >= param1) { @@ -4445,9 +4445,9 @@ static u32 ov16_0226CB10 (UnkStruct_ov16_0226CB10 * param0, int param1, int para } v2 = PAD_KEY_RIGHT; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { v2 = PAD_BUTTON_A; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v2 = PAD_BUTTON_B; } else { return 0; diff --git a/src/overlay017/ov17_0223F7E4.c b/src/overlay017/ov17_0223F7E4.c index 5a2910fc00..2654ee88a2 100644 --- a/src/overlay017/ov17_0223F7E4.c +++ b/src/overlay017/ov17_0223F7E4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "assert.h" #include "struct_decls/struct_02002F38_decl.h" @@ -1541,7 +1541,7 @@ static int ov17_02240C90 (UnkStruct_ov17_0223F7E4 * param0) } if (v0->unk_00 == 0) { - if ((param0->unk_304 == 1) || (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_KEY_RIGHT | PAD_KEY_LEFT | PAD_KEY_UP | PAD_KEY_DOWN))) { + if ((param0->unk_304 == 1) || (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y | PAD_KEY_RIGHT | PAD_KEY_LEFT | PAD_KEY_UP | PAD_KEY_DOWN))) { if (param0->unk_304 == 0) { sub_02005748(1500); } @@ -1702,7 +1702,7 @@ static u32 ov17_02241004 (UnkStruct_ov17_02241004 * param0, int param1, int para v1 = param0->unk_02; v0 = param0->unk_01; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_01--; if (param0->unk_01 < 0) { @@ -1721,7 +1721,7 @@ static u32 ov17_02241004 (UnkStruct_ov17_02241004 * param0, int param1, int para } v2 = PAD_KEY_UP; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_01++; if (param0->unk_01 >= param2) { @@ -1740,7 +1740,7 @@ static u32 ov17_02241004 (UnkStruct_ov17_02241004 * param0, int param1, int para } v2 = PAD_KEY_DOWN; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { param0->unk_02--; if (param0->unk_02 < 0) { @@ -1759,7 +1759,7 @@ static u32 ov17_02241004 (UnkStruct_ov17_02241004 * param0, int param1, int para } v2 = PAD_KEY_LEFT; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { param0->unk_02++; if (param0->unk_02 >= param1) { @@ -1778,9 +1778,9 @@ static u32 ov17_02241004 (UnkStruct_ov17_02241004 * param0, int param1, int para } v2 = PAD_KEY_RIGHT; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { v2 = PAD_BUTTON_A; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v2 = PAD_BUTTON_B; } else { return 0; diff --git a/src/overlay017/ov17_02247A48.c b/src/overlay017/ov17_02247A48.c index 4af4a56425..3523402dd8 100644 --- a/src/overlay017/ov17_02247A48.c +++ b/src/overlay017/ov17_02247A48.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "assert.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -1332,7 +1332,7 @@ static void ov17_02249014 (UnkStruct_0201CD38 * param0, void * param1) v0->unk_15 = 1; } - if ((v0->unk_00->unk_00->unk_155 == 0) && (v0->unk_18 < 30) && ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_60))) { + if ((v0->unk_00->unk_00->unk_155 == 0) && (v0->unk_18 < 30) && ((coresys.padInput & PAD_BUTTON_A) || (coresys.touchInput))) { v0->unk_18 = 30; v1 = 0; v0->unk_13 = 0; diff --git a/src/overlay017/ov17_022492DC.c b/src/overlay017/ov17_022492DC.c index fe0506a5c0..fcf69fd963 100644 --- a/src/overlay017/ov17_022492DC.c +++ b/src/overlay017/ov17_022492DC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -485,13 +485,13 @@ int ov17_02249760 (UnkStruct_ov17_022492DC * param0) if (v1 == 0xffffffff) { if (v3->unk_18 == Unk_ov17_02254554) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_KEY_RIGHT)) { v1 = 3; - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_KEY_DOWN)) { + } else if (coresys.padInput & (PAD_BUTTON_B | PAD_KEY_DOWN)) { v1 = 1; - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_X | PAD_KEY_UP)) { + } else if (coresys.padInput & (PAD_BUTTON_X | PAD_KEY_UP)) { v1 = 0; - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_Y | PAD_KEY_LEFT)) { + } else if (coresys.padInput & (PAD_BUTTON_Y | PAD_KEY_LEFT)) { v1 = 2; } } diff --git a/src/overlay019/ov19_021D0D80.c b/src/overlay019/ov19_021D0D80.c index 79f79eb36d..fde13fcfe7 100644 --- a/src/overlay019/ov19_021D0D80.c +++ b/src/overlay019/ov19_021D0D80.c @@ -4,7 +4,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -309,7 +309,7 @@ int ov19_021D0DEC (UnkStruct_020067E8 * param0, int * param1) return 0; } else { if (v0->unk_1A8 != NULL) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_Y) { + if (coresys.padInput & PAD_BUTTON_Y) { if (ov19_021D6628(v0->unk_114) == 1) { ov19_021D5DD8(&v0->unk_00); ov19_021D6594(v0->unk_114, 43); @@ -485,7 +485,7 @@ static int ov19_021D0FF0 (UnkStruct_ov19_021D5DF8 * param0) { switch (param0->unk_1B0) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov19_021D5E4C(¶m0->unk_00)) { if (ov19_021D5E08(¶m0->unk_00) != 3) { ov19_021D0EB0(param0, ov19_021D20A4); @@ -496,24 +496,24 @@ static int ov19_021D0FF0 (UnkStruct_ov19_021D5DF8 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov19_021D0EB0(param0, ov19_021D1F5C); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_L) { + if (coresys.unk_44 & PAD_BUTTON_L) { ov19_021D5CE8(¶m0->unk_00); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_R) { + if (coresys.unk_44 & PAD_BUTTON_R) { ov19_021D5CBC(&(param0->unk_00)); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (ov19_021D4F74(Unk_021BF67C.unk_44, param0)) { + if (ov19_021D4F74(coresys.unk_44, param0)) { ov19_021D6594(param0->unk_114, 5); if (ov19_021D5E38(¶m0->unk_00) == 1) { @@ -562,7 +562,7 @@ static int ov19_021D1270 (UnkStruct_ov19_021D5DF8 * param0) { switch (param0->unk_1B0) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov19_021D5E2C(¶m0->unk_00) == 6) { param0->unk_1B0 = 2; break; @@ -579,12 +579,12 @@ static int ov19_021D1270 (UnkStruct_ov19_021D5DF8 * param0) break; } - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || ((Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) && (ov19_021D5E2C(¶m0->unk_00) & 1)) || ((Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) && (ov19_021D5E2C(¶m0->unk_00) == 6))) { + if ((coresys.padInput & PAD_BUTTON_B) || ((coresys.padInput & PAD_KEY_RIGHT) && (ov19_021D5E2C(¶m0->unk_00) & 1)) || ((coresys.padInput & PAD_KEY_RIGHT) && (ov19_021D5E2C(¶m0->unk_00) == 6))) { param0->unk_1B0 = 2; break; } - if (ov19_021D4F74(Unk_021BF67C.unk_44, param0)) { + if (ov19_021D4F74(coresys.unk_44, param0)) { ov19_021D6594(param0->unk_114, 5); if (ov19_021D5E38(¶m0->unk_00) == 1) { @@ -645,7 +645,7 @@ static int ov19_021D1270 (UnkStruct_ov19_021D5DF8 * param0) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); param0->unk_1B0 = 0; } @@ -664,29 +664,29 @@ static int ov19_021D15C0 (UnkStruct_ov19_021D5DF8 * param0) { switch (param0->unk_1B0) { case 0: - if (Unk_021BF67C.unk_44 & (PAD_KEY_LEFT | PAD_BUTTON_L)) { + if (coresys.unk_44 & (PAD_KEY_LEFT | PAD_BUTTON_L)) { ov19_021D5CE8(¶m0->unk_00); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (Unk_021BF67C.unk_44 & (PAD_KEY_RIGHT | PAD_BUTTON_R)) { + if (coresys.unk_44 & (PAD_KEY_RIGHT | PAD_BUTTON_R)) { ov19_021D5CBC(&(param0->unk_00)); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov19_021D0EB0(param0, ov19_021D2694); break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov19_021D0EB0(param0, ov19_021D1F5C); break; } - if (ov19_021D4F74(Unk_021BF67C.unk_44, param0)) { + if (ov19_021D4F74(coresys.unk_44, param0)) { ov19_021D6594(param0->unk_114, 5); if (ov19_021D5E38(¶m0->unk_00) == 1) { @@ -713,29 +713,29 @@ static int ov19_021D17AC (UnkStruct_ov19_021D5DF8 * param0) { switch (param0->unk_1B0) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov19_021D0EB0(param0, ov19_021D1DEC); break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov19_021D0EB0(param0, ov19_021D1F5C); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_L) { + if (coresys.unk_44 & PAD_BUTTON_L) { ov19_021D5CE8(¶m0->unk_00); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_R) { + if (coresys.unk_44 & PAD_BUTTON_R) { ov19_021D5CBC(&(param0->unk_00)); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (ov19_021D4F74(Unk_021BF67C.unk_44, param0)) { + if (ov19_021D4F74(coresys.unk_44, param0)) { ov19_021D6594(param0->unk_114, 5); if (ov19_021D5E38(¶m0->unk_00) == 1) { @@ -767,7 +767,7 @@ static int ov19_021D19B8 (UnkStruct_ov19_021D5DF8 * param0) { switch (param0->unk_1B0) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov19_021D5E08(¶m0->unk_00) != 1) { ov19_021D6594(param0->unk_114, 34); param0->unk_1B0 = 1; @@ -780,24 +780,24 @@ static int ov19_021D19B8 (UnkStruct_ov19_021D5DF8 * param0) break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov19_021D0EB0(param0, ov19_021D1F5C); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_L) { + if (coresys.unk_44 & PAD_BUTTON_L) { ov19_021D5CE8(¶m0->unk_00); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_R) { + if (coresys.unk_44 & PAD_BUTTON_R) { ov19_021D5CBC(&(param0->unk_00)); ov19_021D0EB0(param0, ov19_021D45A8); break; } - if (ov19_021D4F74(Unk_021BF67C.unk_44, param0)) { + if (ov19_021D4F74(coresys.unk_44, param0)) { ov19_021D6594(param0->unk_114, 5); if (ov19_021D5E38(¶m0->unk_00) == 1) { @@ -840,7 +840,7 @@ static int ov19_021D19B8 (UnkStruct_ov19_021D5DF8 * param0) } break; case 5: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); param0->unk_1B0 = 0; } @@ -961,7 +961,7 @@ static void ov19_021D1DEC (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } (*param1) = 5; case 5: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 6; } @@ -1017,7 +1017,7 @@ static void ov19_021D1F5C (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } (*param1) = 3; case 3: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 4; } @@ -1282,7 +1282,7 @@ static void ov19_021D2308 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } break; case 7: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 6; } @@ -1554,7 +1554,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) dcd 0x21e00dc dcd 0x1ea0232 _021D2B7A: - ldr r1, = Unk_021BF67C + ldr r1, = coresys ldr r2, [r1, #0x44] mov r1, #1 tst r1, r2 @@ -1576,7 +1576,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) bl ov19_021D0EB0 pop {r3, r4, r5, pc} _021D2BAA: - ldr r1, = Unk_021BF67C + ldr r1, = coresys ldr r2, [r1, #0x44] mov r1, #1 tst r1, r2 @@ -1588,7 +1588,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) beq _021D2BDC cmp r0, #2 bne _021D2CAE - ldr r1, = Unk_021BF67C + ldr r1, = coresys mov r0, #0xf0 ldr r2, [r1, #0x44] ldr r1, [r1, #0x48] @@ -1655,7 +1655,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) bl ov19_021D6628 cmp r0, #0 beq _021D2CAE - ldr r0, = Unk_021BF67C + ldr r0, = coresys add r1, r4, #0 ldr r0, [r0, #0x44] bl ov19_021D5150 @@ -1672,7 +1672,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) dcd 0x80020 dcd 0x700046 _021D2C7E: - ldr r1, = Unk_021BF67C + ldr r1, = coresys mov r0, #0xf0 ldr r2, [r1, #0x44] ldr r1, [r1, #0x48] @@ -1739,7 +1739,7 @@ asm static void ov19_021D2B54 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) str r0, [r5, #0] pop {r3, r4, r5, pc} _021D2D10: - ldr r0, = Unk_021BF67C + ldr r0, = coresys ldr r1, [r0, #0x48] mov r0, #1 tst r0, r1 @@ -1872,7 +1872,7 @@ static void ov19_021D2E1C (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } break; case 2: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 3; } @@ -1969,7 +1969,7 @@ static void ov19_021D3010 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 2; } @@ -2046,7 +2046,7 @@ static void ov19_021D30D0 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 8; } @@ -2128,7 +2128,7 @@ static void ov19_021D3294 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D4458(param0); (*param1) = 1; } @@ -2138,7 +2138,7 @@ static void ov19_021D3294 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 6; } @@ -2318,7 +2318,7 @@ static void ov19_021D35F8 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D5408(¶m0->unk_00, 4); ov19_021D6594(param0->unk_114, 24); (*param1) = 6; @@ -2329,7 +2329,7 @@ static void ov19_021D35F8 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D5408(¶m0->unk_00, 33); ov19_021D6594(param0->unk_114, 24); (*param1) = 6; @@ -2340,7 +2340,7 @@ static void ov19_021D35F8 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 7; } @@ -2364,7 +2364,7 @@ static void ov19_021D35F8 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov19_021D6594(param0->unk_114, 26); (*param1) = 9; } @@ -2680,7 +2680,7 @@ static void ov19_021D3D44 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; case 5: if (ov19_021D6600(param0->unk_114, 24)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov19_021D6594(param0->unk_114, 26); (*param1)++; @@ -2757,7 +2757,7 @@ static void ov19_021D3FB0 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; case 4: if (ov19_021D6600(param0->unk_114, 24)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov19_021D6594(param0->unk_114, 26); (*param1) = 5; @@ -2846,7 +2846,7 @@ static void ov19_021D4184 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) break; case 5: if (ov19_021D6600(param0->unk_114, 24)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov19_021D6594(param0->unk_114, 26); (*param1) = 6; @@ -2880,7 +2880,7 @@ static void ov19_021D4390 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } break; case 3: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_PLUS_KEY_MASK)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_PLUS_KEY_MASK)) { ov19_021D6594(param0->unk_114, 18); (*param1)++; } @@ -2944,7 +2944,7 @@ static BOOL ov19_021D4468 (UnkStruct_ov19_021D5DF8 * param0) break; } - if (Unk_021BF67C.unk_48 & (PAD_KEY_LEFT | PAD_BUTTON_L)) { + if (coresys.padInput & (PAD_KEY_LEFT | PAD_BUTTON_L)) { v0->unk_05--; if (v0->unk_05 < 0) { @@ -2956,7 +2956,7 @@ static BOOL ov19_021D4468 (UnkStruct_ov19_021D5DF8 * param0) break; } - if (Unk_021BF67C.unk_48 & (PAD_KEY_RIGHT | PAD_BUTTON_R)) { + if (coresys.padInput & (PAD_KEY_RIGHT | PAD_BUTTON_R)) { if (++(v0->unk_05) >= 18) { v0->unk_05 = 0; } @@ -2966,12 +2966,12 @@ static BOOL ov19_021D4468 (UnkStruct_ov19_021D5DF8 * param0) break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1501); return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); v0->unk_05 = -1; return 1; @@ -3038,7 +3038,7 @@ static void ov19_021D4640 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } } - if (Unk_021BF67C.unk_48 & (PAD_PLUS_KEY_MASK | PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_PLUS_KEY_MASK | PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov19_021D5D94(&(param0->unk_00), 0); ov19_021D5D9C(&(param0->unk_00), ov19_021D5E68(¶m0->unk_00)); @@ -3184,7 +3184,7 @@ static void ov19_021D4938 (UnkStruct_ov19_021D5DF8 * param0, u32 * param1) } } - if (Unk_021BF67C.unk_48 & (PAD_PLUS_KEY_MASK | PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_PLUS_KEY_MASK | PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov19_021D5D94(¶m0->unk_00, 0); ov19_021D6594(param0->unk_114, 40); diff --git a/src/overlay019/ov19_021DF964.c b/src/overlay019/ov19_021DF964.c index c97e74bf49..4e8bdd838f 100644 --- a/src/overlay019/ov19_021DF964.c +++ b/src/overlay019/ov19_021DF964.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020797DC_decl.h" @@ -255,7 +255,7 @@ int ov19_021DFD2C (UnkStruct_ov19_021D4DF0 * param0) { UnkStruct_ov19_021DF964 * v0 = &(param0->unk_74); - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (v0->unk_20) { v0->unk_20--; return -2; @@ -265,7 +265,7 @@ int ov19_021DFD2C (UnkStruct_ov19_021D4DF0 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (v0->unk_20 < (v0->unk_21 - 1)) { v0->unk_20++; return -2; @@ -275,12 +275,12 @@ int ov19_021DFD2C (UnkStruct_ov19_021D4DF0 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); return -1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1501); return v0->unk_00[v0->unk_20]; } diff --git a/src/overlay020/ov20_021D0D80.c b/src/overlay020/ov20_021D0D80.c index 7c1ece450a..1c1ef916d1 100644 --- a/src/overlay020/ov20_021D0D80.c +++ b/src/overlay020/ov20_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "strbuf.h" @@ -155,9 +155,9 @@ int ov20_021D0DF8 (UnkStruct_020067E8 * param0, int * param1) { UnkStruct_ov20_021D16E8 * v0 = sub_0200682C(param0); - v0->unk_30 = Unk_021BF67C.unk_48; - v0->unk_32 = Unk_021BF67C.unk_44; - v0->unk_34 = Unk_021BF67C.unk_4C; + v0->unk_30 = coresys.padInput; + v0->unk_32 = coresys.unk_44; + v0->unk_34 = coresys.unk_4C; sub_0202404C(v0->unk_40); diff --git a/src/overlay021/ov21_021D3208.c b/src/overlay021/ov21_021D3208.c index 8de3923b19..77cd159835 100644 --- a/src/overlay021/ov21_021D3208.c +++ b/src/overlay021/ov21_021D3208.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "struct_decls/struct_02026324_decl.h" @@ -584,12 +584,12 @@ BOOL ov21_021D3954 (const UnkStruct_ov21_021D3320 * param0) void ov21_021D3960 (UnkStruct_ov21_021D3320 * param0) { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { param0->unk_1758 = 0; return; } - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { if (param0->unk_1758 == 0) { param0->unk_1758 = 1; } else { diff --git a/src/overlay021/ov21_021D5AEC.c b/src/overlay021/ov21_021D5AEC.c index 7cc1904fec..0e52404e6a 100644 --- a/src/overlay021/ov21_021D5AEC.c +++ b/src/overlay021/ov21_021D5AEC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02007C7C_decl.h" @@ -538,7 +538,7 @@ static void ov21_021D5FC4 (UnkStruct_ov21_021D5B68 * param0) static void ov21_021D5FD4 (UnkStruct_ov21_021D5B68 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_04->unk_1740 == 0) { param0->unk_28 = 1; } else { @@ -548,17 +548,17 @@ static void ov21_021D5FD4 (UnkStruct_ov21_021D5B68 * param0) return; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { param0->unk_2C = 1; return; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { param0->unk_34 = 1; return; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { param0->unk_30 = 1; return; } @@ -1766,7 +1766,7 @@ static void ov21_021D7590 (UnkStruct_ov21_021D7464 * param0, UnkStruct_ov21_021D static void ov21_021D75DC (UnkStruct_ov21_021D7464 * param0, UnkStruct_ov21_021D5B68 * param1) { - if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + if (coresys.unk_44 & PAD_KEY_UP) { if (ov21_021D6108(param1, -1)) { ov21_021D60FC(param1, param0, 2); param1->unk_20 = 1; @@ -1779,7 +1779,7 @@ static void ov21_021D75DC (UnkStruct_ov21_021D7464 * param0, UnkStruct_ov21_021D return; } - if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + if (coresys.unk_44 & PAD_KEY_DOWN) { if (ov21_021D6108(param1, 1)) { ov21_021D60FC(param1, param0, 1); param1->unk_20 = 1; @@ -1792,7 +1792,7 @@ static void ov21_021D75DC (UnkStruct_ov21_021D7464 * param0, UnkStruct_ov21_021D return; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { param0->unk_14 = 1; param0->unk_18 = 5; param0->unk_1C = -1; @@ -1801,7 +1801,7 @@ static void ov21_021D75DC (UnkStruct_ov21_021D7464 * param0, UnkStruct_ov21_021D return; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { param0->unk_14 = 1; param0->unk_18 = 5; param0->unk_1C = 1; diff --git a/src/overlay021/ov21_021D76B0.c b/src/overlay021/ov21_021D76B0.c index d10ac1e816..99eadac4e7 100644 --- a/src/overlay021/ov21_021D76B0.c +++ b/src/overlay021/ov21_021D76B0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -459,8 +459,8 @@ static void ov21_021D7B8C (u32 param0, u32 param1, void * param2) switch (param1) { case 0: - v2->unk_14 = Unk_021BF67C.unk_5C; - v2->unk_18 = Unk_021BF67C.unk_5E; + v2->unk_14 = coresys.unk_5C; + v2->unk_18 = coresys.unk_5E; break; case 2: switch (param0) { @@ -504,8 +504,8 @@ static void ov21_021D7B8C (u32 param0, u32 param1, void * param2) } } - v2->unk_14 = Unk_021BF67C.unk_5C; - v2->unk_18 = Unk_021BF67C.unk_5E; + v2->unk_14 = coresys.unk_5C; + v2->unk_18 = coresys.unk_5E; } v2->unk_20 = 1; @@ -835,8 +835,8 @@ static void ov21_021D8324 (UnkStruct_ov21_021D7A64 * param0) v1 = param0->unk_14 - (128 + 120); v0 = param0->unk_18 - (104 + -0); - v3 = Unk_021BF67C.unk_5C - (128 + 120); - v2 = Unk_021BF67C.unk_5E - (104 + -0); + v3 = coresys.unk_5C - (128 + 120); + v2 = coresys.unk_5E - (104 + -0); param0->unk_0C = sub_0201D4CC(v1, v0, v3, v2, 524); param0->unk_0C *= 10; diff --git a/src/overlay021/ov21_021D94BC.c b/src/overlay021/ov21_021D94BC.c index 27a8267343..d18e0d753f 100644 --- a/src/overlay021/ov21_021D94BC.c +++ b/src/overlay021/ov21_021D94BC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -1389,7 +1389,7 @@ static void ov21_021DA534 (UnkStruct_ov21_021D4FE4 * param0, int param1) static void ov21_021DA5A8 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 1: @@ -1427,7 +1427,7 @@ static void ov21_021DA5A8 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D param0->unk_8C = 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { param0->unk_80 = 0; param0->unk_2C[param0->unk_80] = 2; } @@ -1508,7 +1508,7 @@ static void ov21_021DA6B0 (UnkStruct_ov21_021D9B24 * param0, int param1) static void ov21_021DA7B0 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 8: @@ -1619,7 +1619,7 @@ static void ov21_021DA888 (UnkStruct_ov21_021D9B24 * param0, int param1) static void ov21_021DA988 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 6: @@ -1766,7 +1766,7 @@ static void ov21_021DAAD4 (UnkStruct_ov21_021D9B24 * param0, int param1) static void ov21_021DAC08 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 6: @@ -1932,7 +1932,7 @@ static void ov21_021DAD74 (UnkStruct_ov21_021D9B24 * param0, int param1) static void ov21_021DAED8 (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 6: @@ -2060,7 +2060,7 @@ static void ov21_021DB02C (UnkStruct_ov21_021D9B24 * param0, int param1) static void ov21_021DB12C (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { if (param0->unk_8C == 0) { switch (ov21_021D4F7C(param0->unk_18)) { case 6: @@ -2134,22 +2134,22 @@ static void ov21_021DB12C (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D static void ov21_021DB2FC (UnkStruct_ov21_021D9B24 * param0, UnkStruct_ov21_021D95B8 * param1) { - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { ov21_021D4F20(param0->unk_18, 0, 1); param0->unk_8C = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov21_021D4F20(param0->unk_18, 0, -1); param0->unk_8C = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { ov21_021D4F20(param0->unk_18, 1, -1); param0->unk_8C = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { ov21_021D4F20(param0->unk_18, 1, 1); param0->unk_8C = 1; } diff --git a/src/overlay021/ov21_021DDD2C.c b/src/overlay021/ov21_021DDD2C.c index 4abb7b9410..bfc55646ae 100644 --- a/src/overlay021/ov21_021DDD2C.c +++ b/src/overlay021/ov21_021DDD2C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -483,14 +483,14 @@ static void ov21_021DE358 (UnkStruct_ov21_021DDE4C * param0, UnkStruct_ov21_021D { s32 v0; - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { return; } if ((ov21_021E33BC(param1->unk_08) == 1) && (ov21_021D3998(param1->unk_04) == 2)) { v0 = ov21_021DCA28(param1->unk_00); - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { v0--; if (v0 < 0) { @@ -500,7 +500,7 @@ static void ov21_021DE358 (UnkStruct_ov21_021DDE4C * param0, UnkStruct_ov21_021D ov21_021DCA30(param1->unk_00, v0); ov21_021DE5A4(param0, param1); param0->unk_24 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v0++; if (v0 >= 3) { @@ -522,9 +522,9 @@ static void ov21_021DE3D0 (UnkStruct_ov21_021DDE4C * param0, UnkStruct_ov21_021D param0->unk_24 = 0; if (param0->unk_20) { - if (Unk_021BF67C.unk_62) { - param0->unk_00 = Unk_021BF67C.unk_5C - param0->unk_08; - param0->unk_04 = Unk_021BF67C.unk_5E - param0->unk_0C; + if (coresys.unk_62) { + param0->unk_00 = coresys.unk_5C - param0->unk_08; + param0->unk_04 = coresys.unk_5E - param0->unk_0C; if (param0->unk_00 < 24) { param0->unk_00 = 24; @@ -571,8 +571,8 @@ static void ov21_021DE44C (u32 param0, u32 param1, void * param2) sub_02005748(1501); v2->unk_20 = 1; - v2->unk_08 = Unk_021BF67C.unk_5C - v2->unk_00; - v2->unk_0C = Unk_021BF67C.unk_5E - v2->unk_04; + v2->unk_08 = coresys.unk_5C - v2->unk_00; + v2->unk_0C = coresys.unk_5E - v2->unk_04; break; default: break; diff --git a/src/overlay021/ov21_021E1924.c b/src/overlay021/ov21_021E1924.c index 9e76c43145..0dc40d0c01 100644 --- a/src/overlay021/ov21_021E1924.c +++ b/src/overlay021/ov21_021E1924.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -1072,12 +1072,12 @@ static void ov21_021E2864 (UnkStruct_ov21_021E1E74 * param0, UnkStruct_ov21_021E static void ov21_021E28A8 (UnkStruct_ov21_021E1E74 * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_34 = 1; return; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_34 = 0; return; } diff --git a/src/overlay021/ov21_021E29DC.c b/src/overlay021/ov21_021E29DC.c index b1bbc9402d..d4ae968d62 100644 --- a/src/overlay021/ov21_021E29DC.c +++ b/src/overlay021/ov21_021E29DC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -1384,7 +1384,7 @@ static void ov21_021E3C34 (UnkStruct_ov21_021E342C * param0) ov21_021E3C64(param0); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov21_021E2E00(v0); param0->unk_2C = 1; sub_02005748(1501); @@ -1429,15 +1429,15 @@ static void ov21_021E3D48 (UnkStruct_ov21_021E37B4 * param0, UnkStruct_ov21_021E return; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { ov21_021D4F20(param0->unk_14, 0, 1); } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov21_021D4F20(param0->unk_14, 0, -1); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { switch (ov21_021D4F7C(param0->unk_14)) { case 0: if (v0->unk_08 != 0) { @@ -1542,11 +1542,11 @@ static void ov21_021E3EEC (UnkStruct_ov21_021E37B4 * param0, UnkStruct_ov21_021E } if ((param1->unk_30 == 0)) { - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { param1->unk_30 = 1; } } else { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param1->unk_30 = 0; } } diff --git a/src/overlay021/ov21_021E4CA4.c b/src/overlay021/ov21_021E4CA4.c index fb6221c260..7342fd6efd 100644 --- a/src/overlay021/ov21_021E4CA4.c +++ b/src/overlay021/ov21_021E4CA4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -631,7 +631,7 @@ static void ov21_021E530C (u32 param0, UnkStruct_ov21_021E4D90 * param1, UnkStru ov21_021E5E18(param2); } - param2->unk_38 = Unk_021BF67C.unk_5C; + param2->unk_38 = coresys.unk_5C; param2->unk_30 = 1; break; case 1: @@ -640,8 +640,8 @@ static void ov21_021E530C (u32 param0, UnkStruct_ov21_021E4D90 * param1, UnkStru } param2->unk_4C = 1; - param2->unk_54 = Unk_021BF67C.unk_5C; - param2->unk_58 = Unk_021BF67C.unk_5E; + param2->unk_54 = coresys.unk_5C; + param2->unk_58 = coresys.unk_5E; break; case 2: if (param2->unk_2C) { @@ -663,18 +663,18 @@ static void ov21_021E537C (u32 param0, UnkStruct_ov21_021E4D90 * param1, UnkStru switch (param0) { case 0: if (param2->unk_30 == 1) { - v0 = Unk_021BF67C.unk_5C - param2->unk_38; + v0 = coresys.unk_5C - param2->unk_38; if (param2->unk_34 == 0) { if (12 <= v0) { param2->unk_34 = 1; - param2->unk_38 = Unk_021BF67C.unk_5C; + param2->unk_38 = coresys.unk_5C; sub_02005748(1527); } } else { if (-12 >= v0) { param2->unk_34 = 0; - param2->unk_38 = Unk_021BF67C.unk_5C; + param2->unk_38 = coresys.unk_5C; sub_02005748(1527); } } @@ -686,8 +686,8 @@ static void ov21_021E537C (u32 param0, UnkStruct_ov21_021E4D90 * param1, UnkStru ov21_021E5AAC(param2); ov21_021E5AD8(param2); - param2->unk_54 = Unk_021BF67C.unk_5C; - param2->unk_58 = Unk_021BF67C.unk_5E; + param2->unk_54 = coresys.unk_5C; + param2->unk_58 = coresys.unk_5E; } break; case 2: @@ -696,11 +696,11 @@ static void ov21_021E537C (u32 param0, UnkStruct_ov21_021E4D90 * param1, UnkStru param2->unk_20 = 1; ov21_021E5ED8(param2, 0); } else { - if (Unk_021BF67C.unk_5E < (99 - -16) + 16) { + if (coresys.unk_5E < (99 - -16) + 16) { if (param2->unk_34 == 0) { - ov21_021E5BE4(param2, Unk_021BF67C.unk_5C); + ov21_021E5BE4(param2, coresys.unk_5C); } else { - ov21_021E5C18(param2, Unk_021BF67C.unk_5C); + ov21_021E5C18(param2, coresys.unk_5C); } param2->unk_3C = 0; @@ -1022,8 +1022,8 @@ static void ov21_021E5A44 (UnkStruct_ov21_021E51DC * param0) v1 = param0->unk_54 - 51; v0 = param0->unk_58 - 157; - v3 = Unk_021BF67C.unk_5C - 51; - v2 = Unk_021BF67C.unk_5E - 157; + v3 = coresys.unk_5C - 51; + v2 = coresys.unk_5E - 157; v4 = sub_0201D4CC(v1, v0, v3, v2, 0); if (MATH_IAbs(v4) < 1) { @@ -1383,7 +1383,7 @@ static void ov21_021E5F5C (UnkStruct_ov21_021E51DC * param0, UnkStruct_ov21_021E { int v0 = ov21_021D37BC(param1->unk_04); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { param0->unk_28 = 1; param0->unk_18[0] = 0; diff --git a/src/overlay021/ov21_021E68F4.c b/src/overlay021/ov21_021E68F4.c index c42df556ef..61c5b48cda 100644 --- a/src/overlay021/ov21_021E68F4.c +++ b/src/overlay021/ov21_021E68F4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -733,7 +733,7 @@ static void ov21_021E728C (UnkStruct_ov21_021E6C60 * param0, UnkStruct_ov21_021E static void ov21_021E72E8 (UnkStruct_ov21_021E6DAC * param0, UnkStruct_ov21_021E6A20 * param1) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param1->unk_04 == 1) { param1->unk_04 = 0; *param1->unk_00 |= (1 << 0); diff --git a/src/overlay021/ov21_021E8484.c b/src/overlay021/ov21_021E8484.c index d18db1eff6..873520e5ad 100644 --- a/src/overlay021/ov21_021E8484.c +++ b/src/overlay021/ov21_021E8484.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -690,7 +690,7 @@ static void ov21_021E8CBC (UnkStruct_ov21_021E8584 * param0, UnkStruct_ov21_021E static void ov21_021E8CF0 (UnkStruct_ov21_021E88B0 * param0, UnkStruct_ov21_021E8570 * param1) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { param0->unk_14 = 1; } } diff --git a/src/overlay022/ov22_02254DE0.c b/src/overlay022/ov22_02254DE0.c index ed6c6456a3..9e1925e3f0 100644 --- a/src/overlay022/ov22_02254DE0.c +++ b/src/overlay022/ov22_02254DE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02015214_decl.h" @@ -75,8 +75,8 @@ BOOL ov22_02254E54 (UnkStruct_ov22_02255040 * param0, int * param1, int * param2 ov22_02254F00(param0, &v1, &v2); - *param1 = Unk_021BF67C.unk_5C - v1; - *param2 = Unk_021BF67C.unk_5E - v2; + *param1 = coresys.unk_5C - v1; + *param2 = coresys.unk_5E - v2; for (v3 = (*param2 - 4); v3 < (*param2 + 4); v3++) { if (v3 >= 0) { diff --git a/src/overlay022/ov22_02255094.c b/src/overlay022/ov22_02255094.c index 51e3fd2493..354bd40bbd 100644 --- a/src/overlay022/ov22_02255094.c +++ b/src/overlay022/ov22_02255094.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -72,14 +72,14 @@ void ov22_02255094 (void) ov22_02255654(); ov22_022556DC(); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); } void ov22_022550B4 (void) { - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); ov22_02255738(); diff --git a/src/overlay022/ov22_02255D44.c b/src/overlay022/ov22_02255D44.c index b292e551d3..e9bb861e9b 100644 --- a/src/overlay022/ov22_02255D44.c +++ b/src/overlay022/ov22_02255D44.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -277,7 +277,7 @@ int ov22_02255E50 (UnkStruct_020067E8 * param0, int * param1) } break; case 5: - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) | (Unk_021BF67C.unk_60)) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) | (coresys.touchInput)) { ov22_0225A628(&v0->unk_5C4, 26, 385, 48); sub_02002B20(0); (*param1)++; diff --git a/src/overlay022/ov22_022588F0.c b/src/overlay022/ov22_022588F0.c index 62429d5b9f..ba28a969d6 100644 --- a/src/overlay022/ov22_022588F0.c +++ b/src/overlay022/ov22_022588F0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "overlay022/struct_ov22_02258A48.h" @@ -20,10 +20,10 @@ void ov22_022588F0 (UnkStruct_ov22_02258A48 * param0) void ov22_0225890C (UnkStruct_ov22_02258A48 * param0) { - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { param0->unk_04(param0); } else { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { param0->unk_0C(param0); } else { if (param0->unk_18) { @@ -32,9 +32,9 @@ void ov22_0225890C (UnkStruct_ov22_02258A48 * param0) } } - param0->unk_14 = Unk_021BF67C.unk_5C; - param0->unk_16 = Unk_021BF67C.unk_5E; - param0->unk_18 = Unk_021BF67C.unk_62; + param0->unk_14 = coresys.unk_5C; + param0->unk_16 = coresys.unk_5E; + param0->unk_18 = coresys.unk_62; } static void ov22_02258948 (UnkStruct_ov22_02258A48 * param0) diff --git a/src/overlay022/ov22_022589E0.c b/src/overlay022/ov22_022589E0.c index 55c2f51011..4a45eb1aca 100644 --- a/src/overlay022/ov22_022589E0.c +++ b/src/overlay022/ov22_022589E0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -275,9 +275,9 @@ static void ov22_02258D4C (UnkStruct_ov22_02258A48 * param0) int v1, v2; if (v0->unk_10 != NULL) { - if ((Unk_021BF67C.unk_5C != 0xffff) && (Unk_021BF67C.unk_5C != 0xffff)) { - v1 = Unk_021BF67C.unk_5C - v0->unk_14; - v2 = Unk_021BF67C.unk_5E - v0->unk_18; + if ((coresys.unk_5C != 0xffff) && (coresys.unk_5C != 0xffff)) { + v1 = coresys.unk_5C - v0->unk_14; + v2 = coresys.unk_5E - v0->unk_18; ov22_022595F8(v0->unk_10, v1, v2); } @@ -312,12 +312,12 @@ static void ov22_02258DAC (UnkStruct_ov22_02258A48 * param0) int v9, v10; if (v0->unk_10 != NULL) { - if ((Unk_021BF67C.unk_5C != 0xffff) && (Unk_021BF67C.unk_5C != 0xffff)) { + if ((coresys.unk_5C != 0xffff) && (coresys.unk_5C != 0xffff)) { ov22_022596B0(v0->unk_10, &v7, &v9, &v8, &v10); ov22_02259698(v0->unk_10, &v1, &v2); - v3 = Unk_021BF67C.unk_5C - v0->unk_14; - v4 = Unk_021BF67C.unk_5E - v0->unk_18; + v3 = coresys.unk_5C - v0->unk_14; + v4 = coresys.unk_5E - v0->unk_18; v5 = v3 + v7; v6 = v4 + v8; diff --git a/src/overlay022/ov22_02259098.c b/src/overlay022/ov22_02259098.c index ca4ff85794..43e4ea71ae 100644 --- a/src/overlay022/ov22_02259098.c +++ b/src/overlay022/ov22_02259098.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02007768_decl.h" #include "pokemon.h" @@ -158,8 +158,8 @@ BOOL ov22_02259278 (UnkStruct_020298D8 * param0, int * param1, int * param2, NNS v3 -= (v1 / 2); v4 -= (v2 / 2); - *param1 = Unk_021BF67C.unk_5C - v3; - *param2 = Unk_021BF67C.unk_5E - v4; + *param1 = coresys.unk_5C - v3; + *param2 = coresys.unk_5E - v4; v0 = ov22_02255420(param3, *param1, *param2, 0); diff --git a/src/overlay022/ov22_0225B660.c b/src/overlay022/ov22_0225B660.c index e6282075f1..5e1caaac0e 100644 --- a/src/overlay022/ov22_0225B660.c +++ b/src/overlay022/ov22_0225B660.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -87,7 +87,7 @@ int ov22_0225B660 (UnkStruct_020067E8 * param0, int * param1) v0->unk_0C = v1->unk_08; ov22_02255094(); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); ov22_022555D4(&v0->unk_14, 14); @@ -143,7 +143,7 @@ int ov22_0225B738 (UnkStruct_020067E8 * param0, int * param1) } break; case 3: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { (*param1)++; } break; diff --git a/src/overlay023/ov23_0223E140.c b/src/overlay023/ov23_0223E140.c index d1fc176e3c..cc4df7ee3f 100644 --- a/src/overlay023/ov23_0223E140.c +++ b/src/overlay023/ov23_0223E140.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -1504,7 +1504,7 @@ static void ov23_0223F118 (UnkStruct_0201CD38 * param0, void * param1) break; case 12: if (sub_0201D724(Unk_ov23_02257740->unk_A24) == 0) { - if (Unk_021BF67C.unk_60 || (Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if (coresys.touchInput || (coresys.padInput & PAD_BUTTON_A)) { ov23_02254044(ov23_0224219C()); v0->unk_00++; } @@ -1535,7 +1535,7 @@ static void ov23_0223F118 (UnkStruct_0201CD38 * param0, void * param1) if (sub_0201D724(Unk_ov23_02257740->unk_A24) == 0) { v0->unk_4C--; - if (Unk_021BF67C.unk_60 || (Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (v0->unk_4C == 0)) { + if (coresys.touchInput || (coresys.padInput & PAD_BUTTON_A) || (v0->unk_4C == 0)) { ov23_02254044(ov23_0224219C()); v0->unk_00 = 16; } @@ -1557,7 +1557,7 @@ static void ov23_0223F118 (UnkStruct_0201CD38 * param0, void * param1) if (sub_0201D724(Unk_ov23_02257740->unk_A24) == 0) { v0->unk_4C--; - if (Unk_021BF67C.unk_60 || (Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (v0->unk_4C == 0)) { + if (coresys.touchInput || (coresys.padInput & PAD_BUTTON_A) || (v0->unk_4C == 0)) { if (ov23_02240A90(v0)) { v0->unk_4C = 60; v0->unk_00 = 15; @@ -1666,7 +1666,7 @@ static void ov23_0223F118 (UnkStruct_0201CD38 * param0, void * param1) if (sub_0201D724(Unk_ov23_02257740->unk_A24) == 0) { v0->unk_4C--; - if (Unk_021BF67C.unk_60 || (Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (v0->unk_4C == 0)) { + if (coresys.touchInput || (coresys.padInput & PAD_BUTTON_A) || (v0->unk_4C == 0)) { ov23_02254044(ov23_0224219C()); v0->unk_00 = 19; } @@ -2701,12 +2701,12 @@ static BOOL ov23_02240CFC (UnkStruct_ov23_0223EE80 * param0) Unk_ov23_02257740->unk_A29 = 0; } - if (Unk_021BF67C.unk_60) { - if ((Unk_021BF67C.unk_5C < 2 * 8 * 13) && (Unk_021BF67C.unk_5E >= 4 * 8)) { - v0[0] = Unk_021BF67C.unk_5C; - v0[1] = Unk_021BF67C.unk_5E; + if (coresys.touchInput) { + if ((coresys.unk_5C < 2 * 8 * 13) && (coresys.unk_5E >= 4 * 8)) { + v0[0] = coresys.unk_5C; + v0[1] = coresys.unk_5E; - ov23_022402B8(Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, Unk_ov23_02257740->unk_A28, param0); + ov23_022402B8(coresys.unk_5C, coresys.unk_5E, Unk_ov23_02257740->unk_A28, param0); if (Unk_ov23_02257740->unk_A28) { v1 = 4; @@ -2726,7 +2726,7 @@ static BOOL ov23_02240CFC (UnkStruct_ov23_0223EE80 * param0) ov23_02240688(Unk_ov23_02257740->unk_04); Unk_ov23_02257740->unk_A2C = 1; - } else if (Unk_021BF67C.unk_5C >= (2 * 8 * 13)) { + } else if (coresys.unk_5C >= (2 * 8 * 13)) { Unk_ov23_02257740->unk_A29 = 2; } } @@ -2739,7 +2739,7 @@ static BOOL ov23_02240CFC (UnkStruct_ov23_0223EE80 * param0) } } - ov23_022404F8(Unk_ov23_02257740->unk_04, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, Unk_ov23_02257740->unk_A29); + ov23_022404F8(Unk_ov23_02257740->unk_04, coresys.unk_5C, coresys.unk_5E, Unk_ov23_02257740->unk_A29); if (Unk_ov23_02257740->unk_A29 >= 2) { Unk_ov23_02257740->unk_A29++; diff --git a/src/overlay023/ov23_02241F74.c b/src/overlay023/ov23_02241F74.c index 2e50c36948..92c376ecb7 100644 --- a/src/overlay023/ov23_02241F74.c +++ b/src/overlay023/ov23_02241F74.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200B358_decl.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -355,7 +355,7 @@ BOOL ov23_02242458 (void) return 0; } - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { Unk_ov23_02257748->unk_134 = 30; if (!Unk_ov23_02257748->unk_14B) { @@ -368,13 +368,13 @@ BOOL ov23_02242458 (void) return 0; } - v0 = ov5_021EAFA4(Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, Unk_ov23_02257748->unk_0C->unk_8C); + v0 = ov5_021EAFA4(coresys.unk_5C, coresys.unk_5E, Unk_ov23_02257748->unk_0C->unk_8C); ov5_021E9230(v0.x, v0.z, &v2, &v3); v4.unk_00 = v2; v4.unk_02 = v3; - Unk_ov23_02257748->unk_18.unk_00 = Unk_021BF67C.unk_5C; - Unk_ov23_02257748->unk_18.unk_02 = Unk_021BF67C.unk_5E; + Unk_ov23_02257748->unk_18.unk_00 = coresys.unk_5C; + Unk_ov23_02257748->unk_18.unk_02 = coresys.unk_5E; Unk_ov23_02257748->unk_1C.unk_00 = v2; Unk_ov23_02257748->unk_1C.unk_02 = v3; diff --git a/src/overlay023/ov23_0224340C.c b/src/overlay023/ov23_0224340C.c index 12d0574037..c9fcec62ba 100644 --- a/src/overlay023/ov23_0224340C.c +++ b/src/overlay023/ov23_0224340C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009714_decl.h" @@ -2393,11 +2393,11 @@ static void ov23_022451C8 (UnkStruct_0201CD38 * param0, void * param1) } break; case 7: - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { UnkStruct_ov23_0224271C v4; - v4.unk_00 = Unk_021BF67C.unk_5C; - v4.unk_02 = Unk_021BF67C.unk_5E; + v4.unk_00 = coresys.unk_5C; + v4.unk_02 = coresys.unk_5E; if (ov23_02245064(&v4, v0->unk_10, v0)) { if (v0->unk_19) { @@ -3745,14 +3745,14 @@ static BOOL ov23_02246F20 (UnkStruct_02018340 * param0, UnkStruct_ov23_022468DC return 1; } - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { for (v0 = 0; v0 < ov23_022468C0(); v0++) { if (param1->unk_E4[v0]) { continue; } - v8 = Unk_021BF67C.unk_5C * FX32_ONE - param1->unk_44[v0].unk_00; - v9 = Unk_021BF67C.unk_5E * FX32_ONE - param1->unk_44[v0].unk_04; + v8 = coresys.unk_5C * FX32_ONE - param1->unk_44[v0].unk_00; + v9 = coresys.unk_5E * FX32_ONE - param1->unk_44[v0].unk_04; v11 = FX_Mul(v8, v8) + FX_Mul(v9, v9); v11 = FX_Sqrt(v11); @@ -3990,9 +3990,9 @@ static BOOL ov23_02247568 (UnkStruct_02018340 * param0, UnkStruct_ov23_022471D8 } break; case 3: - if (Unk_021BF67C.unk_60) { - v7 = (Unk_021BF67C.unk_5C - 128) * FX32_ONE; - v8 = (Unk_021BF67C.unk_5E - param1->unk_120) * FX32_ONE; + if (coresys.touchInput) { + v7 = (coresys.unk_5C - 128) * FX32_ONE; + v8 = (coresys.unk_5E - param1->unk_120) * FX32_ONE; v10 = FX_Mul(v7, v7) + FX_Mul(v8, v8); v10 = FX_Sqrt(v10); diff --git a/src/overlay023/ov23_02248C08.c b/src/overlay023/ov23_02248C08.c index 362c5bb7c8..3cc3906f34 100644 --- a/src/overlay023/ov23_02248C08.c +++ b/src/overlay023/ov23_02248C08.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02013A04_decl.h" @@ -99,7 +99,7 @@ u32 ov23_02248D20 (UnkStruct_ov23_02248D20 * param0) if (param0->unk_1C) { ov23_02248CA4(v1, v2, param0); - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT)) { + if ((coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_BUTTON_SELECT)) { sub_02005748(1500); if (v1 + v2 == v8 - 1) { @@ -163,7 +163,7 @@ u32 ov23_02248D20 (UnkStruct_ov23_02248D20 * param0) return 0xffffffff; } } else { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { sub_02005748(1500); if (v1 + v2 == v8 - 1) { diff --git a/src/overlay023/ov23_0224B05C.c b/src/overlay023/ov23_0224B05C.c index d1b64eac88..6cb2ec1101 100644 --- a/src/overlay023/ov23_0224B05C.c +++ b/src/overlay023/ov23_0224B05C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "message.h" @@ -1681,7 +1681,7 @@ static BOOL ov23_0224C790 (UnkStruct_020508D4 * param0) break; case 12: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v1->unk_0C = 13; ov23_02254044(ov23_0224219C()); sub_020593F4(0); @@ -1716,7 +1716,7 @@ static BOOL ov23_0224C790 (UnkStruct_020508D4 * param0) return 1; case 8: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v1->unk_0C = 13; ov23_02254044(ov23_0224219C()); return 0; @@ -1810,7 +1810,7 @@ static void ov23_0224CB1C (UnkStruct_0201CD38 * param0, void * param1) break; case 4: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v4 = 1; } } @@ -2371,7 +2371,7 @@ static void ov23_0224D5BC (UnkStruct_0201CD38 * param0, void * param1) break; case 1: if (ov23_02254238(ov23_022421AC()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { int v1 = v0->unk_05; ov23_02253F40(ov23_022421AC(), 14 + v1, 0, NULL); @@ -2381,7 +2381,7 @@ static void ov23_0224D5BC (UnkStruct_0201CD38 * param0, void * param1) break; case 2: if (ov23_02254238(ov23_022421AC()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov23_0224D54C(v0); v0->unk_00 = 4; ov23_02254044(ov23_022421AC()); diff --git a/src/overlay023/ov23_0224DC40.c b/src/overlay023/ov23_0224DC40.c index 6214459379..ce3ab60e65 100644 --- a/src/overlay023/ov23_0224DC40.c +++ b/src/overlay023/ov23_0224DC40.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -629,7 +629,7 @@ static void ov23_0224E2D8 (UnkStruct_0201CD38 * param0, void * param1) break; case 7: if (ov23_02254238(ov23_0224219C()) == 0) { - if (( PAD_BUTTON_A )&Unk_021BF67C.unk_48) { + if (( PAD_BUTTON_A )&coresys.padInput) { v0->unk_37 = 4; } } @@ -666,7 +666,7 @@ static void ov23_0224E2D8 (UnkStruct_0201CD38 * param0, void * param1) break; case 15: if (ov23_02254238(ov23_0224219C()) == 0) { - if (( PAD_BUTTON_A )&Unk_021BF67C.unk_48) { + if (( PAD_BUTTON_A )&coresys.padInput) { v0->unk_37 = 14; } } @@ -815,7 +815,7 @@ static void ov23_0224E2D8 (UnkStruct_0201CD38 * param0, void * param1) break; case 37: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0->unk_37 = 38; } } @@ -1093,7 +1093,7 @@ static void ov23_0224EC50 (UnkStruct_0201CD38 * param0, void * param1) case 2: v0->unk_2E = 12; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov23_0224DC40(v0, 8); v0->unk_34 = 8; } else if (v0->unk_35 == 5) { @@ -1121,7 +1121,7 @@ static void ov23_0224EC50 (UnkStruct_0201CD38 * param0, void * param1) break; case 9: if (ov23_02254238(ov23_0224219C()) == 0) { - if (( PAD_BUTTON_A )&Unk_021BF67C.unk_48) { + if (( PAD_BUTTON_A )&coresys.padInput) { v0->unk_34 = 4; } } @@ -1179,7 +1179,7 @@ static void ov23_0224EC50 (UnkStruct_0201CD38 * param0, void * param1) break; case 21: if (ov23_02254238(ov23_0224219C()) == 0) { - if (( PAD_BUTTON_A )&Unk_021BF67C.unk_48) { + if (( PAD_BUTTON_A )&coresys.padInput) { ov23_0224DC40(v0, 15); v0->unk_34 = 15; } diff --git a/src/overlay023/ov23_0224F294.c b/src/overlay023/ov23_0224F294.c index c1f1773d0c..f237817299 100644 --- a/src/overlay023/ov23_0224F294.c +++ b/src/overlay023/ov23_0224F294.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -581,7 +581,7 @@ static void ov23_0224F914 (UnkStruct_0201CD38 * param0, void * param1) break; case 13: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov23_02254044(ov23_0224219C()); ov23_02250B34(param0, v0, 0); ov23_02243204(); @@ -591,7 +591,7 @@ static void ov23_0224F914 (UnkStruct_0201CD38 * param0, void * param1) break; case 14: if (ov23_02254238(ov23_0224219C()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { UnkFuncPtr_ov23_0224F914 v2 = (UnkFuncPtr_ov23_0224F914)v0->unk_00; v2(v0); @@ -1533,7 +1533,7 @@ static void ov23_02250B9C (UnkStruct_0201CD38 * param0, void * param1) return; case 4: if (ov23_02254238(ov23_022421AC()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0->unk_2AA = 2; } } diff --git a/src/overlay023/ov23_0225128C.c b/src/overlay023/ov23_0225128C.c index ffc51abc7d..46c82bd8ec 100644 --- a/src/overlay023/ov23_0225128C.c +++ b/src/overlay023/ov23_0225128C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -588,7 +588,7 @@ static BOOL ov23_02251960 (UnkStruct_0201CD38 * param0, void * param1) static BOOL ov23_02251A58 (UnkStruct_ov23_02250CD4 * param0) { if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov23_02254044(ov23_022421BC()); return 1; } @@ -715,7 +715,7 @@ static void ov23_02251C04 (UnkStruct_0201CD38 * param0, void * param1) v0->unk_2AA = 7; break; case 7: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov23_02253D10(v0->unk_270); v0->unk_270 = NULL; v0->unk_2AA = 0; @@ -770,7 +770,7 @@ static void ov23_02251C04 (UnkStruct_0201CD38 * param0, void * param1) break; case 16: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { if (!sub_02033DFC()) { sub_0200AAE0(1, 0, -6, GX_BLEND_PLANEMASK_BG0, 1); } diff --git a/src/overlay023/ov23_022521F0.c b/src/overlay023/ov23_022521F0.c index d40306478c..4078bd1fc4 100644 --- a/src/overlay023/ov23_022521F0.c +++ b/src/overlay023/ov23_022521F0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "message.h" @@ -717,7 +717,7 @@ static void ov23_02252E70 (UnkStruct_0201CD38 * param0, void * param1) break; case 6: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0->unk_2AA = 7; } } @@ -785,7 +785,7 @@ static void ov23_02252E70 (UnkStruct_0201CD38 * param0, void * param1) break; case 9: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (v0->unk_2AC == 1) { ov23_02252CF4(2, v0->unk_2A8); } else if (v0->unk_2AC == 0) { @@ -801,7 +801,7 @@ static void ov23_02252E70 (UnkStruct_0201CD38 * param0, void * param1) break; case 10: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov23_02252C9C(8); v0->unk_2AA = 2; } @@ -882,7 +882,7 @@ static void ov23_02252E70 (UnkStruct_0201CD38 * param0, void * param1) break; case 16: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov23_0225412C(ov23_022421BC(), v0->unk_27E[0]); ov23_02252CE0(2, v0->unk_279[0]); ov23_02252C9C(7); @@ -899,7 +899,7 @@ static void ov23_02252E70 (UnkStruct_0201CD38 * param0, void * param1) break; case 18: if (ov23_02254238(ov23_022421BC()) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov23_02252CD4(); ov23_02252C78(v0); ov23_02243204(); diff --git a/src/overlay023/ov23_02253598.c b/src/overlay023/ov23_02253598.c index de68629fee..250be1d47e 100644 --- a/src/overlay023/ov23_02253598.c +++ b/src/overlay023/ov23_02253598.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "message.h" @@ -349,7 +349,7 @@ static void ov23_0225381C (UnkStruct_0201CD38 * param0, void * param1) { UnkStruct_ov23_022537D4 * v0 = param1; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov23_022537D4(param0, param1); } } diff --git a/src/overlay023/ov23_02253D40.c b/src/overlay023/ov23_02253D40.c index 9dbe93cb82..ec04cbb874 100644 --- a/src/overlay023/ov23_02253D40.c +++ b/src/overlay023/ov23_02253D40.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -149,7 +149,7 @@ static void ov23_02253E40 (UnkStruct_0201CD38 * param0, void * param1) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov23_02254044(v0); } } diff --git a/src/overlay023/ov23_02254A14.c b/src/overlay023/ov23_02254A14.c index b7c04dc4f1..d01dcb69b5 100644 --- a/src/overlay023/ov23_02254A14.c +++ b/src/overlay023/ov23_02254A14.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02029894_decl.h" #include "struct_decls/struct_020298B0_decl.h" @@ -417,22 +417,22 @@ static BOOL ov23_02254DF8 (UnkStruct_020508D4 * param0) v12 = 1; v13 = v6->unk_3C.unk_00; - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { v0 = -(FX32_ONE * 16); v1 = 0; v13.unk_00--; v13.unk_08--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { v0 = (FX32_ONE * 16); v1 = 0; v13.unk_00++; v13.unk_08++; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + } else if (coresys.unk_4C & PAD_KEY_UP) { v0 = 0; v1 = -(FX32_ONE * 16); v13.unk_04--; v13.unk_0C--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { v0 = 0; v1 = (FX32_ONE * 16); v13.unk_04++; @@ -456,9 +456,9 @@ static BOOL ov23_02254DF8 (UnkStruct_020508D4 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v4 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov23_02254A94(v5, v6->unk_3C.unk_10); v6->unk_04 = 0; return 0; @@ -572,22 +572,22 @@ static BOOL ov23_02255100 (UnkStruct_020508D4 * param0) v3 = v7->unk_4FC->unk_58.z; if (!v4) { - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { sub_02005748(1509); v2 -= (FX32_ONE * 16); v1.unk_00--; v1.unk_08--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { sub_02005748(1509); v2 += (FX32_ONE * 16); v1.unk_00++; v1.unk_08++; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + } else if (coresys.unk_4C & PAD_KEY_UP) { sub_02005748(1509); v3 -= (FX32_ONE * 16); v1.unk_04--; v1.unk_0C--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { sub_02005748(1509); v3 += (FX32_ONE * 16); v1.unk_04++; @@ -596,9 +596,9 @@ static BOOL ov23_02255100 (UnkStruct_020508D4 * param0) v0 = 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v5 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov23_02255F20(v7->unk_4FC); ov23_0225628C(v6, &v7->unk_4DC); ov23_02255EBC(3, v7); @@ -807,22 +807,22 @@ static BOOL ov23_02255580 (UnkStruct_020508D4 * param0) v3 = v7->unk_4FC->unk_58.z; if (!v4) { - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { sub_02005748(1509); v2 -= (FX32_ONE * 16); v1.unk_00--; v1.unk_08--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { sub_02005748(1509); v2 += (FX32_ONE * 16); v1.unk_00++; v1.unk_08++; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + } else if (coresys.unk_4C & PAD_KEY_UP) { sub_02005748(1509); v3 -= (FX32_ONE * 16); v1.unk_04--; v1.unk_0C--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { sub_02005748(1509); v3 += (FX32_ONE * 16); v1.unk_04++; @@ -831,9 +831,9 @@ static BOOL ov23_02255580 (UnkStruct_020508D4 * param0) v0 = 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v5 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov23_02255F20(v7->unk_4FC); ov23_0225628C(v6, &v7->unk_4DC); ov23_02255EBC(3, v7); @@ -945,22 +945,22 @@ static BOOL ov23_02255850 (UnkStruct_020508D4 * param0) v7 = 1; v8 = v6->unk_3C.unk_00; - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { v0 = -(FX32_ONE * 16); v1 = 0; v8.unk_00--; v8.unk_08--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { v0 = (FX32_ONE * 16); v1 = 0; v8.unk_00++; v8.unk_08++; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + } else if (coresys.unk_4C & PAD_KEY_UP) { v0 = 0; v1 = -(FX32_ONE * 16); v8.unk_04--; v8.unk_0C--; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { v0 = 0; v1 = (FX32_ONE * 16); v8.unk_04++; @@ -984,9 +984,9 @@ static BOOL ov23_02255850 (UnkStruct_020508D4 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v4 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov23_02255BB8(&v6->unk_0C.unk_10, v6->unk_0C.unk_00, v6->unk_5C); ov23_02255E8C(v6); ov23_0225628C(v5, &v6->unk_4DC); @@ -1367,7 +1367,7 @@ static void ov23_02255F40 (UnkStruct_0203CDB0 * param0, UnkStruct_ov23_02255A98 v6 = param0->unk_8C; - ov23_02255F28(Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, param2); + ov23_02255F28(coresys.unk_5C, coresys.unk_5E, param2); v1 = ov5_021EAFA4(param2->unk_00, param2->unk_04, v6); v2 = v1.x / (FX32_ONE * 16); @@ -1409,7 +1409,7 @@ static void ov23_02256000 (UnkStruct_0203CDB0 * param0, UnkStruct_ov23_02256000 v4 = param0->unk_8C; - ov23_02255F28(Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, param1); + ov23_02255F28(coresys.unk_5C, coresys.unk_5E, param1); v1 = ov5_021EAFA4(param1->unk_00, param1->unk_04, v4); v2 = v1.x / (FX32_ONE * 16); @@ -1439,14 +1439,14 @@ static BOOL ov23_02256098 (UnkStruct_ov23_02256098 * param0, UnkStruct_0203CDB0 v1 = 0; *param2 = 0; - if (Unk_021BF67C.unk_60) { - if (!Unk_021BF67C.unk_44) { + if (coresys.touchInput) { + if (!coresys.unk_44) { param0->unk_4F0.unk_08 = 1; ov23_02255F40(param1, &(param0->unk_3C), ¶m0->unk_4F0); } v1 = 1; - } else if (Unk_021BF67C.unk_62) { + } else if (coresys.unk_62) { if (param0->unk_4F0.unk_08) { ov23_02255F40(param1, &(param0->unk_3C), ¶m0->unk_4F0); } @@ -1470,14 +1470,14 @@ static BOOL ov23_02256104 (UnkStruct_ov23_02256098 * param0, UnkStruct_0203CDB0 v1 = 0; *param2 = 0; - if (Unk_021BF67C.unk_60) { - if (!Unk_021BF67C.unk_44) { + if (coresys.touchInput) { + if (!coresys.unk_44) { param0->unk_4F0.unk_08 = 1; ov23_02256000(param1, ¶m0->unk_4F0, param0->unk_4FC); } v1 = 1; - } else if (Unk_021BF67C.unk_62) { + } else if (coresys.unk_62) { if (param0->unk_4F0.unk_08) { ov23_02256000(param1, ¶m0->unk_4F0, param0->unk_4FC); } @@ -1501,8 +1501,8 @@ static BOOL ov23_02256174 (UnkStruct_ov23_02256098 * param0, UnkStruct_0203CDB0 v1 = 0; *param2 = 0; - if (Unk_021BF67C.unk_60) { - if (!Unk_021BF67C.unk_44) { + if (coresys.touchInput) { + if (!coresys.unk_44) { param0->unk_4F0.unk_08 = 1; *param2 = 1; ov23_02256000(param1, ¶m0->unk_4F0, param0->unk_4FC); @@ -1524,14 +1524,14 @@ static BOOL ov23_022561BC (UnkStruct_ov23_02256098 * param0, UnkStruct_0203CDB0 v1 = 0; *param2 = 0; - if (Unk_021BF67C.unk_60) { - if (!Unk_021BF67C.unk_44) { + if (coresys.touchInput) { + if (!coresys.unk_44) { param0->unk_4F0.unk_08 = 1; ov23_02255F40(param1, &(param0->unk_3C), ¶m0->unk_4F0); } v1 = 1; - } else if (Unk_021BF67C.unk_62) { + } else if (coresys.unk_62) { if (param0->unk_4F0.unk_08) { ov23_02255F40(param1, &(param0->unk_3C), ¶m0->unk_4F0); } diff --git a/src/overlay025/ov25_02255ACC.c b/src/overlay025/ov25_02255ACC.c index 3dfe6add7d..1183ab7f54 100644 --- a/src/overlay025/ov25_02255ACC.c +++ b/src/overlay025/ov25_02255ACC.c @@ -95,7 +95,7 @@ void ov25_02255B50 (UnkStruct_ov25_02255B34 * param0) v1 = sub_0202278C(); if (v1) { - v2 = sub_02022798(); + v2 = TouchScreen_Tapped(); for (v3 = 0; v3 < param0->unk_0C; v3++) { param0->unk_14[v3].unk_02 = param0->unk_14[v3].unk_01; diff --git a/src/overlay031/ov31_022561C0.c b/src/overlay031/ov31_022561C0.c index e17ce2f2ca..b70ab81a2d 100644 --- a/src/overlay031/ov31_022561C0.c +++ b/src/overlay031/ov31_022561C0.c @@ -262,7 +262,7 @@ static BOOL ov31_0225646C (UnkStruct_ov31_02256228 * param0) v1 = (v1 - 16) / 8; if ((v0 < 24) && (v1 < 20)) { - if (((param0->unk_04 != v0) || (param0->unk_08 != v1)) || (sub_02022798() == 1)) { + if (((param0->unk_04 != v0) || (param0->unk_08 != v1)) || (TouchScreen_Tapped() == 1)) { param0->unk_0C.unk_00[v1][v0]++; if (param0->unk_0C.unk_00[v1][v0] > 4) { diff --git a/src/overlay032/ov32_022561C0.c b/src/overlay032/ov32_022561C0.c index 6bf509b8ea..7391eb7bbd 100644 --- a/src/overlay032/ov32_022561C0.c +++ b/src/overlay032/ov32_022561C0.c @@ -157,7 +157,7 @@ static BOOL ov32_02256308 (UnkStruct_ov32_0225621C * param0) param0->unk_04.unk_64 = ov25_0225446C(&(param0->unk_04.unk_68), &(param0->unk_04.unk_6C)); if (param0->unk_04.unk_64) { - param0->unk_04.unk_66 = sub_02022798(); + param0->unk_04.unk_66 = TouchScreen_Tapped(); if (param0->unk_04.unk_66) { u32 v0 = ov32_02256B78(param0->unk_04.unk_68, param0->unk_04.unk_6C, param0->unk_04.unk_00); diff --git a/src/overlay033/ov33_022561C0.c b/src/overlay033/ov33_022561C0.c index a45179caf7..099bfba913 100644 --- a/src/overlay033/ov33_022561C0.c +++ b/src/overlay033/ov33_022561C0.c @@ -215,7 +215,7 @@ static BOOL ov33_022563D0 (UnkStruct_ov33_0225621C * param0) if (param0->unk_04.unk_4C) { if (((u32)(param0->unk_04.unk_50 - 16) < (u32)(207 - 16)) & ((u32)(param0->unk_04.unk_54 - 16) < (u32)(175 - 16))) { - param0->unk_04.unk_4E = sub_02022798(); + param0->unk_04.unk_4E = TouchScreen_Tapped(); return 0; } diff --git a/src/overlay033/ov33_02256474.c b/src/overlay033/ov33_02256474.c index 5db74dd6a1..90236223d8 100644 --- a/src/overlay033/ov33_02256474.c +++ b/src/overlay033/ov33_02256474.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -513,7 +513,7 @@ static void ov33_02256B08 (UnkStruct_ov33_02256474 * param0, const UnkStruct_ov3 static void ov33_02256B3C (const char * param0, ...) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_B) { + if (coresys.unk_44 & PAD_BUTTON_B) { va_list v0; va_start(v0, param0); va_end(v0); diff --git a/src/overlay056/ov56_022561C0.c b/src/overlay056/ov56_022561C0.c index cfb0cd028f..ad662594c4 100644 --- a/src/overlay056/ov56_022561C0.c +++ b/src/overlay056/ov56_022561C0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02009714_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -607,7 +607,7 @@ static int ov56_02256A68 (UnkStruct_ov56_02256468 * param0) param0->unk_228 = v0 - 2; break; default: - if (Unk_021BF67C.unk_60 == 0) { + if (coresys.touchInput == 0) { break; } @@ -693,19 +693,19 @@ static int ov56_02256BC0 (UnkStruct_ov56_02256468 * param0) static void ov56_02256C84 (UnkStruct_ov56_02256468 * param0) { - if (Unk_021BF67C.unk_44 & PAD_BUTTON_L) { + if (coresys.unk_44 & PAD_BUTTON_L) { ov56_0225718C(param0, 0); - if (Unk_021BF67C.unk_4C & PAD_BUTTON_L) { + if (coresys.unk_4C & PAD_BUTTON_L) { if (param0->unk_2D8.unk_04 != 0) { param0->unk_2D8.unk_04--; sub_02005748(1509); } } - } else if (Unk_021BF67C.unk_44 & PAD_BUTTON_R) { + } else if (coresys.unk_44 & PAD_BUTTON_R) { ov56_0225718C(param0, 1); - if (Unk_021BF67C.unk_4C & PAD_BUTTON_R) { + if (coresys.unk_4C & PAD_BUTTON_R) { if (param0->unk_2D8.unk_04 < param0->unk_2D8.unk_00 - 3) { param0->unk_2D8.unk_04++; sub_02005748(1509); @@ -935,10 +935,10 @@ static void ov56_0225712C (UnkStruct_ov56_02256468 * param0) { param0->unk_2EC = 0; - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { param0->unk_2EC = 1; } else { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { param0->unk_2ED--; if (param0->unk_2ED < 0) { diff --git a/src/overlay058/ov58_021D0D80.c b/src/overlay058/ov58_021D0D80.c index 68d922d564..a64cab8252 100644 --- a/src/overlay058/ov58_021D0D80.c +++ b/src/overlay058/ov58_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -890,7 +890,7 @@ static void ov58_021D1A80 (UnkStruct_02095EAC * param0) sub_02021CAC(param0->unk_23C[sub_0203608C()], 0); if (v1 != 0xffffffff) { - ov58_021D1A10(param0->unk_23C[sub_0203608C()], Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + ov58_021D1A10(param0->unk_23C[sub_0203608C()], coresys.unk_5C, coresys.unk_5E); sub_02021CAC(param0->unk_23C[sub_0203608C()], 1); } diff --git a/src/overlay059/ov59_021D0D80.c b/src/overlay059/ov59_021D0D80.c index f82461d9bb..386af47e91 100644 --- a/src/overlay059/ov59_021D0D80.c +++ b/src/overlay059/ov59_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -759,7 +759,7 @@ static int ov59_021D1838 (UnkStruct_020961E8 * param0, int param1) static void ov59_021D1864 (UnkStruct_020961E8 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (sub_0203608C() == 0) { if ((ov59_021D2528() == param0->unk_4AAC) && (param0->unk_4AB4 == 0)) { u8 v0 = 1; @@ -774,7 +774,7 @@ static void ov59_021D1864 (UnkStruct_020961E8 * param0) sub_02005748(1522); } } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { if (sub_0203608C()) { if (param0->unk_4AA0 == 0) { ov59_021D2628(param0, 4, 0); @@ -876,7 +876,7 @@ static int ov59_021D1A44 (UnkStruct_020961E8 * param0, int param1) if (sub_0203608C()) { if (param0->unk_4AA0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -885,7 +885,7 @@ static int ov59_021D1A44 (UnkStruct_020961E8 * param0, int param1) } } else { if (param0->unk_4AB4 != 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -1002,7 +1002,7 @@ static int ov59_021D1C64 (UnkStruct_020961E8 * param0, int param1) u32 v1; if ((ov59_021D2528() != param0->unk_4AAC) || (param0->unk_4AB4 != 0)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -1090,7 +1090,7 @@ static int ov59_021D1DC8 (UnkStruct_020961E8 * param0, int param1) { void * v0; - Unk_021BF67C.unk_68 = 1; + coresys.unk_68 = 1; v0 = sub_0202C1B4(51); sub_0202B758(param0->unk_08->unk_10, v0, 4); @@ -1115,7 +1115,7 @@ static int ov59_021D1E0C (UnkStruct_020961E8 * param0, int param1) param0->unk_0C.unk_00 = 0; param0->unk_3B4 = 0; - Unk_021BF67C.unk_68 = 0; + coresys.unk_68 = 0; param0->unk_4AA4 = 0; } @@ -1171,7 +1171,7 @@ static int ov59_021D1F24 (UnkStruct_020961E8 * param0, int param1) int v0; if ((param0->unk_4AAC != ov59_021D2528()) || (param0->unk_4AB4 != 0)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } diff --git a/src/overlay061/ov61_0222B008.c b/src/overlay061/ov61_0222B008.c index 386435b85f..63977261d8 100644 --- a/src/overlay061/ov61_0222B008.c +++ b/src/overlay061/ov61_0222B008.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "struct_decls/struct_02025E5C_decl.h" @@ -156,7 +156,7 @@ static int ov61_0222B168 (UnkStruct_ov62_022349A8 * param0, UnkStruct_ov61_0222B static int ov61_0222B190 (UnkStruct_ov62_022349A8 * param0, UnkStruct_ov61_0222B138 * param1) { - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_BUTTON_B)) { + if ((coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_BUTTON_B)) { ov61_0222BB54(param0, NULL); return 1; } diff --git a/src/overlay061/ov61_0222BF44.c b/src/overlay061/ov61_0222BF44.c index cbc66543fb..fb2957e3de 100644 --- a/src/overlay061/ov61_0222BF44.c +++ b/src/overlay061/ov61_0222BF44.c @@ -3,7 +3,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -196,7 +196,7 @@ int ov61_0222BF44 (UnkStruct_020067E8 * param0, int * param1) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG0, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG1, 1); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); sub_02002AC8(1); @@ -853,7 +853,7 @@ static int ov61_0222CC40 (UnkStruct_ov61_0222C664 * param0) static int ov61_0222CC64 (UnkStruct_ov61_0222C664 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A || Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_A || coresys.padInput & PAD_BUTTON_B) { sub_0200DC9C(¶m0->unk_64, 0); param0->unk_90 = 0; diff --git a/src/overlay062/ov62_0222F2C0.c b/src/overlay062/ov62_0222F2C0.c index 73624c06ca..a71336cda8 100644 --- a/src/overlay062/ov62_0222F2C0.c +++ b/src/overlay062/ov62_0222F2C0.c @@ -2,7 +2,7 @@ #include #include "overlay062/ov62_const_funcptr_tables.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0202783C_decl.h" @@ -308,7 +308,7 @@ static void ov62_0222F670 (UnkStruct_02018340 * param0) void ov62_0222F824 (int param0) { - Unk_021BF67C.unk_65 = param0; + coresys.unk_65 = param0; GXLayers_SwapDisplay(); } diff --git a/src/overlay062/ov62_02231690.c b/src/overlay062/ov62_02231690.c index 793343f5b6..1e11bc2b17 100644 --- a/src/overlay062/ov62_02231690.c +++ b/src/overlay062/ov62_02231690.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -3284,7 +3284,7 @@ static void ov62_02234440 (UnkStruct_0208C06C * param0) param0->unk_41D8.unk_0C = NULL; } - if (Unk_021BF67C.unk_65 == 0) { + if (coresys.unk_65 == 0) { param0->unk_41D8.unk_08 = param0->unk_6F4; } else { param0->unk_41D8.unk_08 = param0->unk_6F0; @@ -3688,7 +3688,7 @@ void ov62_022348FC (UnkStruct_0208C06C * param0) break; case 1: - if (sub_02022798()) { + if (TouchScreen_Tapped()) { ov62_02231B8C(param0); param0->unk_14.unk_4F0.unk_10++; } diff --git a/src/overlay062/ov62_02235278.c b/src/overlay062/ov62_02235278.c index a50652bf2c..7403ed132b 100644 --- a/src/overlay062/ov62_02235278.c +++ b/src/overlay062/ov62_02235278.c @@ -38,7 +38,7 @@ static int ov62_022352DC(void); static BOOL ov62_02235278 (UnkStruct_0208C06C * param0) { - if (sub_02022798() && (param0->unk_89C == 0)) { + if (TouchScreen_Tapped() && (param0->unk_89C == 0)) { ov62_02231A1C(param0); } diff --git a/src/overlay062/ov62_02237D24.c b/src/overlay062/ov62_02237D24.c index 82aa10b883..e5e627284f 100644 --- a/src/overlay062/ov62_02237D24.c +++ b/src/overlay062/ov62_02237D24.c @@ -890,7 +890,7 @@ static BOOL ov62_02238B70 (UnkStruct_0208C06C * param0) } break; default: - if (((++param0->unk_0C) >= (30 * 2)) || (sub_02022798() == 1)) { + if (((++param0->unk_0C) >= (30 * 2)) || (TouchScreen_Tapped() == 1)) { param0->unk_0C = 0; ov62_02231B8C(param0); ov62_0222FB60(param0, 3); diff --git a/src/overlay062/ov62_02239D60.c b/src/overlay062/ov62_02239D60.c index ef4d89f6e6..0e539b73ab 100644 --- a/src/overlay062/ov62_02239D60.c +++ b/src/overlay062/ov62_02239D60.c @@ -1708,7 +1708,7 @@ static BOOL ov62_0223B980 (UnkStruct_0208C06C * param0) } break; case 6: - if (((++param0->unk_0C) >= (30 * 2)) || (sub_02022798() == 1)) { + if (((++param0->unk_0C) >= (30 * 2)) || (TouchScreen_Tapped() == 1)) { param0->unk_0C = 0; ov62_02231B8C(param0); v0->unk_2F64 = 0; diff --git a/src/overlay062/ov62_0223DFA8.c b/src/overlay062/ov62_0223DFA8.c index 68337a9f84..193d839679 100644 --- a/src/overlay062/ov62_0223DFA8.c +++ b/src/overlay062/ov62_0223DFA8.c @@ -485,7 +485,7 @@ static BOOL ov62_0223E510 (UnkStruct_0208C06C * param0) ov62_0223E0FC(param0, 281, 0); break; case 6: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } @@ -1926,7 +1926,7 @@ asm static BOOL ov62_022403F8 (UnkStruct_0208C06C * param0) str r0, [r4, #8] b _02240884 _02240518: - bl sub_02022798 + bl TouchScreen_Tapped cmp r0, #0 bne _02240522 b _02240884 diff --git a/src/overlay062/ov62_02241204.c b/src/overlay062/ov62_02241204.c index c048fc0662..a9b3e250e6 100644 --- a/src/overlay062/ov62_02241204.c +++ b/src/overlay062/ov62_02241204.c @@ -2208,7 +2208,7 @@ static BOOL ov62_02243514 (UnkStruct_0208C06C * param0) param0->unk_08++; break; case 3: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } @@ -3315,7 +3315,7 @@ static BOOL ov62_02244CD4 (UnkStruct_0208C06C * param0) param0->unk_08++; break; case 3: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } @@ -3630,7 +3630,7 @@ static BOOL ov62_0224536C (UnkStruct_0208C06C * param0) } break; case 3: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } @@ -4390,7 +4390,7 @@ static BOOL ov62_0224613C (UnkStruct_0208C06C * param0) ov62_02244AB4(param0, 281, 0); break; case 6: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } diff --git a/src/overlay062/ov62_02247D74.c b/src/overlay062/ov62_02247D74.c index cf5d68b7d2..a293d418c9 100644 --- a/src/overlay062/ov62_02247D74.c +++ b/src/overlay062/ov62_02247D74.c @@ -281,7 +281,7 @@ static BOOL ov62_02248114 (UnkStruct_0208C06C * param0) } break; default: - if (!sub_02022798()) { + if (!TouchScreen_Tapped()) { break; } diff --git a/src/overlay064/ov64_0222DCE0.c b/src/overlay064/ov64_0222DCE0.c index 555decbb2c..19e2df306a 100644 --- a/src/overlay064/ov64_0222DCE0.c +++ b/src/overlay064/ov64_0222DCE0.c @@ -4,7 +4,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "struct_decls/struct_0200112C_decl.h" @@ -887,7 +887,7 @@ static void ov64_0222E164 (UnkStruct_ov64_0222E060 * param0) static void ov64_0222E1A4 (UnkStruct_ov64_0222E21C * param0, const UnkStruct_ov64_0222E060 * param1, u32 param2) { - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); param0->unk_21C = NARC_ctor(NARC_INDEX_GRAPHIC__PL_WIFINOTE, param2); @@ -1403,7 +1403,7 @@ static int ov64_0222EA70 (UnkStruct_ov64_0222F038 * param0, UnkStruct_ov64_0222E break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov64_0222F050(param0); param1->unk_04 = 3; } @@ -1624,23 +1624,23 @@ static BOOL ov64_0222EE84 (UnkStruct_ov64_0222F038 * param0, UnkStruct_ov64_0222 { BOOL v0 = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1501); return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); param0->unk_00 = 3; return 1; } - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { if (param0->unk_00 > 0) { param0->unk_00--; v0 = 1; } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { if (param0->unk_00 < 3) { param0->unk_00++; v0 = 1; @@ -1934,7 +1934,7 @@ static int ov64_0222F0C4 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E break; } - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { ov64_0222EA28(param2, 1); param1->unk_04 = 2; ov64_0222FF18(param0); @@ -2250,7 +2250,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E BOOL v2; int v3; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_04 == 8) { sub_02005748(1501); return 3; @@ -2264,7 +2264,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E return 4; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); return 3; } @@ -2273,7 +2273,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E v1 = 0; v2 = 0; - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { if (param0->unk_04 == 8) { param0->unk_04 = param0->unk_06; v1 = 1; @@ -2291,7 +2291,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E } } } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { if ((param0->unk_04 == 3) || (param0->unk_04 == 7)) { param0->unk_04 = 8; v1 = 1; @@ -2310,7 +2310,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E } } } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + } else if (coresys.unk_4C & PAD_KEY_LEFT) { if (param0->unk_04 != 8) { if (param0->unk_04 < (8 / 2)) { param0->unk_04 += (8 / 2); @@ -2322,7 +2322,7 @@ static u32 ov64_0222F798 (UnkStruct_ov64_0222F0C4 * param0, UnkStruct_ov64_0222E v1 = 1; } } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { if (param0->unk_04 != 8) { if (param0->unk_04 < (8 / 2)) { param0->unk_04 += (8 / 2); @@ -2952,7 +2952,7 @@ static int ov64_02230628 (UnkStruct_ov64_02230620 * param0, UnkStruct_ov64_0222E param1->unk_04 = 1; break; case 1: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); ov64_0222E074(param1, 0, 2); ov64_0223087C(param0, param2); @@ -3194,30 +3194,30 @@ static int ov64_02230904 (UnkStruct_ov64_02230904 * param0, UnkStruct_ov64_0222E param1->unk_04 = 2; break; case 2: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1501); param1->unk_04 = 6; } else { - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { ov64_02232138(param0, -1); param1->unk_04 = 3; param0->unk_08 = 2; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { ov64_02232138(param0, 1); param1->unk_04 = 3; param0->unk_08 = 3; - } else if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + } else if (coresys.unk_44 & PAD_KEY_UP) { param1->unk_04 = 5; param0->unk_08 = 0; param0->unk_0C = 4; - } else if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + } else if (coresys.unk_44 & PAD_KEY_DOWN) { param1->unk_04 = 5; param0->unk_08 = 1; param0->unk_0C = 4; } } - if ((Unk_021BF67C.unk_44 & (PAD_KEY_UP | PAD_KEY_DOWN)) == 0) { + if ((coresys.unk_44 & (PAD_KEY_UP | PAD_KEY_DOWN)) == 0) { param0->unk_0E = 0; } break; diff --git a/src/overlay065/ov65_0222DCE0.c b/src/overlay065/ov65_0222DCE0.c index c82da04125..059eb9e1af 100644 --- a/src/overlay065/ov65_0222DCE0.c +++ b/src/overlay065/ov65_0222DCE0.c @@ -6,7 +6,7 @@ #include "inlines.h" #include "assert.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -1695,7 +1695,7 @@ static int ov65_0222F1A8 (UnkStruct_ov65_0222EBE0 * param0, int param1) static int ov65_0222F21C (UnkStruct_ov65_0222EBE0 * param0, int param1) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { ov65_02232CA8(param0, 21); sub_02019060(3, 0); sub_02019060(2, 1); @@ -1967,7 +1967,7 @@ static void ov65_0222F6EC (UnkStruct_ov65_0222EBE0 * param0) static int ov65_0222F7AC (UnkStruct_ov65_0222EBE0 * param0, int param1) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { if (sub_0201A7CC(¶m0->unk_360)) { sub_0200E084(¶m0->unk_360, 0); sub_0201A8FC(¶m0->unk_360); @@ -1998,7 +1998,7 @@ static int ov65_0222F808 (UnkStruct_ov65_0222EBE0 * param0, int param1) return param1; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { if (sub_0201A7CC(¶m0->unk_360)) { sub_0200E084(¶m0->unk_360, 0); sub_0201A8FC(¶m0->unk_360); @@ -2279,7 +2279,7 @@ static int ov65_0222FCB8 (UnkStruct_ov65_0222EBE0 * param0, int param1) static int ov65_0222FCDC (UnkStruct_ov65_0222EBE0 * param0, int param1) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { if (param0->unk_3B4 == 1) { param0->unk_3AC = 10; param0->unk_3A8 = 34; @@ -2608,7 +2608,7 @@ static int ov65_022302C4 (UnkStruct_ov65_0222EBE0 * param0, int param1) if (ov65_0223537C(¶m0->unk_3EC) == 0) { if (ov4_021D2568() == -1) { - if (PAD_BUTTON_X & Unk_021BF67C.unk_48) { + if (PAD_BUTTON_X & coresys.padInput) { if (ov65_02232F00(param0)) { ov65_02232B58(param0, 90, 0); } else { @@ -2667,7 +2667,7 @@ static int ov65_022302C4 (UnkStruct_ov65_0222EBE0 * param0, int param1) v4 = ov65_0222DD20(param0, ¶m0->unk_04->unk_00); if (param0->unk_3D0 == -1) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { if (ov65_0222DDFC(v4)) { sub_02005748(1501); param0->unk_3A8 = 39; @@ -2838,7 +2838,7 @@ static int ov65_022307B0 (UnkStruct_ov65_0222EBE0 * param0, int param1) } if (sub_0201D724(param0->unk_180) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { ov65_02232DFC(param0); param0->unk_3A8 = 24; } else { @@ -2884,7 +2884,7 @@ static int ov65_02230860 (UnkStruct_ov65_0222EBE0 * param0, int param1) ov65_02232DC0(param0, ov4_021D2388()); ov65_02232B58(param0, 16, 0); param0->unk_3A8 = 27; - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + } else if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { ov65_02232B58(param0, 20, 0); param0->unk_3A8 = 25; } else { @@ -2974,7 +2974,7 @@ static int ov65_02230AF8 (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_3BC--; - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) || (param0->unk_3BC == 0)) { + if ((coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) || (param0->unk_3BC == 0)) { ov65_02232DFC(param0); sub_02038378(); sub_02038B60(); @@ -3002,7 +3002,7 @@ static int ov65_02230BB4 (UnkStruct_ov65_0222EBE0 * param0, int param1) return param1; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { ov65_02232DFC(param0); ov65_02232E58(param0, 16); sub_02038378(); @@ -3027,7 +3027,7 @@ static int ov65_02230C04 (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_3BC--; - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) || (param0->unk_3BC == 0)) { + if ((coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) || (param0->unk_3BC == 0)) { ov65_02232DFC(param0); ov65_02232E58(param0, 16); @@ -3071,7 +3071,7 @@ static int ov65_02230CB8 (UnkStruct_ov65_0222EBE0 * param0, int param1) return param1; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { ov65_02232B58(param0, 26, 1); param0->unk_3A8 = 59; param0->unk_3BC = 1; @@ -4436,7 +4436,7 @@ static int ov65_02232564 (UnkStruct_ov65_0222EBE0 * param0, int param1) param0->unk_3A8 = 56; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { param0->unk_3A8 = 56; } @@ -5075,7 +5075,7 @@ static BOOL ov65_02233208 (UnkStruct_ov65_0222EBE0 * param0, u32 param1) return 0; } - if ((Unk_021BF67C.unk_44 & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN)) || (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X)) || (param1 == 2)) { + if ((coresys.unk_44 & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN)) || (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X)) || (param1 == 2)) { return 1; } diff --git a/src/overlay065/ov65_02235060.c b/src/overlay065/ov65_02235060.c index 13058e11e6..1be94ad5cf 100644 --- a/src/overlay065/ov65_02235060.c +++ b/src/overlay065/ov65_02235060.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -199,12 +199,12 @@ u32 ov65_02235198 (UnkStruct_ov65_02235130 * param0) if (v0 == 1) { ov65_02235B30(param0); - if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + if (coresys.unk_44 & PAD_KEY_DOWN) { return 1; } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov65_02235254(param0) > 0) { return 2; } else if (ov65_02235654(param0) == 1) { @@ -987,7 +987,7 @@ static BOOL ov65_02236044 (UnkStruct_ov65_02235130 * param0, UnkStruct_ov65_0223 return 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v4 = ov65_022357A8(param0, param1, v0); if (v4 != NULL) { @@ -1005,31 +1005,31 @@ static BOOL ov65_02236044 (UnkStruct_ov65_02235130 * param0, UnkStruct_ov65_0223 return 0; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_B) { + if (coresys.unk_44 & PAD_BUTTON_B) { v3 = 3; } else { v3 = 2; } - if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + if (coresys.unk_44 & PAD_KEY_UP) { if (v0 == 0) { ov65_02236230(param0, v3, v0, v1); } else { ov65_02236230(param0, 1, 0, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + } else if (coresys.unk_44 & PAD_KEY_DOWN) { if (v0 == 1) { ov65_02236230(param0, v3, v0, v1); } else { ov65_02236230(param0, 1, 1, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_LEFT) { + } else if (coresys.unk_44 & PAD_KEY_LEFT) { if (v0 == 2) { ov65_02236230(param0, v3, v0, v1); } else { ov65_02236230(param0, 1, 2, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_RIGHT) { + } else if (coresys.unk_44 & PAD_KEY_RIGHT) { if (v0 == 3) { ov65_02236230(param0, v3, v0, v1); } else { diff --git a/src/overlay065/ov65_0223648C.c b/src/overlay065/ov65_0223648C.c index 4c0525c4a7..51c72605c3 100644 --- a/src/overlay065/ov65_0223648C.c +++ b/src/overlay065/ov65_0223648C.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -1708,7 +1708,7 @@ static BOOL ov65_02237AC0 (UnkStruct_ov65_022367A8 * param0, UnkStruct_0207DE04 } do { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1501); if (ov65_02237450(param0) == 0) { @@ -1725,7 +1725,7 @@ static BOOL ov65_02237AC0 (UnkStruct_ov65_022367A8 * param0, UnkStruct_0207DE04 } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); param0->unk_00.unk_05 = 22; break; @@ -1737,7 +1737,7 @@ static BOOL ov65_02237AC0 (UnkStruct_ov65_022367A8 * param0, UnkStruct_0207DE04 break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { param0->unk_00.unk_05 = 30; sub_02005748(1501); break; @@ -2443,7 +2443,7 @@ static BOOL ov65_022383D0 (UnkStruct_ov65_022367A8 * param0, UnkStruct_0207DE04 ov65_0223789C(param0); param0->unk_00.unk_05 = 11; } else { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { ov65_022378C4(param0, param1, param2); param0->unk_00.unk_05 = 18; } diff --git a/src/overlay067/ov67_0225C700.c b/src/overlay067/ov67_0225C700.c index dfb8f4580e..a61d39a74c 100644 --- a/src/overlay067/ov67_0225C700.c +++ b/src/overlay067/ov67_0225C700.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -317,7 +317,7 @@ int ov67_0225C820 (UnkStruct_020067E8 * param0, int * param1) } break; case 10: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { int v8; int v9; diff --git a/src/overlay068/ov68_0225C700.c b/src/overlay068/ov68_0225C700.c index d2651ac0f9..41a73baa9c 100644 --- a/src/overlay068/ov68_0225C700.c +++ b/src/overlay068/ov68_0225C700.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -490,7 +490,7 @@ static void ov68_0225C9A0 (UnkStruct_ov68_0225C91C * param0, UnkStruct_020279FC sub_02018368(&Unk_ov68_0225DD48); param0->unk_00 = sub_02018340(param2); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); @@ -780,18 +780,18 @@ static BOOL ov68_0225CE48 (UnkStruct_ov68_0225D0F8 * param0, UnkStruct_ov68_0225 param0->unk_28 = 5; break; case 5: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); param0->unk_28++; break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if ((param0->unk_10 - 1) >= 0) { sub_02005748(1504); param0->unk_10--; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { if ((param0->unk_10 + 1) < 3) { sub_02005748(1504); param0->unk_10++; @@ -1104,7 +1104,7 @@ static BOOL ov68_0225D478 (UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225 param0->unk_60 = 22; break; case 2: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0 = ov68_0225CBEC(param1, 0, 104); ov68_0225D1B4(param3, v0); param0->unk_62 = 3; @@ -1153,7 +1153,7 @@ static BOOL ov68_0225D478 (UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225 } break; case 6: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_A8.unk_00 != (PPW_LOBBY_INVALID_QUESTION_NO)) { param0->unk_60 = 7; } else { @@ -1224,7 +1224,7 @@ static BOOL ov68_0225D478 (UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225 param0->unk_60 = 22; break; case 15: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0 = ov68_0225CBEC(param1, 0, 114); ov68_0225D1B4(param3, v0); param0->unk_62 = 16; @@ -1272,7 +1272,7 @@ static BOOL ov68_0225D478 (UnkStruct_ov68_0225D388 * param0, UnkStruct_ov68_0225 } break; case 19: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { param0->unk_60 = 20; } break; diff --git a/src/overlay069/ov69_0225C700.c b/src/overlay069/ov69_0225C700.c index 25db7558b1..e9b67e4e42 100644 --- a/src/overlay069/ov69_0225C700.c +++ b/src/overlay069/ov69_0225C700.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -926,8 +926,8 @@ static void ov69_0225CBE4 (int param0, int param1, int * param2, int * param3, i int v2 = 0; int v3 = 0; - if (Unk_021BF67C.unk_5C != 0xffff) { - v2 = Unk_021BF67C.unk_5C - param0; + if (coresys.unk_5C != 0xffff) { + v2 = coresys.unk_5C - param0; if (v2 < 0) { v2 ^= -1; @@ -944,8 +944,8 @@ static void ov69_0225CBE4 (int param0, int param1, int * param2, int * param3, i *param2 = v0; *param3 = v2; - if (Unk_021BF67C.unk_5E != 0xffff) { - v3 = Unk_021BF67C.unk_5E - param1; + if (coresys.unk_5E != 0xffff) { + v3 = coresys.unk_5E - param1; if (v3 < 0) { v3 ^= -1; @@ -1178,7 +1178,7 @@ static u32 ov69_0225CF9C (UnkStruct_ov69_0225CE64 * param0) sub_02005748(1501); return 2; } else { - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_X)) { + if ((coresys.padInput & PAD_BUTTON_X)) { { UnkStruct_ov69_0225E0C0 v2; @@ -1200,7 +1200,7 @@ static u32 ov69_0225CF9C (UnkStruct_ov69_0225CE64 * param0) } } } else { - v0 = ov69_0225CC54(param0, Unk_021BF67C.unk_48, Unk_021BF67C.unk_44); + v0 = ov69_0225CC54(param0, coresys.padInput, coresys.unk_44); } } @@ -1430,7 +1430,7 @@ static void ov69_0225D3A4 (UnkStruct_ov69_0225D35C * param0, UnkStruct_020279FC sub_02018368(&Unk_ov69_0225F040); param0->unk_00 = sub_02018340(param2); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); @@ -1482,7 +1482,7 @@ static void ov69_0225D504 (UnkStruct_ov69_0225D35C * param0) } Heap_FreeToHeap(param0->unk_00); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); } @@ -1878,8 +1878,8 @@ static void ov69_0225DC54 (UnkStruct_ov69_0225DC48 * param0) param0->unk_00 = 0; - if (Unk_021BF67C.unk_60) { - if ((Unk_021BF67C.unk_5C >= (25 * 8)) && (Unk_021BF67C.unk_5C <= ((25 + 6) * 8)) && (Unk_021BF67C.unk_5E >= (21 * 8)) && (Unk_021BF67C.unk_5E <= ((21 + 2) * 8))) { + if (coresys.touchInput) { + if ((coresys.unk_5C >= (25 * 8)) && (coresys.unk_5C <= ((25 + 6) * 8)) && (coresys.unk_5E >= (21 * 8)) && (coresys.unk_5E <= ((21 + 2) * 8))) { param0->unk_00 = PAD_BUTTON_B; return; } else { @@ -1888,13 +1888,13 @@ static void ov69_0225DC54 (UnkStruct_ov69_0225DC48 * param0) param0->unk_14 = 0; param0->unk_18 = 0; param0->unk_00 = 0; - param0->unk_08 = Unk_021BF67C.unk_5C; - param0->unk_0C = Unk_021BF67C.unk_5E; + param0->unk_08 = coresys.unk_5C; + param0->unk_0C = coresys.unk_5E; param0->unk_18 = 4; } } - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { switch (param0->unk_04) { case 0: @@ -1908,8 +1908,8 @@ static void ov69_0225DC54 (UnkStruct_ov69_0225DC48 * param0) param0->unk_00 = v0 | v2; param0->unk_10 = v1; param0->unk_14 = v3; - param0->unk_08 = Unk_021BF67C.unk_5C; - param0->unk_0C = Unk_021BF67C.unk_5E; + param0->unk_08 = coresys.unk_5C; + param0->unk_0C = coresys.unk_5E; break; } } else { diff --git a/src/overlay070/ov70_0225C9B4.c b/src/overlay070/ov70_0225C9B4.c index 02f0d1b3a0..a6f27cfc76 100644 --- a/src/overlay070/ov70_0225C9B4.c +++ b/src/overlay070/ov70_0225C9B4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "overlay063/struct_ov63_0222BCE8_decl.h" #include "overlay063/struct_ov63_0222BE18_decl.h" @@ -805,31 +805,31 @@ static void ov70_0225D310 (UnkStruct_ov70_0225CC54 * param0, UnkStruct_ov70_0225 return; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_B) { + if (coresys.unk_44 & PAD_BUTTON_B) { v3 = 3; } else { v3 = 2; } - if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + if (coresys.unk_44 & PAD_KEY_UP) { if (v0 == 0) { ov70_0225D17C(param1, v3, v0, v1); } else { ov70_0225D17C(param1, 1, 0, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + } else if (coresys.unk_44 & PAD_KEY_DOWN) { if (v0 == 1) { ov70_0225D17C(param1, v3, v0, v1); } else { ov70_0225D17C(param1, 1, 1, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_LEFT) { + } else if (coresys.unk_44 & PAD_KEY_LEFT) { if (v0 == 2) { ov70_0225D17C(param1, v3, v0, v1); } else { ov70_0225D17C(param1, 1, 2, v1); } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_RIGHT) { + } else if (coresys.unk_44 & PAD_KEY_RIGHT) { if (v0 == 3) { ov70_0225D17C(param1, v3, v0, v1); } else { diff --git a/src/overlay070/ov70_0225D9A4.c b/src/overlay070/ov70_0225D9A4.c index a73c1b0834..dbb5819921 100644 --- a/src/overlay070/ov70_0225D9A4.c +++ b/src/overlay070/ov70_0225D9A4.c @@ -4,7 +4,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -742,7 +742,7 @@ int ov70_0225DB90 (UnkStruct_020067E8 * param0, int * param1) } break; case 4: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { (*param1) = 7; } break; @@ -1293,7 +1293,7 @@ static void ov70_0225E4EC (UnkStruct_ov70_0225E4EC * param0, SaveData * param1, sub_0201DBEC(32, param2); GXLayers_SetBanks(&Unk_ov70_0226D664); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); { diff --git a/src/overlay070/ov70_022630A4.c b/src/overlay070/ov70_022630A4.c index 8c018e436e..04c8f65cee 100644 --- a/src/overlay070/ov70_022630A4.c +++ b/src/overlay070/ov70_022630A4.c @@ -4,7 +4,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" @@ -465,7 +465,7 @@ static BOOL ov70_02263120 (int param0) break; } - if (Unk_021BF67C.unk_44 & v0) { + if (coresys.unk_44 & v0) { return 1; } @@ -905,7 +905,7 @@ static BOOL ov70_02263414 (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225 ov70_02262E88(param0, 21); break; case 18: - if (!((sub_020057D4(1448) == 0) && (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)))) { + if (!((sub_020057D4(1448) == 0) && (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)))) { break; } @@ -1333,7 +1333,7 @@ static BOOL ov70_02263CC8 (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225 return 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { { UnkStruct_ov70_0225CC54 * v17; u32 v18; @@ -1421,7 +1421,7 @@ static BOOL ov70_02263CC8 (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225 } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { if (ov70_0225E3F0(param1) == 0) { ov70_0225E328(param1, ov66_0222E338(v11), 0); sub_02005748(1500); @@ -2480,7 +2480,7 @@ static BOOL ov70_02264D38 (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225 } break; case 2: - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (Unk_021BF67C.unk_48 & PAD_KEY_DOWN)) { + if ((coresys.padInput & PAD_BUTTON_B) || (coresys.padInput & PAD_KEY_DOWN)) { ov66_0222EBC4(v4, param2); ov70_0225DFCC(param1); v0->unk_0A = 6; diff --git a/src/overlay070/ov70_02265F38.c b/src/overlay070/ov70_02265F38.c index 9d153b137c..66cbec6774 100644 --- a/src/overlay070/ov70_02265F38.c +++ b/src/overlay070/ov70_02265F38.c @@ -4,7 +4,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" @@ -345,7 +345,7 @@ BOOL ov70_02265F38 (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225DEE8 * } if (v0->unk_14 == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); if (ov66_02233374() == 0) { @@ -831,7 +831,7 @@ BOOL ov70_022669FC (UnkStruct_ov70_02263344 * param0, UnkStruct_ov70_0225DEE8 * } break; case 1: - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) || (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) || (Unk_021BF67C.unk_48 & PAD_KEY_DOWN)) { + if ((coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_KEY_RIGHT) || (coresys.padInput & PAD_KEY_LEFT) || (coresys.padInput & PAD_KEY_DOWN)) { ov70_02266CB0(&v0->unk_00, param1); ov70_0225DFEC(param1); diff --git a/src/overlay070/ov70_02269190.c b/src/overlay070/ov70_02269190.c index 6eb162663b..4ad972c1b9 100644 --- a/src/overlay070/ov70_02269190.c +++ b/src/overlay070/ov70_02269190.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "overlay066/struct_ov66_0222DFF8_decl.h" @@ -1941,19 +1941,19 @@ static BOOL ov70_0226AC24 (UnkStruct_ov70_02269204 * param0, UnkStruct_ov70_0226 if (param1->unk_08 == ov70_0225CCAC(param0->unk_04)) { u32 v4 = 4; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v4 = 0; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { v4 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { v4 = 3; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { v4 = 2; } diff --git a/src/overlay071/ov71_0223B140.c b/src/overlay071/ov71_0223B140.c index 49880355e7..dac80c0397 100644 --- a/src/overlay071/ov71_0223B140.c +++ b/src/overlay071/ov71_0223B140.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -939,7 +939,7 @@ static int ov71_0223BEF8 (UnkStruct_ov71_0223B620 * param0) param0->unk_30D4 = 0xffffffff; - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { param0->unk_30C4 = 1; } @@ -948,7 +948,7 @@ static int ov71_0223BEF8 (UnkStruct_ov71_0223B620 * param0) if (param0->unk_30D4 != 0xffffffff) { v1 = 1; v0 = 1; - } else if (Unk_021BF67C.unk_62) { + } else if (coresys.unk_62) { param0->unk_30D4 = ov71_0223C654(param0->unk_00, Unk_ov71_0223D4D0[param0->unk_B4->unk_04_0].unk_00[param0->unk_337C]); if (param0->unk_30C4) { @@ -960,9 +960,9 @@ static int ov71_0223BEF8 (UnkStruct_ov71_0223B620 * param0) } if (v1 == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0 = 3; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v0 = 4; } } @@ -977,23 +977,23 @@ static void ov71_0223BFBC (UnkStruct_ov71_0223B620 * param0) v0 = 0; - if ((Unk_021BF67C.unk_5C != 0xffff) && (Unk_021BF67C.unk_5E != 0xffff) && (param0->unk_30DC != 0xffff) && (param0->unk_30E0 != 0xffff)) { + if ((coresys.unk_5C != 0xffff) && (coresys.unk_5E != 0xffff) && (param0->unk_30DC != 0xffff) && (param0->unk_30E0 != 0xffff)) { if ((param0->unk_30D4 != 0xffffffff) && (param0->unk_30D4 != 0)) { if (param0->unk_B4->unk_48[param0->unk_30D4 - 1].unk_00_0) { - if (param0->unk_30DC > Unk_021BF67C.unk_5C) { - v1 = param0->unk_30DC - Unk_021BF67C.unk_5C; + if (param0->unk_30DC > coresys.unk_5C) { + v1 = param0->unk_30DC - coresys.unk_5C; param0->unk_3364.unk_02 = -1; } else { - v1 = Unk_021BF67C.unk_5C - param0->unk_30DC; + v1 = coresys.unk_5C - param0->unk_30DC; param0->unk_3364.unk_02 = 1; } if ((v1 >= 3) && (v1 <= 40)) { - if (param0->unk_30E0 > Unk_021BF67C.unk_5E) { - v1 = param0->unk_30E0 - Unk_021BF67C.unk_5E; + if (param0->unk_30E0 > coresys.unk_5E) { + v1 = param0->unk_30E0 - coresys.unk_5E; param0->unk_3364.unk_03 = -1; } else { - v1 = Unk_021BF67C.unk_5E - param0->unk_30E0; + v1 = coresys.unk_5E - param0->unk_30E0; param0->unk_3364.unk_03 = 1; } @@ -1004,11 +1004,11 @@ static void ov71_0223BFBC (UnkStruct_ov71_0223B620 * param0) ov71_0223C444(¶m0->unk_3364); } } else if (v1 <= 40) { - if (param0->unk_30E0 > Unk_021BF67C.unk_5E) { - v1 = param0->unk_30E0 - Unk_021BF67C.unk_5E; + if (param0->unk_30E0 > coresys.unk_5E) { + v1 = param0->unk_30E0 - coresys.unk_5E; param0->unk_3364.unk_03 = -1; } else { - v1 = Unk_021BF67C.unk_5E - param0->unk_30E0; + v1 = coresys.unk_5E - param0->unk_30E0; param0->unk_3364.unk_03 = 1; } @@ -1027,8 +1027,8 @@ static void ov71_0223BFBC (UnkStruct_ov71_0223B620 * param0) } } - param0->unk_30DC = Unk_021BF67C.unk_5C; - param0->unk_30E0 = Unk_021BF67C.unk_5E; + param0->unk_30DC = coresys.unk_5C; + param0->unk_30E0 = coresys.unk_5E; } static void ov71_0223C0D8 (UnkStruct_ov71_0223B620 * param0, const u8 param1) @@ -1333,7 +1333,7 @@ static int ov71_0223C60C (UnkStruct_02018340 * param0, const UnkUnion_02022594 * if (v0 != 0) { u16 v1 = 0x40; - if (sub_0201C784(param0, 2, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0, 2, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } else { @@ -1352,7 +1352,7 @@ static int ov71_0223C654 (UnkStruct_02018340 * param0, const UnkUnion_02022594 * if (v0 != 0) { u16 v1 = 0x40; - if (sub_0201C784(param0, 2, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0, 2, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } else { diff --git a/src/overlay072/ov72_0223D7A0.c b/src/overlay072/ov72_0223D7A0.c index 8720aa5372..faf1541f70 100644 --- a/src/overlay072/ov72_0223D7A0.c +++ b/src/overlay072/ov72_0223D7A0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "assert.h" #include "inlines.h" @@ -1166,21 +1166,21 @@ static void ov72_0223EA18 (UnkStruct_ov72_0223DB98 * param0) v0 = 0; - if ((Unk_021BF67C.unk_5C != 0xffff) && (Unk_021BF67C.unk_5E != 0xffff) && (param0->unk_5D0C != 0xffff) && (param0->unk_5D10 != 0xffff)) { - if (param0->unk_5D0C > Unk_021BF67C.unk_5C) { - v1 = param0->unk_5D0C - Unk_021BF67C.unk_5C; + if ((coresys.unk_5C != 0xffff) && (coresys.unk_5E != 0xffff) && (param0->unk_5D0C != 0xffff) && (param0->unk_5D10 != 0xffff)) { + if (param0->unk_5D0C > coresys.unk_5C) { + v1 = param0->unk_5D0C - coresys.unk_5C; param0->unk_5D04.unk_02 = -1; } else { - v1 = Unk_021BF67C.unk_5C - param0->unk_5D0C; + v1 = coresys.unk_5C - param0->unk_5D0C; param0->unk_5D04.unk_02 = 1; } if ((v1 >= 3) && (v1 <= 40)) { - if (param0->unk_5D10 > Unk_021BF67C.unk_5E) { - v1 = param0->unk_5D10 - Unk_021BF67C.unk_5E; + if (param0->unk_5D10 > coresys.unk_5E) { + v1 = param0->unk_5D10 - coresys.unk_5E; param0->unk_5D04.unk_03 = -1; } else { - v1 = Unk_021BF67C.unk_5E - param0->unk_5D10; + v1 = coresys.unk_5E - param0->unk_5D10; param0->unk_5D04.unk_03 = 1; } @@ -1191,11 +1191,11 @@ static void ov72_0223EA18 (UnkStruct_ov72_0223DB98 * param0) (void)0; } } else if (v1 <= 40) { - if (param0->unk_5D10 > Unk_021BF67C.unk_5E) { - v1 = param0->unk_5D10 - Unk_021BF67C.unk_5E; + if (param0->unk_5D10 > coresys.unk_5E) { + v1 = param0->unk_5D10 - coresys.unk_5E; param0->unk_5D04.unk_03 = -1; } else { - v1 = Unk_021BF67C.unk_5E - param0->unk_5D10; + v1 = coresys.unk_5E - param0->unk_5D10; param0->unk_5D04.unk_03 = 1; } @@ -1208,8 +1208,8 @@ static void ov72_0223EA18 (UnkStruct_ov72_0223DB98 * param0) } } - param0->unk_5D0C = Unk_021BF67C.unk_5C; - param0->unk_5D10 = Unk_021BF67C.unk_5E; + param0->unk_5D0C = coresys.unk_5C; + param0->unk_5D10 = coresys.unk_5E; } static void ov72_0223EAD8 (UnkStruct_ov72_0223EAD8 * param0) diff --git a/src/overlay073/ov73_021D0D80.c b/src/overlay073/ov73_021D0D80.c index acf1d8f15c..715ac0208d 100644 --- a/src/overlay073/ov73_021D0D80.c +++ b/src/overlay073/ov73_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -283,18 +283,18 @@ static BOOL ov73_021D0FFC (void) BOOL v0 = 0; u16 v1, v2; - if (Unk_021BF67C.unk_60) { - if ((Unk_021BF67C.unk_5C < 256) && (Unk_021BF67C.unk_5E < 192)) { - if (Unk_021BF67C.unk_5C < 128) { - v1 = 128 - Unk_021BF67C.unk_5C; + if (coresys.touchInput) { + if ((coresys.unk_5C < 256) && (coresys.unk_5E < 192)) { + if (coresys.unk_5C < 128) { + v1 = 128 - coresys.unk_5C; } else { - v1 = Unk_021BF67C.unk_5C - 128; + v1 = coresys.unk_5C - 128; } - if (Unk_021BF67C.unk_5E < 100) { - v2 = 100 - Unk_021BF67C.unk_5E; + if (coresys.unk_5E < 100) { + v2 = 100 - coresys.unk_5E; } else { - v2 = Unk_021BF67C.unk_5E - 100; + v2 = coresys.unk_5E - 100; } if ((v1 * v1 + v2 * v2) <= 16 * 16) { @@ -741,7 +741,7 @@ static BOOL ov73_021D1510 (UnkStruct_ov73_021D1058 * param0, u32 param1, int par } break; case 2: - if ((param2 != 0) || ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A)) { + if ((param2 != 0) || ((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A)) { sub_0201A8FC(¶m0->unk_1C); param0->unk_50 = 0; v0 = 1; @@ -895,7 +895,7 @@ static BOOL ov73_021D1784 (UnkStruct_ov73_021D1058 * param0, u32 param1, int par } break; case 3: - if (((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A) || ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) == PAD_BUTTON_B)) { + if (((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A) || ((coresys.padInput & PAD_BUTTON_B) == PAD_BUTTON_B)) { sub_02005748(1500); param0->unk_54 = 4; } @@ -1596,7 +1596,7 @@ static BOOL ov73_021D2318 (UnkStruct_ov73_021D1058 * param0) param0->unk_0C = 22; break; case 22: - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { param0->unk_0C = 27; break; } @@ -1762,7 +1762,7 @@ static BOOL ov73_021D2318 (UnkStruct_ov73_021D1058 * param0) param0->unk_94[1] = 0; {sub_02019EBC(param0->unk_18, 0);} param0->unk_0C = 48; - } else if (Unk_021BF67C.unk_48) { + } else if (coresys.padInput) { param0->unk_0C = 49; } break; @@ -1895,7 +1895,7 @@ static BOOL ov73_021D2318 (UnkStruct_ov73_021D1058 * param0) } break; case 67: - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A) { + if ((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A) { param0->unk_7C = 6; param0->unk_80 = 10; param0->unk_78 = 2; @@ -1908,7 +1908,7 @@ static BOOL ov73_021D2318 (UnkStruct_ov73_021D1058 * param0) break; } - if ((Unk_021BF67C.unk_48 & PAD_KEY_LEFT) == PAD_KEY_LEFT || (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) == PAD_KEY_RIGHT) { + if ((coresys.padInput & PAD_KEY_LEFT) == PAD_KEY_LEFT || (coresys.padInput & PAD_KEY_RIGHT) == PAD_KEY_RIGHT) { if (param0->unk_84 == 0) { param0->unk_84 = 1; } else { diff --git a/src/overlay073/ov73_021D3250.c b/src/overlay073/ov73_021D3250.c index 6d51d47758..2438008ebd 100644 --- a/src/overlay073/ov73_021D3250.c +++ b/src/overlay073/ov73_021D3250.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -454,7 +454,7 @@ asm static BOOL ov73_021D3698 (UnkStruct_ov73_021D342C * param0, int param1, int str r0, [r4, #0xc] b _021D3798 _021D3768: - ldr r0, = Unk_021BF67C + ldr r0, = coresys ldr r1, [r0, #0x48] mov r0, #1 and r0, r1 diff --git a/src/overlay074/ov74_021D0D80.c b/src/overlay074/ov74_021D0D80.c index b3f7c5f8bb..e9169d0862 100644 --- a/src/overlay074/ov74_021D0D80.c +++ b/src/overlay074/ov74_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -174,7 +174,7 @@ int ov74_021D0F60 (UnkStruct_020067E8 * param0, int * param1) } break; case 2: - if (((Unk_021BF67C.unk_48 & PAD_BUTTON_A) && (v0->unk_10_2 == (7 - 1))) || (Unk_021BF67C.unk_48 & PAD_BUTTON_B)) { + if (((coresys.padInput & PAD_BUTTON_A) && (v0->unk_10_2 == (7 - 1))) || (coresys.padInput & PAD_BUTTON_B)) { v1 = ov74_021D1B44(v0); if (v1 == 1) { @@ -711,23 +711,23 @@ static void ov74_021D1A24 (UnkStruct_ov74_021D0D80 * param0) v0 = &(param0->unk_5C[param0->unk_10_2]); if (param0->unk_10_2 != 6) { - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { v0->unk_02 = (v0->unk_02 + 1) % v0->unk_00; ov74_021D17CC(param0, param0->unk_10_2); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { v0->unk_02 = (v0->unk_02 + v0->unk_00 - 1) % v0->unk_00; ov74_021D17CC(param0, param0->unk_10_2); sub_02005748(1500); } } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_10_2 = (param0->unk_10_2 + 7 - 1) % 7; sub_0201C63C(param0->unk_14, 0, 3, -(param0->unk_10_2 * 16 + 24)); ov74_021D1BE4(param0, param0->unk_10_2, 1); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_10_2 = (param0->unk_10_2 + 1) % 7; sub_0201C63C(param0->unk_14, 0, 3, -(param0->unk_10_2 * 16 + 24)); ov74_021D1BE4(param0, param0->unk_10_2, 1); diff --git a/src/overlay075/ov75_021D0D80.c b/src/overlay075/ov75_021D0D80.c index 3ba27b68e6..5406e454a7 100644 --- a/src/overlay075/ov75_021D0D80.c +++ b/src/overlay075/ov75_021D0D80.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02002F38_decl.h" @@ -194,7 +194,7 @@ static BOOL ov75_021D0E34 (UnkStruct_ov75_021D1184 * param0) static int ov75_021D0E5C (UnkStruct_ov75_021D1184 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1507); return 1; } @@ -206,7 +206,7 @@ static int ov75_021D0E80 (UnkStruct_ov75_021D1184 * param0) { u8 v0 = 0; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_A)) { if (param0->unk_11 == 3) { if (param0->unk_12 == 0) { if (ov75_021D0E34(param0)) { @@ -231,23 +231,23 @@ static int ov75_021D0E80 (UnkStruct_ov75_021D1184 * param0) } return 1; - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B)) { + } else if (coresys.padInput & (PAD_BUTTON_B)) { sub_02005748(1501); param0->unk_0C = UnkEnum_ov75_021D0E80_03; return 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_START) { + if (coresys.padInput & PAD_BUTTON_START) { param0->unk_11 = 3; param0->unk_12 = 0; v0 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_11 = (param0->unk_11 + 1) % 4; v0 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + } else if (coresys.padInput & PAD_KEY_UP) { param0->unk_11 = (param0->unk_11 + 4 - 1) % 4; v0 = 1; - } else if (Unk_021BF67C.unk_48 & (PAD_KEY_RIGHT | PAD_KEY_LEFT)) { + } else if (coresys.padInput & (PAD_KEY_RIGHT | PAD_KEY_LEFT)) { if (param0->unk_11 == 3) { param0->unk_12 ^= 1; v0 = 1; @@ -288,7 +288,7 @@ static int ov75_021D0FA0 (UnkStruct_ov75_021D1184 * param0) break; case 1: - if (!(Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if (!(coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { return 0; } diff --git a/src/overlay076/ov76_0223B140.c b/src/overlay076/ov76_0223B140.c index cfc20e2e7d..c5ee224f88 100644 --- a/src/overlay076/ov76_0223B140.c +++ b/src/overlay076/ov76_0223B140.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_0200C6E4_decl.h" @@ -57,7 +57,7 @@ void ov76_0223B184 (UnkUnion_02022594 * param0, UnkStruct_0200D0F4 * param1, BOO } if (param2 == 1) { - sub_0200D4C4(param1, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + sub_0200D4C4(param1, coresys.unk_5C, coresys.unk_5E); sub_0200D550(param1, &v0, &v1); ov76_0223B174(param0); } else { diff --git a/src/overlay076/ov76_0223D338.c b/src/overlay076/ov76_0223D338.c index e654477df5..8ca53558bd 100644 --- a/src/overlay076/ov76_0223D338.c +++ b/src/overlay076/ov76_0223D338.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02012CE0_decl.h" @@ -259,23 +259,23 @@ static BOOL ov76_0223D574 (int * param0) { int * v0 = param0; - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { (*v0)++; (*v0) %= 12; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + } else if (coresys.unk_4C & PAD_KEY_LEFT) { if (*v0 > 0) { (*v0)--; } else { *v0 = 12 - 1; } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + } else if (coresys.unk_4C & PAD_KEY_UP) { if ((*v0 / 4) != 0) { (*v0) -= 4; (*v0) %= 12; } else { return 0; } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { if ((*v0 / 4) != (3 - 1)) { (*v0) += 4; (*v0) %= 12; @@ -369,7 +369,7 @@ static BOOL ov76_0223D674 (UnkStruct_ov76_0223DE00 * param0) int v2; int v3; - if (sub_02022798() == 1) { + if (TouchScreen_Tapped() == 1) { ov76_0223D4FC(param0); break; } @@ -393,12 +393,12 @@ static BOOL ov76_0223D674 (UnkStruct_ov76_0223DE00 * param0) ov76_0223B1E0(param0); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { param0->unk_3D4++; ov76_0223CA30(¶m0->unk_D4.unk_18[0], 8); ov76_0223BF74(param0->unk_D4.unk_10, ¶m0->unk_D4.unk_18[1], 1, param0, param0->unk_3C4[0]); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { param0->unk_3D4 = 5; sub_02005748(1501); } @@ -1260,7 +1260,7 @@ static BOOL ov76_0223E950 (UnkStruct_ov76_0223DE00 * param0) param0->unk_3D4++; break; case 1: - if (Unk_021BF67C.unk_48 & (0x1 | 0x2 | 0x400 | 0x800 | 0x40 | 0x80 | 0x20 | 0x10)) { + if (coresys.padInput & (0x1 | 0x2 | 0x400 | 0x800 | 0x40 | 0x80 | 0x20 | 0x10)) { param0->unk_3D4++; } break; @@ -1296,13 +1296,13 @@ static BOOL ov76_0223E9C4 (UnkStruct_ov76_0223DE00 * param0) ov76_0223D600(param0, 1, 0); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { ov76_0223C80C(param0, param0->unk_3C4[0], param0->unk_3C4[1]); ov76_0223D600(param0, 1, 1); ov76_0223CA30(¶m0->unk_D4.unk_18[0], 11); param0->unk_3D4 = 2; sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { sub_0200D3F4(param0->unk_2F4[1], 0); ov76_0223D600(param0, 0, 1); param0->unk_3D4 = 3; @@ -1311,7 +1311,7 @@ static BOOL ov76_0223E9C4 (UnkStruct_ov76_0223DE00 * param0) } break; case 2: - if (Unk_021BF67C.unk_48 & (0x1 | 0x2 | 0x400 | 0x800 | 0x40 | 0x80 | 0x20 | 0x10)) { + if (coresys.padInput & (0x1 | 0x2 | 0x400 | 0x800 | 0x40 | 0x80 | 0x20 | 0x10)) { param0->unk_3D4 = 3; } break; diff --git a/src/overlay077/ov77_021D0D80.c b/src/overlay077/ov77_021D0D80.c index 06088e2eb7..9624a5ebbf 100644 --- a/src/overlay077/ov77_021D0D80.c +++ b/src/overlay077/ov77_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -221,14 +221,14 @@ static int ov77_021D0E3C (UnkStruct_020067E8 * param0, int * param1) if (ov77_021D1A60(&v0->unk_238, v0->unk_04, v0->unk_00) == 1) { v0->unk_238.unk_00 = 0; - if (Unk_021BF67C.unk_6C == 0) { + if (coresys.unk_6C == 0) { v0->unk_4EC = 30 * 1; v0->unk_238.unk_29C = 1; v0->unk_238.unk_2A0 = 0; *param1 = 2; } else { v0->unk_4EC = 0; - Unk_021BF67C.unk_6C = 0; + coresys.unk_6C = 0; v0->unk_238.unk_2A0 = 1; *param1 = 1; } @@ -259,7 +259,7 @@ static int ov77_021D0E3C (UnkStruct_020067E8 * param0, int * param1) v0->unk_4F8++; - if (((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A) || ((Unk_021BF67C.unk_48 & PAD_BUTTON_START) == PAD_BUTTON_START)) { + if (((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A) || ((coresys.padInput & PAD_BUTTON_START) == PAD_BUTTON_START)) { v0->unk_4E8 = 1; sub_0200564C(0, 60); sub_02005844(487, 1); @@ -268,7 +268,7 @@ static int ov77_021D0E3C (UnkStruct_020067E8 * param0, int * param1) break; } - if (((Unk_021BF67C.unk_44 & (PAD_BUTTON_B | PAD_KEY_UP | PAD_BUTTON_SELECT)) == (PAD_BUTTON_B | PAD_KEY_UP | PAD_BUTTON_SELECT))) { + if (((coresys.unk_44 & (PAD_BUTTON_B | PAD_KEY_UP | PAD_BUTTON_SELECT)) == (PAD_BUTTON_B | PAD_KEY_UP | PAD_BUTTON_SELECT))) { v0->unk_4E8 = 2; sub_0200F174(0, 0, 0, 0x0, 6, 1, v0->unk_00); *param1 = 6; @@ -277,7 +277,7 @@ static int ov77_021D0E3C (UnkStruct_020067E8 * param0, int * param1) if (v0->unk_4F8 > 30 * 30) { v0->unk_4E8 = 3; - Unk_021BF67C.unk_6C = 1; + coresys.unk_6C = 1; {GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG0, 0);} sub_0200564C(0, 60); *param1 = 5; @@ -386,7 +386,7 @@ static void ov77_021D1184 (void) static BOOL ov77_021D11A4 (void) { - if (((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A) || ((Unk_021BF67C.unk_48 & PAD_BUTTON_START) == PAD_BUTTON_START) || ((Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) == PAD_BUTTON_SELECT)) { + if (((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A) || ((coresys.padInput & PAD_BUTTON_START) == PAD_BUTTON_START) || ((coresys.padInput & PAD_BUTTON_SELECT) == PAD_BUTTON_SELECT)) { return 1; } @@ -908,7 +908,7 @@ static BOOL ov77_021D1A60 (UnkStruct_ov77_021D1568 * param0, UnkStruct_02018340 G3X_AntiAlias(1); } - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); param0->unk_04.unk_00 = 2; @@ -1214,7 +1214,7 @@ static BOOL ov77_021D21C0 (UnkStruct_ov77_021D1568 * param0, UnkStruct_02018340 G2_BlendNone(); G3X_EdgeMarking(0); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); return 1; diff --git a/src/overlay077/ov77_021D25B0.c b/src/overlay077/ov77_021D25B0.c index 5ae092c184..719f7167a0 100644 --- a/src/overlay077/ov77_021D25B0.c +++ b/src/overlay077/ov77_021D25B0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -868,7 +868,7 @@ static void ov77_021D2B38 (void * param0) UnkStruct_ov77_021D37C0 * v2 = &v1->unk_34; if (v2->unk_25B == 1) { - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG0, 1); @@ -957,7 +957,7 @@ static int ov77_021D2D08 (UnkStruct_020067E8 * param0, int * param1) v0->unk_08 = 0; v0->unk_2A8 = 0; - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); v0->unk_14 = LCRNG_GetSeed(); @@ -970,9 +970,9 @@ static int ov77_021D2D94 (UnkStruct_020067E8 * param0, int * param1) { UnkStruct_ov77_021D2E9C * v0 = sub_0200682C(param0); - if ((v0->unk_2A8) && ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_BUTTON_START))) { + if ((v0->unk_2A8) && ((coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_BUTTON_START))) { v0->unk_08 = 1; - Unk_021BF67C.unk_6C = 0; + coresys.unk_6C = 0; sub_0200F344(0, 0x0); sub_0200F344(1, 0x0); } @@ -1353,7 +1353,7 @@ static void ov77_021D34A8 (UnkStruct_ov77_021D2E9C * param0) ov77_021D6CFC(param0->unk_34.unk_1C); param0->unk_34.unk_10 = param0->unk_0C; - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); for (v0 = 0; v0 < 4; v0++) { @@ -1639,7 +1639,7 @@ static void ov77_021D3D4C (UnkStruct_ov77_021D2E9C * param0, UnkStruct_ov77_021D static void ov77_021D3DC4 (UnkStruct_ov77_021D37C0 * param0) { - if (Unk_021BF67C.unk_65 == 0) { + if (coresys.unk_65 == 0) { sub_02019184(param0->unk_10, 1, 3, 0); sub_02019184(param0->unk_10, 2, 3, 0); sub_02019184(param0->unk_10, 3, 3, 0); @@ -2065,7 +2065,7 @@ static BOOL ov77_021D4230 (UnkStruct_ov77_021D2E9C * param0, UnkStruct_ov77_021D ov77_021D603C(param1->unk_14, 16, 1); ov77_021D636C(param1->unk_14, 0); ov77_021D3B5C(param0, param1); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); ov77_021D3DC4(param1); param1->unk_246 = 1; @@ -2111,7 +2111,7 @@ static BOOL ov77_021D4230 (UnkStruct_ov77_021D2E9C * param0, UnkStruct_ov77_021D if (ScreenWipe_Done()) { if (1) { - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); ov77_021D3DC4(param1); @@ -2139,7 +2139,7 @@ static BOOL ov77_021D4230 (UnkStruct_ov77_021D2E9C * param0, UnkStruct_ov77_021D if (ScreenWipe_Done()) { MI_CpuCopy16(param1->unk_240, (void *)HW_BG_PLTT, 0x200); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); ov77_021D3D4C(param0, param1); @@ -2185,7 +2185,7 @@ static BOOL ov77_021D4230 (UnkStruct_ov77_021D2E9C * param0, UnkStruct_ov77_021D ov77_021D6290(param1->unk_14, (16 << FX32_SHIFT)); if (ScreenWipe_Done()) { - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); (*v0)++; } diff --git a/src/overlay077/ov77_021D54B0.c b/src/overlay077/ov77_021D54B0.c index fd85570a47..67d80c110c 100644 --- a/src/overlay077/ov77_021D54B0.c +++ b/src/overlay077/ov77_021D54B0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02009714_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -524,7 +524,7 @@ void ov77_021D6290 (UnkStruct_ov77_021D5564 * param0, fx32 param1) VecFx32 v1; int v2, v3; - if (Unk_021BF67C.unk_65 == 0) { + if (coresys.unk_65 == 0) { v2 = 13; v3 = 15; } else { @@ -563,7 +563,7 @@ void ov77_021D636C (UnkStruct_ov77_021D5564 * param0, int param1) VecFx32 v1; if (param1 == 0) { - if (Unk_021BF67C.unk_65 == 0) { + if (coresys.unk_65 == 0) { sub_02021F24(param0->unk_250[13], 0); sub_02021F24(param0->unk_250[14], 0); sub_02021F24(param0->unk_250[15], 1); diff --git a/src/overlay078/ov78_021D0D80.c b/src/overlay078/ov78_021D0D80.c index 29db1d998c..dfb79c64bd 100644 --- a/src/overlay078/ov78_021D0D80.c +++ b/src/overlay078/ov78_021D0D80.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -911,7 +911,7 @@ static BOOL ov78_021D1978 (UnkStruct_ov78_021D107C * param0, int param1) case 3: ov78_021D1C58(param0); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov78_021D1C98(param0, 1); sub_02005748(1500); @@ -1085,14 +1085,14 @@ static void ov78_021D1C28 (UnkStruct_ov78_021D107C * param0) static void ov78_021D1C58 (UnkStruct_ov78_021D107C * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_54 - 1 >= 0) { param0->unk_54 -= 1; sub_02005748(1500); } } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_54 + 1 < 3) { param0->unk_54 += 1; sub_02005748(1500); diff --git a/src/overlay079/ov79_021D0D80.c b/src/overlay079/ov79_021D0D80.c index 84051882a3..5742ba3c09 100644 --- a/src/overlay079/ov79_021D0D80.c +++ b/src/overlay079/ov79_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -254,7 +254,7 @@ static int ov79_021D0FEC (UnkStruct_ov79_021D0E1C * param0) v1 = ov79_021D0FB0(param0); - if (Unk_021BF67C.unk_44 != 0) { + if (coresys.unk_44 != 0) { if (param0->unk_14 == 0) { v0 = sub_02001288(param0->unk_C4); } @@ -269,14 +269,14 @@ static int ov79_021D0FEC (UnkStruct_ov79_021D0E1C * param0) return 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); param0->unk_1A = 0xFF; param0->unk_10 = 0; return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); switch (v0) { @@ -314,7 +314,7 @@ static int ov79_021D10B8 (UnkStruct_ov79_021D0E1C * param0) v0 = sub_02001288(param0->unk_C8); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); ov79_021D1F60(param0); ov79_021D2214(param0, 0); @@ -322,7 +322,7 @@ static int ov79_021D10B8 (UnkStruct_ov79_021D0E1C * param0) return 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); switch (v0) { @@ -382,7 +382,7 @@ static int ov79_021D11C0 (UnkStruct_ov79_021D0E1C * param0) return 0; } - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) == 0) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) == 0) { return 0; } diff --git a/src/overlay079/ov79_021D2268.c b/src/overlay079/ov79_021D2268.c index d6a6a95567..a43e6fd7a9 100644 --- a/src/overlay079/ov79_021D2268.c +++ b/src/overlay079/ov79_021D2268.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -752,7 +752,7 @@ static int ov79_021D2C08 (UnkStruct_ov79_021D2928 * param0) return 7; } - if (((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) == 0) && (param0->unk_0E++ < 90)) { + if (((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) == 0) && (param0->unk_0E++ < 90)) { return 7; } diff --git a/src/overlay080/ov80_021D1458.c b/src/overlay080/ov80_021D1458.c index 30c5abd064..591d71c334 100644 --- a/src/overlay080/ov80_021D1458.c +++ b/src/overlay080/ov80_021D1458.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02022550_decl.h" @@ -247,7 +247,7 @@ int ov80_021D163C (UnkStruct_ov80_021D2A08 * param0) { UnkStruct_ov80_021D1478 * v0 = param0->unk_34; - if ((v0->unk_14 <= 1) && Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if ((v0->unk_14 <= 1) && coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); return 1; } @@ -256,7 +256,7 @@ int ov80_021D163C (UnkStruct_ov80_021D2A08 * param0) return 0; } - ov80_021D18F8(param0, Unk_021BF67C.unk_44); + ov80_021D18F8(param0, coresys.unk_44); return 0; } @@ -266,14 +266,14 @@ int ov80_021D1678 (UnkStruct_ov80_021D2A08 * param0) UnkStruct_ov80_021D1478 * v0 = param0->unk_34; if (v0->unk_14 <= 1) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov80_021D29BC(param0)) { sub_02005748(1501); return 1; } return 0; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); return 1; } @@ -283,7 +283,7 @@ int ov80_021D1678 (UnkStruct_ov80_021D2A08 * param0) return 0; } - ov80_021D18F8(param0, Unk_021BF67C.unk_44); + ov80_021D18F8(param0, coresys.unk_44); return 0; } @@ -291,12 +291,12 @@ int ov80_021D16D0 (UnkStruct_ov80_021D2A08 * param0) { UnkStruct_ov80_021D1478 * v0 = param0->unk_34; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_B)) { sub_02005748(1501); return 1; } - ov80_021D18F8(param0, Unk_021BF67C.unk_44); + ov80_021D18F8(param0, coresys.unk_44); return 0; } @@ -396,7 +396,7 @@ static int ov80_021D1848 (UnkStruct_ov80_021D2A08 * param0, int param1) v1 = 0x12; - if (sub_0201C784(param0->unk_28, 5, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_28, 5, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return v0; } diff --git a/src/overlay081/ov81_021D0D80.c b/src/overlay081/ov81_021D0D80.c index f77b6b107e..20aeab9981 100644 --- a/src/overlay081/ov81_021D0D80.c +++ b/src/overlay081/ov81_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -341,7 +341,7 @@ static int ov81_021D1174 (UnkStruct_ov81_021D1610 * param0) static int ov81_021D1188 (UnkStruct_ov81_021D1610 * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (ov81_021D13CC(param0, -1) == 1) { return 2; } @@ -349,7 +349,7 @@ static int ov81_021D1188 (UnkStruct_ov81_021D1610 * param0) return 1; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_KEY_RIGHT)) { if (ov81_021D13CC(param0, 1) == 1) { return 3; } @@ -357,7 +357,7 @@ static int ov81_021D1188 (UnkStruct_ov81_021D1610 * param0) return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_105C != 0) { if (ov81_021D13CC(param0, -1) == 1) { return 2; @@ -368,7 +368,7 @@ static int ov81_021D1188 (UnkStruct_ov81_021D1610 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_START) { + if (coresys.padInput & PAD_BUTTON_START) { sub_0208C120(1, 42); return 4; } diff --git a/src/overlay083/ov83_0223B5A0.c b/src/overlay083/ov83_0223B5A0.c index 3ee191353c..1e54d17807 100644 --- a/src/overlay083/ov83_0223B5A0.c +++ b/src/overlay083/ov83_0223B5A0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0202440C_decl.h" @@ -682,7 +682,7 @@ static int ov83_0223BF74 (UnkStruct_ov83_0223C344 * param0, UnkStruct_ov83_0223B case 4: param1->unk_1C--; - if ((param1->unk_1C < 0) || (Unk_021BF67C.unk_60) || (Unk_021BF67C.unk_48 & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { + if ((param1->unk_1C < 0) || (coresys.touchInput) || (coresys.padInput & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { (*param2)++; break; } @@ -700,7 +700,7 @@ static int ov83_0223BF74 (UnkStruct_ov83_0223C344 * param0, UnkStruct_ov83_0223B case 6: param1->unk_1C--; - if ((Unk_021BF67C.unk_60) || (param1->unk_1C < 0) || (Unk_021BF67C.unk_48 & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { + if ((coresys.touchInput) || (param1->unk_1C < 0) || (coresys.padInput & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { (*param2)++; } break; @@ -750,7 +750,7 @@ static int ov83_0223BF74 (UnkStruct_ov83_0223C344 * param0, UnkStruct_ov83_0223B case 10: param1->unk_1C--; - if ((Unk_021BF67C.unk_60) || (param1->unk_1C < 0) || (Unk_021BF67C.unk_48 & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { + if ((coresys.touchInput) || (param1->unk_1C < 0) || (coresys.padInput & ((PAD_BUTTON_A | PAD_BUTTON_B)))) { if (param1->unk_1488 > 1) { ov83_0223EC8C(¶m1->unk_6A0, 6); ov83_0223E9BC(¶m1->unk_6A0); diff --git a/src/overlay083/ov83_0223C958.c b/src/overlay083/ov83_0223C958.c index dbffc746e3..0d7a55f7da 100644 --- a/src/overlay083/ov83_0223C958.c +++ b/src/overlay083/ov83_0223C958.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -73,7 +73,7 @@ void ov83_0223C958 (UnkStruct_ov83_0223B784 * param0) NARC_dtor(v0); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); } @@ -98,7 +98,7 @@ void ov83_0223CAA4 (UnkStruct_ov83_0223B784 * param0) ov83_0223CF20(param0); ov83_0223D068(param0); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); } diff --git a/src/overlay083/ov83_0223F7F4.c b/src/overlay083/ov83_0223F7F4.c index 1c29ed2e93..7d43638e7e 100644 --- a/src/overlay083/ov83_0223F7F4.c +++ b/src/overlay083/ov83_0223F7F4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_berry_data_decl.h" @@ -58,9 +58,9 @@ void ov83_0223F83C (UnkStruct_ov83_0223F820 * param0) { s32 v0; - if (Unk_021BF67C.unk_62) { - param0->unk_00 = Unk_021BF67C.unk_5C; - param0->unk_04 = Unk_021BF67C.unk_5E; + if (coresys.unk_62) { + param0->unk_00 = coresys.unk_5C; + param0->unk_04 = coresys.unk_5E; if (param0->unk_14 == 0) { param0->unk_08 = param0->unk_00; @@ -71,7 +71,7 @@ void ov83_0223F83C (UnkStruct_ov83_0223F820 * param0) param0->unk_10 = ov83_0223F7F4(param0->unk_00, param0->unk_04, param0->unk_08, param0->unk_0C, 128, 96); param0->unk_08 = param0->unk_00; param0->unk_0C = param0->unk_04; - param0->unk_14 = Unk_021BF67C.unk_62; + param0->unk_14 = coresys.unk_62; } void ov83_0223F88C (UnkStruct_ov83_0223F88C * param0, UnkStruct_ov83_0223F820 * param1) diff --git a/src/overlay084/ov84_0223B5A0.c b/src/overlay084/ov84_0223B5A0.c index 903dbff36c..43ce1ddbe0 100644 --- a/src/overlay084/ov84_0223B5A0.c +++ b/src/overlay084/ov84_0223B5A0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -1238,7 +1238,7 @@ static u8 ov84_0223C5B8 (UnkStruct_ov84_0223B5A0 * param0) v0 = ¶m0->unk_C4->unk_04[param0->unk_C4->unk_64]; sub_020014DC(param0->unk_15C, &v0->unk_06, &v0->unk_04); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { if (ov84_0223D244(param0) == 1) { sub_02005748(1500); return 2; @@ -1303,7 +1303,7 @@ static void ov84_0223C720 (UnkStruct_ov84_0223B5A0 * param0) static u8 ov84_0223C750 (UnkStruct_ov84_0223B5A0 * param0) { - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { if (param0->unk_424 == 1) { return 0; } @@ -1325,7 +1325,7 @@ static u8 ov84_0223C750 (UnkStruct_ov84_0223B5A0 * param0) return 1; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { if (param0->unk_424 == 1) { return 0; } @@ -1460,7 +1460,7 @@ static u8 ov84_0223CA5C (UnkStruct_ov84_0223B5A0 * param0) { UnkStruct_ov84_0223C920 * v0 = ¶m0->unk_429; - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_424 == 1) { return 1; } @@ -1493,7 +1493,7 @@ static u8 ov84_0223CA5C (UnkStruct_ov84_0223B5A0 * param0) ov84_02240B68(param0); return 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_424 == 1) { return 1; } @@ -1609,7 +1609,7 @@ static int ov84_0223CDB0 (UnkStruct_ov84_0223B5A0 * param0) if (v0 != 0xffffffff) { u16 v1 = 0xfffe; - if (sub_0201C784(param0->unk_00, 4, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_00, 4, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } @@ -1624,7 +1624,7 @@ static int ov84_0223CE08 (UnkStruct_ov84_0223B5A0 * param0) if (v0 != 0xffffffff) { u16 v1 = 0xfffe; - if (sub_0201C784(param0->unk_00, 4, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_00, 4, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } @@ -1806,7 +1806,7 @@ static BOOL ov84_0223D1F4 (UnkStruct_ov84_0223B5A0 * param0) if (v0 != 0xffffffff) { u16 v1 = 0xfffe; - if (sub_0201C784(param0->unk_00, 4, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_00, 4, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0; } @@ -1869,7 +1869,7 @@ static u8 ov84_0223D2F8 (UnkStruct_ov84_0223B5A0 * param0) return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { sub_02005748(1500); ov84_0223D42C(param0); return 1; @@ -1900,7 +1900,7 @@ static u8 ov84_0223D2F8 (UnkStruct_ov84_0223B5A0 * param0) case 0xfffffffe: sub_02005748(1500); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov84_0223D42C(param0); } else { ov84_0223D484(param0); @@ -2139,7 +2139,7 @@ static int ov84_0223D858 (UnkStruct_ov84_0223B5A0 * param0) static int ov84_0223D8EC (UnkStruct_ov84_0223B5A0 * param0) { if (sub_0201D724(param0->unk_426) == 0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { sub_0200E084(¶m0->unk_04[6], 0); sub_0201A9A4(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2216,7 +2216,7 @@ static int ov84_0223DA14 (UnkStruct_ov84_0223B5A0 * param0) break; } - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { Strbuf* v1 = MessageLoader_GetNewStrbuf(param0->unk_114, 60); sub_0201ADA4(¶m0->unk_04[6], 15); @@ -2351,7 +2351,7 @@ static int ov84_0223DDD0 (UnkStruct_ov84_0223B5A0 * param0) break; } - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { sub_0200E084(¶m0->unk_04[6], 0); param0->unk_483 = 2; } @@ -2433,13 +2433,13 @@ static int ov84_0223DF0C (UnkStruct_ov84_0223B5A0 * param0) sub_02005748(1592); return 7; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov84_0223FFF0(param0); ov84_02240D3C(param0, 0); sub_02005748(1500); return 8; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov84_0223FFC0(param0); ov84_02240D3C(param0, 0); ov84_02240B34(param0, 1); @@ -2531,7 +2531,7 @@ static int ov84_0223E158 (UnkStruct_ov84_0223B5A0 * param0) static int ov84_0223E18C (UnkStruct_ov84_0223B5A0 * param0) { if (sub_0201D724(param0->unk_426) == 0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { param0->unk_479 = 0; sub_0200E084(¶m0->unk_04[6], 0); sub_0201A9A4(¶m0->unk_04[1]); @@ -2627,7 +2627,7 @@ static int ov84_0223E27C (UnkStruct_ov84_0223B5A0 * param0) static int ov84_0223E36C (UnkStruct_ov84_0223B5A0 * param0) { if (sub_0201D724(param0->unk_426) == 0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { sub_0200E084(¶m0->unk_04[6], 0); sub_0201A9A4(¶m0->unk_04[1]); ov84_02240B34(param0, 1); @@ -2755,7 +2755,7 @@ static int ov84_0223E5C4 (UnkStruct_ov84_0223B5A0 * param0) sub_02005748(1592); return 18; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { Strbuf* v1; ov84_02240D3C(param0, 0); @@ -2772,7 +2772,7 @@ static int ov84_0223E5C4 (UnkStruct_ov84_0223B5A0 * param0) return 19; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { param0->unk_48C = 0; ov84_02240D3C(param0, 0); @@ -2885,7 +2885,7 @@ static int ov84_0223E920 (UnkStruct_ov84_0223B5A0 * param0) static int ov84_0223E9B0 (UnkStruct_ov84_0223B5A0 * param0) { if (sub_0201D724(param0->unk_426) == 0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || Unk_021BF67C.unk_60) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || coresys.touchInput) { param0->unk_479 = 0; param0->unk_48C = 0; @@ -2987,15 +2987,15 @@ static BOOL ov84_0223EB84 (UnkStruct_ov84_0223B5A0 * param0, u16 param1) param0->unk_492 = 1; param0->unk_498 = 0; param0->unk_494 = 0; - param0->unk_49E = Unk_021BF67C.unk_5C; - param0->unk_4A0 = Unk_021BF67C.unk_5E; + param0->unk_49E = coresys.unk_5C; + param0->unk_4A0 = coresys.unk_5E; } if (param0->unk_492 == 1) { if (ov84_0223EB6C() == 1) { s32 v0, v1; - v0 = sub_0201D4CC(128 - param0->unk_49E, 80 - param0->unk_4A0, 128 - Unk_021BF67C.unk_5C, 80 - Unk_021BF67C.unk_5E, 80); + v0 = sub_0201D4CC(128 - param0->unk_49E, 80 - param0->unk_4A0, 128 - coresys.unk_5C, 80 - coresys.unk_5E, 80); v1 = sub_0201D580(80, v0 * 2); v1 = ((v1 << 8) / 182) >> 8; param0->unk_49A += v1; @@ -3031,8 +3031,8 @@ static BOOL ov84_0223EB84 (UnkStruct_ov84_0223B5A0 * param0, u16 param1) } } } - param0->unk_49E = Unk_021BF67C.unk_5C; - param0->unk_4A0 = Unk_021BF67C.unk_5E; + param0->unk_49E = coresys.unk_5C; + param0->unk_4A0 = coresys.unk_5E; } else { param0->unk_492 = 0; param0->unk_498 = 0; diff --git a/src/overlay085/ov85_02241440.c b/src/overlay085/ov85_02241440.c index 1284d8dae7..6add4c6e05 100644 --- a/src/overlay085/ov85_02241440.c +++ b/src/overlay085/ov85_02241440.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -717,7 +717,7 @@ static int ov85_02241D10 (UnkStruct_ov85_022417E4 * param0) { u32 v0; - if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + if (coresys.unk_44 & PAD_KEY_UP) { v0 = ov85_02241EB8(param0->unk_1F8->unk_00, param0->unk_1F8->unk_08, -1); if (param0->unk_1F8->unk_08 != v0) { @@ -737,7 +737,7 @@ static int ov85_02241D10 (UnkStruct_ov85_022417E4 * param0) return 1; } - if (Unk_021BF67C.unk_44 & PAD_KEY_DOWN) { + if (coresys.unk_44 & PAD_KEY_DOWN) { v0 = ov85_02241EB8(param0->unk_1F8->unk_00, param0->unk_1F8->unk_08, 1); if (param0->unk_1F8->unk_08 != v0) { @@ -757,7 +757,7 @@ static int ov85_02241D10 (UnkStruct_ov85_022417E4 * param0) return 1; } - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (Unk_021BF67C.unk_60)) { + if ((coresys.padInput & PAD_BUTTON_B) || (coresys.touchInput)) { sub_0208C120(1, 36); return 3; } diff --git a/src/overlay086/ov86_0223B140.c b/src/overlay086/ov86_0223B140.c index 80cbeec96d..7b2308f342 100644 --- a/src/overlay086/ov86_0223B140.c +++ b/src/overlay086/ov86_0223B140.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "enums.h" @@ -556,7 +556,7 @@ static BOOL ov86_0223B574 (UnkStruct_ov86_0223B3C8 * param0) param0->unk_00++; break; case 8: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } break; diff --git a/src/overlay087/ov87_021D0D80.c b/src/overlay087/ov87_021D0D80.c index 2c6766020f..314fe065ed 100644 --- a/src/overlay087/ov87_021D0D80.c +++ b/src/overlay087/ov87_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "overlay087/struct_ov87_021D106C_decl.h" @@ -82,33 +82,33 @@ int ov87_021D0E2C (UnkStruct_020067E8 * param0, int * param1) switch (*param1) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov87_021D0F38(v0, 1); (*param1)++; break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v0->unk_00.unk_1C ^= 1; ov87_021D0F38(v0, 4); break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (ov87_021D0F4C(v0)) { ov87_021D0F38(v0, 3); } break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (ov87_021D0F88(v0)) { ov87_021D0F38(v0, 3); } break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (--(v0->unk_00.unk_18) < 0) { if (ov87_021D0F4C(v0)) { v0->unk_00.unk_18 = v0->unk_00.unk_14 - 1; @@ -120,7 +120,7 @@ int ov87_021D0E2C (UnkStruct_020067E8 * param0, int * param1) break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (++(v0->unk_00.unk_18) >= v0->unk_00.unk_14) { if (ov87_021D0F88(v0)) { ov87_021D0F38(v0, 3); diff --git a/src/overlay088/ov88_0223B140.c b/src/overlay088/ov88_0223B140.c index c1d5e5e21e..39ef028ccb 100644 --- a/src/overlay088/ov88_0223B140.c +++ b/src/overlay088/ov88_0223B140.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -1488,22 +1488,22 @@ static void ov88_0223CE34 (u32 * param0) int v0 = 0; int v1 = 0; - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { v1 = 1; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { v1 = 2; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { v1 = 3; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { v1 = 4; v0++; } @@ -1704,7 +1704,7 @@ static void ov88_0223D140 (UnkStruct_0202CC84 * param0) static int ov88_0223D150 (UnkStruct_02095E80 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); param0->unk_88[0] = 12; ov88_0223BE28(param0); @@ -1712,7 +1712,7 @@ static int ov88_0223D150 (UnkStruct_02095E80 * param0) } else { ov88_0223CE34(¶m0->unk_14C[0]); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_14C[0] == 0) { if (param0->unk_88[0] == 12) { param0->unk_226C = ov88_0223D2C4; @@ -1813,7 +1813,7 @@ static int ov88_0223D3E0 (UnkStruct_02095E80 * param0) static int ov88_0223D434 (UnkStruct_02095E80 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02019CB8(param0->unk_174, 0, 0, 0, 0, 32, 24, 0); ov88_0223ECBC(¶m0->unk_49C[21], 15, 1, param0->unk_184, param0->unk_178); param0->unk_226C = ov88_0223D150; diff --git a/src/overlay090/ov90_021D0D80.c b/src/overlay090/ov90_021D0D80.c index ce13634038..42f68f9a8a 100644 --- a/src/overlay090/ov90_021D0D80.c +++ b/src/overlay090/ov90_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "struct_decls/struct_020067E8_decl.h" @@ -331,7 +331,7 @@ static void ov90_021D1034 (void * param0) static int ov90_021D105C (UnkStruct_ov90_021D0ECC * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); return 1; } @@ -377,12 +377,12 @@ static int ov90_021D1080 (UnkStruct_ov90_021D0ECC * param0) { int v0 = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (param0->unk_0B >= 10) { @@ -392,26 +392,26 @@ static int ov90_021D1080 (UnkStruct_ov90_021D0ECC * param0) param0->unk_0D = (param0->unk_0D + 1) % 2; v0 = 1; } else { - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { v0 = inline_ov90_021D1080(param0); if (v0) { sub_02005748(1500); } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { v0 = inline_ov90_021D1080_1(param0); if (v0) { sub_02005748(1500); } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + } else if (coresys.unk_4C & PAD_KEY_LEFT) { param0->unk_0C = (param0->unk_0C + 2) % 3; v0 = 1; if (param0->unk_0B != 10) { sub_02005748(1500); } - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { param0->unk_0C = (param0->unk_0C + 1) % 3; v0 = 1; diff --git a/src/overlay091/ov91_021D0D80.c b/src/overlay091/ov91_021D0D80.c index 10023dacab..7ad26a767b 100644 --- a/src/overlay091/ov91_021D0D80.c +++ b/src/overlay091/ov91_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -674,7 +674,7 @@ static int ov91_021D122C (UnkStruct_ov91_021D0ED8 * param0) u32 v0; u16 v1, v2; - if (Unk_021BF67C.unk_48 & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { sub_02005748(1501); param0->unk_00->unk_14 ^= 1; ov91_021D1498(param0); diff --git a/src/overlay092/ov92_021D0D80.c b/src/overlay092/ov92_021D0D80.c index c834435cf4..08eae5a6cf 100644 --- a/src/overlay092/ov92_021D0D80.c +++ b/src/overlay092/ov92_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -364,7 +364,7 @@ int ov92_021D0D80 (UnkStruct_020067E8 * param0, int * param1) v0->unk_BACC = sub_020203AC(v0->unk_00); v0->unk_BAE8 = 0; - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); sub_02017DD4(4, 8); @@ -616,7 +616,7 @@ int ov92_021D0EB8 (UnkStruct_020067E8 * param0, int * param1) u16 v10 = v0->unk_BAD8; ov92_021D1700(v0); - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (v0->unk_BAF8 & PAD_BUTTON_B)) { + if ((coresys.padInput & PAD_BUTTON_B) || (v0->unk_BAF8 & PAD_BUTTON_B)) { sub_0200DC9C(&v0->unk_B834, 0); sub_02005748(1501); sub_0201AE78(&v0->unk_B814, 15, 0, 0, 27 * 8, 4 * 8); @@ -629,7 +629,7 @@ int ov92_021D0EB8 (UnkStruct_020067E8 * param0, int * param1) *param1 = 17; } } else { - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_X) && (v0->unk_BB28 == 0)) { + if ((coresys.padInput & PAD_BUTTON_X) && (v0->unk_BB28 == 0)) { v0->unk_BB28 = 1; ov92_021D1F90(v0); @@ -639,7 +639,7 @@ int ov92_021D0EB8 (UnkStruct_020067E8 * param0, int * param1) break; } - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_X | PAD_BUTTON_A | PAD_BUTTON_B)) && (v0->unk_BB28 == 1)) { + if ((coresys.padInput & (PAD_BUTTON_X | PAD_BUTTON_A | PAD_BUTTON_B)) && (v0->unk_BB28 == 1)) { v0->unk_BB28 = 0; ov92_021D1F90(v0); break; @@ -648,7 +648,7 @@ int ov92_021D0EB8 (UnkStruct_020067E8 * param0, int * param1) { BOOL v11; - v11 = ov92_021D2460(v0, Unk_021BF67C.unk_48, Unk_021BF67C.unk_44); + v11 = ov92_021D2460(v0, coresys.padInput, coresys.unk_44); if ((v11 == 1) && (v0->unk_BB28 == 1)) { v0->unk_BB28 = 0; @@ -717,7 +717,7 @@ int ov92_021D1478 (UnkStruct_020067E8 * param0, int * param1) sub_02006830(param0); Heap_Destroy(v1); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; return 1; } @@ -856,8 +856,8 @@ static void ov92_021D1700 (UnkStruct_ov92_021D1B24 * param0) param0->unk_BAF8 = 0; - if (Unk_021BF67C.unk_60) { - if ((Unk_021BF67C.unk_5C >= (25 * 8)) && (Unk_021BF67C.unk_5C <= ((25 + 6) * 8)) && (Unk_021BF67C.unk_5E >= (21 * 8)) && (Unk_021BF67C.unk_5E <= ((21 + 2) * 8))) { + if (coresys.touchInput) { + if ((coresys.unk_5C >= (25 * 8)) && (coresys.unk_5C <= ((25 + 6) * 8)) && (coresys.unk_5E >= (21 * 8)) && (coresys.unk_5E <= ((21 + 2) * 8))) { param0->unk_BAF8 = PAD_BUTTON_B; return; } else { @@ -866,13 +866,13 @@ static void ov92_021D1700 (UnkStruct_ov92_021D1B24 * param0) param0->unk_BB0C = 0; param0->unk_BB10 = 0; param0->unk_BAF8 = 0; - param0->unk_BB00 = Unk_021BF67C.unk_5C; - param0->unk_BB04 = Unk_021BF67C.unk_5E; + param0->unk_BB00 = coresys.unk_5C; + param0->unk_BB04 = coresys.unk_5E; param0->unk_BB10 = 4; } } - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { switch (param0->unk_BAFC) { case 0: if (!param0->unk_BB10) { @@ -885,8 +885,8 @@ static void ov92_021D1700 (UnkStruct_ov92_021D1B24 * param0) param0->unk_BAF8 = v0 | v2; param0->unk_BB08 = v1; param0->unk_BB0C = v3; - param0->unk_BB00 = Unk_021BF67C.unk_5C; - param0->unk_BB04 = Unk_021BF67C.unk_5E; + param0->unk_BB00 = coresys.unk_5C; + param0->unk_BB04 = coresys.unk_5E; break; } } else { @@ -908,8 +908,8 @@ static void ov92_021D1818 (int param0, int param1, int * param2, int * param3, i int v2 = 0; int v3 = 0; - if (Unk_021BF67C.unk_5C != 0xffff) { - v2 = Unk_021BF67C.unk_5C - param0; + if (coresys.unk_5C != 0xffff) { + v2 = coresys.unk_5C - param0; if (v2 < 0) { v2 ^= -1; @@ -925,8 +925,8 @@ static void ov92_021D1818 (int param0, int param1, int * param2, int * param3, i *param2 = v0; *param3 = v2; - if (Unk_021BF67C.unk_5E != 0xffff) { - v3 = Unk_021BF67C.unk_5E - param1; + if (coresys.unk_5E != 0xffff) { + v3 = coresys.unk_5E - param1; if (v3 < 0) { v3 ^= -1; @@ -1034,7 +1034,7 @@ static BOOL ov92_021D1B70 (UnkStruct_ov92_021D1B24 * param0, u32 param1, int par } break; case 2: - if ((param2 != 0) || (Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if ((param2 != 0) || (coresys.padInput & PAD_BUTTON_A)) { param0->unk_B864 = 0; v0 = 1; } diff --git a/src/overlay094/ov94_0223C610.c b/src/overlay094/ov94_0223C610.c index e17b861824..1bb1d16062 100644 --- a/src/overlay094/ov94_0223C610.c +++ b/src/overlay094/ov94_0223C610.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -431,11 +431,11 @@ static int ov94_0223CBEC (UnkStruct_ov94_0223FD4C * param0) static int ov94_0223CC28 (UnkStruct_ov94_0223FD4C * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov94_0223CFD8(param0, 7, ov94_0223C4D4(param0), 0, 0xf0f); ov94_0223C3F4(param0, 10, 12); sub_02021CC8(param0->unk_E20, 0); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { switch (param0->unk_10C) { case 0: if (param0->unk_36 == 0) { @@ -470,13 +470,13 @@ static int ov94_0223CC28 (UnkStruct_ov94_0223FD4C * param0) sub_02005748(1500); break; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + } else if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_10C != 0) { param0->unk_10C--; sub_02005748(1500); ov94_0223C3FC(param0->unk_E20, Unk_ov94_02245A48[param0->unk_10C][0], Unk_ov94_02245A48[param0->unk_10C][1]); } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_10C < 2) { param0->unk_10C++; sub_02005748(1500); diff --git a/src/overlay094/ov94_0223D0C4.c b/src/overlay094/ov94_0223D0C4.c index 732dacaf04..3aa0837b4e 100644 --- a/src/overlay094/ov94_0223D0C4.c +++ b/src/overlay094/ov94_0223D0C4.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -361,11 +361,11 @@ static int ov94_0223D5B0 (UnkStruct_ov94_0223FD4C * param0) static int ov94_0223D5B8 (UnkStruct_ov94_0223FD4C * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov94_0223D88C(param0, 5, 1, 0, 0xf0f, (Pokemon *)param0->unk_12C.unk_00.unk_00); ov94_0223C3F4(param0, 3, 7); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { param0->unk_2C = 2; ov94_0223C4C0(param0, 1, 0); sub_02005748(1500); diff --git a/src/overlay094/ov94_0223DC04.c b/src/overlay094/ov94_0223DC04.c index 34ab1f2ba5..008f3fa11a 100644 --- a/src/overlay094/ov94_0223DC04.c +++ b/src/overlay094/ov94_0223DC04.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02018340_decl.h" @@ -330,22 +330,22 @@ static int ov94_0223E09C (UnkStruct_ov94_0223FD4C * param0) static int ov94_0223E0A4 (UnkStruct_ov94_0223FD4C * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov94_0223E300(param0, 16, 1, 0, 0xf0f); ov94_0223C3F4(param0, 3, 4); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { param0->unk_2C = 2; ov94_0223C4C0(param0, 4, 0); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_10E == 0) { param0->unk_10E = 1; param0->unk_2C = 6; sub_02005748(1500); } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_10E != 0) { param0->unk_10E = 0; param0->unk_2C = 6; diff --git a/src/overlay094/ov94_0223E46C.c b/src/overlay094/ov94_0223E46C.c index 662ef5020d..8c995a4a9d 100644 --- a/src/overlay094/ov94_0223E46C.c +++ b/src/overlay094/ov94_0223E46C.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "struct_decls/struct_02006C24_decl.h" @@ -418,7 +418,7 @@ static int ov94_0223EA84 (UnkStruct_ov94_0223FD4C * param0) { ov94_0223EFAC(param0); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { int v0 = ov94_0223EF94(param0); switch (v0) { @@ -455,7 +455,7 @@ static int ov94_0223EA84 (UnkStruct_ov94_0223FD4C * param0) sub_02005748(1500); break; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov94_0223F9A4(param0, 15, 1, 0, 0xf0f); ov94_0223C3F4(param0, 23, 25); sub_02005748(1500); @@ -690,7 +690,7 @@ static void ov94_0223EFAC (UnkStruct_ov94_0223FD4C * param0) { int v0; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_10E4->unk_24 == 0) { if (param0->unk_10E4->unk_28 > 0) { param0->unk_10E4->unk_28--; @@ -703,7 +703,7 @@ static void ov94_0223EFAC (UnkStruct_ov94_0223FD4C * param0) param0->unk_10E4->unk_2C = 0; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_10E4->unk_24 == 0) { if (param0->unk_10E4->unk_28 < 3) { param0->unk_10E4->unk_28++; @@ -716,13 +716,13 @@ static void ov94_0223EFAC (UnkStruct_ov94_0223FD4C * param0) param0->unk_10E4->unk_2C = 1; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_10E4->unk_24 != 1) { sub_02005748(1500); } param0->unk_10E4->unk_24 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_10E4->unk_24 != 0) { sub_02005748(1500); } diff --git a/src/overlay094/ov94_0223FB48.c b/src/overlay094/ov94_0223FB48.c index 77468f8740..0f87479354 100644 --- a/src/overlay094/ov94_0223FB48.c +++ b/src/overlay094/ov94_0223FB48.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -551,11 +551,11 @@ static int ov94_022402BC (UnkStruct_ov94_0223FD4C * param0) ov94_022404F0(param0); if (param0->unk_24 == 5) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov94_0223C4C0(param0, 1, 0); param0->unk_2C = 2; sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_112 == 30) { ov94_0223C4C0(param0, 1, 0); param0->unk_2C = 2; @@ -584,11 +584,11 @@ static int ov94_022402BC (UnkStruct_ov94_0223FD4C * param0) } } } else if (param0->unk_24 == 6) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov94_0223C4C0(param0, 3, 0); param0->unk_2C = 2; sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_112 == 30) { ov94_0223C4C0(param0, 3, 0); param0->unk_2C = 2; @@ -632,13 +632,13 @@ static void ov94_022404F0 (UnkStruct_ov94_0223FD4C * param0) { int v0 = 0, v1 = 0, v2 = 0; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v1 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { v1 = 2; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { v1 = 3; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v1 = 4; } diff --git a/src/overlay094/ov94_022414B8.c b/src/overlay094/ov94_022414B8.c index 2dda20edfe..3cc4ebcdb9 100644 --- a/src/overlay094/ov94_022414B8.c +++ b/src/overlay094/ov94_022414B8.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "message.h" @@ -535,7 +535,7 @@ static int ov94_0224195C (UnkStruct_ov94_0223FD4C * param0) static int ov94_02241990 (UnkStruct_ov94_0223FD4C * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov94_0223C4C0(param0, 5, 5); param0->unk_2C = 2; } diff --git a/src/overlay094/ov94_02244950.c b/src/overlay094/ov94_02244950.c index 3fce81df5c..c96c9ec858 100644 --- a/src/overlay094/ov94_02244950.c +++ b/src/overlay094/ov94_02244950.c @@ -3,7 +3,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -756,7 +756,7 @@ static int ov94_02245540 (UnkStruct_ov94_0223FD4C * param0) static int ov94_02245564 (UnkStruct_ov94_0223FD4C * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A || Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_A || coresys.padInput & PAD_BUTTON_B) { sub_0200DC9C(¶m0->unk_F8C, 0); param0->unk_2C = 0; } diff --git a/src/overlay096/ov96_0223BCE0.c b/src/overlay096/ov96_0223BCE0.c index af05f63b07..77a6ccb80e 100644 --- a/src/overlay096/ov96_0223BCE0.c +++ b/src/overlay096/ov96_0223BCE0.c @@ -3,7 +3,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -891,7 +891,7 @@ static int ov96_0223CA28 (UnkStruct_ov96_0223BF40 * param0) static int ov96_0223CA70 (UnkStruct_ov96_0223BF40 * param0) { - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { param0->unk_98++; if (param0->unk_98 > param0->unk_94) { @@ -900,7 +900,7 @@ static int ov96_0223CA70 (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); sub_02005748(1500); - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { param0->unk_98--; if (param0->unk_98 < 1) { @@ -909,7 +909,7 @@ static int ov96_0223CA70 (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { { RTCTime v0; RTCDate v1; @@ -925,7 +925,7 @@ static int ov96_0223CA70 (UnkStruct_ov96_0223BF40 * param0) ov96_0223D950(param0, 0, 0); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov96_0223D950(param0, 0, 0); param0->unk_1C = 21; sub_02005748(1500); @@ -1156,7 +1156,7 @@ static int ov96_0223CF5C (UnkStruct_ov96_0223BF40 * param0) static int ov96_0223CFAC (UnkStruct_ov96_0223BF40 * param0) { - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { param0->unk_90++; if (param0->unk_90 > 10) { @@ -1165,7 +1165,7 @@ static int ov96_0223CFAC (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E48, param0->unk_BE8, param0->unk_90, 2); sub_02005748(1500); - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { param0->unk_90--; if (param0->unk_90 < 1) { @@ -1174,11 +1174,11 @@ static int ov96_0223CFAC (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E48, param0->unk_BE8, param0->unk_90, 2); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { ov96_0223D950(param0, 0, 0); ov96_0223BBFC(param0, 11, 32); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov96_0223D950(param0, 0, 0); param0->unk_1C = 23; sub_02005748(1500); @@ -1211,7 +1211,7 @@ static int ov96_0223D0B0 (UnkStruct_ov96_0223BF40 * param0) static int ov96_0223D100 (UnkStruct_ov96_0223BF40 * param0) { - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { param0->unk_98++; if (param0->unk_98 == param0->unk_94 + 1) { @@ -1220,7 +1220,7 @@ static int ov96_0223D100 (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); sub_02005748(1500); - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { param0->unk_98--; if (param0->unk_98 < 1) { @@ -1229,11 +1229,11 @@ static int ov96_0223D100 (UnkStruct_ov96_0223BF40 * param0) ov96_0223D90C(¶m0->unk_E58, param0->unk_BE4, param0->unk_98, 3); sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { ov96_0223D950(param0, 0, 0); param0->unk_1C = 35; sub_02005748(1500); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { ov96_0223D950(param0, 0, 0); param0->unk_1C = 29; sub_02005748(1500); @@ -1590,7 +1590,7 @@ static int ov96_0223D7B8 (UnkStruct_ov96_0223BF40 * param0) static int ov96_0223D7E4 (UnkStruct_ov96_0223BF40 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A || Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_A || coresys.padInput & PAD_BUTTON_B) { sub_0200DC9C(¶m0->unk_E78, 0); param0->unk_1C = 0; } diff --git a/src/overlay097/ov97_0222AE60.c b/src/overlay097/ov97_0222AE60.c index e8a2d526f8..a50b0e4119 100644 --- a/src/overlay097/ov97_0222AE60.c +++ b/src/overlay097/ov97_0222AE60.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -206,7 +206,7 @@ static BOOL ov97_0222AE64 (UnkStruct_0222AE60 * param0) } } } else { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_0200DC9C(¶m0->unk_158, 0); sub_0201A8FC(¶m0->unk_158); @@ -391,10 +391,10 @@ static BOOL ov97_0222B07C (UnkStruct_0222AE60 * param0) if (param0->unk_134) { param0->unk_134--; } else { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0201A8FC(¶m0->unk_13C); param0->unk_12C = 19; - param0->unk_138 = Unk_021BF67C.unk_48; + param0->unk_138 = coresys.padInput; sub_02005748(1500); } } @@ -1075,8 +1075,8 @@ static int ov97_0222BE24 (UnkStruct_020067E8 * param0, int * param1) v1->unk_124 = 10; break; case 5: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); v1->unk_58 = v1->unk_DC[v1->unk_54]; @@ -1119,11 +1119,11 @@ static int ov97_0222BE24 (UnkStruct_020067E8 * param0, int * param1) break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { ov97_0222BB88(v1, -1); } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { ov97_0222BB88(v1, 1); } diff --git a/src/overlay097/ov97_0222C174.c b/src/overlay097/ov97_0222C174.c index 6a5431d7f7..60815b5fc6 100644 --- a/src/overlay097/ov97_0222C174.c +++ b/src/overlay097/ov97_0222C174.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -589,7 +589,7 @@ static BOOL ov97_0222C404 (UnkStruct_ov97_0222C388 * param0) ov97_0223795C(param0->unk_04, &v0, 5, 4, 2); return 1; } else { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200DC9C(¶m0->unk_18, 0); sub_0201A8FC(¶m0->unk_18); return 0; @@ -744,7 +744,7 @@ static int ov97_0222C78C (UnkStruct_020067E8 * param0, int * param1) } break; case UnkEnum_ov97_0222C78C_03: - if ((sub_0201D724(v0->unk_317C) == 0) && Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if ((sub_0201D724(v0->unk_317C) == 0) && coresys.padInput & PAD_BUTTON_A) { ov97_02237784(1); ov97_02237790(0, UnkEnum_ov97_0222C78C_12, param1, UnkEnum_ov97_0222C78C_13); } @@ -771,7 +771,7 @@ static int ov97_0222C78C (UnkStruct_020067E8 * param0, int * param1) v0->unk_3180.unk_104.unk_4E_2 = 0; break; case UnkEnum_ov97_0222C78C_06: - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { ov97_02237790(0, UnkEnum_ov97_0222C78C_11, param1, UnkEnum_ov97_0222C78C_13); } break; @@ -872,7 +872,7 @@ static int ov97_0222CAB4 (UnkStruct_ov97_0222C388 * param0, int * param1, int pa } } - if (param3 && Unk_021BF67C.unk_48 & param3) { + if (param3 && coresys.padInput & param3) { ov97_022333BC(); *param1 = UnkEnum_ov97_0222C6F8_26; return 1; @@ -952,7 +952,7 @@ int ov97_0222CB10 (UnkStruct_ov97_0222C388 * param0) *v3 = UnkEnum_ov97_0222C6F8_30; break; case UnkEnum_ov97_0222C6F8_30: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { *v3 = UnkEnum_ov97_0222C6F8_08; } @@ -1090,7 +1090,7 @@ int ov97_0222CB10 (UnkStruct_ov97_0222C388 * param0) param0->unk_148 = 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { *v3 = UnkEnum_ov97_0222C6F8_27; return 4; } @@ -1117,7 +1117,7 @@ int ov97_0222CB10 (UnkStruct_ov97_0222C388 * param0) param0->unk_148 = 0; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { OS_ResetSystem(0); } } diff --git a/src/overlay097/ov97_0222D30C.c b/src/overlay097/ov97_0222D30C.c index 4b2b5a23bd..1754ef51fe 100644 --- a/src/overlay097/ov97_0222D30C.c +++ b/src/overlay097/ov97_0222D30C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02009DC8_decl.h" @@ -2178,7 +2178,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) *param1 = 8; } - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (--v3->unk_434 == 0)) { + if ((coresys.padInput & PAD_BUTTON_B) || (--v3->unk_434 == 0)) { ov97_0222D30C(v3, 0); ov97_0222D2DC(); sub_02039794(); @@ -2210,7 +2210,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) break; } - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (--v3->unk_434 == 0)) { + if ((coresys.padInput & PAD_BUTTON_B) || (--v3->unk_434 == 0)) { ov97_0222D2DC(); sub_02039794(); ov97_0222D40C(v3, -1); @@ -2225,7 +2225,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) v1 = sub_0203608C(); - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (--v3->unk_434 == 0) || ((v1 != 0) && (sub_02035D78(v1) == 0))) { + if ((coresys.padInput & PAD_BUTTON_B) || (--v3->unk_434 == 0) || ((v1 != 0) && (sub_02035D78(v1) == 0))) { ov97_0222D30C(v3, 0); ov97_0222D2DC(); sub_02039794(); @@ -2310,7 +2310,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) *param1 = 18; break; case 18: - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { sub_02005748(1500); ov97_0222DDD0(param0, (((1 + (18 + 12)) + 9) + 26 * 6), 0); *param1 = 3; @@ -2399,7 +2399,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) *param1 = ov97_0222E228(param0, NULL, NULL, *param1); break; case 51: - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { ov97_0222D444(&v3->unk_58, 0); *param1 = ov97_0222DA64(param0); } @@ -2420,7 +2420,7 @@ static int ov97_0222F75C (UnkStruct_020067E8 * param0, int * param1) return 1; break; case 55: - if (Unk_021BF67C.unk_48) { + if (coresys.padInput) { sub_02005748(1500); if (v3->unk_8C.unk_00.unk_4E_2 == 1) { @@ -2603,7 +2603,7 @@ static void ov97_022302F4 (UnkStruct_ov97_0222D04C * param0) break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { switch (Unk_ov97_0223F1A8) { case 40: case 41: diff --git a/src/overlay097/ov97_02230410.c b/src/overlay097/ov97_02230410.c index 82dfac90fb..49ea72f3cd 100644 --- a/src/overlay097/ov97_02230410.c +++ b/src/overlay097/ov97_02230410.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -993,11 +993,11 @@ static void ov97_022314FC (UnkStruct_ov97_02230868 * param0, int param1, int * p int v0; int v1 = param0->unk_3E10; - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT && (param0->unk_3E10 != 1)) { + if (coresys.padInput & PAD_KEY_RIGHT && (param0->unk_3E10 != 1)) { param0->unk_3E10 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT && (param0->unk_3E10 != 0)) { + if (coresys.padInput & PAD_KEY_LEFT && (param0->unk_3E10 != 0)) { param0->unk_3E10 = 0; } @@ -1008,13 +1008,13 @@ static void ov97_022314FC (UnkStruct_ov97_02230868 * param0, int param1, int * p v0 = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { v0 = 2; - } else if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) && param1 && (param0->unk_3E10 == 0)) { + } else if ((coresys.padInput & PAD_BUTTON_A) && param1 && (param0->unk_3E10 == 0)) { v0 = 1; - } else if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) && (param0->unk_3E10 == 1)) { + } else if ((coresys.padInput & PAD_BUTTON_A) && (param0->unk_3E10 == 1)) { v0 = 2; - } else if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) && (param1 == 0)) { + } else if ((coresys.padInput & PAD_BUTTON_A) && (param1 == 0)) { v0 = 3; } @@ -1076,14 +1076,14 @@ static int ov97_0223161C (UnkStruct_020067E8 * param0, int * param1) case 3: v0 = v4->unk_2C20; - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v0 = ov97_02230F20(v4, v4->unk_2C20, -1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { v0 = ov97_02230F20(v4, v4->unk_2C20, 1); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); ov97_02230C10(v4, 0, 28, param1); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); *param1 = 4; } @@ -1102,7 +1102,7 @@ static int ov97_0223161C (UnkStruct_020067E8 * param0, int * param1) case 5: ov97_02231088(param0, param1, NULL); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); *param1 = 11; } @@ -1125,7 +1125,7 @@ static int ov97_0223161C (UnkStruct_020067E8 * param0, int * param1) case 8: ov97_02231354(v4); - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1536); ov97_022312B4(v4, 1, 1 * FX32_ONE, 0.025 * FX32_ONE); *param1 = 9; @@ -1241,7 +1241,7 @@ static int ov97_0223161C (UnkStruct_020067E8 * param0, int * param1) } break; case 25: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { *param1 = 19; } break; diff --git a/src/overlay097/ov97_02233B18.c b/src/overlay097/ov97_02233B18.c index 6833805a12..11c13c025f 100644 --- a/src/overlay097/ov97_02233B18.c +++ b/src/overlay097/ov97_02233B18.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -724,7 +724,7 @@ static void ov97_022343A8 (UnkStruct_ov97_02234A2C * param0) v1 = ov97_02234124(param0, param0->unk_E8E4, v0); v2 = ov97_02234148(param0, param0->unk_E8E4, v0); v5 = ov97_0223416C(param0, param0->unk_E8E4, v0); - v3 = Unk_021BF67C.unk_66; + v3 = coresys.unk_66; v4 = GBASpeciesToDSFormId(ov97_02236DD0(v1), v5, v3); ov97_022342E4(v1, v2, v4, v0, param0->unk_20C[v0].unk_00, v6, v7); @@ -1417,7 +1417,7 @@ static void ov97_02234DFC (UnkStruct_ov97_02234A2C * param0) GXLayers_SetBanks(&v0); ov97_02234D28(param0->unk_20); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); sub_0201D710(); @@ -1492,7 +1492,7 @@ static void ov97_02234F88 (UnkStruct_ov97_02234A2C * param0) v1 = ov97_02234124(param0, param0->unk_42C[v0].unk_08, param0->unk_42C[v0].unk_04); v2 = ov97_02234148(param0, param0->unk_42C[v0].unk_08, param0->unk_42C[v0].unk_04); v4 = ov97_0223416C(param0, param0->unk_42C[v0].unk_08, param0->unk_42C[v0].unk_04); - v3 = Unk_021BF67C.unk_66; + v3 = coresys.unk_66; ov97_02234278(v1, v2, v4, v3, v0, param0->unk_478[v0]); } @@ -1596,7 +1596,7 @@ static void ov97_022351F0 (UnkStruct_ov97_02234A2C * param0) sub_0201F8B4(); sub_02015938(param0->unk_E8EC); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); sub_02019044(param0->unk_20, 0); @@ -1774,7 +1774,7 @@ static BOOL ov97_02235590 (UnkStruct_ov97_02234A2C * param0, int param1) return 1; } } else { - if (Unk_021BF67C.unk_60 || Unk_021BF67C.unk_48) { + if (coresys.touchInput || coresys.padInput) { sub_02002B20(0); sub_02005748(1500); return 1; @@ -1935,7 +1935,7 @@ static int ov97_022356E8 (UnkStruct_020067E8 * param0, int * param1) } break; case 7: - if (Unk_021BF67C.unk_60 || Unk_021BF67C.unk_48) { + if (coresys.touchInput || coresys.padInput) { ov97_02234CC4(v3, 0, 12, param1); } break; @@ -2129,7 +2129,7 @@ static int ov97_022356E8 (UnkStruct_020067E8 * param0, int * param1) } break; case 22: - if (Unk_021BF67C.unk_60 || Unk_021BF67C.unk_48) { + if (coresys.touchInput || coresys.padInput) { ov97_02234CF4(v3, 0, 24, param1); sub_02005748(1500); } diff --git a/src/overlay097/ov97_02236380.c b/src/overlay097/ov97_02236380.c index 3119d8b30b..89a6715e41 100644 --- a/src/overlay097/ov97_02236380.c +++ b/src/overlay097/ov97_02236380.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "pokemon.h" #include "overlay097/box_pokemon_gba.h" @@ -1563,7 +1563,7 @@ void BoxMonGBAToBoxMon (BoxPokemonGBA * param0, BoxPokemon * param1) } if (BoxPokemon_GetValue(param1, MON_DATA_SPECIES, NULL) == 386) { - switch (Unk_021BF67C.unk_66) { + switch (coresys.unk_66) { default: case 2: case 1: diff --git a/src/overlay097/ov97_02238D74.c b/src/overlay097/ov97_02238D74.c index 37a71d722e..6c1f56b7f4 100644 --- a/src/overlay097/ov97_02238D74.c +++ b/src/overlay097/ov97_02238D74.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" @@ -237,7 +237,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { v2->unk_26D8 = 1; } break; @@ -262,7 +262,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) *param1 = 4109; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { DWC_NASLoginAbort(); } break; @@ -318,7 +318,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) break; case 4107: if (Unk_ov97_02240400 == 0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { ov97_02238E44(v2, 3, param1, 4108, 4108); } else { if (DWC_NdGetProgress(&v2->unk_26BC, &v2->unk_26C0) == 1) { @@ -369,7 +369,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) *param1 = 4112; break; case 4112: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { v2->unk_26DC = NULL; DWC_ClearError(); ov97_02238E94(); @@ -386,7 +386,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) } else { *param1 = v2->unk_16B0; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v2->unk_26D8 = 1; } break; @@ -394,7 +394,7 @@ int ov97_02238EAC (UnkStruct_020067E8 * param0, int * param1) if (Unk_ov97_02240404 == 1) { Unk_ov97_02240404 = 0; *param1 = v2->unk_16B0; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v2->unk_26D8 = 1; } diff --git a/src/overlay098/ov98_022471C8.c b/src/overlay098/ov98_022471C8.c index d8833cfb85..43a0e41d25 100644 --- a/src/overlay098/ov98_022471C8.c +++ b/src/overlay098/ov98_022471C8.c @@ -3,7 +3,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -368,7 +368,7 @@ int ov98_022471C8 (UnkStruct_020067E8 * param0, int * param1) GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 1); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); sub_02002AC8(1); @@ -1213,7 +1213,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) str r1, [r0, #0] b _02248670 _022484B8: - ldr r1, = Unk_021BF67C + ldr r1, = coresys add r0, #0xac ldr r2, [r1, #0x4c] ldr r4, [r0, #0] @@ -1300,7 +1300,7 @@ asm static int ov98_02248350 (UnkStruct_ov98_02247704 * param0) bl ov98_022482CC b _02248670 _02248566: - ldr r1, = Unk_021BF67C + ldr r1, = coresys mov r2, #0x10 ldr r1, [r1, #0x48] tst r2, r1 @@ -2277,7 +2277,7 @@ static int ov98_02249414 (UnkStruct_ov98_02247704 * param0) static int ov98_02249438 (UnkStruct_ov98_02247704 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A || Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_A || coresys.padInput & PAD_BUTTON_B) { sub_0200DC9C(¶m0->unk_68, 0); param0->unk_08 = 0; } diff --git a/src/overlay099/ov99_021D0D80.c b/src/overlay099/ov99_021D0D80.c index 0b52e70568..e784d6f958 100644 --- a/src/overlay099/ov99_021D0D80.c +++ b/src/overlay099/ov99_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "enums.h" #include "struct_decls/struct_020067E8_decl.h" @@ -163,7 +163,7 @@ int ov99_021D0D80 (UnkStruct_020067E8 * param0, int * param1) GX_SetVisibleWnd(GX_WNDMASK_W0); GXS_SetVisibleWnd(GX_WNDMASK_W0); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); GXLayers_TurnBothDispOn(); @@ -194,7 +194,7 @@ int ov99_021D1028 (UnkStruct_020067E8 * param0, int * param1) v0->unk_1110 = ov99_021D3F6C(v0->unk_110C, 1); } - if (v0->unk_00->unk_04 && (Unk_021BF67C.unk_48 & PAD_BUTTON_START)) { + if (v0->unk_00->unk_04 && (coresys.padInput & PAD_BUTTON_START)) { if ((v0->unk_1100 == 0) && (v0->unk_1101 < 6)) { sub_0200F174(0, 0, 0, 0x0, 6, 1, 75); v0->unk_1100 = 1; diff --git a/src/overlay099/ov99_021D1A54.c b/src/overlay099/ov99_021D1A54.c index 9ce49f75da..7a05008bd6 100644 --- a/src/overlay099/ov99_021D1A54.c +++ b/src/overlay099/ov99_021D1A54.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02018340_decl.h" #include "strbuf.h" @@ -1063,7 +1063,7 @@ static void ov99_021D2AAC (UnkStruct_ov99_021D2CB0 * param0) { UnkStruct_02018340 * v0 = param0->unk_08; - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); sub_020038B0(param0->unk_0C, 0, 2, 0x0, 0, 1); diff --git a/src/overlay099/ov99_021D3DE0.c b/src/overlay099/ov99_021D3DE0.c index 08ab7542dc..a5f98ee5b1 100644 --- a/src/overlay099/ov99_021D3DE0.c +++ b/src/overlay099/ov99_021D3DE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "overlay099/struct_ov99_021D2CB0.h" #include "overlay099/struct_ov99_021D3A40.h" @@ -21,7 +21,7 @@ BOOL ov99_021D3DE0 (UnkStruct_ov99_021D2CB0 * param0, UnkStruct_ov99_021D3A40 * break; case 1: if (ScreenWipe_Done() == 1) { - if ((param0->unk_10FC > 10080) || (Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_BUTTON_START)) { + if ((param0->unk_10FC > 10080) || (coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_BUTTON_START)) { sub_0200F174(0, 0, 0, 0x0, 45, 1, 75); param1->unk_00++; } diff --git a/src/overlay100/ov100_021D0D80.c b/src/overlay100/ov100_021D0D80.c index 01407eb691..adbc4a029f 100644 --- a/src/overlay100/ov100_021D0D80.c +++ b/src/overlay100/ov100_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -162,7 +162,7 @@ int ov100_021D0F44 (UnkStruct_020067E8 * param0, int * param1) sub_0201A8FC(&v0->unk_0C.unk_30); ov100_021D111C(&v0->unk_0C); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); sub_02006830(param0); diff --git a/src/overlay100/ov100_021D46C8.c b/src/overlay100/ov100_021D46C8.c index 297cf8cb13..02608c13a7 100644 --- a/src/overlay100/ov100_021D46C8.c +++ b/src/overlay100/ov100_021D46C8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "message.h" @@ -335,7 +335,7 @@ void ov100_021D4C94 (UnkStruct_ov100_021D46C8 * param0, int param1) void ov100_021D4DC8 (int param0) { - Unk_021BF67C.unk_65 = param0; + coresys.unk_65 = param0; GXLayers_SwapDisplay(); } diff --git a/src/overlay101/ov101_021D1A28.c b/src/overlay101/ov101_021D1A28.c index 88397cd581..73648ac52d 100644 --- a/src/overlay101/ov101_021D1A28.c +++ b/src/overlay101/ov101_021D1A28.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" #include "overlay101/struct_ov101_021D5D90_decl.h" @@ -380,7 +380,7 @@ static int ov101_021D1C9C (UnkStruct_ov101_021D13C8 * param0) static int ov101_021D1CBC (UnkStruct_ov101_021D13C8 * param0) { - u32 v0 = Unk_021BF67C.unk_48; + u32 v0 = coresys.padInput; if ((param0->unk_7C[0] == 1) && (v0 & PAD_BUTTON_Y)) { param0->unk_7C[0] = 2; @@ -817,7 +817,7 @@ static int ov101_021D22D0 (UnkStruct_ov101_021D13C8 * param0) static int ov101_021D22F0 (UnkStruct_ov101_021D13C8 * param0) { - u32 v0 = Unk_021BF67C.unk_48; + u32 v0 = coresys.padInput; if ((param0->unk_7C[0] == 1) && (v0 & PAD_BUTTON_Y)) { param0->unk_7C[0] = 2; @@ -1184,7 +1184,7 @@ static int ov101_021D2828 (UnkStruct_ov101_021D13C8 * param0) static int ov101_021D2850 (UnkStruct_ov101_021D13C8 * param0) { - u32 v0 = Unk_021BF67C.unk_48; + u32 v0 = coresys.padInput; if ((param0->unk_7C[0] == 1) && (v0 & PAD_BUTTON_Y)) { param0->unk_7C[0] = 2; @@ -3145,7 +3145,7 @@ static void ov101_021D4614 (UnkStruct_0201CD38 * param0, void * param1) v0 = 0x3; - if (Unk_021BF67C.unk_44 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) { + if (coresys.unk_44 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_BUTTON_X | PAD_BUTTON_Y)) { v0 = 0x1; } @@ -4293,7 +4293,7 @@ UnkEnum_ov101_021D9688 ov101_021D55D4 (UnkStruct_ov101_021D13C8 * param0, UnkEnu static int ov101_021D55F8 (u32 param0) { - u32 v0 = Unk_021BF67C.unk_48 & param0; + u32 v0 = coresys.padInput & param0; if (v0 == param0) { return 2; diff --git a/src/overlay102/ov102_021D0D80.c b/src/overlay102/ov102_021D0D80.c index e8428eb0f5..d1ff4befd6 100644 --- a/src/overlay102/ov102_021D0D80.c +++ b/src/overlay102/ov102_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "message.h" @@ -147,7 +147,7 @@ int ov102_021D0E2C (UnkStruct_020067E8 * param0, int * param1) } break; case 4: - if ((((Unk_021BF67C.unk_48 & PAD_BUTTON_A) == PAD_BUTTON_A)) || (((Unk_021BF67C.unk_48 & PAD_BUTTON_B) == PAD_BUTTON_B)) || (Unk_021BF67C.unk_60)) { + if ((((coresys.padInput & PAD_BUTTON_A) == PAD_BUTTON_A)) || (((coresys.padInput & PAD_BUTTON_B) == PAD_BUTTON_B)) || (coresys.touchInput)) { sub_0200F174(0, 0, 0, 0x0, 6, 1, v0->unk_00); *param1 = 5; } diff --git a/src/overlay104/ov104_0222FBE4.c b/src/overlay104/ov104_0222FBE4.c index 8f572f32b8..35b5d2ffe0 100644 --- a/src/overlay104/ov104_0222FBE4.c +++ b/src/overlay104/ov104_0222FBE4.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -2017,7 +2017,7 @@ static BOOL ov104_02231068 (UnkStruct_ov104_0222E930 * param0) static BOOL ov104_02231078 (UnkStruct_ov104_0222E930 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } @@ -2033,7 +2033,7 @@ static BOOL ov104_02231090 (UnkStruct_ov104_0222E930 * param0) static BOOL ov104_022310B0 (UnkStruct_ov104_0222E930 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } diff --git a/src/overlay104/ov104_02231F74.c b/src/overlay104/ov104_02231F74.c index 0be9007848..1002fe6f91 100644 --- a/src/overlay104/ov104_02231F74.c +++ b/src/overlay104/ov104_02231F74.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -498,7 +498,7 @@ static void ov104_022324C8 (UnkStruct_0201CD38 * param0, void * param1) v0 = sub_02001BE0(v1->unk_B0); - if ((Unk_021BF67C.unk_4C & PAD_KEY_UP) || (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) || (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) || (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT)) { + if ((coresys.unk_4C & PAD_KEY_UP) || (coresys.unk_4C & PAD_KEY_DOWN) || (coresys.unk_4C & PAD_KEY_LEFT) || (coresys.unk_4C & PAD_KEY_RIGHT)) { ov104_022325D8(v1); } @@ -845,7 +845,7 @@ static void ov104_0223296C (UnkStruct_0201CD38 * param0, void * param1) sub_02005748(1500); } - if ((Unk_021BF67C.unk_4C & PAD_KEY_UP) || (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) || (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) || (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT)) { + if ((coresys.unk_4C & PAD_KEY_UP) || (coresys.unk_4C & PAD_KEY_DOWN) || (coresys.unk_4C & PAD_KEY_LEFT) || (coresys.unk_4C & PAD_KEY_RIGHT)) { ov104_02232B2C(v2); } diff --git a/src/overlay105/ov105_02241AE0.c b/src/overlay105/ov105_02241AE0.c index 97c42b29a9..bff4111cc1 100644 --- a/src/overlay105/ov105_02241AE0.c +++ b/src/overlay105/ov105_02241AE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02002F38_decl.h" @@ -907,19 +907,19 @@ static BOOL ov105_022426E0 (UnkStruct_ov105_02241FF4 * param0) case 1: ov105_02246080(param0->unk_30C); - if (Unk_021BF67C.unk_48 & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { sub_02005748(1500); ov105_022453F8(param0, param0->unk_11, ov105_022461A0(param0->unk_30C), 0, param0->unk_31C); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); ov105_022461A4(param0->unk_30C, 1); ov105_02244DF0(param0); param0->unk_310 = ov105_02245FB8(¶m0->unk_144, (NELEMS(Unk_ov105_02246308)), (NELEMS(Unk_ov105_02246308)), 1, 0, Unk_ov105_02246308, NULL); param0->unk_08++; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_11 > 0) { sub_02005748(1500); ov105_0224296C(param0); @@ -1438,12 +1438,12 @@ static BOOL ov105_022434BC (UnkStruct_ov105_02241FF4 * param0) case 1: ov105_02246080(param0->unk_30C); - if (Unk_021BF67C.unk_48 & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1500); ov105_022453F8(param0, param0->unk_11, ov105_022461A0(param0->unk_30C), 1, param0->unk_31C); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (ov105_022461A0(param0->unk_30C) == (param0->unk_1A - 1)) { @@ -1456,7 +1456,7 @@ static BOOL ov105_022434BC (UnkStruct_ov105_02241FF4 * param0) param0->unk_310 = ov105_02245FB8(¶m0->unk_144, (NELEMS(Unk_ov105_02246308)), (NELEMS(Unk_ov105_02246308)), 1, 0, Unk_ov105_02246308, NULL); param0->unk_08++; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); ov105_02245528(param0, 1); return 1; @@ -1654,17 +1654,17 @@ static BOOL ov105_02243A3C (UnkStruct_ov105_02241FF4 * param0) case 1: ov105_02246080(param0->unk_30C); - if (Unk_021BF67C.unk_48 & (PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1500); ov105_022453F8(param0, 0, ov105_022461A0(param0->unk_30C), 0, param0->unk_320); } - if (Unk_021BF67C.unk_48 & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_KEY_LEFT | PAD_KEY_RIGHT)) { sub_02005748(1500); ov105_022453F8(param0, 0, ov105_022461A0(param0->unk_30C), 0, param0->unk_320); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (ov105_022461A0(param0->unk_30C) == (param0->unk_1B - 1)) { @@ -1681,7 +1681,7 @@ static BOOL ov105_02243A3C (UnkStruct_ov105_02241FF4 * param0) param0->unk_10 = ov105_02244D14(param0, 14); param0->unk_08++; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); ov105_02245528(param0, 1); return 1; diff --git a/src/overlay105/ov105_02245FB8.c b/src/overlay105/ov105_02245FB8.c index 16abba7c48..1d9b8f0286 100644 --- a/src/overlay105/ov105_02245FB8.c +++ b/src/overlay105/ov105_02245FB8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02022550_decl.h" #include "overlay105/struct_ov105_02246060_decl.h" @@ -88,24 +88,24 @@ void ov105_02246080 (UnkStruct_ov105_02246060 * param0) return; } - if (Unk_021BF67C.unk_48 == 0) { + if (coresys.padInput == 0) { return; } if (param0->unk_01 == 2) { - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_02 == 0) { param0->unk_02 = (param0->unk_00 - 1); } else { param0->unk_02--; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_02 == (param0->unk_00 - 1)) { param0->unk_02 = 0; } else { param0->unk_02++; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_02 < (param0->unk_10)) { param0->unk_02 = param0->unk_10; } else if (param0->unk_02 == (param0->unk_00 - 1)) { @@ -113,7 +113,7 @@ void ov105_02246080 (UnkStruct_ov105_02246060 * param0) } else { param0->unk_02++; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + } else if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_02 < (param0->unk_10)) { param0->unk_02 = (param0->unk_00 - 1); } else { @@ -129,13 +129,13 @@ void ov105_02246080 (UnkStruct_ov105_02246060 * param0) v2 = PAD_KEY_UP; } - if (Unk_021BF67C.unk_48 & v1) { + if (coresys.padInput & v1) { param0->unk_02++; if (param0->unk_02 >= param0->unk_00) { param0->unk_02 = 0; } - } else if (Unk_021BF67C.unk_48 & v2) { + } else if (coresys.padInput & v2) { if (param0->unk_02 == 0) { param0->unk_02 = param0->unk_00; } diff --git a/src/overlay106/ov106_02241AE0.c b/src/overlay106/ov106_02241AE0.c index 25956921a9..202e88110d 100644 --- a/src/overlay106/ov106_02241AE0.c +++ b/src/overlay106/ov106_02241AE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02002F38_decl.h" @@ -418,9 +418,9 @@ static BOOL ov106_02241E5C (UnkStruct_ov106_02243118 * param0) param0->unk_08 = 1; break; case 1: - ov106_02242D64(param0, Unk_021BF67C.unk_48); + ov106_02242D64(param0, coresys.padInput); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (ov104_0223B5A4(param0->unk_0D) == 0xfe) { sub_02005748(1501); sub_0200F174(0, 0, 0, 0x0, 6, 1, 98); @@ -1253,7 +1253,7 @@ static void ov106_02242D64 (UnkStruct_ov106_02243118 * param0, int param1) v0 = 0; - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (ov104_0223B5A4(param0->unk_0D) != 0xfe) { param0->unk_0C = param0->unk_0D; } else { @@ -1271,7 +1271,7 @@ static void ov106_02242D64 (UnkStruct_ov106_02243118 * param0, int param1) v0 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (ov104_0223B5A4(param0->unk_0D) != 0xfe) { param0->unk_0C = param0->unk_0D; } else { @@ -1289,7 +1289,7 @@ static void ov106_02242D64 (UnkStruct_ov106_02243118 * param0, int param1) v0 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (ov104_0223B5A4(param0->unk_0D) != 0xfe) { param0->unk_0C = param0->unk_0D; } else { @@ -1315,7 +1315,7 @@ static void ov106_02242D64 (UnkStruct_ov106_02243118 * param0, int param1) v0 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (ov104_0223B5A4(param0->unk_0D) != 0xfe) { param0->unk_0C = param0->unk_0D; } else { diff --git a/src/overlay107/ov107_02241AE0.c b/src/overlay107/ov107_02241AE0.c index edb5146226..ee348d6dcd 100644 --- a/src/overlay107/ov107_02241AE0.c +++ b/src/overlay107/ov107_02241AE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -711,9 +711,9 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) return 0; } - ov107_02244BD8(param0, Unk_021BF67C.unk_48); + ov107_02244BD8(param0, coresys.padInput); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (param0->unk_0D >= param0->unk_15) { @@ -724,7 +724,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) param0->unk_08 = 1; break; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_0D != param0->unk_15) { sub_02005748(1500); param0->unk_0D = param0->unk_15; @@ -775,7 +775,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) case 2: sub_020014D0(param0->unk_198, ¶m0->unk_16); - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_16 == 0) { sub_02001408(param0->unk_198, (UnkStruct_ov84_02240FA8 *)¶m0->unk_1A0, 0, ((NELEMS(Unk_ov107_02249FF0)) - 1), 1, PAD_KEY_DOWN, NULL, NULL); sub_020013AC(param0->unk_198); @@ -783,7 +783,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) ov107_0224379C(param0, ¶m0->unk_50[6], 28, 1, 1, 0xff, 1, 2, 15, 1); return 0; } - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_16 == ((NELEMS(Unk_ov107_02249FF0)) - 1)) { sub_02001408(param0->unk_198, (UnkStruct_ov84_02240FA8 *)¶m0->unk_1A0, 0, 0, 1, PAD_KEY_UP, NULL, NULL); sub_020013AC(param0->unk_198); @@ -956,7 +956,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 6: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245618(param0); ov107_02244064(param0); @@ -965,7 +965,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 7: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245288(¶m0->unk_50[6]); ov107_02244064(param0); @@ -1151,7 +1151,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 13: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245618(param0); ov107_0224409C(param0); @@ -1160,7 +1160,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 14: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245288(¶m0->unk_50[6]); ov107_0224409C(param0); @@ -1168,14 +1168,14 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 15: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_022456E4(param0); param0->unk_08 = 9; } break; case 16: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); param0->unk_0A = ov107_02243918(param0, 61, 1); ov107_022441DC(param0); @@ -1222,7 +1222,7 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 19: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245288(¶m0->unk_50[6]); ov107_02243FA4(param0); @@ -1230,11 +1230,11 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 20: - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov107_02245140(param0, -1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { ov107_02245140(param0, 1); - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + } else if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245BE0(param0); ov107_02244018(param0); @@ -1242,11 +1242,11 @@ static BOOL ov107_02241EC8 (UnkStruct_ov107_02241D6C * param0) } break; case 21: - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov107_0224518C(param0, -1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { ov107_0224518C(param0, 1); - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + } else if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02245BE0(param0); ov107_02244018(param0); @@ -3149,7 +3149,7 @@ static void ov107_02244BD8 (UnkStruct_ov107_02241D6C * param0, int param1) v1 = 0; v0 = ov107_02249C98(param0->unk_14, param0->unk_0D); - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_0D == param0->unk_15) { return; } @@ -3163,7 +3163,7 @@ static void ov107_02244BD8 (UnkStruct_ov107_02241D6C * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_0D == param0->unk_15) { return; } @@ -3177,7 +3177,7 @@ static void ov107_02244BD8 (UnkStruct_ov107_02241D6C * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_0D < param0->unk_14) { return; } @@ -3186,7 +3186,7 @@ static void ov107_02244BD8 (UnkStruct_ov107_02241D6C * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_0D >= param0->unk_15) { return; } diff --git a/src/overlay107/ov107_02245EB0.c b/src/overlay107/ov107_02245EB0.c index 4806c6f87e..87f79b92eb 100644 --- a/src/overlay107/ov107_02245EB0.c +++ b/src/overlay107/ov107_02245EB0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -511,9 +511,9 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) param0->unk_0F_3 = 0; break; case 1: - ov107_02248358(param0, Unk_021BF67C.unk_48); + ov107_02248358(param0, coresys.padInput); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (param0->unk_0D >= param0->unk_15) { @@ -524,7 +524,7 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) param0->unk_08 = 2; break; } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_0D != param0->unk_15) { sub_02005748(1500); param0->unk_0D = param0->unk_15; @@ -869,7 +869,7 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) } break; case 10: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { ov107_02248BB4(param0); ov107_022482FC(param0); ov107_02249C60(param0->unk_3C4, 211, 105); @@ -894,14 +894,14 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) } break; case 14: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_022482FC(param0); param0->unk_08 = 6; } break; case 15: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02248860(¶m0->unk_50[7]); ov107_02248240(param0); @@ -909,11 +909,11 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) } break; case 16: - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov107_0224877C(param0, -1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { ov107_0224877C(param0, 1); - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + } else if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02249238(param0); ov107_022482B0(param0); @@ -921,11 +921,11 @@ static BOOL ov107_022462CC (UnkStruct_ov107_02246170 * param0) } break; case 17: - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { ov107_022487DC(param0, -1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { ov107_022487DC(param0, 1); - } else if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + } else if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02249238(param0); ov107_022482B0(param0); @@ -2525,7 +2525,7 @@ static void ov107_02248358 (UnkStruct_ov107_02246170 * param0, int param1) v1 = 0; v0 = ov107_02249C98(param0->unk_14, param0->unk_0D); - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (param0->unk_0D == param0->unk_15) { return; } @@ -2539,7 +2539,7 @@ static void ov107_02248358 (UnkStruct_ov107_02246170 * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (param0->unk_0D == param0->unk_15) { return; } @@ -2553,7 +2553,7 @@ static void ov107_02248358 (UnkStruct_ov107_02246170 * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_0D < param0->unk_14) { return; } @@ -2562,7 +2562,7 @@ static void ov107_02248358 (UnkStruct_ov107_02246170 * param0, int param1) v1 = 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_0D >= param0->unk_15) { return; } @@ -2705,7 +2705,7 @@ static BOOL ov107_0224850C (UnkStruct_ov107_02246170 * param0, u8 param1, u8 par break; case 3: if (ov104_0223BA14(param0->unk_09) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02248A2C(param0, param1); param0->unk_0F_0 = 0; @@ -2718,7 +2718,7 @@ static BOOL ov107_0224850C (UnkStruct_ov107_02246170 * param0, u8 param1, u8 par break; case 4: if (ov104_0223BA14(param0->unk_09) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); ov107_02248AF0(param0, param1); param0->unk_0F_0 = 0; diff --git a/src/overlay108/ov108_02241AE0.c b/src/overlay108/ov108_02241AE0.c index 5e35030364..8abe3de9c6 100644 --- a/src/overlay108/ov108_02241AE0.c +++ b/src/overlay108/ov108_02241AE0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_02002F38_decl.h" @@ -609,7 +609,7 @@ static BOOL ov108_02241F28 (UnkStruct_ov108_02241DB0 * param0) param0->unk_08 = 6; break; case 6: - ov108_02242964(param0, Unk_021BF67C.unk_48); + ov108_02242964(param0, coresys.padInput); if (sub_0203608C() == 0) { if (param0->unk_18 > 0) { diff --git a/src/overlay109/ov109_021D0D80.c b/src/overlay109/ov109_021D0D80.c index a8f3ca6647..837d963e73 100644 --- a/src/overlay109/ov109_021D0D80.c +++ b/src/overlay109/ov109_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -1369,7 +1369,7 @@ static int ov109_021D1A14 (UnkStruct_ov109_021D0F70 * param0) ov109_021D2634(param0, 11); sub_020364F0(202); - Unk_021BF67C.unk_68 = 1; + coresys.unk_68 = 1; param0->unk_00 = 44; return 0; @@ -1393,7 +1393,7 @@ static int ov109_021D1AA8 (UnkStruct_ov109_021D0F70 * param0) param0->unk_CC->unk_14.unk_08, 2, ¶m0->unk_04); if (v0) { - Unk_021BF67C.unk_68 = 0; + coresys.unk_68 = 0; sub_0200EBA0(param0->unk_DC8); param0->unk_00 = 48; } diff --git a/src/overlay109/ov109_021D3D50.c b/src/overlay109/ov109_021D3D50.c index 6e5f471fd1..9f79e66a12 100644 --- a/src/overlay109/ov109_021D3D50.c +++ b/src/overlay109/ov109_021D3D50.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -747,7 +747,7 @@ static int ov109_021D478C (UnkStruct_ov109_021D5140 * param0, int param1) static void ov109_021D47B8 (UnkStruct_ov109_021D5140 * param0) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (sub_0203608C() == 0) { if ((ov109_021D548C() == param0->unk_10->unk_2C) && (param0->unk_10->unk_30 == 0)) { u8 v0 = 1; @@ -760,7 +760,7 @@ static void ov109_021D47B8 (UnkStruct_ov109_021D5140 * param0) sub_02005748(1522); } } - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { if (sub_0203608C()) { if (param0->unk_10->unk_28 == 0) { ov109_021D55A8(param0, 4, 0); @@ -861,7 +861,7 @@ static int ov109_021D4980 (UnkStruct_ov109_021D5140 * param0, int param1) if (sub_0203608C()) { if (param0->unk_10->unk_28) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -870,7 +870,7 @@ static int ov109_021D4980 (UnkStruct_ov109_021D5140 * param0, int param1) } } else { if (param0->unk_10->unk_30 != 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -985,7 +985,7 @@ static int ov109_021D4B94 (UnkStruct_ov109_021D5140 * param0, int param1) u32 v1; if ((ov109_021D548C() != param0->unk_10->unk_2C) || (param0->unk_10->unk_30 != 0)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } @@ -1061,7 +1061,7 @@ static int ov109_021D4CC8 (UnkStruct_ov109_021D5140 * param0, int param1) { void * v0; - Unk_021BF67C.unk_68 = 1; + coresys.unk_68 = 1; v0 = sub_0202C1B4(95); sub_0202B758(param0->unk_0C->unk_14.unk_18, v0, 4); @@ -1088,7 +1088,7 @@ static int ov109_021D4D20 (UnkStruct_ov109_021D5140 * param0, int param1) param0->unk_1C.unk_00 = 0; param0->unk_3C4 = 0; - Unk_021BF67C.unk_68 = 0; + coresys.unk_68 = 0; param0->unk_10->unk_24 = 0; } @@ -1143,7 +1143,7 @@ static int ov109_021D4E28 (UnkStruct_ov109_021D5140 * param0, int param1) int v0; if ((param0->unk_10->unk_2C != ov109_021D548C()) || (param0->unk_10->unk_30 != 0)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_KEY_UP | PAD_KEY_DOWN)) { sub_02005748(1522); } diff --git a/src/overlay110/ov110_021D0D80.c b/src/overlay110/ov110_021D0D80.c index d5be2fb853..bb4d13d2ff 100644 --- a/src/overlay110/ov110_021D0D80.c +++ b/src/overlay110/ov110_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -228,7 +228,7 @@ static BOOL ov110_021D0FD0 (UnkStruct_ov110_021D0F78 * param0) break; case 1: - if ((Unk_021BF67C.unk_44 & PAD_BUTTON_A) || (Unk_021BF67C.unk_44 & PAD_BUTTON_B)) { + if ((coresys.unk_44 & PAD_BUTTON_A) || (coresys.unk_44 & PAD_BUTTON_B)) { return 1; } break; diff --git a/src/overlay112/ov112_0225C700.c b/src/overlay112/ov112_0225C700.c index f7e2be40d3..c5aa218792 100644 --- a/src/overlay112/ov112_0225C700.c +++ b/src/overlay112/ov112_0225C700.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -393,7 +393,7 @@ int ov112_0225C7C4 (UnkStruct_020067E8 * param0, int * param1) } break; case 2: - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_B) || (ov66_0222E12C(v1->unk_08) == 1) || (ov66_02231760() == 1)) { + if ((coresys.padInput & PAD_BUTTON_B) || (ov66_0222E12C(v1->unk_08) == 1) || (ov66_02231760() == 1)) { if ((ov66_0222E12C(v1->unk_08) == 1)) { ov66_0222E2A4(v1->unk_08); } @@ -513,7 +513,7 @@ static void ov112_0225CA34 (UnkStruct_ov112_0225C9BC * param0, u32 param1) sub_02018368(&Unk_ov112_0225D834); param0->unk_00 = sub_02018340(param1); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); @@ -553,7 +553,7 @@ static void ov112_0225CB60 (UnkStruct_ov112_0225C9BC * param0) } Heap_FreeToHeap(param0->unk_00); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); } diff --git a/src/overlay113/ov113_0225C700.c b/src/overlay113/ov113_0225C700.c index 938458f159..2ce0b4a2f2 100644 --- a/src/overlay113/ov113_0225C700.c +++ b/src/overlay113/ov113_0225C700.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02002F38_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -448,7 +448,7 @@ int ov113_0225C700 (UnkStruct_020067E8 * param0, int * param1) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG1, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG2, 1); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); GXLayers_TurnBothDispOn(); @@ -489,10 +489,10 @@ int ov113_0225CA04 (UnkStruct_020067E8 * param0, int * param1) } break; case 2: - if (Unk_021BF67C.unk_60 && (Unk_021BF67C.unk_5E < 160)) { + if (coresys.touchInput && (coresys.unk_5E < 160)) { if (ov113_0225E318(v0, ((32 << 8) / 6)) == 1) { - v0->unk_8D8[v0->unk_920].unk_09 = Unk_021BF67C.unk_5C; - v0->unk_8D8[v0->unk_920].unk_0A = Unk_021BF67C.unk_5E; + v0->unk_8D8[v0->unk_920].unk_09 = coresys.unk_5C; + v0->unk_8D8[v0->unk_920].unk_0A = coresys.unk_5E; ov113_0225DDC0(v0, &v0->unk_8D8[v0->unk_920], v0->unk_168.unk_04); ov113_02260818(&v0->unk_8D8[v0->unk_920]); diff --git a/src/overlay114/ov114_0225C700.c b/src/overlay114/ov114_0225C700.c index 55a6314cc0..07b9645173 100644 --- a/src/overlay114/ov114_0225C700.c +++ b/src/overlay114/ov114_0225C700.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009714_decl.h" @@ -1348,7 +1348,7 @@ static void ov114_0225CEF0 (UnkStruct_ov114_0225CEF0 * param0, const UnkStruct_o param0->unk_04 = param2; param0->unk_08 = param3; - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); { diff --git a/src/overlay115/ov115_02260440.c b/src/overlay115/ov115_02260440.c index 4c06876b7c..9cba9fa57d 100644 --- a/src/overlay115/ov115_02260440.c +++ b/src/overlay115/ov115_02260440.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "overlay114/struct_ov114_0225D678_decl.h" @@ -132,7 +132,7 @@ int ov115_0226048C (UnkStruct_020067E8 * param0, int * param1) } break; case 2: - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { break; } diff --git a/src/overlay115/ov115_02260CEC.c b/src/overlay115/ov115_02260CEC.c index 0faf944366..7481502f41 100644 --- a/src/overlay115/ov115_02260CEC.c +++ b/src/overlay115/ov115_02260CEC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02009714_decl.h" @@ -2345,7 +2345,7 @@ static void ov115_0226294C (UnkStruct_ov115_022622F8 * param0, const VecFx32 * p static void ov115_02262974 (UnkStruct_ov115_02260D78 * param0) { - if (Unk_021BF67C.unk_62 == 0) { + if (coresys.unk_62 == 0) { ov115_02262990(param0); } else { ov115_02262B70(param0); @@ -2461,8 +2461,8 @@ static void ov115_02262B70 (UnkStruct_ov115_02260D78 * param0) v0.y = param0->unk_8690.unk_02[param0->unk_8690.unk_00 - 1].y; ov115_02262CBC(¶m0->unk_20, v0); } else { - v0.x = Unk_021BF67C.unk_5C; - v0.y = Unk_021BF67C.unk_5E; + v0.x = coresys.unk_5C; + v0.y = coresys.unk_5E; ov115_02262CBC(¶m0->unk_20, v0); } } @@ -2478,8 +2478,8 @@ static BOOL ov115_02262C60 (UnkStruct_ov115_02260D78 * param0) return 0; } - v0 = 128 - Unk_021BF67C.unk_5C; - v1 = -96 - Unk_021BF67C.unk_5E; + v0 = 128 - coresys.unk_5C; + v1 = -96 - coresys.unk_5E; v2 = FX_Sqrt(((v0 * v0) + (v1 * v1)) << FX32_SHIFT) >> FX32_SHIFT; if (v2 <= (190 - -96)) { @@ -3970,7 +3970,7 @@ static void ov115_02264BC0 (UnkStruct_ov115_02264BA0 * param0) return; } - ov115_02264BD8(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + ov115_02264BD8(param0, coresys.unk_5C, coresys.unk_5E); } static void ov115_02264BD8 (UnkStruct_ov115_02264BA0 * param0, s32 param1, s32 param2) diff --git a/src/overlay116/ov116_022604C4.c b/src/overlay116/ov116_022604C4.c index f8d7cea61f..68862fbba0 100644 --- a/src/overlay116/ov116_022604C4.c +++ b/src/overlay116/ov116_022604C4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -836,7 +836,7 @@ void ov116_0226139C (UnkStruct_ov116_0226139C * param0) sub_0200D0B0(param0->unk_48.unk_08, param0->unk_48.unk_0C); sub_0200C8D4(param0->unk_48.unk_08); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G3X_AlphaBlend(0); @@ -1042,7 +1042,7 @@ static void ov116_02261494 (UnkStruct_02018340 * param0) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 1); GXLayers_EngineBToggleLayers(GX_PLANEMASK_OBJ, 1); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); G2_SetBlendAlpha(0, GX_BLEND_PLANEMASK_BG1 | GX_BLEND_PLANEMASK_BG2 | GX_BLEND_PLANEMASK_BG3 | GX_BLEND_PLANEMASK_OBJ, 7, 10); diff --git a/src/overlay117/ov117_02260668.c b/src/overlay117/ov117_02260668.c index a4c4ed4fa8..e4bdf9c66d 100644 --- a/src/overlay117/ov117_02260668.c +++ b/src/overlay117/ov117_02260668.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "enums.h" #include "struct_decls/struct_020067E8_decl.h" @@ -267,7 +267,7 @@ int ov117_02260668 (UnkStruct_020067E8 * param0, int * param1) sub_0200F174(0, 27, 27, 0x0, 6, 1, 110); v0->unk_94 = sub_0200D9E8(ov117_02260F7C, v0, 60000); - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); GXLayers_TurnBothDispOn(); diff --git a/src/overlay117/ov117_022626B0.c b/src/overlay117/ov117_022626B0.c index 2df10bb5b2..d7525e3b6d 100644 --- a/src/overlay117/ov117_022626B0.c +++ b/src/overlay117/ov117_022626B0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "struct_decls/struct_02006C24_decl.h" @@ -225,10 +225,10 @@ void ov117_02262798 (UnkStruct_ov117_02261280 * param0, UnkStruct_ov117_022626B0 param1->unk_214 = 0; param1->unk_218 = 0; } else { - param1->unk_20C = Unk_021BF67C.unk_5C; - param1->unk_210 = Unk_021BF67C.unk_5E; - param1->unk_214 = Unk_021BF67C.unk_62; - param1->unk_218 = Unk_021BF67C.unk_60; + param1->unk_20C = coresys.unk_5C; + param1->unk_210 = coresys.unk_5E; + param1->unk_214 = coresys.unk_62; + param1->unk_218 = coresys.touchInput; } ov117_02263270(param1); diff --git a/src/overlay121/ov121_021D0D80.c b/src/overlay121/ov121_021D0D80.c index 194c985c3e..731557413a 100644 --- a/src/overlay121/ov121_021D0D80.c +++ b/src/overlay121/ov121_021D0D80.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -93,7 +93,7 @@ int ov121_021D0D80 (UnkStruct_020067E8 * param0, int * param1) ov121_021D0FF4(v0); sub_0200F174(0, 1, 1, 0x0, 16, 1, 30); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); GXLayers_TurnBothDispOn(); diff --git a/src/unk_0200112C.c b/src/unk_0200112C.c index 5b668c6ed7..dba5f40724 100644 --- a/src/unk_0200112C.c +++ b/src/unk_0200112C.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02013A04_decl.h" #include "struct_decls/struct_020149F0_decl.h" @@ -90,15 +90,15 @@ u32 sub_02001288 (UnkStruct_0200112C * param0) param0->unk_2F = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { return param0->unk_00.unk_00[param0->unk_28 + param0->unk_2A].unk_04; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { return 0xfffffffe; } - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { if (sub_02001A18(param0, 1, 1, 0) == 0) { param0->unk_2F = 1; } @@ -106,7 +106,7 @@ u32 sub_02001288 (UnkStruct_0200112C * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { if (sub_02001A18(param0, 1, 1, 1) == 0) { param0->unk_2F = 2; } @@ -121,12 +121,12 @@ u32 sub_02001288 (UnkStruct_0200112C * param0) v1 = 0; break; case 1: - v0 = (Unk_021BF67C.unk_4C & PAD_KEY_LEFT); - v1 = (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT); + v0 = (coresys.unk_4C & PAD_KEY_LEFT); + v1 = (coresys.unk_4C & PAD_KEY_RIGHT); break; case 2: - v0 = (Unk_021BF67C.unk_4C & PAD_BUTTON_L); - v1 = (Unk_021BF67C.unk_4C & PAD_BUTTON_R); + v0 = (coresys.unk_4C & PAD_BUTTON_L); + v1 = (coresys.unk_4C & PAD_BUTTON_R); break; } diff --git a/src/unk_02001AF4.c b/src/unk_02001AF4.c index 5e510f5bea..8c5afd170c 100644 --- a/src/unk_02001AF4.c +++ b/src/unk_02001AF4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02013A04_decl.h" @@ -96,17 +96,17 @@ u32 sub_02001BE0 (UnkStruct_02001AF4 * param0) { param0->unk_1B = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); return param0->unk_00.unk_00[param0->unk_15].unk_04; } - if (Unk_021BF67C.unk_48 & param0->unk_10) { + if (coresys.padInput & param0->unk_10) { sub_02005748(1500); return 0xfffffffe; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (sub_02001DCC(param0, 0, 1500) == 1) { param0->unk_1B = 1; } @@ -114,7 +114,7 @@ u32 sub_02001BE0 (UnkStruct_02001AF4 * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (sub_02001DCC(param0, 1, 1500) == 1) { param0->unk_1B = 2; } @@ -122,7 +122,7 @@ u32 sub_02001BE0 (UnkStruct_02001AF4 * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (sub_02001DCC(param0, 2, 1500) == 1) { param0->unk_1B = 3; } @@ -130,7 +130,7 @@ u32 sub_02001BE0 (UnkStruct_02001AF4 * param0) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (sub_02001DCC(param0, 3, 1500) == 1) { param0->unk_1B = 4; } @@ -145,17 +145,17 @@ u32 sub_02001C94 (UnkStruct_02001AF4 * param0, u16 param1) { param0->unk_1B = 0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); return param0->unk_00.unk_00[param0->unk_15].unk_04; } - if (Unk_021BF67C.unk_48 & param0->unk_10) { + if (coresys.padInput & param0->unk_10) { sub_02005748(1500); return 0xfffffffe; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (sub_02001DCC(param0, 0, param1) == 1) { param0->unk_1B = 1; } @@ -163,7 +163,7 @@ u32 sub_02001C94 (UnkStruct_02001AF4 * param0, u16 param1) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (sub_02001DCC(param0, 1, param1) == 1) { param0->unk_1B = 2; } @@ -171,7 +171,7 @@ u32 sub_02001C94 (UnkStruct_02001AF4 * param0, u16 param1) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { if (sub_02001DCC(param0, 2, param1) == 1) { param0->unk_1B = 3; } @@ -179,7 +179,7 @@ u32 sub_02001C94 (UnkStruct_02001AF4 * param0, u16 param1) return 0xffffffff; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { if (sub_02001DCC(param0, 3, param1) == 1) { param0->unk_1B = 4; } diff --git a/src/unk_02002328.c b/src/unk_02002328.c index 209d8df4b5..e50bd632de 100644 --- a/src/unk_02002328.c +++ b/src/unk_02002328.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_defs/struct_02002328.h" #include "struct_defs/struct_02002D18.h" @@ -29,7 +29,7 @@ int sub_02002328 (UnkStruct_0201D834 * param0) switch (param0->unk_28) { case 0: - if (((Unk_021BF67C.unk_44 & (PAD_BUTTON_A | PAD_BUTTON_B)) && (v1->unk_00_4)) || ((Unk_021BF67C.unk_62) && (Unk_02101D44.unk_00_4))) { + if (((coresys.unk_44 & (PAD_BUTTON_A | PAD_BUTTON_B)) && (v1->unk_00_4)) || ((coresys.unk_62) && (Unk_02101D44.unk_00_4))) { param0->unk_2A = 0; if (param0->unk_29_0 != 0) { @@ -41,7 +41,7 @@ int sub_02002328 (UnkStruct_0201D834 * param0) (param0->unk_2A)--; if (Unk_02101D44.unk_00_0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || ((Unk_021BF67C.unk_60) && (Unk_02101D44.unk_00_4))) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || ((coresys.touchInput) && (Unk_02101D44.unk_00_4))) { v1->unk_00_4 = 1; param0->unk_2A = 0; } @@ -323,7 +323,7 @@ void sub_02002968 (UnkStruct_0201D834 * param0) static BOOL sub_020029FC (UnkStruct_0201D834 * param0) { - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) || ((Unk_021BF67C.unk_60) && (Unk_02101D44.unk_00_4))) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) || ((coresys.touchInput) && (Unk_02101D44.unk_00_4))) { sub_02005748(1500); Unk_02101D44.unk_00_7 = 1; return 1; diff --git a/src/unk_0200D9E8.c b/src/unk_0200D9E8.c index 7f34d8cb27..0a3a1f8888 100644 --- a/src/unk_0200D9E8.c +++ b/src/unk_0200D9E8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -12,22 +12,22 @@ UnkStruct_0201CD38 * sub_0200D9E8 (UnkFuncPtr_0201CE28 param0, void * param1, u32 param2) { - return sub_0201CE14(Unk_021BF67C.unk_18, param0, param1, param2); + return sub_0201CE14(coresys.unk_18, param0, param1, param2); } UnkStruct_0201CD38 * sub_0200DA04 (UnkFuncPtr_0201CE28 param0, void * param1, u32 param2) { - return sub_0201CE14(Unk_021BF67C.unk_1C, param0, param1, param2); + return sub_0201CE14(coresys.unk_1C, param0, param1, param2); } UnkStruct_0201CD38 * sub_0200DA20 (UnkFuncPtr_0201CE28 param0, void * param1, u32 param2) { - return sub_0201CE14(Unk_021BF67C.unk_24, param0, param1, param2); + return sub_0201CE14(coresys.unk_24, param0, param1, param2); } UnkStruct_0201CD38 * sub_0200DA3C (UnkFuncPtr_0201CE28 param0, void * param1, u32 param2) { - return sub_0201CE14(Unk_021BF67C.unk_20, param0, param1, param2); + return sub_0201CE14(coresys.unk_20, param0, param1, param2); } void sub_0200DA58 (UnkStruct_0201CD38 * param0) diff --git a/src/unk_02017728.c b/src/unk_02017728.c index 3246b8acf7..bc2bf26cb8 100644 --- a/src/unk_02017728.c +++ b/src/unk_02017728.c @@ -1,11 +1,10 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "functypes/funcptr_02017798.h" #include "struct_defs/struct_02017E74.h" -#include "struct_defs/struct_021BF67C.h" #include "unk_02017728.h" #include "heap.h" @@ -22,16 +21,16 @@ static void sub_02017808(BOOL param0); void sub_0201777C(void); static void sub_02017CA0(void); -UnkStruct_021BF67C Unk_021BF67C; +CoreSys coresys; void sub_02017728 (void) { OS_SetIrqCheckFlag(OS_IE_V_BLANK); MI_WaitDma(GX_DEFAULT_DMAID); - sub_0201CDD4(Unk_021BF67C.unk_1C); + sub_0201CDD4(coresys.unk_1C); - Unk_021BF67C.unk_30++; + coresys.unk_30++; } static void sub_0201775C (void) @@ -49,28 +48,28 @@ void sub_0201777C (void) void sub_02017798 (UnkFuncPtr_02017798 param0, void * param1) { - Unk_021BF67C.unk_00 = param0; - Unk_021BF67C.unk_04 = param1; + coresys.unk_00 = param0; + coresys.unk_04 = param1; } void sub_020177A4 (void) { sub_02017808(0); - Unk_021BF67C.unk_08 = NULL; - Unk_021BF67C.unk_0C = NULL; + coresys.unk_08 = NULL; + coresys.unk_0C = NULL; } BOOL sub_020177BC (UnkFuncPtr_02017798 param0, void * param1) { if (param0 == NULL) { sub_02017808(0); - Unk_021BF67C.unk_08 = NULL; - Unk_021BF67C.unk_0C = NULL; + coresys.unk_08 = NULL; + coresys.unk_0C = NULL; return 1; } else { - if (Unk_021BF67C.unk_08 == NULL) { - Unk_021BF67C.unk_0C = param1; - Unk_021BF67C.unk_08 = param0; + if (coresys.unk_08 == NULL) { + coresys.unk_0C = param1; + coresys.unk_08 = param0; sub_02017808(1); return 1; } else { @@ -81,8 +80,8 @@ BOOL sub_020177BC (UnkFuncPtr_02017798 param0, void * param1) static void sub_020177F4 (void) { - if (Unk_021BF67C.unk_08) { - Unk_021BF67C.unk_08(Unk_021BF67C.unk_0C); + if (coresys.unk_08) { + coresys.unk_08(coresys.unk_0C); } } @@ -149,10 +148,10 @@ void sub_0201789C (void) OS_InitTick(); sub_02017850(); - Unk_021BF67C.unk_18 = sub_0201CD88(160, OS_AllocFromMainArenaLo(sub_0201CD80(160), 4)); - Unk_021BF67C.unk_1C = sub_0201CD88(32, OS_AllocFromMainArenaLo(sub_0201CD80(32), 4)); - Unk_021BF67C.unk_20 = sub_0201CD88(32, OS_AllocFromMainArenaLo(sub_0201CD80(32), 4)); - Unk_021BF67C.unk_24 = sub_0201CD88(4, OS_AllocFromMainArenaLo(sub_0201CD80(4), 4)); + coresys.unk_18 = sub_0201CD88(160, OS_AllocFromMainArenaLo(sub_0201CD80(160), 4)); + coresys.unk_1C = sub_0201CD88(32, OS_AllocFromMainArenaLo(sub_0201CD80(32), 4)); + coresys.unk_20 = sub_0201CD88(32, OS_AllocFromMainArenaLo(sub_0201CD80(32), 4)); + coresys.unk_24 = sub_0201CD88(4, OS_AllocFromMainArenaLo(sub_0201CD80(4), 4)); GX_DispOff(); GXS_DispOff(); @@ -176,13 +175,13 @@ void sub_0201789C (void) FS_LoadTable(v1, v0); } - Unk_021BF67C.unk_00 = NULL; - Unk_021BF67C.unk_08 = NULL; - Unk_021BF67C.unk_10 = NULL; - Unk_021BF67C.unk_14 = NULL; - Unk_021BF67C.unk_70 = NULL; - Unk_021BF67C.unk_2C = 0; - Unk_021BF67C.unk_65 = 0; + coresys.unk_00 = NULL; + coresys.unk_08 = NULL; + coresys.unk_10 = NULL; + coresys.unk_14 = NULL; + coresys.unk_70 = NULL; + coresys.unk_2C = 0; + coresys.unk_65 = 0; CARD_SetCacheFlushThreshold(0x500, 0x2400); @@ -275,21 +274,21 @@ void sub_02017AF4 (void) { TPCalibrateParam v0; - Unk_021BF67C.unk_34 = 0; - Unk_021BF67C.unk_38 = 0; - Unk_021BF67C.unk_3C = 0; - Unk_021BF67C.unk_40 = 0; - Unk_021BF67C.unk_44 = 0; - Unk_021BF67C.unk_48 = 0; - Unk_021BF67C.unk_4C = 0; - Unk_021BF67C.unk_50 = 0; - Unk_021BF67C.unk_54 = 4; - Unk_021BF67C.unk_58 = 8; - Unk_021BF67C.unk_5C = 0; - Unk_021BF67C.unk_5E = 0; - Unk_021BF67C.unk_60 = 0; - Unk_021BF67C.unk_62 = 0; - Unk_021BF67C.unk_64 = 0; + coresys.unk_34 = 0; + coresys.unk_38 = 0; + coresys.unk_3C = 0; + coresys.unk_40 = 0; + coresys.unk_44 = 0; + coresys.padInput = 0; + coresys.unk_4C = 0; + coresys.unk_50 = 0; + coresys.unk_54 = 4; + coresys.unk_58 = 8; + coresys.unk_5C = 0; + coresys.unk_5E = 0; + coresys.touchInput = 0; + coresys.unk_62 = 0; + coresys.unk_64 = 0; TP_Init(); @@ -307,17 +306,17 @@ void sub_02017AF4 (void) void sub_02017B70 (int param0) { - Unk_021BF67C.unk_66 = param0; + coresys.unk_66 = param0; } void sub_02017B7C (u8 param0) { - Unk_021BF67C.unk_67 |= param0; + coresys.unk_67 |= param0; } void sub_02017B8C (u8 param0) { - Unk_021BF67C.unk_67 &= ~(param0); + coresys.unk_67 &= ~(param0); } void sub_02017B9C (void) @@ -327,36 +326,36 @@ void sub_02017B9C (void) int v2; if (PAD_DetectFold()) { - Unk_021BF67C.unk_48 = 0; - Unk_021BF67C.unk_44 = 0; - Unk_021BF67C.unk_4C = 0; - Unk_021BF67C.unk_60 = 0; - Unk_021BF67C.unk_62 = 0; + coresys.padInput = 0; + coresys.unk_44 = 0; + coresys.unk_4C = 0; + coresys.touchInput = 0; + coresys.unk_62 = 0; return; } v2 = PAD_Read(); - Unk_021BF67C.unk_3C = v2 & (v2 ^ Unk_021BF67C.unk_38); - Unk_021BF67C.unk_40 = v2 & (v2 ^ Unk_021BF67C.unk_38); + coresys.unk_3C = v2 & (v2 ^ coresys.unk_38); + coresys.unk_40 = v2 & (v2 ^ coresys.unk_38); - if ((v2 != 0) && (Unk_021BF67C.unk_38 == v2)) { - if (--Unk_021BF67C.unk_50 == 0) { - Unk_021BF67C.unk_40 = v2; - Unk_021BF67C.unk_50 = Unk_021BF67C.unk_54; + if ((v2 != 0) && (coresys.unk_38 == v2)) { + if (--coresys.unk_50 == 0) { + coresys.unk_40 = v2; + coresys.unk_50 = coresys.unk_54; } } else { - Unk_021BF67C.unk_50 = Unk_021BF67C.unk_58; + coresys.unk_50 = coresys.unk_58; } - Unk_021BF67C.unk_38 = v2; - Unk_021BF67C.unk_48 = Unk_021BF67C.unk_3C; - Unk_021BF67C.unk_44 = Unk_021BF67C.unk_38; - Unk_021BF67C.unk_4C = Unk_021BF67C.unk_40; + coresys.unk_38 = v2; + coresys.padInput = coresys.unk_3C; + coresys.unk_44 = coresys.unk_38; + coresys.unk_4C = coresys.unk_40; sub_02017CA0(); - if (Unk_021BF67C.unk_64 == 0) { + if (coresys.unk_64 == 0) { while (TP_RequestRawSampling(&v0) != 0) { (void)0; } @@ -367,16 +366,16 @@ void sub_02017B9C (void) TP_GetCalibratedPoint(&v1, &v0); if (v1.validity == TP_VALIDITY_VALID) { - Unk_021BF67C.unk_5C = v1.x; - Unk_021BF67C.unk_5E = v1.y; + coresys.unk_5C = v1.x; + coresys.unk_5E = v1.y; } else { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { switch (v1.validity) { case TP_VALIDITY_INVALID_X: - Unk_021BF67C.unk_5E = v1.y; + coresys.unk_5E = v1.y; break; case TP_VALIDITY_INVALID_Y: - Unk_021BF67C.unk_5C = v1.x; + coresys.unk_5C = v1.x; break; case TP_VALIDITY_INVALID_XY: break; @@ -388,126 +387,126 @@ void sub_02017B9C (void) } } - Unk_021BF67C.unk_60 = (u16)(v1.touch & (v1.touch ^ Unk_021BF67C.unk_62)); - Unk_021BF67C.unk_62 = v1.touch; + coresys.touchInput = (u16)(v1.touch & (v1.touch ^ coresys.unk_62)); + coresys.unk_62 = v1.touch; } static void sub_02017CA0 (void) { - switch (Unk_021BF67C.unk_34) { + switch (coresys.unk_34) { default: case 0: break; case 1: - if (Unk_021BF67C.unk_48 & 0x8) { - Unk_021BF67C.unk_48 |= 0x400; + if (coresys.padInput & 0x8) { + coresys.padInput |= 0x400; } - if (Unk_021BF67C.unk_44 & 0x8) { - Unk_021BF67C.unk_44 |= 0x400; + if (coresys.unk_44 & 0x8) { + coresys.unk_44 |= 0x400; } - if (Unk_021BF67C.unk_4C & 0x8) { - Unk_021BF67C.unk_4C |= 0x400; + if (coresys.unk_4C & 0x8) { + coresys.unk_4C |= 0x400; } break; case 2: { int v0 = 0; - if (Unk_021BF67C.unk_48 & 0x400) { + if (coresys.padInput & 0x400) { v0 |= 0x800; } - if (Unk_021BF67C.unk_48 & 0x800) { + if (coresys.padInput & 0x800) { v0 |= 0x400; } - Unk_021BF67C.unk_48 &= ((0x400 | 0x800) ^ 0xffff); Unk_021BF67C.unk_48 |= v0; + coresys.padInput &= ((0x400 | 0x800) ^ 0xffff); coresys.padInput |= v0; } { int v0 = 0; - if (Unk_021BF67C.unk_44 & 0x400) { + if (coresys.unk_44 & 0x400) { v0 |= 0x800; } - if (Unk_021BF67C.unk_44 & 0x800) { + if (coresys.unk_44 & 0x800) { v0 |= 0x400; } - Unk_021BF67C.unk_44 &= ((0x400 | 0x800) ^ 0xffff); Unk_021BF67C.unk_44 |= v0; + coresys.unk_44 &= ((0x400 | 0x800) ^ 0xffff); coresys.unk_44 |= v0; } { int v0 = 0; - if (Unk_021BF67C.unk_4C & 0x400) { + if (coresys.unk_4C & 0x400) { v0 |= 0x800; } - if (Unk_021BF67C.unk_4C & 0x800) { + if (coresys.unk_4C & 0x800) { v0 |= 0x400; } - Unk_021BF67C.unk_4C &= ((0x400 | 0x800) ^ 0xffff); Unk_021BF67C.unk_4C |= v0; + coresys.unk_4C &= ((0x400 | 0x800) ^ 0xffff); coresys.unk_4C |= v0; } break; case 3: - if (Unk_021BF67C.unk_48 & 0x200) { - Unk_021BF67C.unk_48 |= 0x1; + if (coresys.padInput & 0x200) { + coresys.padInput |= 0x1; } - if (Unk_021BF67C.unk_44 & 0x200) { - Unk_021BF67C.unk_44 |= 0x1; + if (coresys.unk_44 & 0x200) { + coresys.unk_44 |= 0x1; } - if (Unk_021BF67C.unk_4C & 0x200) { - Unk_021BF67C.unk_4C |= 0x1; + if (coresys.unk_4C & 0x200) { + coresys.unk_4C |= 0x1; } - Unk_021BF67C.unk_48 &= ((0x200 | 0x100) ^ 0xffff); - Unk_021BF67C.unk_44 &= ((0x200 | 0x100) ^ 0xffff); - Unk_021BF67C.unk_4C &= ((0x200 | 0x100) ^ 0xffff); + coresys.padInput &= ((0x200 | 0x100) ^ 0xffff); + coresys.unk_44 &= ((0x200 | 0x100) ^ 0xffff); + coresys.unk_4C &= ((0x200 | 0x100) ^ 0xffff); break; } } void sub_02017DD4 (int param0, int param1) { - Unk_021BF67C.unk_54 = param0; - Unk_021BF67C.unk_58 = param1; + coresys.unk_54 = param0; + coresys.unk_58 = param1; } void sub_02017DE0 (u8 param0) { - Unk_021BF67C.unk_68 |= param0; + coresys.unk_68 |= param0; } void sub_02017DF0 (u8 param0) { - Unk_021BF67C.unk_68 &= ~(param0); + coresys.unk_68 &= ~(param0); } void sub_02017E00 (int param0) { - GF_ASSERT(Unk_021BF67C.unk_70 == NULL); + GF_ASSERT(coresys.unk_70 == NULL); - Unk_021BF67C.unk_70 = Heap_AllocFromHeapAtEnd(param0, sizeof(u32)); - *(Unk_021BF67C.unk_70) = 0x2f93a1bc; + coresys.unk_70 = Heap_AllocFromHeapAtEnd(param0, sizeof(u32)); + *(coresys.unk_70) = 0x2f93a1bc; } void sub_02017E2C (void) { - GF_ASSERT(Unk_021BF67C.unk_70 != NULL); + GF_ASSERT(coresys.unk_70 != NULL); - *(Unk_021BF67C.unk_70) = 0; - Heap_FreeToHeap(Unk_021BF67C.unk_70); - Unk_021BF67C.unk_70 = NULL; + *(coresys.unk_70) = 0; + Heap_FreeToHeap(coresys.unk_70); + coresys.unk_70 = NULL; } BOOL sub_02017E54 (void) { - if ((Unk_021BF67C.unk_70 != NULL) && (*(Unk_021BF67C.unk_70) == 0x2f93a1bc)) { + if ((coresys.unk_70 != NULL) && (*(coresys.unk_70) == 0x2f93a1bc)) { return 1; } diff --git a/src/unk_0201E3D8.c b/src/unk_0201E3D8.c index 212a74c265..879245998d 100644 --- a/src/unk_0201E3D8.c +++ b/src/unk_0201E3D8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "inlines.h" #include "overlay072/struct_ov72_0223E2A8.h" @@ -93,7 +93,7 @@ u32 sub_0201E450 (u32 param0) static void sub_0201E4A4 (u32 param0, u32 param1, void * param2, u32 param3, u32 param4, u32 param5) { Unk_021C0704.unk_58 = param0; - Unk_021BF67C.unk_64 = param1; + coresys.unk_64 = param1; Unk_021C0704.unk_00 = param2; Unk_021C0704.unk_04 = param3; Unk_021C0704.unk_08 = param5; diff --git a/src/unk_02022594.c b/src/unk_02022594.c index 23e3847907..953e2fa5b5 100644 --- a/src/unk_02022594.c +++ b/src/unk_02022594.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_defs/union_02022594_020225E0.h" @@ -47,8 +47,8 @@ static BOOL sub_0202260C (const UnkUnion_020225E0 * param0, u32 param1, u32 para int sub_02022644 (const UnkUnion_02022594 * param0) { - if (Unk_021BF67C.unk_62) { - return sub_02022594(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + if (coresys.unk_62) { + return sub_02022594(param0, coresys.unk_5C, coresys.unk_5E); } return 0xffffffff; @@ -56,8 +56,8 @@ int sub_02022644 (const UnkUnion_02022594 * param0) int sub_02022664 (const UnkUnion_02022594 * param0) { - if (Unk_021BF67C.unk_60) { - return sub_02022594(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + if (coresys.touchInput) { + return sub_02022594(param0, coresys.unk_5C, coresys.unk_5E); } return 0xffffffff; @@ -65,16 +65,16 @@ int sub_02022664 (const UnkUnion_02022594 * param0) int sub_02022684 (const UnkUnion_020225E0 * param0) { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { int v0; for (v0 = 0; param0[v0].val2.unk_00 != 0xff; v0++) { if (param0[v0].val2.unk_00 == 0xfe) { - if (sub_020225E0(¶m0[v0], Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E)) { + if (sub_020225E0(¶m0[v0], coresys.unk_5C, coresys.unk_5E)) { return v0; } } else { - if (sub_0202260C(¶m0[v0], Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E)) { + if (sub_0202260C(¶m0[v0], coresys.unk_5C, coresys.unk_5E)) { return v0; } } @@ -86,16 +86,16 @@ int sub_02022684 (const UnkUnion_020225E0 * param0) int sub_020226DC (const UnkUnion_020225E0 * param0) { - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { int v0; for (v0 = 0; param0[v0].val2.unk_00 != 0xff; v0++) { if (param0[v0].val2.unk_00 == 0xfe) { - if (sub_020225E0(¶m0[v0], Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E)) { + if (sub_020225E0(¶m0[v0], coresys.unk_5C, coresys.unk_5E)) { return v0; } } else { - if (sub_0202260C(¶m0[v0], Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E)) { + if (sub_0202260C(¶m0[v0], coresys.unk_5C, coresys.unk_5E)) { return v0; } } @@ -107,11 +107,11 @@ int sub_020226DC (const UnkUnion_020225E0 * param0) BOOL sub_02022734 (const UnkUnion_020225E0 * param0) { - if (Unk_021BF67C.unk_62) { + if (coresys.unk_62) { if (param0->val2.unk_00 == 0xfe) { - return sub_020225E0(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + return sub_020225E0(param0, coresys.unk_5C, coresys.unk_5E); } else { - return sub_0202260C(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + return sub_0202260C(param0, coresys.unk_5C, coresys.unk_5E); } } @@ -120,11 +120,11 @@ BOOL sub_02022734 (const UnkUnion_020225E0 * param0) BOOL sub_02022760 (const UnkUnion_020225E0 * param0) { - if (Unk_021BF67C.unk_60) { + if (coresys.touchInput) { if (param0->val2.unk_00 == 0xfe) { - return sub_020225E0(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + return sub_020225E0(param0, coresys.unk_5C, coresys.unk_5E); } else { - return sub_0202260C(param0, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E); + return sub_0202260C(param0, coresys.unk_5C, coresys.unk_5E); } } @@ -133,19 +133,19 @@ BOOL sub_02022760 (const UnkUnion_020225E0 * param0) BOOL sub_0202278C (void) { - return Unk_021BF67C.unk_62; + return coresys.unk_62; } -BOOL sub_02022798 (void) +BOOL TouchScreen_Tapped(void) { - return Unk_021BF67C.unk_60; + return coresys.touchInput; } BOOL sub_020227A4 (u32 * param0, u32 * param1) { - if (Unk_021BF67C.unk_62) { - *param0 = Unk_021BF67C.unk_5C; - *param1 = Unk_021BF67C.unk_5E; + if (coresys.unk_62) { + *param0 = coresys.unk_5C; + *param1 = coresys.unk_5E; return 1; } @@ -154,9 +154,9 @@ BOOL sub_020227A4 (u32 * param0, u32 * param1) BOOL sub_020227C0 (u32 * param0, u32 * param1) { - if (Unk_021BF67C.unk_60) { - *param0 = Unk_021BF67C.unk_5C; - *param1 = Unk_021BF67C.unk_5E; + if (coresys.touchInput) { + *param0 = coresys.unk_5C; + *param1 = coresys.unk_5E; return 1; } diff --git a/src/unk_02023FCC.c b/src/unk_02023FCC.c index 85439f375a..9dcedcc151 100644 --- a/src/unk_02023FCC.c +++ b/src/unk_02023FCC.c @@ -85,7 +85,7 @@ void sub_0202404C (UnkStruct_02023FCC * param0) v1 = sub_0202278C(); if (v1) { - v2 = sub_02022798(); + v2 = TouchScreen_Tapped(); for (v3 = 0; v3 < param0->unk_04; v3++) { if (param0->unk_10[v3].unk_01) { diff --git a/src/unk_020279FC.c b/src/unk_020279FC.c index 3ffcb8d97b..2dc605b9f3 100644 --- a/src/unk_020279FC.c +++ b/src/unk_020279FC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_021C0794_decl.h" @@ -48,14 +48,14 @@ void sub_02027A68 (SaveData * param0, int param1) switch (param1) { case 1: - Unk_021BF67C.unk_34 = 1; + coresys.unk_34 = 1; break; case 2: - Unk_021BF67C.unk_34 = 3; + coresys.unk_34 = 3; break; case 0: default: - Unk_021BF67C.unk_34 = 0; + coresys.unk_34 = 0; break; } } diff --git a/src/unk_0202854C.c b/src/unk_0202854C.c index ce23b3bbad..2b9ef017de 100644 --- a/src/unk_0202854C.c +++ b/src/unk_0202854C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "trainer_info.h" #include "struct_decls/struct_021C0794_decl.h" @@ -104,7 +104,7 @@ void Underground_Init (UnkStruct_020298B0 * param0) RTCTime v2; sub_0201384C(&v1, &v2); - v0 = (((((((u32)v1.year * 32ULL + v1.month) * 32ULL) + v1.day) * 32ULL + v2.hour) * 32ULL + v2.minute) * 32ULL + (v2.second + Unk_021BF67C.unk_2C)); + v0 = (((((((u32)v1.year * 32ULL + v1.month) * 32ULL) + v1.day) * 32ULL + v2.hour) * 32ULL + v2.minute) * 32ULL + (v2.second + coresys.unk_2C)); MI_CpuFill8(param0, 0, sizeof(UnkStruct_020298B0)); diff --git a/src/unk_02034198.c b/src/unk_02034198.c index f3729341ca..c22e408b2e 100644 --- a/src/unk_02034198.c +++ b/src/unk_02034198.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -513,7 +513,7 @@ BOOL sub_020349EC (void) Unk_021C07CC->unk_6B5++; Unk_021C07C5 = 0; sub_020347EC(); - Unk_021C07CC->unk_654 |= (Unk_021BF67C.unk_44 & 0x7fff); + Unk_021C07CC->unk_654 |= (coresys.unk_44 & 0x7fff); sub_02035534(); sub_02034B50(); Unk_021C07CC->unk_654 &= 0x8000; @@ -1877,7 +1877,7 @@ void sub_020361BC (MATHRandContext32 * param0) RTCTime v2; sub_0201384C(&v1, &v2); - v0 = (((((((u64)v1.year * 16ULL + v1.month) * 32ULL) + v1.day) * 32ULL + v2.hour) * 64ULL + v2.minute) * 64ULL + (v2.second + Unk_021BF67C.unk_2C)); + v0 = (((((((u64)v1.year * 16ULL + v1.month) * 32ULL) + v1.day) * 32ULL + v2.hour) * 64ULL + v2.minute) * 64ULL + (v2.second + coresys.unk_2C)); MATH_InitRand32(param0, v0); } diff --git a/src/unk_020366A0.c b/src/unk_020366A0.c index d203c961a3..c6cd2f1021 100644 --- a/src/unk_020366A0.c +++ b/src/unk_020366A0.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02018340_decl.h" #include "trainer_info.h" @@ -2463,7 +2463,7 @@ void sub_02038A20 (int param0) if (!sub_020389D8()) { sub_0200569C(); sub_02024850(Unk_021C07D4->unk_28); - Unk_021BF67C.unk_64 = 1; + coresys.unk_64 = 1; if (Unk_021C07D4->unk_59 == 3) { sub_020389C4(3); diff --git a/src/unk_02039814.c b/src/unk_02039814.c index d4c6834be6..310f340b2e 100644 --- a/src/unk_02039814.c +++ b/src/unk_02039814.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -133,7 +133,7 @@ void sub_02039834 (int param0, int param1, int param2) GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); diff --git a/src/unk_02039A64.c b/src/unk_02039A64.c index 044f75deba..c8ce3e3b57 100644 --- a/src/unk_02039A64.c +++ b/src/unk_02039A64.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02018340_decl.h" @@ -96,7 +96,7 @@ void sub_02039A64 (int param0, int param1) GX_SetVisiblePlane(0); GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); diff --git a/src/unk_0203CC84.c b/src/unk_0203CC84.c index cd01af7225..3a2a931aeb 100644 --- a/src/unk_0203CC84.c +++ b/src/unk_0203CC84.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -262,7 +262,7 @@ void sub_0203CF5C (UnkStruct_0203CDB0 * param0) if (v2) { sub_0205F490(param0->unk_3C); - ov5_021D1CAC(&v1, param0, Unk_021BF67C.unk_48, Unk_021BF67C.unk_44); + ov5_021D1CAC(&v1, param0, coresys.padInput, coresys.unk_44); } v0 = param0->unk_70; @@ -313,7 +313,7 @@ void sub_0203CF5C (UnkStruct_0203CDB0 * param0) ov5_021E0EEC(param0->unk_3C); ov5_021EA714(param0, 0, 1); } else { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov5_021DDA78(param0->unk_04->unk_08); } @@ -339,7 +339,7 @@ void sub_0203CF5C (UnkStruct_0203CDB0 * param0) ov5_021E0EEC(param0->unk_3C); ov5_021EA714(param0, 0, 1); } else { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { ov5_021DDA78(param0->unk_04->unk_08); } diff --git a/src/unk_0203F6C4.c b/src/unk_0203F6C4.c index 36c78a0d30..23b88e7b66 100644 --- a/src/unk_0203F6C4.c +++ b/src/unk_0203F6C4.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "message.h" @@ -2351,7 +2351,7 @@ static BOOL sub_02040180 (UnkStruct_0203E724 * param0) static BOOL sub_02040190 (UnkStruct_0203E724 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } @@ -2367,7 +2367,7 @@ static BOOL sub_020401A8 (UnkStruct_0203E724 * param0) static BOOL sub_020401D0 (UnkStruct_0203E724 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } @@ -2388,19 +2388,19 @@ static BOOL sub_020401F4 (UnkStruct_0203E724 * param0) static BOOL sub_02040204 (UnkStruct_0203E724 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { sub_0205EA84(param0->unk_34->unk_3C, 0); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { sub_0205EA84(param0->unk_34->unk_3C, 1); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { sub_0205EA84(param0->unk_34->unk_3C, 2); - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { sub_0205EA84(param0->unk_34->unk_3C, 3); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + } else if (coresys.padInput & PAD_BUTTON_X) { sub_0203F0C0(param0->unk_34); } else { return 0; @@ -2417,11 +2417,11 @@ static BOOL sub_02040284 (UnkStruct_0203E724 * param0) static BOOL sub_02040294 (UnkStruct_0203E724 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 1; } - if (Unk_021BF67C.unk_48 & (PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT)) { + if (coresys.padInput & (PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT)) { return 1; } @@ -2651,13 +2651,13 @@ static BOOL sub_02040670 (UnkStruct_0203E724 * param0) return 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v4 = 0; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { v4 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { v4 = 2; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v4 = 3; } @@ -2668,7 +2668,7 @@ static BOOL sub_02040670 (UnkStruct_0203E724 * param0) return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { sub_0201D730(*v1); *v2 = 1; return 1; @@ -2693,18 +2693,18 @@ static BOOL sub_02040730 (UnkStruct_0203E724 * param0) u16 * v1 = sub_0203F118(v0, param0->unk_18[0]); int v2 = 0xffff; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { *v1 = 0; return 1; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { v2 = 0; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + } else if (coresys.padInput & PAD_KEY_DOWN) { v2 = 1; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + } else if (coresys.padInput & PAD_KEY_LEFT) { v2 = 2; - } else if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + } else if (coresys.padInput & PAD_KEY_RIGHT) { v2 = 3; } @@ -2714,7 +2714,7 @@ static BOOL sub_02040730 (UnkStruct_0203E724 * param0) return 1; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_X) { + if (coresys.padInput & PAD_BUTTON_X) { *v1 = 1; return 1; } @@ -5588,7 +5588,7 @@ static BOOL sub_02043A4C (UnkStruct_0203E724 * param0) u16 * v0 = sub_0203F118(param0->unk_34, param0->unk_18[0]); u32 v1 = sub_0205B91C(param0->unk_34->unk_7C); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { v1 = sub_0205B9EC(param0->unk_34->unk_7C, 8); if (v1) { @@ -7198,7 +7198,7 @@ static BOOL sub_020456E8 (UnkStruct_0203E724 * param0) { u16 * v0 = inline_0204FCAC(param0); - *v0 = Unk_021BF67C.unk_66; + *v0 = coresys.unk_66; return 1; } @@ -8225,11 +8225,11 @@ static BOOL sub_0204666C (UnkStruct_0203E724 * param0) *v0 = 0; - if (Unk_021BF67C.unk_44 & PAD_BUTTON_A) { + if (coresys.unk_44 & PAD_BUTTON_A) { *v0 = 1; } - if (Unk_021BF67C.unk_44 & PAD_BUTTON_B) { + if (coresys.unk_44 & PAD_BUTTON_B) { *v0 = 1; } diff --git a/src/unk_020482D4.c b/src/unk_020482D4.c index 7db86c36f7..7c57e25c5e 100644 --- a/src/unk_020482D4.c +++ b/src/unk_020482D4.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0203E724_decl.h" @@ -274,7 +274,7 @@ BOOL sub_0204858C (UnkStruct_0203E724 * param0) BOOL sub_020485C0 (UnkStruct_0203E724 * param0) { - if (Unk_021BF67C.unk_44 & PAD_KEY_UP) { + if (coresys.unk_44 & PAD_KEY_UP) { sub_02004550(22, 1218, 1); } else { sub_02004550(22, 1218, 1); diff --git a/src/unk_02050568.c b/src/unk_02050568.c index 842c97b17e..8a52e92a73 100644 --- a/src/unk_02050568.c +++ b/src/unk_02050568.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_020508D4_decl.h" @@ -89,7 +89,7 @@ static BOOL sub_020505A0 (UnkStruct_020508D4 * param0) v1->unk_08++; break; case 5: - if ((Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if ((coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { v1->unk_08++; } break; diff --git a/src/unk_02051D8C.c b/src/unk_02051D8C.c index 6d8a5cd073..5e94c0ab73 100644 --- a/src/unk_02051D8C.c +++ b/src/unk_02051D8C.c @@ -3,7 +3,7 @@ #include "constants/pokemon.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "trainer_info.h" #include "struct_decls/struct_02026324_decl.h" @@ -120,7 +120,7 @@ BattleParams * sub_02051D8C (int param0, u32 param1) RTCTime v3; sub_0201384C(&v2, &v3); - v1->unk_174 = v2.year + v2.month * 0x100 * v2.day * 0x10000 + v3.hour * 0x10000 + (v3.minute + v3.second) * 0x1000000 + Unk_021BF67C.unk_2C; + v1->unk_174 = v2.year + v2.month * 0x100 * v2.day * 0x10000 + v3.hour * 0x10000 + (v3.minute + v3.second) * 0x1000000 + coresys.unk_2C; } if (sub_02035E38() == 1) { diff --git a/src/unk_020528D0.c b/src/unk_020528D0.c index a85ca73db0..6328e5b226 100644 --- a/src/unk_020528D0.c +++ b/src/unk_020528D0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -161,7 +161,7 @@ static BOOL sub_020529C4 (UnkStruct_020508D4 * param0) } break; case 2: - if ((Unk_021BF67C.unk_48 & PAD_BUTTON_A) || (Unk_021BF67C.unk_48 & PAD_BUTTON_B)) { + if ((coresys.padInput & PAD_BUTTON_A) || (coresys.padInput & PAD_BUTTON_B)) { sub_0200F174(0, 0, 0, 0x0, 8, 1, 32); v0->unk_00++; } diff --git a/src/unk_020530C8.c b/src/unk_020530C8.c index b31e6e1237..996cdedbf8 100644 --- a/src/unk_020530C8.c +++ b/src/unk_020530C8.c @@ -2,7 +2,7 @@ #include #include "inlines.h" -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "message.h" @@ -238,7 +238,7 @@ static void sub_0205311C (UnkStruct_0203CDB0 * param0, const UnkStruct_02049FA8 void sub_020531A0 (UnkStruct_0203CDB0 * param0) { GF_ASSERT(param0->unk_70 < 5); - Unk_021BF67C.unk_65 = param0->unk_74->unk_00_12; + coresys.unk_65 = param0->unk_74->unk_00_12; } void sub_020531C0 (UnkStruct_0203CDB0 * param0, BOOL param1) diff --git a/src/unk_02055C50.c b/src/unk_02055C50.c index d45a3328b0..e98d360e90 100644 --- a/src/unk_02055C50.c +++ b/src/unk_02055C50.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" #include "struct_decls/struct_02027854_decl.h" @@ -401,7 +401,7 @@ static BOOL sub_02056124 (UnkStruct_020508D4 * param0) v1->unk_08 = 0; v1->unk_00 = 2; case 2: - if (Unk_021BF67C.unk_44 & PAD_KEY_LEFT) { + if (coresys.unk_44 & PAD_KEY_LEFT) { UnkStruct_02061AB4 * v2 = sub_02056074(v0, 2); if ((v2 == NULL) || !sub_020560E4(v2)) { @@ -412,7 +412,7 @@ static BOOL sub_02056124 (UnkStruct_020508D4 * param0) v1->unk_00 = 3; break; } - } else if (Unk_021BF67C.unk_44 & PAD_KEY_RIGHT) { + } else if (coresys.unk_44 & PAD_KEY_RIGHT) { UnkStruct_02061AB4 * v2 = sub_02056074(v0, 3); if ((v2 == NULL) || !sub_020560E4(v2)) { @@ -423,11 +423,11 @@ static BOOL sub_02056124 (UnkStruct_020508D4 * param0) v1->unk_00 = 3; break; } - } else if ((Unk_021BF67C.unk_44 & PAD_KEY_UP) && (v1->unk_04 == 1)) { + } else if ((coresys.unk_44 & PAD_KEY_UP) && (v1->unk_04 == 1)) { sub_0205EA84(v0->unk_3C, 0); v1->unk_00 = 4; break; - } else if ((Unk_021BF67C.unk_44 & PAD_KEY_DOWN) && (v1->unk_04 == 0)) { + } else if ((coresys.unk_44 & PAD_KEY_DOWN) && (v1->unk_04 == 0)) { v1->unk_00 = 4; break; } diff --git a/src/unk_02057518.c b/src/unk_02057518.c index d6b23b5015..1474596a78 100644 --- a/src/unk_02057518.c +++ b/src/unk_02057518.c @@ -3,7 +3,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0201CD38_decl.h" #include "trainer_info.h" @@ -498,7 +498,7 @@ static void sub_02057E68 () { u8 v0 = 2; - if (PAD_BUTTON_B & Unk_021BF67C.unk_44) { + if (PAD_BUTTON_B & coresys.unk_44) { v0 = 1; } diff --git a/src/unk_0205A0D8.c b/src/unk_0205A0D8.c index f0a78b06a4..ac5378f425 100644 --- a/src/unk_0205A0D8.c +++ b/src/unk_0205A0D8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -288,7 +288,7 @@ static BOOL sub_0205A324 (UnkStruct_020508D4 * param0) v0->unk_34 = 7; sub_02062C30(v0->unk_24->unk_38); v0->unk_08(1, v0->unk_50); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { v0->unk_34 = 4; sub_020364F0(92); v0->unk_43 = 5; @@ -936,17 +936,17 @@ static void sub_0205AF18 (UnkStruct_0205A0D8 * param0, int param1) static int sub_0205AFE4 (UnkStruct_0205A0D8 * param0) { do { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_81 = ((param0->unk_81 == 0) ? (param0->unk_80 - 1) : (param0->unk_81 - 1)); break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_81 = (param0->unk_81 == (param0->unk_80 - 1)) ? 0 : (param0->unk_81 + 1); break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if (param0->unk_81 < (param0->unk_80 - 1)) { @@ -956,7 +956,7 @@ static int sub_0205AFE4 (UnkStruct_0205A0D8 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); return 2; } @@ -1036,7 +1036,7 @@ static BOOL sub_0205B140 (UnkStruct_020508D4 * param0) break; case 1: if (sub_0205DA04(v1->unk_20)) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { MessageLoader_Free(v1->unk_1C); sub_0200B3F0(v1->unk_18); Strbuf_Free(v1->unk_00); diff --git a/src/unk_020683F4.c b/src/unk_020683F4.c index e5cf9b5519..e5c37cd7eb 100644 --- a/src/unk_020683F4.c +++ b/src/unk_020683F4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "struct_decls/struct_020507E4_decl.h" @@ -965,7 +965,7 @@ static BOOL sub_02068F48 (UnkStruct_020508D4 * param0) break; case 1: if (sub_0205DA04(v1->unk_14) == 1) { - if (Unk_021BF67C.unk_48 & (PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_KEY_UP | PAD_KEY_DOWN | PAD_KEY_LEFT | PAD_KEY_RIGHT | PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(&v1->unk_00, 0); v1->unk_16++; } diff --git a/src/unk_0206C0E8.c b/src/unk_0206C0E8.c index 6e528ab7fb..66bbd994ff 100644 --- a/src/unk_0206C0E8.c +++ b/src/unk_0206C0E8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020507E4_decl.h" #include "struct_decls/struct_020508D4_decl.h" @@ -113,7 +113,7 @@ static BOOL sub_0206C120 (UnkStruct_020508D4 * param0) case 5: v1->unk_0E++; - if ((v1->unk_0E >= 60) || (Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if ((v1->unk_0E >= 60) || (coresys.padInput & PAD_BUTTON_A)) { ov6_02242A94(v1->unk_0D, v1->unk_04); v1->unk_08 = ov6_02242AEC(v1->unk_04); sub_02005748(1657); diff --git a/src/unk_0206F314.c b/src/unk_0206F314.c index c9805a526d..f78508e709 100644 --- a/src/unk_0206F314.c +++ b/src/unk_0206F314.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -284,13 +284,13 @@ static int sub_0206F498 (UnkStruct_0206F7F8 * param0) v0 = sub_02001288(param0->unk_C0); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); sub_0206FF10(param0); return 10; } - if (!(Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if (!(coresys.padInput & PAD_BUTTON_A)) { return 3; } @@ -320,13 +320,13 @@ static int sub_0206F508 (UnkStruct_0206F7F8 * param0) static int sub_0206F514 (UnkStruct_0206F7F8 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { sub_02005748(1500); sub_02070288(param0); return 2; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { sub_02005748(1500); sub_0206FFE4(param0); return 6; @@ -339,13 +339,13 @@ static int sub_0206F554 (UnkStruct_0206F7F8 * param0) { UnkStruct_0206F3A0 * v0; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_B)) { sub_02005748(1500); sub_02070010(param0); return 5; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); param0->unk_0C = 0; param0->unk_328 = &(param0->unk_324[param0->unk_1F].unk_04[param0->unk_32C[param0->unk_28]]); @@ -357,7 +357,7 @@ static int sub_0206F554 (UnkStruct_0206F7F8 * param0) return 7; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (param0->unk_28 > 0) { sub_02005748(1500); --param0->unk_28; @@ -365,7 +365,7 @@ static int sub_0206F554 (UnkStruct_0206F7F8 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (param0->unk_28 < (param0->unk_21 - 1)) { sub_02005748(1500); ++param0->unk_28; @@ -456,7 +456,7 @@ static int sub_0206F748 (UnkStruct_0206F7F8 * param0) param0->unk_0C++; break; case 2: - if (!(Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if (!(coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { break; } @@ -895,7 +895,7 @@ static BOOL sub_020702D0 (UnkStruct_020508D4 * param0) sub_020219F8(v1->unk_08->unk_134.unk_00); break; case 9: - if (!(Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if (!(coresys.padInput & PAD_BUTTON_A)) { return 0; } diff --git a/src/unk_020722AC.c b/src/unk_020722AC.c index 5d969f7ba8..c5ddf06348 100644 --- a/src/unk_020722AC.c +++ b/src/unk_020722AC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_0200112C_decl.h" #include "struct_decls/struct_02001AF4_decl.h" @@ -270,13 +270,13 @@ static void sub_02072390 (UnkStruct_0201CD38 * param0, void * param1) sub_0206A870(v0->unk_1A4); } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02072EA4(v0, sub_02072518, sub_02072364); sub_02005748(1500); return; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); switch (v1) { @@ -326,13 +326,13 @@ static void sub_02072470 (UnkStruct_0201CD38 * param0, void * param1) v1 = sub_02001288(v0->unk_160); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02072EA4(v0, sub_02072534, sub_02072370); sub_02005748(1500); return; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); switch (v1) { @@ -504,7 +504,7 @@ static void sub_020726B4 (UnkStruct_0201CD38 * param0, void * param1) } break; case 2: - if (!(Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if (!(coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { return; } @@ -584,7 +584,7 @@ static void sub_020727F8 (UnkStruct_0201CD38 * param0, void * param1) } break; case 2: - if (!(Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B))) { + if (!(coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B))) { return; } diff --git a/src/unk_0207AE68.c b/src/unk_0207AE68.c index 54a8698906..bbe34f663e 100644 --- a/src/unk_0207AE68.c +++ b/src/unk_0207AE68.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02018340_decl.h" #include "struct_decls/struct_0201CD38_decl.h" @@ -250,7 +250,7 @@ static void sub_0207B180 (UnkStruct_0207AE68 * param0) } } - if ((param0->unk_7C & 0x1) && (param0->unk_64 == 8) && (Unk_021BF67C.unk_48 & PAD_BUTTON_B)) { + if ((param0->unk_7C & 0x1) && (param0->unk_64 == 8) && (coresys.padInput & PAD_BUTTON_B)) { sub_02003178(param0->unk_14, ((0x1 | 0x2 | 0x4 | 0x8)), (0xc00 ^ 0xffff), 0, 0, 16, 0x7fff); param0->unk_64 = 41; } diff --git a/src/unk_0207E0B8.c b/src/unk_0207E0B8.c index 07206e449b..6aa1e9940b 100644 --- a/src/unk_0207E0B8.c +++ b/src/unk_0207E0B8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -600,7 +600,7 @@ static int sub_0207E6C0 (UnkStruct_0207F248 * param0) static int sub_0207E6E4 (UnkStruct_0207F248 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); return 32; } @@ -1434,13 +1434,13 @@ static u8 sub_0207FA24 (UnkStruct_0207F248 * param0) v1 = 4; - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { v1 = 0; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + } else if (coresys.unk_4C & PAD_KEY_DOWN) { v1 = 1; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + } else if (coresys.unk_4C & PAD_KEY_LEFT) { v1 = 2; - } else if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + } else if (coresys.unk_4C & PAD_KEY_RIGHT) { v1 = 3; } @@ -1635,7 +1635,7 @@ static u8 sub_0207FE98 (UnkStruct_0207F248 * param0) { u8 v0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_B11 == 6) { return 4; } else if (param0->unk_B11 == 7) { @@ -1675,7 +1675,7 @@ static u8 sub_0207FE98 (UnkStruct_0207F248 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_B0F_7 == 0) { sub_02005748(1500); param0->unk_B11 = 7; @@ -2044,7 +2044,7 @@ static u8 sub_020805E4 (UnkStruct_0207F248 * param0) { u8 v0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); if ((param0->unk_B11 >= 6) || (param0->unk_B11 == param0->unk_B0F_0)) { @@ -2056,7 +2056,7 @@ static u8 sub_020805E4 (UnkStruct_0207F248 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); sub_02083B88(param0); return 3; @@ -2320,7 +2320,7 @@ static int sub_02080AD8 (UnkStruct_0207F248 * param0) if (v0 != 0xffffffff) { u16 v1 = 0xfffe; - if (sub_0201C784(param0->unk_00, 4, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_00, 4, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } @@ -2376,7 +2376,7 @@ static int sub_02080BF4 (UnkStruct_0207F248 * param0) { switch (param0->unk_B14[1]) { case 0: - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_B11 >= 6) { sub_02005748(1500); sub_02083B88(param0); @@ -2405,7 +2405,7 @@ static int sub_02080BF4 (UnkStruct_0207F248 * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); sub_02083B88(param0); return 1; @@ -2439,7 +2439,7 @@ static int sub_02080BF4 (UnkStruct_0207F248 * param0) } break; case 1: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_0200E084(¶m0->unk_04[34], 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -2479,7 +2479,7 @@ static int sub_02080BF4 (UnkStruct_0207F248 * param0) } break; case 4: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_0200E084(¶m0->unk_04[34], 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -2538,7 +2538,7 @@ static u8 sub_02080FD0 (UnkStruct_0207F248 * param0) { u8 v0; - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_B11 == 7) { if (param0->unk_B0F_7 == 0) { sub_02005748(1500); @@ -2556,7 +2556,7 @@ static u8 sub_02080FD0 (UnkStruct_0207F248 * param0) return 5; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { if (param0->unk_B0F_7 == 0) { sub_02005748(1500); param0->unk_B11 = 7; @@ -2746,7 +2746,7 @@ static void sub_020814A8 (UnkStruct_0207F248 * param0, Pokemon * param1, u32 par static int sub_0208150C (UnkStruct_0207F248 * param0) { if (sub_0201D724(param0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return sub_0208170C(param0); } } @@ -2757,7 +2757,7 @@ static int sub_0208150C (UnkStruct_0207F248 * param0) static int sub_0208153C (UnkStruct_0207F248 * param0) { if (sub_0201D724(param0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020819B4(param0); return 13; diff --git a/src/unk_02083370.c b/src/unk_02083370.c index a3757fd464..14c5fd6e2c 100644 --- a/src/unk_02083370.c +++ b/src/unk_02083370.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "pokemon.h" @@ -218,7 +218,7 @@ static void sub_020834B0 (UnkStruct_0207F248 * param0, int * param1) int sub_02083658 (UnkStruct_0207F248 * param0) { if (sub_0201D724(param0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -232,7 +232,7 @@ int sub_02083658 (UnkStruct_0207F248 * param0) int sub_020836A8 (UnkStruct_0207F248 * param0) { if (sub_0201D724(param0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020819B4(param0); return 19; @@ -377,7 +377,7 @@ static int sub_02083990 (void * param0) int sub_020839BC (UnkStruct_0207F248 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -761,7 +761,7 @@ static void sub_020844B0 (UnkStruct_0207F248 * param0, int * param1) int sub_020845A8 (UnkStruct_0207F248 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020826E0(param0, 34, 1); sub_0200D414(param0->unk_5B0[6], 0); @@ -1032,7 +1032,7 @@ static int sub_02084A18 (UnkStruct_0207F248 * param0) int sub_02084B34 (UnkStruct_0207F248 * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0200E084(¶m0->unk_04[34], 1); sub_020826E0(param0, 29, 1); sub_0200D414(param0->unk_5B0[6], 0); diff --git a/src/unk_02084B70.c b/src/unk_02084B70.c index c5c853f2ab..cb6cbca54d 100644 --- a/src/unk_02084B70.c +++ b/src/unk_02084B70.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" #include "pokemon.h" @@ -407,7 +407,7 @@ int sub_02085348 (void * param0) return 5; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v0->unk_5A4->unk_23 = 0; return 32; } @@ -634,7 +634,7 @@ int sub_02085804 (UnkStruct_0207F248 * param0) break; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); v3 = param0->unk_B11; param0->unk_B11 = sub_020857C0(param0, param0->unk_B11 + 1); @@ -720,7 +720,7 @@ static int sub_02085C50 (void * param0) switch (v0->unk_B13) { case 0: if (sub_0201D724(v0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_020829DC(v0); v0->unk_B13 = 1; @@ -728,14 +728,14 @@ static int sub_02085C50 (void * param0) } break; case 1: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_02082B58(v0); v0->unk_B13 = 2; } break; case 2: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); sub_02082C10(v0); v0->unk_B13 = 3; @@ -781,14 +781,14 @@ static int sub_02085C50 (void * param0) break; case 4: if (sub_0201D724(v0->unk_B10) == 0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_02005748(1500); v0->unk_B13 = 3; } } break; case 5: - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v1 = Party_GetPokemonBySlotIndex(v0->unk_5A4->unk_00, v0->unk_B11); sub_02086590(v0, v1, v0->unk_5A4->unk_28); v2 = MessageLoader_GetNewStrbuf(v0->unk_69C, 61); @@ -1039,7 +1039,7 @@ int sub_020863A0 (UnkStruct_0207F248 * param0) Pokemon * v0; Strbuf* v1; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { v0 = Party_GetPokemonBySlotIndex(param0->unk_5A4->unk_00, param0->unk_B11); sub_02086590(param0, v0, param0->unk_5A4->unk_28); diff --git a/src/unk_0208694C.c b/src/unk_0208694C.c index e951143818..0081cb9eb7 100644 --- a/src/unk_0208694C.c +++ b/src/unk_0208694C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -935,7 +935,7 @@ static int sub_0208694C (UnkStruct_020067E8 * param0, int * param1) sub_0208732C(1); { - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); } @@ -1043,7 +1043,7 @@ static int sub_02086D38 (UnkStruct_02087A10 * param0, int param1) { sub_02088350(param0); - if (Unk_021BF67C.unk_48 & PAD_BUTTON_SELECT) { + if (coresys.padInput & PAD_BUTTON_SELECT) { if (sub_02021D34(param0->unk_390[8]) == 0) { sub_02021CAC(param0->unk_390[8], 1); return param1; @@ -1069,15 +1069,15 @@ static int sub_02086D38 (UnkStruct_02087A10 * param0, int param1) sub_02088844(param0->unk_3A, param0->unk_4C4); sub_02005748(1694); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + } else if (coresys.padInput & PAD_BUTTON_A) { param1 = sub_02088898(param0, param0->unk_3A[param0->unk_1C.unk_04][param0->unk_1C.unk_00], 1); param0->unk_1C.unk_14 = 1; } else if (param0->unk_62C == 1) { param1 = sub_02088898(param0, param0->unk_3A[param0->unk_1C.unk_04][param0->unk_1C.unk_00], 0); param0->unk_1C.unk_14 = 0; - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + } else if (coresys.padInput & PAD_BUTTON_B) { param1 = sub_02088898(param0, (0xe001 + 6), 1); - } else if (Unk_021BF67C.unk_48 & PAD_BUTTON_R) { + } else if (coresys.padInput & PAD_BUTTON_R) { param1 = sub_02088898(param0, (0xe001 + 5), 1); } @@ -1203,7 +1203,7 @@ static int sub_02086F3C (UnkStruct_020067E8 * param0, int * param1) Heap_Destroy(18); { - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); } @@ -1976,35 +1976,35 @@ static void sub_02088350 (UnkStruct_02087A10 * param0) v2 = 1; } - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { sub_02005748(1500); sub_02021CAC(param0->unk_390[8], 1); v1 = 1; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { sub_02005748(1500); sub_02021CAC(param0->unk_390[8], 1); v1 = 2; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { sub_02005748(1500); sub_02021CAC(param0->unk_390[8], 1); v1 = 3; v0++; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { sub_02005748(1500); sub_02021CAC(param0->unk_390[8], 1); v1 = 4; v0++; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_START) { + if (coresys.padInput & PAD_BUTTON_START) { sub_02005748(1500); sub_02021CAC(param0->unk_390[8], 1); param0->unk_1C.unk_00 = 12; @@ -2247,7 +2247,7 @@ static int sub_02088898 (UnkStruct_02087A10 * param0, u16 param1, int param2) } } - if ((sub_02021D34(param0->unk_390[8]) == 0) && (Unk_021BF67C.unk_60 == 0)) { + if ((sub_02021D34(param0->unk_390[8]) == 0) && (coresys.touchInput == 0)) { sub_02021CAC(param0->unk_390[8], 1); return 2; } @@ -2620,9 +2620,9 @@ static BOOL sub_0208903C (UnkStruct_02087A10 * param0) v1 = 4; } - if (Unk_021BF67C.unk_60) { - v2 = Unk_021BF67C.unk_5C; - v3 = Unk_021BF67C.unk_5E; + if (coresys.touchInput) { + v2 = coresys.unk_5C; + v3 = coresys.unk_5E; for (v0 = v1; v0 < (NELEMS(Unk_020F2A14)); v0++) { v4 = Unk_020F2A14[v0].unk_00; diff --git a/src/unk_020890F4.c b/src/unk_020890F4.c index 1311472d9a..ab2c346ce8 100644 --- a/src/unk_020890F4.c +++ b/src/unk_020890F4.c @@ -2,7 +2,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -349,7 +349,7 @@ static void sub_0208945C (UnkStruct_02018340 * param0) GXLayers_EngineBToggleLayers(GX_PLANEMASK_BG3, 0); } - Unk_021BF67C.unk_65 = 1; + coresys.unk_65 = 1; GXLayers_SwapDisplay(); GXLayers_EngineAToggleLayers(GX_PLANEMASK_OBJ, 1); diff --git a/src/unk_02089604.c b/src/unk_02089604.c index a55c2377bf..909c01ff66 100644 --- a/src/unk_02089604.c +++ b/src/unk_02089604.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "strbuf.h" @@ -492,7 +492,7 @@ asm void sub_02089C20 (UnkStruct_02089688 * param0) ldr r0, [r4, r0] cmp r0, #1 bne _02089CBC - ldr r0, = Unk_021BF67C + ldr r0, = coresys ldr r0, [r0, #0x48] cmp r0, #0 beq _02089C80 @@ -532,7 +532,7 @@ asm void sub_02089C20 (UnkStruct_02089688 * param0) str r1, [r4, r0] pop {r3, r4, r5, r6, r7, pc} _02089CBC: - ldr r0, = Unk_021BF67C + ldr r0, = coresys mov r1, #0x40 ldr r0, [r0, #0x4c] tst r1, r0 @@ -620,7 +620,7 @@ asm void sub_02089C20 (UnkStruct_02089688 * param0) mov r6, #1 b _02089F2A _02089D56: - ldr r1, = Unk_021BF67C + ldr r1, = coresys ldr r7, [r1, #0x48] mov r1, #1 tst r1, r7 diff --git a/src/unk_0208BEBC.c b/src/unk_0208BEBC.c index 4dc7237554..efee35ee5b 100644 --- a/src/unk_0208BEBC.c +++ b/src/unk_0208BEBC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_0202783C_decl.h" @@ -134,7 +134,7 @@ static int sub_0208BF6C (UnkStruct_020067E8 * param0, int * param1) ov62_0222F514(v0); Heap_Destroy(102); Overlay_UnloadByID(FS_OVERLAY_ID(overlay62)); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); return 1; diff --git a/src/unk_0208C098.c b/src/unk_0208C098.c index 40d9a62777..f46a597f5a 100644 --- a/src/unk_0208C098.c +++ b/src/unk_0208C098.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02006C24_decl.h" #include "struct_decls/struct_02018340_decl.h" @@ -100,7 +100,7 @@ u8 sub_0208C15C (s16 * param0, u16 param1) v0 = *param0; - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { *param0 += 1; if (*param0 > param1) { @@ -114,7 +114,7 @@ u8 sub_0208C15C (s16 * param0, u16 param1) return 1; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { *param0 -= 1; if (*param0 <= 0) { @@ -128,7 +128,7 @@ u8 sub_0208C15C (s16 * param0, u16 param1) return 2; } - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { *param0 -= 10; if (*param0 <= 0) { @@ -142,7 +142,7 @@ u8 sub_0208C15C (s16 * param0, u16 param1) return 2; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { *param0 += 10; if (*param0 > param1) { diff --git a/src/unk_0208C324.c b/src/unk_0208C324.c index a25f207518..8c0adbaa8e 100644 --- a/src/unk_0208C324.c +++ b/src/unk_0208C324.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "struct_decls/struct_02006C24_decl.h" @@ -540,33 +540,33 @@ static int sub_0208CA00 (UnkStruct_0208D7BC * param0) return 18; } - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { sub_0208D898(param0, -1); return 2; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { sub_0208D898(param0, 1); return 2; } - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { sub_0208DB10(param0, -1); return 2; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { sub_0208DB10(param0, 1); return 2; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); param0->unk_24C->unk_17 = 1; return 18; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if ((param0->unk_24C->unk_12 == 3) && (param0->unk_6A4 == 4)) { sub_02005748(1501); return sub_0208E958(param0); @@ -639,7 +639,7 @@ static int sub_0208CB74 (UnkStruct_0208D7BC * param0) static int sub_0208CB88 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (sub_0208DF94(param0, -1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -648,7 +648,7 @@ static int sub_0208CB88 (UnkStruct_0208D7BC * param0) return 7; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (sub_0208DF94(param0, 1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -657,7 +657,7 @@ static int sub_0208CB88 (UnkStruct_0208D7BC * param0) return 7; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { if (param0->unk_6A5_0 == 4) { sub_02005748(1692); param0->unk_6A6 = 0; @@ -675,7 +675,7 @@ static int sub_0208CB88 (UnkStruct_0208D7BC * param0) } } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1692); param0->unk_6A6 = 0; @@ -691,7 +691,7 @@ static int sub_0208CB88 (UnkStruct_0208D7BC * param0) static int sub_0208CC6C (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (sub_0208DF94(param0, -1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -700,7 +700,7 @@ static int sub_0208CC6C (UnkStruct_0208D7BC * param0) return 8; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (sub_0208DF94(param0, 1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -709,7 +709,7 @@ static int sub_0208CC6C (UnkStruct_0208D7BC * param0) return 8; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02021CAC(param0->unk_41C[10], 0); if ((param0->unk_6A5_0 != 4) && (param0->unk_6A5_0 != param0->unk_6A5_4)) { @@ -725,7 +725,7 @@ static int sub_0208CC6C (UnkStruct_0208D7BC * param0) return 7; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); sub_02021CAC(param0->unk_41C[10], 0); return 7; @@ -736,17 +736,17 @@ static int sub_0208CC6C (UnkStruct_0208D7BC * param0) static int sub_0208CD44 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & PAD_KEY_LEFT) { + if (coresys.padInput & PAD_KEY_LEFT) { sub_0208D898(param0, -1); return 9; } - if (Unk_021BF67C.unk_48 & PAD_KEY_RIGHT) { + if (coresys.padInput & PAD_KEY_RIGHT) { sub_0208D898(param0, 1); return 9; } - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { if (sub_0208DF94(param0, -1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -755,7 +755,7 @@ static int sub_0208CD44 (UnkStruct_0208D7BC * param0) return 9; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { if (sub_0208DF94(param0, 1) == 1) { sub_02005748(1500); sub_0208DFF4(param0); @@ -764,7 +764,7 @@ static int sub_0208CD44 (UnkStruct_0208D7BC * param0) return 9; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1501); if (param0->unk_6A5_0 != 4) { @@ -781,7 +781,7 @@ static int sub_0208CD44 (UnkStruct_0208D7BC * param0) return 18; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1501); param0->unk_24C->unk_16 = 4; param0->unk_24C->unk_17 = 1; @@ -793,7 +793,7 @@ static int sub_0208CD44 (UnkStruct_0208D7BC * param0) static int sub_0208CE54 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { sub_0208DFF4(param0); return 9; } @@ -821,27 +821,27 @@ static int sub_0208CE84 (UnkStruct_0208D7BC * param0) static int sub_0208CE98 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_4C & PAD_KEY_LEFT) { + if (coresys.unk_4C & PAD_KEY_LEFT) { sub_0208E794(param0, -1); return 13; } - if (Unk_021BF67C.unk_4C & PAD_KEY_RIGHT) { + if (coresys.unk_4C & PAD_KEY_RIGHT) { sub_0208E794(param0, 1); return 13; } - if (Unk_021BF67C.unk_4C & PAD_KEY_UP) { + if (coresys.unk_4C & PAD_KEY_UP) { sub_0208E794(param0, -4); return 13; } - if (Unk_021BF67C.unk_4C & PAD_KEY_DOWN) { + if (coresys.unk_4C & PAD_KEY_DOWN) { sub_0208E794(param0, 4); return 13; } - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_B | PAD_BUTTON_A)) { + if (coresys.padInput & (PAD_BUTTON_B | PAD_BUTTON_A)) { sub_02005748(1501); param0->unk_6A6 = 0; return 12; @@ -877,7 +877,7 @@ static int sub_0208CF0C (UnkStruct_0208D7BC * param0) static int sub_0208CF78 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { BoxPokemon * v0; Pokemon * v1; u8 v2; @@ -955,7 +955,7 @@ static int sub_0208D114 (UnkStruct_0208D7BC * param0) { u8 v0; - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { for (v0 = 0; v0 < 5; v0++) { if ((param0->unk_6A6 & (1 << v0))) { sub_02091610(param0, v0); @@ -974,7 +974,7 @@ static int sub_0208D114 (UnkStruct_0208D7BC * param0) static int sub_0208D164 (UnkStruct_0208D7BC * param0) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B)) { return 18; } diff --git a/src/unk_020920C0.c b/src/unk_020920C0.c index dad505d2aa..2298c6597a 100644 --- a/src/unk_020920C0.c +++ b/src/unk_020920C0.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_defs/union_02022594_020225E0.h" #include "struct_defs/struct_0208D7BC.h" @@ -189,7 +189,7 @@ static int sub_02092224 (UnkStruct_0208D7BC * param0) if (v0 != 0xffffffff) { u16 v1 = 0xfffe; - if (sub_0201C784(param0->unk_00, 4, Unk_021BF67C.unk_5C, Unk_021BF67C.unk_5E, &v1) == 0) { + if (sub_0201C784(param0->unk_00, 4, coresys.unk_5C, coresys.unk_5E, &v1) == 0) { return 0xffffffff; } } diff --git a/src/unk_02099DFC.c b/src/unk_02099DFC.c index 840212dcfb..d2ae55c499 100644 --- a/src/unk_02099DFC.c +++ b/src/unk_02099DFC.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -356,7 +356,7 @@ static BOOL sub_0209A200 (UnkStruct_02099DFC * param0, u32 param1, int param2, i } break; case 2: - if ((param2 != 0) || (Unk_021BF67C.unk_48 & 1)) { + if ((param2 != 0) || (coresys.padInput & 1)) { param0->unk_08 = 0; v0 = 1; } diff --git a/src/unk_0209A2C4.c b/src/unk_0209A2C4.c index 843bc24979..8dc4eaf67a 100644 --- a/src/unk_0209A2C4.c +++ b/src/unk_0209A2C4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_02001AF4_decl.h" #include "struct_decls/struct_020067E8_decl.h" @@ -332,7 +332,7 @@ static BOOL sub_0209A688 (UnkStruct_0209A3D0 * param0, u32 param1, int param2, i } break; case 2: - if ((param2 != 0) || (Unk_021BF67C.unk_48 & PAD_BUTTON_A)) { + if ((param2 != 0) || (coresys.padInput & PAD_BUTTON_A)) { param0->unk_0C = 0; v0 = 1; } diff --git a/src/unk_0209A74C.c b/src/unk_0209A74C.c index 486179b216..ed6edbad95 100644 --- a/src/unk_0209A74C.c +++ b/src/unk_0209A74C.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02018340_decl.h" @@ -92,7 +92,7 @@ void sub_0209A74C (int param0) GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); @@ -165,7 +165,7 @@ void sub_0209A8E0 (int param0) GX_SetVisiblePlane(0); GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); diff --git a/src/unk_0209AA74.c b/src/unk_0209AA74.c index b97f73d270..da9fc20228 100644 --- a/src/unk_0209AA74.c +++ b/src/unk_0209AA74.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_02018340_decl.h" @@ -101,7 +101,7 @@ void sub_0209AA74 (int param0, int param1) GXS_SetVisiblePlane(0); sub_02017DD4(4, 8); - Unk_021BF67C.unk_65 = 0; + coresys.unk_65 = 0; GXLayers_SwapDisplay(); G2_BlendNone(); diff --git a/src/unk_0209ACF4.c b/src/unk_0209ACF4.c index 17751679c0..f26080c0eb 100644 --- a/src/unk_0209ACF4.c +++ b/src/unk_0209ACF4.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "message.h" #include "struct_decls/struct_0200B358_decl.h" @@ -246,7 +246,7 @@ static BOOL sub_0209AE14 (UnkStruct_020508D4 * param0) break; case 12: if (sub_0209B100(v0)) { - if (Unk_021BF67C.unk_48 & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_PLUS_KEY_MASK)) { + if (coresys.padInput & (PAD_BUTTON_A | PAD_BUTTON_B | PAD_PLUS_KEY_MASK)) { sub_0209B110(v0); v0->unk_54 = 13; } @@ -363,7 +363,7 @@ static void sub_0209B27C (UnkStruct_0209AD84 * param0) static int sub_0209B288 (UnkStruct_0209AD84 * param0) { do { - if (Unk_021BF67C.unk_48 & PAD_KEY_UP) { + if (coresys.padInput & PAD_KEY_UP) { param0->unk_5C--; if (param0->unk_5C < 0) { @@ -376,7 +376,7 @@ static int sub_0209B288 (UnkStruct_0209AD84 * param0) break; } - if (Unk_021BF67C.unk_48 & PAD_KEY_DOWN) { + if (coresys.padInput & PAD_KEY_DOWN) { param0->unk_5C++; if (param0->unk_5C >= param0->unk_60) { @@ -389,12 +389,12 @@ static int sub_0209B288 (UnkStruct_0209AD84 * param0) break; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_A) { + if (coresys.padInput & PAD_BUTTON_A) { sub_02005748(1500); return param0->unk_5C; } - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { sub_02005748(1500); return param0->unk_60 - 1; } diff --git a/src/unk_0209B6F8.c b/src/unk_0209B6F8.c index 031515896e..18b0936171 100644 --- a/src/unk_0209B6F8.c +++ b/src/unk_0209B6F8.c @@ -1,7 +1,7 @@ #include #include -#include "data_021BF67C.h" +#include "coresys.h" #include "struct_decls/struct_020067E8_decl.h" #include "overlay104/struct_ov104_022320B4_decl.h" @@ -115,7 +115,7 @@ int sub_0209B75C (UnkStruct_020067E8 * param0, int * param1) } if (ov104_0222E6A8(v0->unk_14) == 1) { - if (Unk_021BF67C.unk_48 & PAD_BUTTON_B) { + if (coresys.padInput & PAD_BUTTON_B) { *param1 = 2; } }