//
// GJBaseGameLayer::rotateObjects from 0x1001f8e00 to 0x1001f91bc (956 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x1001fa6dc
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GJBaseGameLayer::rotateObjects(
GJBaseGameLayer *a1,
cocos2d::CCArray *a2,
float a3,
cocos2d::CCPoint a4,
cocos2d::CCPoint a5,
bool a6,
bool a7)
{
char v7; // w4
char v8; // w21
float32x2_t *v9; // x22
_BOOL8 v10; // x23
float v14; // s8
float v15; // s10
__int64 *v16; // x0
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCObject **arr; // x26
unsigned __int64 v20; // x27
cocos2d::CCObject *v21; // x24
float64x2_t v22; // q0
unsigned int m_commandIndex; // w8
cocos2d::CCNode *m_areaTransformNode2; // x25
double v25; // d0
cocos2d::CCAffineTransform *v26; // x0
cocos2d::CCAffineTransform v27; // [xsp+8h] [xbp-C8h] BYREF
float32x2_t v28; // [xsp+20h] [xbp-B0h] BYREF
cocos2d::CCAffineTransform v29; // [xsp+28h] [xbp-A8h] BYREF
cocos2d::CCAffineTransform v30; // [xsp+40h] [xbp-90h] BYREF
__int64 v31; // [xsp+58h] [xbp-78h] BYREF
if ( a2 )
{
v8 = v7;
v9 = (float32x2_t *)a7;
v10 = a6;
v14 = ((float (__fastcall *)(cocos2d::CCLayer *, float, __n128, __n128, __n128, __n128))a1->m_objectLayer->getScaleX)(
a1->m_objectLayer,
a3,
*(__n128 *)&a4.x,
*(__n128 *)&a4.y,
*(__n128 *)&a5.x,
*(__n128 *)&a5.y);
v15 = ((float (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getScaleY)(a1->m_objectLayer);
v16 = (__int64 *)((__int64 (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->getPosition)(a1->m_objectLayer);
sub_1000229B8(&v31, v16);
((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_objectLayer->setScale)(a1->m_objectLayer, 1.0);
((void (__fastcall *)(cocos2d::CCLayer *, __int64 *))a1->m_objectLayer->setPosition)(
a1->m_objectLayer,
&qword_10086C9A0);
((void (__fastcall *)(cocos2d::CCNode *, _BOOL8))a1->m_areaTransformNode->setPosition)(a1->m_areaTransformNode, v10);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode->setScaleX)(a1->m_areaTransformNode, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode->setScaleY)(a1->m_areaTransformNode, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaScaleNode->setScaleX)(a1->m_areaScaleNode, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaScaleNode->setScaleY)(a1->m_areaScaleNode, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode->setSkewX)(a1->m_areaTransformNode, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode->setSkewY)(a1->m_areaTransformNode, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaSkewNode->setSkewX)(a1->m_areaSkewNode, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaSkewNode->setSkewY)(a1->m_areaSkewNode, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode->setRotation)(a1->m_areaTransformNode, a3);
GJBaseGameLayer::prepareTransformParent(a1, 0);
((void (__fastcall *)(cocos2d::CCAffineTransform *__return_ptr))a1->m_areaTransformNode->nodeToWorldTransform)(&v30);
((void (__fastcall *)(cocos2d::CCAffineTransform *__return_ptr))a1->m_areaSkewNode->nodeToWorldTransform)(&v29);
((void (__fastcall *)(cocos2d::CCAffineTransform *__return_ptr))a1->m_areaScaleNode->nodeToWorldTransform)(&v29);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode2->setScaleX)(a1->m_areaTransformNode2, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode2->setScaleY)(a1->m_areaTransformNode2, 1.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode2->setSkewX)(a1->m_areaTransformNode2, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode2->setSkewY)(a1->m_areaTransformNode2, 0.0);
((void (__fastcall *)(cocos2d::CCNode *, float))a1->m_areaTransformNode2->setRotation)(
a1->m_areaTransformNode2,
0.0);
sub_1000229B0(&v28);
data = a2->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v20 = (unsigned __int64)&arr[num - 1];
do
{
v21 = *arr;
if ( !*arr )
break;
BYTE3(v21[23].__vftable) = v8;
v22 = *(float64x2_t *)&v21[16].m_uOrderOfArrival;
v28 = vcvt_f32_f64(vsubq_f64(v22, vcvtq_f64_f32(*(float32x2_t *)&v21[11].m_unknown5)));
if ( (BYTE2(v21[23].__vftable) & 1) == 0 )
{
m_commandIndex = a1->m_gameState.m_commandIndex;
if ( HIDWORD(v21[22].__vftable) != m_commandIndex )
{
*(float32x2_t *)&v21[21].m_uOrderOfArrival = vcvt_f32_f64(v22);
HIDWORD(v21[22].__vftable) = m_commandIndex;
GameObject::dirtifyObjectRect((GameObject *)v21);
}
}
LOBYTE(v21[15].__vftable) = 1;
BYTE2(v21[15].__vftable) = 1;
m_areaTransformNode2 = a1->m_areaTransformNode2;
*(float32x2_t *)&v25 = sub_1000229F0(&v28, (float32x2_t *)v10, (float32x2_t *)&v29);
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCAffineTransform *, double))m_areaTransformNode2->setPosition)(
m_areaTransformNode2,
&v29,
v25);
((void (__fastcall *)(cocos2d::CCAffineTransform *__return_ptr))a1->m_areaTransformNode2->nodeToParentTransform)(&v27);
v26 = cocos2d::CCAffineTransformConcat(&v29, &v27, &v30);
*(float64x2_t *)&v21[16].m_uOrderOfArrival = vaddq_f64(
*(float64x2_t *)&v21[16].m_uOrderOfArrival,
vcvtq_f64_f32(vsub_f32(vadd_f32(*(float32x2_t *)&v29.tx, *v9), v28)));
GJBaseGameLayer::rotateObject((GJBaseGameLayer *)v26, (GameObject *)v21, a3);
((void (__fastcall *)(GJBaseGameLayer *, cocos2d::CCObject *))a1->updateObjectSection)(a1, v21);
++arr;
}
while ( (unsigned __int64)arr <= v20 );
}
((void (__fastcall *)(GJBaseGameLayer *, cocos2d::CCArray *))a1->updateDisabledObjectsLastPos)(a1, a2);
((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_objectLayer->setScaleX)(a1->m_objectLayer, v14);
((void (__fastcall *)(cocos2d::CCLayer *, float))a1->m_objectLayer->setScaleY)(a1->m_objectLayer, v15);
((void (__fastcall *)(cocos2d::CCLayer *, __int64 *))a1->m_objectLayer->setPosition)(a1->m_objectLayer, &v31);
}
}