//
// GJBaseGameLayer::processAreaEffects from 0x100290574 to 0x100290d14 (1952 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::processAreaActions @ 0x10029259c
// > GJBaseGameLayer::processAreaActions @ 0x1002925b8
// > GJBaseGameLayer::processAreaActions @ 0x1002925d0
// > GJBaseGameLayer::processAreaVisualActions @ 0x100292820
// > GJBaseGameLayer::processAreaVisualActions @ 0x100292844
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:02:03 +0000
//
__int64 *__fastcall GJBaseGameLayer::processAreaEffects(__int64 a1, __int64 *a2, int a3, char a4, float a5)
{
__int64 *result; // x0
__int64 v10; // x9
__int64 v11; // x22
__int64 v12; // x26
unsigned int v13; // w8
__int64 v14; // x24
__int64 MainObject; // x0
__int64 v16; // x24
double v17; // d0
float32x2_t *LastPosition; // x1
float32x2_t *v19; // x0
_QWORD *v20; // x8
__int64 v21; // x24
double *v22; // x0
double v23; // d0
__int64 v24; // x25
float32x2_t *v25; // x1
__int64 v26; // x0
float v27; // s0
float v28; // s1
float v29; // s1
float32x2_t v30; // d0
float v31; // s1
float v32; // s1
float v33; // s2
float v34; // s3
float v35; // s3
float v36; // s5
float v37; // s1
float v38; // s2
float v39; // s2
float v40; // s4
float v41; // s1
float v42; // s6
float v43; // s4
float v44; // s4
float v45; // s3
float v46; // s5
float v47; // s3
int v48; // w10
float v49; // s13
float v50; // s12
int v51; // w8
int v52; // w9
int v53; // w9
int v54; // s1
__int32 v55; // s1
char v56; // w25
int v57; // w23
int v58; // w19
int v59; // w8
char v60; // w24
int v61; // w9
__int64 v62; // x0
__int64 v63; // x28
double v64; // d0
double v65; // d0
double v66; // d0
double v67; // d0
double v68; // d0
__int64 v69; // [xsp+0h] [xbp-E0h]
__int64 v70; // [xsp+20h] [xbp-C0h]
unsigned int v72; // [xsp+30h] [xbp-B0h]
unsigned int v73; // [xsp+34h] [xbp-ACh]
float32x2_t v74; // [xsp+38h] [xbp-A8h] BYREF
float32x2_t v75; // [xsp+40h] [xbp-A0h] BYREF
float32x2_t v76; // [xsp+48h] [xbp-98h] BYREF
__int64 v77; // [xsp+50h] [xbp-90h] BYREF
bool (__fastcall *v78)(__int64, __int64); // [xsp+58h] [xbp-88h] BYREF
LODWORD(v78) = a3;
result = sub_100019268((_QWORD *)(a1 + 1600), (int *)&v78);
if ( result )
{
v78 = sub_100273F38;
sub_1002AAE80();
LODWORD(v78) = a3;
result = sub_10001BB58((_QWORD *)(a1 + 1600), (int *)&v78);
}
v11 = *a2;
v10 = a2[1];
if ( *a2 != v10 )
{
v70 = a2[1];
while ( (*(_BYTE *)(v11 + 196) & 1) != 0 )
{
LABEL_117:
v11 += 240;
if ( v11 == v10 )
return result;
}
v12 = *(_QWORD *)(v11 + 168);
sub_10005471C(v11, a1, a5);
sub_1000262EC(&v78);
sub_1000262EC(&v77);
v13 = *(_DWORD *)(v12 + 1540);
if ( v13 )
v14 = v13;
else
v14 = *(unsigned int *)(v11 + 184);
if ( (v14 & 0x80000000) == 0 )
{
MainObject = GJBaseGameLayer::tryGetMainObject(a1, v14);
if ( !MainObject )
goto LABEL_44;
v16 = MainObject;
if ( (unsigned int)(a3 - 5) <= 0xFFFFFFFD
&& (unsigned int)GJBaseGameLayer::resetAreaObjectValues(a1, MainObject, 1) )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1368LL))(a1, v16);
}
(*(void (__fastcall **)(float32x2_t *__return_ptr, __int64))(*(_QWORD *)v16 + 1360LL))(&v76, v16);
v17 = sub_10002630C(&v78, (double *)&v76);
(*(void (__fastcall **)(float32x2_t *__return_ptr, __int64, double))(*(_QWORD *)v16 + 1360LL))(&v75, v16, v17);
LastPosition = (float32x2_t *)GameObject::getLastPosition(v16);
v19 = &v75;
goto LABEL_20;
}
if ( (unsigned int)v14 >= 0xFFFFFFFE )
{
if ( (_DWORD)v14 != -2 || (v20 = (_QWORD *)(a1 + 3264), (*(_BYTE *)(a1 + 1010) & 1) == 0) )
v20 = (_QWORD *)(a1 + 3256);
v21 = *v20;
v22 = (double *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*v20 + 192LL))(*v20);
v23 = sub_10002630C(&v78, v22);
v24 = (*(__int64 (__fastcall **)(__int64, double))(*(_QWORD *)v21 + 192LL))(v21, v23);
LastPosition = (float32x2_t *)GameObject::getLastPosition(v21);
v19 = (float32x2_t *)v24;
LABEL_20:
sub_10002632C(v19, LastPosition, &v76);
v25 = &v76;
LABEL_43:
sub_10002630C(&v77, (double *)v25);
LABEL_44:
v30.i32[0] = *(_DWORD *)(v11 + 32);
v31 = (float)((float)(*(float *)(v11 + 24) + *(float *)(v11 + 28)) + v30.f32[0]) + *(float *)(v11 + 36);
*(_DWORD *)(v12 + 2060) = (int)v31;
v32 = (float)(int)v31;
v33 = fabsf(*(float *)(v11 + 48));
v34 = fabsf(*(float *)(v11 + 52));
if ( v33 > v34 )
v33 = v34;
v35 = (float)(1.0 / v33) * v32;
v36 = *(float *)&v78 - v35;
v37 = 0.0;
v38 = 0.0;
if ( (float)(*(float *)&v78 - v35) > 0.0 )
{
v39 = *(float *)(a1 + 13632);
if ( v36 >= 10000000.0 )
v38 = v39 * 10000000.0;
else
v38 = v36 * v39;
}
v40 = *(float *)&v78 + v35;
if ( (float)(*(float *)&v78 + v35) > 0.0 )
{
v41 = *(float *)(a1 + 13632);
if ( v40 >= 10000000.0 )
v37 = v41 * 10000000.0;
else
v37 = v40 * v41;
}
v42 = *((float *)&v78 + 1) - v35;
v43 = 0.0;
if ( (float)(*((float *)&v78 + 1) - v35) > 0.0 )
{
v44 = *(float *)(a1 + 13636);
if ( v42 >= 10000000.0 )
v43 = v44 * 10000000.0;
else
v43 = v42 * v44;
}
v45 = v35 + *((float *)&v78 + 1);
if ( v45 <= 0.0 )
{
v46 = *(float *)(a1 + 13636);
v47 = 0.0;
}
else
{
v46 = *(float *)(a1 + 13636);
if ( v45 >= 10000000.0 )
v47 = v46 * 10000000.0;
else
v47 = v45 * v46;
}
v48 = (int)v43;
v49 = *(float *)(a1 + 13632) * 10000000.0;
v50 = v46 * 10000000.0;
v51 = *(_DWORD *)(v12 + 1968);
if ( v51 == 2 )
{
if ( *(_BYTE *)(v12 + 2020) )
v53 = (int)v43;
else
v53 = 0;
if ( *(_BYTE *)(v12 + 2020) )
v48 = 0;
if ( *(_BYTE *)(v12 + 2012) )
v53 = v48;
else
v50 = v47;
v73 = v53;
v52 = 0;
}
else
{
v52 = (int)v38;
if ( v51 == 1 )
{
if ( !*(_BYTE *)(v12 + 2012) )
{
if ( !*(_BYTE *)(v12 + 2020) )
v52 = 0;
v72 = v52;
v73 = 0;
v49 = v37;
LABEL_85:
if ( *(float *)&v77 != 0.0 )
*(_BYTE *)(v12 + 2056) = *(float *)&v77 < 0.0;
*(_DWORD *)(v11 + 192) += 2;
if ( !a3 )
{
if ( *(float *)(v11 + 72) != 0.0 )
{
*(_BYTE *)(v12 + 1900) = 0;
if ( v51 )
goto LABEL_91;
goto LABEL_96;
}
*(_BYTE *)(v12 + 1900) = 1;
cocos2d::ccpForAngle((float *)&v76, (float)(*(float *)(v11 + 68) + -90.0) * 0.017453);
sub_10002630C((_QWORD *)(v12 + 1904), (double *)&v76);
v51 = *(_DWORD *)(v12 + 1968);
v30.i32[0] = *(_DWORD *)(v11 + 32);
}
if ( v51 )
{
LABEL_91:
v54 = *(_DWORD *)(v11 + 36);
*(_DWORD *)(v11 + 40) = v30.i32[0];
*(_DWORD *)(v11 + 44) = v54;
v55 = v30.i32[0];
LABEL_97:
v30.i32[1] = v55;
v78 = (bool (__fastcall *)(__int64, __int64))vadd_f32(v30, (float32x2_t)v78);
if ( *(_BYTE *)(v12 + 2020) == 1 )
*(float *)(v11 + 48) = -fabsf(*(float *)(v11 + 48));
v56 = 0;
v57 = 0;
v58 = *(_DWORD *)(v11 + 200);
v59 = -1;
v60 = 1;
v61 = v58;
while ( 1 )
{
v62 = v61 < 1
? GJBaseGameLayer::getGroup(a1, *(_DWORD *)(v11 + 180))
: sub_1002E75A0(*(_QWORD *)(a1 + 3832), (unsigned int)(v59 + v61));
v63 = v62;
if ( a3 <= 1 )
{
if ( a3 )
{
if ( a3 == 1 )
{
v65 = sub_1000262F4(&v76, (double *)&v78);
BYTE5(v69) = a4;
BYTE4(v69) = v56 & 1;
LODWORD(v69) = v57;
GJBaseGameLayer::processAreaRotateGroupAction(
a1,
v63,
v11,
&v76,
v72,
(unsigned int)(int)v49,
v73,
(unsigned int)(int)v50,
v65,
v69);
}
}
else
{
v68 = sub_1000262F4(&v76, (double *)&v78);
BYTE5(v69) = 0;
BYTE4(v69) = v56 & 1;
LODWORD(v69) = v57;
GJBaseGameLayer::processAreaMoveGroupAction(
a1,
v63,
v11,
&v76,
v72,
(unsigned int)(int)v49,
v73,
(unsigned int)(int)v50,
v68,
v69);
}
}
else
{
switch ( a3 )
{
case 4:
v66 = sub_1000262F4(&v76, (double *)&v78);
GJBaseGameLayer::processAreaTintGroupAction(a1, v63, v11, &v76, v56 & 1, v66);
break;
case 3:
v67 = sub_1000262F4(&v76, (double *)&v78);
GJBaseGameLayer::processAreaFadeGroupAction(a1, v63, v11, &v76, v56 & 1, v67);
break;
case 2:
v64 = sub_1000262F4(&v76, (double *)&v78);
BYTE5(v69) = a4;
BYTE4(v69) = v56 & 1;
LODWORD(v69) = v57;
GJBaseGameLayer::processAreaTransformGroupAction(
a1,
v63,
v11,
&v76,
v72,
(unsigned int)(int)v49,
v73,
(unsigned int)(int)v50,
v64,
v69);
break;
}
}
result = (__int64 *)sub_1002E757C(v63);
if ( ((v58 > 0) & (unsigned __int8)v60) == 0 )
break;
v60 = 0;
v59 = 0;
v57 += (int)result;
v61 = *(_DWORD *)(v11 + 200);
v56 = 1;
}
v10 = v70;
goto LABEL_117;
}
LABEL_96:
v55 = *(_DWORD *)(v11 + 40);
goto LABEL_97;
}
v73 = 0;
if ( *(_BYTE *)(v12 + 2020) )
v52 = 0;
}
else
{
if ( *(_BYTE *)(v12 + 2012) )
v48 = 0;
else
v50 = v47;
v73 = v48;
if ( *(_BYTE *)(v12 + 2012) )
v52 = 0;
else
v49 = v37;
}
}
v72 = v52;
goto LABEL_85;
}
v26 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v26, &v76);
v76 = vdiv_f32(v76, vld1_dup_f32((const float *)(a1 + 424)));
sub_1000262F4(&v75, (double *)&qword_1009F5820);
if ( (int)v14 <= -8 )
{
if ( (int)v14 <= -10 )
{
if ( (_DWORD)v14 != -11 )
{
if ( (_DWORD)v14 == -10 )
{
v28 = v76.f32[1];
v27 = v76.f32[0];
LABEL_41:
v29 = v28 * 0.5;
goto LABEL_42;
}
LABEL_40:
v28 = v76.f32[1];
v27 = v76.f32[0] * 0.5;
goto LABEL_41;
}
v29 = v76.f32[1];
v27 = v76.f32[0];
LABEL_42:
sub_1000262BC((float *)&v74, v27, v29);
sub_10002630C(&v75, (double *)&v74);
sub_100026318((float32x2_t *)(a1 + 992), &v75, &v74);
sub_10002630C(&v78, (double *)&v74);
sub_10002632C((float32x2_t *)(a1 + 992), (float32x2_t *)(a1 + 1204), &v74);
v25 = &v74;
goto LABEL_43;
}
if ( (_DWORD)v14 != -9 )
{
v29 = v76.f32[1];
v27 = v76.f32[0] * 0.5;
goto LABEL_42;
}
v27 = v76.f32[0];
LABEL_37:
v29 = 0.0;
goto LABEL_42;
}
if ( (int)v14 > -6 )
{
if ( (_DWORD)v14 != -5 )
{
if ( (_DWORD)v14 != -4 )
goto LABEL_40;
v27 = 0.0;
goto LABEL_37;
}
v29 = v76.f32[1] * 0.5;
}
else
{
if ( (_DWORD)v14 == -7 )
{
v27 = v76.f32[0] * 0.5;
goto LABEL_37;
}
v29 = v76.f32[1];
}
v27 = 0.0;
goto LABEL_42;
}
return result;
}