//
// GJTransformControl::applyFreeRotation from 0x6eede8 to 0x6eef12 (298 bytes)
//
// 2 xrefs:
// > GJTransformControl::ccTouchEnded @ 0x6eeff2
// > GJTransformControl::applyRotation @ 0x6ef14e
//
// 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:57:34 +0000
//
cocos2d::CCArray *__fastcall GJTransformControl::applyFreeRotation(cocos2d::CCArray *this, float a2)
{
GJTransformControl *v2; // r4
int v4; // r8
float *TransformState; // r0
float *v6; // r5
int v7; // r0
int v8; // r0
int v9; // r0
int v10; // r0
int v11; // r0
int v12; // [sp+1Ch] [bp-18h]
_BYTE v13[8]; // [sp+24h] [bp-10h] BYREF
v2 = this;
if ( *((_DWORD *)this + 84) )
{
this = *((cocos2d::CCArray **)this + 81);
if ( this )
{
this = (cocos2d::CCArray *)cocos2d::CCArray::count(this);
if ( this )
{
v4 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 84) + 60))(*((_DWORD *)v2 + 84));
TransformState = (float *)EditorUI::getTransformState((EditorUI *)v4);
*((_DWORD *)v2 + 116) = 0;
v6 = TransformState;
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v2 + 80) + 180))(*((_DWORD *)v2 + 80), 0);
*v6 = 1.0;
v6[1] = 1.0;
v6[2] = 0.0;
v6[3] = 0.0;
v6[4] = 0.0;
v6[5] = 0.0;
v6[8] = 0.0;
v6[9] = 0.0;
v6[10] = 0.0;
v6[11] = 0.0;
v6[16] = 1.0;
v6[17] = 1.0;
GJTransformControl::loadValues(v2, nullptr, *((cocos2d::CCArray **)v2 + 81), v4 + 344);
v12 = *((_DWORD *)v2 + 81);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v13, (const cocos2d::CCPoint *)(v4 + 580));
EditorUI::transformObjects(v4, v12, v13, 1065353216, 1065353216, -a2, -a2, 0, 0);
EditorUI::resetObjectEditorValues((EditorUI *)v4, *((cocos2d::CCArray **)v2 + 81));
v6[2] = a2;
v6[3] = a2;
v7 = *((_DWORD *)v2 + 80);
*((float *)v2 + 116) = a2;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v7 + 180))(v7, LODWORD(a2));
GJTransformControl::updateButtons(v2, 0, 0);
v8 = GJTransformControl::spriteByTag((cocos2d::CCArray **)v2, 7);
v9 = (*(int (__fastcall **)(int))(*(_DWORD *)v8 + 96))(v8);
cocos2d::CCPoint::operator=((char *)v2 + 348, v9);
v10 = GJTransformControl::spriteByTag((cocos2d::CCArray **)v2, 8);
v11 = (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 96))(v10);
return (cocos2d::CCArray *)cocos2d::CCPoint::operator=((char *)v2 + 356, v11);
}
}
}
return this;
}