//
// GJScaleControl::ccTouchEnded from 0x14012ab90 to 0x14012acc4 (308 bytes)
//
// 2 xrefs:
// > ??> @ 0x140552bf0
// > ??> @ 0x1406c9b34
//
// 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 GJScaleControl::ccTouchEnded(GJScaleControl *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
__int16 ty_high; // ax
float v7; // xmm0_4
cocos2d::CCString *v8; // rax
float v9; // xmm0_4
__int64 v10; // rcx
float Value; // xmm0_4
cocos2d::CCString *v12; // rax
float v13; // xmm0_4
__int64 v14; // rcx
if ( LODWORD(a1->m_obContentSize.height) == a2->m_nId )
{
ty_high = HIWORD(a1->m_sAdditionalTransform.ty);
if ( ty_high )
{
if ( ty_high == 1 )
{
Value = SliderThumb::getValue(*(SliderThumb **)(*(_QWORD *)(*(_QWORD *)&a1->m_obAnchorPointInPoints.y + 408LL)
+ 456LL));
v12 = cocos2d::CCString::createWithFormat(
"%.02f",
(float)((float)((float)(a1->m_sInverse.d - a1->m_sInverse.tx) * Value) + a1->m_sInverse.tx));
v13 = cocos2d::CCString::floatValue(v12);
v10 = *(_QWORD *)&a1->m_obAnchorPointInPoints.y;
a1->m_sAdditionalTransform.b = v13;
}
else
{
v10 = *(_QWORD *)&a1->m_obAnchorPoint.y;
}
}
else
{
v7 = SliderThumb::getValue(*(SliderThumb **)(*(_QWORD *)(*(_QWORD *)&a1->m_fSkewY + 408LL) + 456LL));
v8 = cocos2d::CCString::createWithFormat(
"%.02f",
(float)((float)((float)(a1->m_sInverse.d - a1->m_sInverse.tx) * v7) + a1->m_sInverse.tx));
v9 = cocos2d::CCString::floatValue(v8);
v10 = *(_QWORD *)&a1->m_fSkewY;
a1->m_sAdditionalTransform.a = v9;
}
(*(void (__fastcall **)(__int64, cocos2d::CCTouch *, cocos2d::CCEvent *))(*(_QWORD *)(v10 + 320) + 24LL))(
v10 + 320,
a2,
a3);
if ( LODWORD(a1->m_obContentSize.height) != -1 )
{
v14 = *(_QWORD *)&a1->m_sInverse.b;
a1->m_obContentSize.height = NAN;
if ( v14 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v14 + 32LL))(v14);
}
}
}