//
// GJBaseGameLayer::processAreaRotateGroupAction from 0x140229d90 to 0x14022a0fe (878 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::processAreaEffects @ 0x140228e85
// > ??> @ 0x14068066c
// > ??> @ 0x1406806b8
// > ??> @ 0x1406cda64
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void GJBaseGameLayer::processAreaRotateGroupAction(
GJBaseGameLayer *a1,
cocos2d::CCArray *a2,
EnterEffectInstance *a3,
cocos2d::CCPoint a4,
int a5,
int a6,
int a7,
int a8,
int a9,
bool a10,
bool a11)
{
cocos2d::CCPoint *v12; // r12
int v15; // edx
unsigned int v16; // r8d
cocos2d::ccArray *data; // r14
__int64 num; // rax
cocos2d::CCObject **arr; // r14
cocos2d::CCObject **v20; // rbx
int v21; // r15d
cocos2d::CCObject *v22; // rdi
int m_nTag; // eax
int m_uReference; // eax
bool v25; // r13
GameObject *v26; // rdx
float AreaObjectValue; // xmm0_4
__m128 v28; // xmm6
float v29; // xmm7_4
__m128 v30; // xmm6
__int64 m_eObjType; // rbx
cocos2d::CCDictionary *v32; // rax
cocos2d::CCArray *v33; // r12
__int64 v34; // rbx
cocos2d::CCDictionary *v35; // rax
GameObject *v36; // rbx
unsigned int v37; // eax
bool v38; // zf
cocos2d::CCObject_vtbl *v39; // rax
int v40; // [rsp+30h] [rbp-88h]
cocos2d::CCObject **v41; // [rsp+38h] [rbp-80h]
bool v42; // [rsp+C0h] [rbp+8h] BYREF
unsigned int v43; // [rsp+C8h] [rbp+10h]
cocos2d::CCPoint v44; // [rsp+D8h] [rbp+20h]
v44 = a4;
v12 = (cocos2d::CCPoint *)a4;
a1->m_areaRotatedCount += cocos2d::CCArray::count(a2);
v15 = 0;
v43 = 0;
v16 = 0;
if ( a2 )
{
data = a2->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v20 = &arr[num - 1];
v41 = v20;
if ( arr <= v20 )
{
v21 = a9 - 1;
do
{
v22 = *arr;
if ( !*arr )
break;
++v21;
if ( !BYTE1(v22[13].m_nZOrder) )
{
m_nTag = v22[11].m_nTag;
if ( m_nTag > a6 )
continue;
if ( m_nTag < a5 )
continue;
m_uReference = v22[11].m_uReference;
if ( m_uReference > a8 || m_uReference < a7 )
continue;
}
v40 = v15 + 1;
v25 = GJBaseGameLayer::resetAreaObjectValues(a1, (GameObject *)v22, 1);
v42 = 0;
AreaObjectValue = GJBaseGameLayer::getAreaObjectValue(a1, a3, (GameObject *)v22, v12, &v42);
if ( AreaObjectValue < 1.0 )
{
v28 = 0;
v29 = (float)(a1->m_varianceValues._Elems[SWORD2(v22[18].__vftable) + 18] * a3->m_rotationVariance)
+ a3->m_rotation;
if ( v29 != 0.0 )
{
v28 = (__m128)0x3F800000u;
v28.m128_f32[0] = (float)(1.0 - GJBaseGameLayer::getEasedAreaValue(a1, v26, a3, AreaObjectValue, v42, v21))
* v29;
}
v30 = _mm_shuffle_ps(v28, v28, 0);
if ( a10 )
{
m_eObjType = v22[16].m_eObjType;
v32 = (cocos2d::CCDictionary *)cocos2d::CCArray::objectAtIndex(
a1->m_targetGroupsArray,
a3->m_targetGroupIndex + 1);
v33 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v32, m_eObjType);
v34 = v22[16].m_eObjType;
v35 = (cocos2d::CCDictionary *)cocos2d::CCArray::objectAtIndex(
a1->m_targetGroupsArray,
a3->m_targetGroupIndex + 2);
v36 = (GameObject *)cocos2d::CCDictionary::objectForKey(v35, v34);
v37 = cocos2d::CCArray::count(v33);
v43 = v37 + v43 - 1;
if ( a3->m_gameObject->m_dontEditAreaParent )
LOBYTE(v22[23].m_uAutoReleaseCount) = 1;
GJBaseGameLayer::rotateAreaObjects(a1, v36, v33, v30.m128_f32[0], a11);
v20 = v41;
v12 = (cocos2d::CCPoint *)v44;
LOBYTE(v22[23].m_uAutoReleaseCount) = 0;
}
else if ( v30.m128_f32[0] != 0.0 )
{
v38 = !a11;
*(__m128 *)&v22[12].m_uID = _mm_add_ps(*(__m128 *)&v22[12].m_uID, v30);
if ( !v38 )
((void (__fastcall *)(cocos2d::CCObject *))v22->__vftable[18].isEqual)(v22);
if ( v22[16].m_uIndexInArray != 7 )
{
v38 = LOBYTE(v22[13].m_nTag) == 0;
LOWORD(v22[15].m_uIndexInArray) = 257;
if ( v38 )
{
v39 = v22->__vftable;
LOBYTE(v22[13].m_nTag) = 1;
((void (__fastcall *)(cocos2d::CCObject *))v39[19].update)(v22);
((void (__fastcall *)(cocos2d::CCObject *))v22->__vftable[16].isEqual)(v22);
}
}
}
}
if ( v25 )
a1->updateObjectSection(a1, (GameObject *)v22);
v15 = v40;
++arr;
}
while ( arr <= v20 );
v16 = v43;
}
}
}
a1->m_areaRotatedCount += v16;
a1->m_areaRotatedCountTotal += v16 + v15;
}