//
// GJTransformControl::ccTouchEnded from 0x1003fc32c to 0x1003fc4fc (464 bytes)
//
// 2 xrefs:
// > sub_1003FC4FC @ 0x1003fc500
// > ??> @ 0x1008146d8
//
// 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 __fastcall GJTransformControl::ccTouchEnded(GJTransformControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
int m_transformButtonType; // w8
GJTransformControlDelegate *m_delegate; // x20
__int64 v7; // x0
const cocos2d::CCPoint *v8; // x0
__int64 v9; // x0
__int64 v10; // x0
double *v11; // x0
__int64 v12; // x0
__int64 *v13; // x0
double v14; // d0
EditorUI *v15; // x20
GJTransformControlDelegate *v16; // x0
cocos2d::CCArray var30; // [xsp+10h] [xbp-30h] BYREF
cocos2d::CCPoint v18; // 0:kr00_8.8
cocos2d::CCPoint v19; // 0:s0.4,4:s1.4
sub_1000229B0(&var30.m_uAutoReleaseCount);
if ( a1->m_touchID == a2->m_nId )
{
m_transformButtonType = (unsigned __int16)a1->m_transformButtonType;
if ( a1->m_transformButtonType )
{
if ( m_transformButtonType == 1 )
{
a1->m_touchID = -1;
m_delegate = a1->m_delegate;
if ( m_delegate )
{
v7 = sub_10024A388((__int64)a1->m_warpSprites, 0);
v8 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7);
v18 = cocos2d::CCNode::convertToWorldSpace(a1, v8);
((void (__fastcall *)(GJTransformControlDelegate *, int *, float, float))m_delegate->anchorPointMoved)(
m_delegate,
&var30.m_nTag,
v18.x,
v18.y);
v9 = sub_10024A388((__int64)a1->m_warpSprites, 0);
(*(void (__fastcall **)(__int64, int *))(*(_QWORD *)v9 + 184LL))(v9, &dword_10086E8B0);
v10 = sub_10024A388((__int64)a1->m_objects, 0);
v11 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10);
sub_1000229D0(&var30.m_uAutoReleaseCount, v11);
GJTransformControl::updateButtons(a1, 0, 1);
a1->m_transformButtonType = 0;
GJTransformControl::updateButtons(a1, 0, 0);
v12 = sub_10024A388((__int64)a1->m_objects, 0);
v13 = (__int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 192LL))(v12);
sub_1000229B8((__int64 *)&var30.m_nTag, v13);
*(float32x2_t *)&v14 = sub_1000229F0(
(float32x2_t *)&var30.m_uAutoReleaseCount,
(float32x2_t *)&var30.m_nTag,
(float32x2_t *)&var30.m_uID);
v15 = (EditorUI *)((__int64 (__fastcall *)(GJTransformControlDelegate *, double))a1->m_delegate->getUI)(
a1->m_delegate,
v14);
v19.x = sub_1000229B8((__int64 *)&var30, (__int64 *)&var30.m_uID);
EditorUI::checkDiffAfterTransformAnchor(v15, v19, &var30);
GJTransformControl::updateButtons(a1, 0, 1);
LABEL_11:
GJTransformControl::updateButtons(a1, 0, 0);
return;
}
}
else
{
a1->m_touchID = -1;
v16 = a1->m_delegate;
if ( v16 )
{
((void (__fastcall *)(GJTransformControlDelegate *))v16->transformChangeEnded)(v16);
LOWORD(m_transformButtonType) = a1->m_transformButtonType;
}
if ( (m_transformButtonType & 0xFFFE) == 0xA )
GJTransformControl::updateButtons(a1, 0, 1);
}
}
a1->m_transformButtonType = 0;
goto LABEL_11;
}
}