//
// GJBaseGameLayer::rotateObjects from 0x5942c8 to 0x594564 (668 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x5bc5b0
//
// 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:08 +0000
//
int __fastcall GJBaseGameLayer::rotateObjects(int result, int a2, float a3, int a4, float *a5, char a6)
{
int v7; // r4
const cocos2d::CCPoint *v9; // r0
_DWORD *v10; // r1
int *v11; // r7
int v12; // r11
int v13; // t1
float v14; // s14
int v15; // r2
double v16; // d6
double v17; // d5
float v18; // s14
float v19; // s14
float v20; // s12
float v21; // s10
int v23; // [sp+8h] [bp-6Ch]
int v24; // [sp+Ch] [bp-68h]
int *v25; // [sp+10h] [bp-64h]
_BYTE v26[8]; // [sp+24h] [bp-50h] BYREF
float v27; // [sp+2Ch] [bp-48h] BYREF
float v28; // [sp+30h] [bp-44h]
float v29[2]; // [sp+34h] [bp-40h] BYREF
_BYTE v30[24]; // [sp+3Ch] [bp-38h] BYREF
_BYTE v31[24]; // [sp+54h] [bp-20h] BYREF
v7 = result;
if ( a2 )
{
v23 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(result + 2436) + 68))(*(_DWORD *)(result + 2436));
v24 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v7 + 2436) + 76))(*(_DWORD *)(v7 + 2436));
v9 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v7 + 2436) + 96))(*(_DWORD *)(v7 + 2436));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, v9);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 2436) + 80))(*(_DWORD *)(v7 + 2436), 1065353216);
(*(void (__fastcall **)(_DWORD, void *))(**(_DWORD **)(v7 + 2436) + 92))(*(_DWORD *)(v7 + 2436), &unk_D2C400);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 1468) + 92))(*(_DWORD *)(v7 + 1468), a4);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 1468) + 64))(*(_DWORD *)(v7 + 1468), 1065353216);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 1468) + 72))(*(_DWORD *)(v7 + 1468), 1065353216);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 1476) + 64))(*(_DWORD *)(v7 + 1476), 1065353216);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 1476) + 72))(*(_DWORD *)(v7 + 1476), 1065353216);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v7 + 1468) + 132))(*(_DWORD *)(v7 + 1468), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v7 + 1468) + 140))(*(_DWORD *)(v7 + 1468), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v7 + 1472) + 132))(*(_DWORD *)(v7 + 1472), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(v7 + 1472) + 140))(*(_DWORD *)(v7 + 1472), 0);
(*(void (__fastcall **)(_DWORD, float))(**(_DWORD **)(v7 + 1468) + 180))(
*(_DWORD *)(v7 + 1468),
COERCE_FLOAT(LODWORD(a3)));
GJBaseGameLayer::prepareTransformParent((cocos2d::CCObject **)v7, 0);
(*(void (__fastcall **)(_BYTE *))(**(_DWORD **)(v7 + 1468) + 412))(v30);
(*(void (__fastcall **)(_BYTE *))(**(_DWORD **)(v7 + 1472) + 412))(v31);
(*(void (__fastcall **)(_BYTE *))(**(_DWORD **)(v7 + 1476) + 412))(v31);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v27);
v10 = *(_DWORD **)(a2 + 52);
if ( *v10 )
{
v11 = (int *)v10[3];
v25 = &v11[*v10 - 1];
while ( v11 <= v25 )
{
v13 = *v11++;
v12 = v13;
if ( !v13 )
break;
v14 = *(float *)(v12 + 568);
v15 = *(unsigned __int8 *)(v12 + 1110);
v16 = *(double *)(v12 + 808);
*(_BYTE *)(v12 + 1111) = a6;
v17 = *(double *)(v12 + 816);
v18 = v16 - v14;
v27 = v18;
v19 = v17 - *(float *)(v12 + 572);
v28 = v19;
if ( !v15 && *(_DWORD *)(v12 + 1072) != *(_DWORD *)(v7 + 808) )
{
v20 = v16;
v21 = v17;
*(float *)(v12 + 1060) = v20;
*(float *)(v12 + 1064) = v21;
*(_DWORD *)(v12 + 1072) = *(_DWORD *)(v7 + 808);
GameObject::dirtifyObjectRect(v12);
}
*(_BYTE *)(v12 + 708) = 1;
*(_BYTE *)(v12 + 710) = 1;
cocos2d::CCPoint::operator-(v31, &v27, a4);
cocos2d::__CCPointApplyAffineTransform(v29, v31, v30);
*(double *)(v12 + 808) = *(double *)(v12 + 808) + (float)((float)(v29[0] + *a5) - v27);
*(double *)(v12 + 816) = *(double *)(v12 + 816) + (float)((float)(v29[1] + a5[1]) - v28);
GJBaseGameLayer::rotateObject((GJBaseGameLayer *)v7, (GameObject *)v12, a3);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 684))(v7, v12);
}
}
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 688))(v7, a2);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 2436) + 64))(*(_DWORD *)(v7 + 2436), v23);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v7 + 2436) + 72))(*(_DWORD *)(v7 + 2436), v24);
return (*(int (__fastcall **)(_DWORD, _BYTE *))(**(_DWORD **)(v7 + 2436) + 92))(*(_DWORD *)(v7 + 2436), v26);
}
return result;
}