Mass rename a couple touch screen functions

This commit is contained in:
RavePossum
2025-01-21 11:18:55 -05:00
parent 78dfd86080
commit df1c5349bc
21 changed files with 36 additions and 37 deletions

View File

@@ -26,8 +26,8 @@ typedef union {
} circle;
} TouchScreenRect, TouchScreenHitTable;
int sub_02022644(const TouchScreenRect *rect);
int sub_02022664(const TouchScreenRect *rect);
int TouchScreen_CheckRectangleHeld(const TouchScreenRect *rect);
int TouchScreen_CheckRectanglePressed(const TouchScreenRect *rect);
int sub_02022684(const TouchScreenHitTable *hitTable);
int sub_020226DC(const TouchScreenHitTable *hitTable);
BOOL TouchScreen_LocationHeld(const TouchScreenHitTable *hitTable);

View File

@@ -163,7 +163,7 @@ static int CheckSubscreenRectanglePress(PokemonSummaryScreen *summaryScreen)
return TOUCHSCREEN_INPUT_NONE;
}
return sub_02022664(sSubscreenRectangles[summaryScreen->subscreenType]);
return TouchScreen_CheckRectanglePressed(sSubscreenRectangles[summaryScreen->subscreenType]);
}
static int CheckSubscreenRectangleHeld(PokemonSummaryScreen *summaryScreen)
@@ -172,7 +172,7 @@ static int CheckSubscreenRectangleHeld(PokemonSummaryScreen *summaryScreen)
return TOUCHSCREEN_INPUT_NONE;
}
int rectHeld = sub_02022644(sSubscreenRectangles[summaryScreen->subscreenType]);
int rectHeld = TouchScreen_CheckRectangleHeld(sSubscreenRectangles[summaryScreen->subscreenType]);
if (rectHeld != TOUCHSCREEN_INPUT_NONE) {
u16 v1 = 0xFFFE;

View File

@@ -1557,7 +1557,7 @@ int ov16_0226925C(UnkStruct_ov16_02268A14 *param0)
if (BattleSystem_BattleType(param0->unk_00) & 0x400) {
v1 = ov16_0226CD18(param0);
} else {
v1 = sub_02022664(v4->unk_14);
v1 = TouchScreen_CheckRectanglePressed(v4->unk_14);
if (v1 == 0xffffffff) {
v1 = ov16_0226BE48(param0);

View File

@@ -1368,7 +1368,7 @@ static u8 ov13_0222139C(UnkStruct_ov13_022213F0 *param0)
static int ov13_022213E4(UnkStruct_ov13_022213F0 *param0, const TouchScreenRect *rect)
{
int v0 = sub_02022664(rect);
int v0 = TouchScreen_CheckRectanglePressed(rect);
return v0;
}

View File

@@ -818,7 +818,7 @@ static void ov13_022271D0(UnkStruct_ov13_02227244 *param0, u8 param1)
static int ov13_02227238(UnkStruct_ov13_02227244 *param0, const TouchScreenRect *rect)
{
int v0 = sub_02022664(rect);
int v0 = TouchScreen_CheckRectanglePressed(rect);
return v0;
}

View File

@@ -695,7 +695,7 @@ int ov17_0223FAF8(UnkStruct_ov17_0223F7E4 *param0)
GF_ASSERT(v4->unk_18 != NULL);
v1 = sub_02022664(v4->unk_14);
v1 = TouchScreen_CheckRectanglePressed(v4->unk_14);
if (v1 == 0xffffffff) {
v1 = ov17_02240C90(param0);

View File

@@ -470,7 +470,7 @@ int ov17_02249760(UnkStruct_ov17_022492DC *param0)
}
GF_ASSERT(v3->unk_18 != NULL);
v1 = sub_02022664(v3->unk_14);
v1 = TouchScreen_CheckRectanglePressed(v3->unk_14);
if (v1 == 0xffffffff) {
if (v3->unk_18 == Unk_ov17_02254554) {

View File

@@ -557,7 +557,7 @@ static int ov56_02256A68(UnkStruct_ov56_02256468 *param0)
WMBssDesc *v4;
UnkStruct_0203330C *v5;
v0 = sub_02022644(Unk_ov56_02257264);
v0 = TouchScreen_CheckRectangleHeld(Unk_ov56_02257264);
v3 = ov56_02257174(param0);
if (v0 != 0xffffffff) {
@@ -633,7 +633,7 @@ static int ov56_02256BC0(UnkStruct_ov56_02256468 *param0)
{
int v0;
v0 = sub_02022644(Unk_ov56_02257250);
v0 = TouchScreen_CheckRectangleHeld(Unk_ov56_02257250);
if (v0 != 0xffffffff) {
u32 v1, v2;

View File

@@ -804,7 +804,7 @@ static void ov58_021D1A80(UnkStruct_02095EAC *param0)
int v0 = -1, v1;
int v2 = 0;
v0 = sub_02022664(Unk_ov58_021D2EB8);
v0 = TouchScreen_CheckRectanglePressed(Unk_ov58_021D2EB8);
if (v0 != 0xffffffff) {
switch (v0) {
@@ -871,7 +871,7 @@ static void ov58_021D1A80(UnkStruct_02095EAC *param0)
}
}
v1 = sub_02022644(Unk_ov58_021D2DDC);
v1 = TouchScreen_CheckRectangleHeld(Unk_ov58_021D2DDC);
Sprite_SetDrawFlag(param0->unk_23C[CommSys_CurNetId()], 0);
if (v1 != 0xffffffff) {
@@ -1869,7 +1869,7 @@ static void ov58_021D2D10(UnkStruct_02095EAC *param0)
static int ov58_021D2D30(UnkStruct_02095EAC *param0)
{
int v0 = sub_02022664(Unk_ov58_021D2DD4);
int v0 = TouchScreen_CheckRectanglePressed(Unk_ov58_021D2DD4);
if (v0 != 0xffffffff) {
return 1;

View File

@@ -1317,7 +1317,7 @@ static void ov71_0223C5A4(UnkStruct_ov71_0223B620 *param0, const u8 param1)
static int ov71_0223C60C(BgConfig *param0, const TouchScreenRect *rect)
{
int v0 = sub_02022664(rect);
int v0 = TouchScreen_CheckRectanglePressed(rect);
if (v0 != 0xffffffff) {
if (v0 != 0) {
@@ -1336,7 +1336,7 @@ static int ov71_0223C60C(BgConfig *param0, const TouchScreenRect *rect)
static int ov71_0223C654(BgConfig *param0, const TouchScreenRect *rect)
{
int v0 = sub_02022644(rect);
int v0 = TouchScreen_CheckRectangleHeld(rect);
if (v0 != 0xffffffff) {
if (v0 != 0) {

View File

@@ -648,7 +648,7 @@ static void ov72_0223E2A8(UnkStruct_ov72_0223DB98 *param0)
{
int v0 = -1, v1;
v0 = sub_02022664(Unk_ov72_0223EB4A);
v0 = TouchScreen_CheckRectanglePressed(Unk_ov72_0223EB4A);
if (v0 != 0xffffffff) {
if (v0 == 0) {
@@ -664,7 +664,7 @@ static void ov72_0223E2A8(UnkStruct_ov72_0223DB98 *param0)
}
}
v1 = sub_02022644(Unk_ov72_0223EB42);
v1 = TouchScreen_CheckRectangleHeld(Unk_ov72_0223EB42);
if (v1 != 0xffffffff) {
ov72_0223EA18(param0);

View File

@@ -219,13 +219,13 @@ static int ov79_021D0FB0(UnkStruct_ov79_021D0E1C *param0)
{ 0xFF, 0x0, 0x0, 0x0 }
};
v0 = sub_02022664(v2);
v0 = TouchScreen_CheckRectanglePressed(v2);
if (v0 != 0xffffffff) {
return v0;
}
v0 = sub_02022644(v2);
v0 = TouchScreen_CheckRectangleHeld(v2);
if (v0 == 0xffffffff) {
if (param0->unk_14 == 1) {

View File

@@ -378,7 +378,7 @@ static int ov80_021D1848(UnkStruct_ov80_021D2A08 *param0, int param1)
{ 0xff, 0, 0, 0 }
};
v0 = sub_02022664(&(v2[1 - param1]));
v0 = TouchScreen_CheckRectanglePressed(&(v2[1 - param1]));
if ((v0 == 0xffffffff) || (param1 == 1)) {
return v0;

View File

@@ -1592,7 +1592,7 @@ static u8 ov84_0223CD40(UnkStruct_ov84_0223B5A0 *param0)
static int ov84_0223CDB0(UnkStruct_ov84_0223B5A0 *param0)
{
int v0 = sub_02022664(Unk_ov84_022410C8[param0->unk_424].unk_04);
int v0 = TouchScreen_CheckRectanglePressed(Unk_ov84_022410C8[param0->unk_424].unk_04);
if (v0 != 0xffffffff) {
u16 v1 = 0xfffe;
@@ -1607,7 +1607,7 @@ static int ov84_0223CDB0(UnkStruct_ov84_0223B5A0 *param0)
static int ov84_0223CE08(UnkStruct_ov84_0223B5A0 *param0)
{
int v0 = sub_02022644(Unk_ov84_022410C8[param0->unk_424].unk_04);
int v0 = TouchScreen_CheckRectangleHeld(Unk_ov84_022410C8[param0->unk_424].unk_04);
if (v0 != 0xffffffff) {
u16 v1 = 0xfffe;
@@ -1789,7 +1789,7 @@ static void ov84_0223D0FC(UnkStruct_ov84_0223B5A0 *param0)
static BOOL ov84_0223D1F4(UnkStruct_ov84_0223B5A0 *param0)
{
int v0 = sub_02022664(Unk_ov84_02240E98);
int v0 = TouchScreen_CheckRectanglePressed(Unk_ov84_02240E98);
if (v0 != 0xffffffff) {
u16 v1 = 0xfffe;

View File

@@ -1509,7 +1509,7 @@ static void ov88_0223CE74(UnkStruct_02095E80 *param0)
return;
}
v2 = sub_02022664(Unk_ov88_0223EE28);
v2 = TouchScreen_CheckRectanglePressed(Unk_ov88_0223EE28);
if (v2 != 0xffffffff) {
if (param0->unk_6F4[param0->unk_88[0]].unk_05) {

View File

@@ -222,7 +222,7 @@ static const TouchScreenRect Unk_ov94_0224633E[] = {
int ov94_02244214(int param0)
{
int v0 = sub_02022664(Unk_ov94_0224633E);
int v0 = TouchScreen_CheckRectanglePressed(Unk_ov94_0224633E);
if (v0 != 0xffffffff) {
if (v0 < param0) {

View File

@@ -1964,7 +1964,7 @@ static int ov97_022356E8(OverlayManager *param0, int *param1)
break;
case 13:
v0 = sub_02022664((const TouchScreenRect *)v3->unk_374);
v0 = TouchScreen_CheckRectanglePressed((const TouchScreenRect *)v3->unk_374);
if (v0 != 0xffffffff) {
if (v0 < 30) {

View File

@@ -518,7 +518,7 @@ static BOOL ov111_021D10B8(UnkStruct_ov111_021D0F7C *param0)
param0->unk_0F--;
}
v3 = sub_02022644((const TouchScreenRect *)Unk_ov111_021D364C);
v3 = TouchScreen_CheckRectangleHeld((const TouchScreenRect *)Unk_ov111_021D364C);
if (v3 != 0xffffffff) {
GXLayers_EngineAToggleLayers((GX_PLANEMASK_BG2), 0);
@@ -745,7 +745,7 @@ static BOOL ov111_021D1508(UnkStruct_ov111_021D0F7C *param0)
break;
case 3:
sub_0201E564(&param0->unk_424, 4, 2);
v1 = sub_02022644((const TouchScreenRect *)Unk_ov111_021D3794);
v1 = TouchScreen_CheckRectangleHeld((const TouchScreenRect *)Unk_ov111_021D3794);
if (v1 != 0xffffffff) {
if (ov111_021D2918(param0) < 3) {
@@ -802,7 +802,7 @@ static BOOL ov111_021D1508(UnkStruct_ov111_021D0F7C *param0)
}
if (param0->unk_0E == (3 - 1)) {
v1 = sub_02022664((const TouchScreenRect *)Unk_ov111_021D3610);
v1 = TouchScreen_CheckRectanglePressed((const TouchScreenRect *)Unk_ov111_021D3610);
if (v1 != 0xffffffff) {
ov111_021D350C(param0->unk_3A0, 1);
@@ -817,7 +817,7 @@ static BOOL ov111_021D1508(UnkStruct_ov111_021D0F7C *param0)
break;
}
} else {
v1 = sub_02022664((const TouchScreenRect *)Unk_ov111_021D3618);
v1 = TouchScreen_CheckRectanglePressed((const TouchScreenRect *)Unk_ov111_021D3618);
if (v1 != 0xffffffff) {
ov111_021D350C(param0->unk_3A0, 1);

View File

@@ -130,7 +130,7 @@ int ov113_02260748(UnkStruct_ov113_02260818 *param0, int param1)
int v0;
int v1 = 0xff;
v0 = sub_02022664(Unk_ov113_02260D4C);
v0 = TouchScreen_CheckRectanglePressed(Unk_ov113_02260D4C);
if (v0 < 6) {
if ((param1 != v0) && (param0[v0].unk_02 != 0) && (param0[v0].unk_02 <= NATIONAL_DEX_COUNT)) {

View File

@@ -41,8 +41,7 @@ static BOOL sub_0202260C(const TouchScreenHitTable *hitTable, u32 param1, u32 pa
return 0;
}
// ravetodo TouchScreen_CheckRectangleHeld
int sub_02022644(const TouchScreenRect *rect)
int TouchScreen_CheckRectangleHeld(const TouchScreenRect *rect)
{
if (gSystem.touchHeld) {
return CheckRectangleTouch(rect, gSystem.touchX, gSystem.touchY);
@@ -50,8 +49,8 @@ int sub_02022644(const TouchScreenRect *rect)
return TOUCHSCREEN_INPUT_NONE;
}
// ravetodo TouchScreen_CheckRectanglePressed
int sub_02022664(const TouchScreenRect *rect)
int TouchScreen_CheckRectanglePressed(const TouchScreenRect *rect)
{
if (gSystem.touchPressed) {
return CheckRectangleTouch(rect, gSystem.touchX, gSystem.touchY);

View File

@@ -2302,7 +2302,7 @@ static int GetValidWindowLayout(GameWindowLayout *param0)
return 0xffffffff;
}
v0 = sub_02022664(Unk_020F1C94);
v0 = TouchScreen_CheckRectanglePressed(Unk_020F1C94);
if (v0 != 0xffffffff) {
u16 v1 = 0xfffe;