//
// GJBaseGameLayer::transformAreaObjects from 0x59e198 to 0x59e51a (898 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x59e764
//
// 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
//
int __fastcall GJBaseGameLayer::transformAreaObjects(
GJBaseGameLayer *this,
GameObject *a2,
cocos2d::CCArray *a3,
float a4,
float a5,
bool a6)
{
_DWORD *v11; // r3
int *v12; // r7
int *v13; // r11
int v14; // r4
int v15; // t1
int v16; // r0
float v17; // s19
float v18; // s16
float v19; // s23
float v20; // s22
float v21; // r0
float v22; // s25
float v23; // s24
float v24; // s18
float v25; // s17
float v26; // s15
float v27; // s14
float v28; // s12
float v29; // s13
float v30; // s14
float v31; // s15
float v32; // s11
int v33; // [sp+0h] [bp-8Ch]
void (__fastcall *v34)(int, _BYTE *); // [sp+4h] [bp-88h]
int v35; // [sp+Ch] [bp-80h]
_DWORD v36[7]; // [sp+10h] [bp-7Ch] BYREF
_BYTE v37[8]; // [sp+2Ch] [bp-60h] BYREF
float v38[2]; // [sp+34h] [bp-58h] BYREF
_DWORD v39[6]; // [sp+3Ch] [bp-50h] BYREF
float v40[6]; // [sp+54h] [bp-38h] BYREF
_BYTE v41[24]; // [sp+6Ch] [bp-20h] BYREF
if ( GJBaseGameLayer::resetAreaObjectValues(this, a2, 1) )
(*(void (__fastcall **)(GJBaseGameLayer *, GameObject *))(*(_DWORD *)this + 684))(this, a2);
(*(void (__fastcall **)(_BYTE *, GameObject *))(*(_DWORD *)a2 + 680))(v37, a2);
(*(void (__fastcall **)(_DWORD, _BYTE *))(**((_DWORD **)this + 367) + 92))(*((_DWORD *)this + 367), v37);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 367) + 64))(*((_DWORD *)this + 367), LODWORD(a4));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 367) + 72))(*((_DWORD *)this + 367), LODWORD(a5));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 367) + 132))(*((_DWORD *)this + 367), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 367) + 140))(*((_DWORD *)this + 367), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 367) + 180))(*((_DWORD *)this + 367), 0);
GJBaseGameLayer::prepareTransformParent((cocos2d::CCObject **)this, 0);
(*(void (__fastcall **)(_DWORD *))(**((_DWORD **)this + 367) + 412))(v36);
v39[0] = v36[0];
v39[1] = v36[1];
v39[2] = v36[2];
v39[3] = v36[3];
v39[4] = v36[4];
v39[5] = v36[5];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38);
if ( a3 )
{
v11 = *((_DWORD **)a3 + 13);
if ( *v11 )
{
v12 = (int *)v11[3];
v13 = &v12[*v11 - 1];
while ( v12 <= v13 )
{
v15 = *v12++;
v14 = v15;
if ( !v15 )
break;
if ( !*(_BYTE *)(v14 + 1124) )
{
(*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v14 + 680))(v41, v14);
cocos2d::CCPoint::operator=(v38, v41);
v16 = GJBaseGameLayer::resetAreaObjectValues(this, (GameObject *)v14, 1);
*(_BYTE *)(v14 + 708) = 1;
v33 = v16;
(*(void (__fastcall **)(_BYTE *, int))(*(_DWORD *)v14 + 680))(v41, v14);
cocos2d::CCPoint::operator=(v38, v41);
v35 = *((_DWORD *)this + 371);
v34 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v35 + 92);
cocos2d::CCPoint::operator-(v41, v38, v37);
v34(v35, v41);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 371) + 64))(
*((_DWORD *)this + 371),
*(_DWORD *)(v14 + 1008));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 371) + 72))(
*((_DWORD *)this + 371),
*(_DWORD *)(v14 + 1012));
v17 = *(float *)(v14 + 836) + *(float *)(v14 + 576);
v18 = *(float *)(v14 + 840) + *(float *)(v14 + 584);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 371) + 188))(
*((_DWORD *)this + 371),
LODWORD(v17));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 371) + 196))(
*((_DWORD *)this + 371),
LODWORD(v18));
(*(void (__fastcall **)(_BYTE *))(**((_DWORD **)this + 371) + 400))(v41);
cocos2d::CCAffineTransformConcat(v40, v41, v39);
GJBaseGameLayer::moveAreaObject(this, (GameObject *)v14, v40[4] - v38[0], v40[5] - v38[1]);
v19 = v40[1];
v20 = v40[0];
v21 = sqrtf((float)(v19 * v19) + (float)(v20 * v20));
v22 = v40[3];
v23 = v40[2];
v24 = v21;
v25 = sqrtf((float)(v22 * v22) + (float)(v23 * v23));
v26 = (float)-(float)((float)(atan2f(v22, v23) * 57.296) - 90.0) - v17;
v27 = (float)-(float)(57.296 * atan2f(v19, v20)) - v18;
if ( v26 != 0.0 || v27 != 0.0 )
{
*(float *)(v14 + 576) = *(float *)(v14 + 576) + v26;
*(float *)(v14 + 580) = *(float *)(v14 + 580) + v26;
*(float *)(v14 + 584) = *(float *)(v14 + 584) + v27;
*(float *)(v14 + 588) = *(float *)(v14 + 588) + v27;
if ( a6 )
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v14 + 740))(v14, 0);
if ( *(_DWORD *)(v14 + 784) != 7 && !*(_BYTE *)(v14 + 636) )
GameObject::calculateOrientedBox((GameObject *)v14);
}
v28 = *(float *)(v14 + 1008);
v29 = *(float *)(v14 + 1012);
v30 = v24 - v28;
v31 = v25 - v29;
if ( (float)(v24 - v28) != 0.0 || v31 != 0.0 )
{
v32 = *(float *)(v14 + 592);
*(_BYTE *)(v14 + 708) = 1;
*(_BYTE *)(v14 + 732) = 1;
*(float *)(v14 + 1012) = v29 + v31;
*(float *)(v14 + 592) = v32 + v30;
*(float *)(v14 + 600) = *(float *)(v14 + 600) + v30;
*(float *)(v14 + 1008) = v28 + v30;
*(float *)(v14 + 596) = *(float *)(v14 + 596) + v31;
*(float *)(v14 + 604) = *(float *)(v14 + 604) + v31;
if ( a6 )
(*(void (__fastcall **)(int, int))(*(_DWORD *)v14 + 728))(v14, 1065353216);
}
if ( v33 )
(*(void (__fastcall **)(GJBaseGameLayer *, int))(*(_DWORD *)this + 684))(this, v14);
}
}
}
}
return (*(int (__fastcall **)(GJBaseGameLayer *, cocos2d::CCArray *))(*(_DWORD *)this + 688))(this, a3);
}