//
// GJBaseGameLayer::processAreaRotateGroupAction from 0x59eaa8 to 0x59ecd8 (560 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processAreaEffects @ 0x5acffa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:15 +0000
//
float __fastcall GJBaseGameLayer::processAreaRotateGroupAction(
float *a1,
cocos2d::CCArray *a2,
int a3,
cocos2d::CCPoint *a4,
int a5,
int a6,
int a7,
int a8,
int a9,
char a10,
bool a11)
{
int v13; // r5
float result; // r0
int *v15; // r3
int *v16; // r3
int v17; // r6
int *v19; // r2
int *v20; // r8
int v21; // r6
int v22; // r4
int v23; // t1
int v24; // r3
int v25; // r3
int v26; // r0
float v27; // s17
float v28; // s16
int v29; // r3
cocos2d::CCArray *TargetGroup; // [sp+8h] [bp-2Ch]
unsigned int v31; // [sp+14h] [bp-20h]
int v32; // [sp+18h] [bp-1Ch]
GameObject *TargetGroupOrigin; // [sp+24h] [bp-10h]
bool v35; // [sp+2Bh] [bp-9h] BYREF
v13 = (int)a2;
LODWORD(result) = cocos2d::CCArray::count(a2) + *((_DWORD *)a1 + 2870);
a1[2870] = result;
if ( v13 )
{
v15 = *(int **)(v13 + 52);
v13 = *v15;
if ( *v15 )
{
v16 = (int *)v15[3];
v17 = v13 + 0x3FFFFFFF;
v13 = 0;
v19 = &v16[v17];
v20 = v16;
v21 = 0;
v31 = (unsigned int)v19;
while ( 1 )
{
if ( (unsigned int)v20 > v31 )
goto LABEL_8;
v23 = *v20++;
v22 = v23;
if ( !v23 )
goto LABEL_8;
if ( *(_BYTE *)(v22 + 657) )
break;
v24 = *(_DWORD *)(v22 + 528);
if ( v24 <= a6 && v24 >= a5 )
{
v25 = *(_DWORD *)(v22 + 532);
if ( v25 <= a8 && v25 >= a7 )
break;
}
LABEL_23:
++a9;
}
v26 = GJBaseGameLayer::resetAreaObjectValues((GJBaseGameLayer *)a1, (GameObject *)v22, 1);
v35 = 0;
v32 = v26;
result = COERCE_FLOAT(
GJBaseGameLayer::getAreaObjectValue(
(GJBaseGameLayer *)a1,
(EnterEffectInstance *)a3,
(GameObject *)v22,
a4,
&v35));
if ( result < 1.0 )
{
v27 = *(float *)(a3 + 100) + (float)(*(float *)(a3 + 104) * a1[*(__int16 *)(v22 + 868) + 651]);
if ( v27 != 0.0 )
{
result = GJBaseGameLayer::getEasedAreaValue(
(GJBaseGameLayer *)a1,
(GameObject *)v22,
(EnterEffectInstance *)a3,
result,
v35,
a9);
v28 = v27 * (float)(1.0 - result);
if ( !a10 )
{
if ( v28 != 0.0 )
{
*(float *)(v22 + 576) = *(float *)(v22 + 576) + v28;
*(float *)(v22 + 580) = *(float *)(v22 + 580) + v28;
*(float *)(v22 + 584) = *(float *)(v22 + 584) + v28;
*(float *)(v22 + 588) = *(float *)(v22 + 588) + v28;
if ( a11 )
result = COERCE_FLOAT((*(int (__fastcall **)(int, _DWORD))(*(_DWORD *)v22 + 740))(v22, 0));
if ( *(_DWORD *)(v22 + 784) != 7 )
{
v29 = *(unsigned __int8 *)(v22 + 636);
*(_BYTE *)(v22 + 732) = 1;
*(_BYTE *)(v22 + 733) = 1;
if ( !v29 )
result = COERCE_FLOAT(GameObject::calculateOrientedBox((GameObject *)v22));
}
}
goto LABEL_20;
}
goto LABEL_17;
}
if ( a10 )
{
v28 = 0.0;
LABEL_17:
TargetGroup = (cocos2d::CCArray *)GJBaseGameLayer::getTargetGroup(
(cocos2d::CCArray **)a1,
*(_DWORD *)(a3 + 180),
*(_DWORD *)(v22 + 780));
TargetGroupOrigin = (GameObject *)GJBaseGameLayer::getTargetGroupOrigin(
(cocos2d::CCArray **)a1,
*(_DWORD *)(a3 + 180),
*(_DWORD *)(v22 + 780));
v13 = v13 - 1 + cocos2d::CCArray::count(TargetGroup);
if ( *(_BYTE *)(*(_DWORD *)(a3 + 152) + 1829) )
*(_BYTE *)(v22 + 1124) = 1;
result = COERCE_FLOAT(GJBaseGameLayer::rotateAreaObjects((GJBaseGameLayer *)a1, TargetGroupOrigin, TargetGroup, v28, a11));
*(_BYTE *)(v22 + 1124) = 0;
}
}
LABEL_20:
if ( v32 )
result = COERCE_FLOAT((*(int (__fastcall **)(float *, int))(*(_DWORD *)a1 + 684))(a1, v22));
++v21;
goto LABEL_23;
}
}
v21 = v13;
LABEL_8:
*((_DWORD *)a1 + 2870) += v13;
*((_DWORD *)a1 + 2874) += v13 + v21;
return result;
}