//
// TableView::ccTouchBegan from 0x140075280 to 0x140075429 (425 bytes)
//
// 4 xrefs:
// > ??> @ 0x140537680
// > ??> @ 0x140667234
// > ??> @ 0x140667244
// > ??> @ 0x1406c63c0
//
// 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
//
bool TableView::ccTouchBegan(TableView *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
__int64 v5; // rcx
cocos2d::CCDirector *v6; // rax
struct cocos2d::CCPoint v7; // rax
__int64 v8; // rax
struct cocos2d::CCPoint v9; // rax
__int64 v10; // rax
bool v11; // zf
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
struct cocos2d::CCPoint v14; // rax
__int64 v15; // rax
struct cocos2d::CCPoint v17; // [rsp+20h] [rbp-38h] BYREF
cocos2d::CCRect v18[3]; // [rsp+28h] [rbp-30h] BYREF
struct cocos2d::CCPoint v19; // [rsp+60h] [rbp+8h] BYREF
if ( BYTE1(a1->m_sInverse.a) )
return 0;
*(_QWORD *)&a1->m_fSkewY = a2;
cocos2d::CCTouch::getLocationInView(a2);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
v7 = cocos2d::CCDirector::convertToGL(v6, &v17);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_obAnchorPointInPoints.y, v7);
cocos2d::CCPoint::operator=(&a1->m_obAnchorPoint.y, v8);
v9 = cocos2d::CCNode::convertToNodeSpace((TableView *)((char *)a1 - 320), &v17);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v19, v9);
cocos2d::CCRect::CCRect(v18);
cocos2d::CCPoint::operator=(v18, &stru_1406C13A8);
v10 = ((__int64 (__fastcall *)(cocos2d::CCAccelerometerDelegate *))a1[-1].CCScrollLayerExt::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable[38].didAccelerate)(&a1[-1].cocos2d::CCAccelerometerDelegate);
cocos2d::CCSize::operator=(&v18[0].size, v10);
if ( !cocos2d::CCRect::containsPoint(v18, &v19) )
return 0;
cocos2d::CCNode::stopAllActions(*(cocos2d::CCNode **)&a1->m_sTransform.d);
cocos2d::CCTime::gettimeofdayCocos2d((struct cocos2d::cc_timeval *)&a1->m_obContentSize.height, nullptr);
v11 = BYTE1(a1->m_sInverse.a) == 0;
LOBYTE(a1->m_sAdditionalTransform.b) = 1;
if ( !v11 )
return 0;
a1->m_pGrid = (cocos2d::CCGridBase *)a2;
cocos2d::CCTouch::getLocationInView(a2);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
v14 = cocos2d::CCDirector::convertToGL(v13, &v19);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_pUserData, v14);
cocos2d::CCPoint::operator=(&a1->m_pChildren, v15);
if ( !LOBYTE(a1->m_pCamera) )
{
cocos2d::CCNode::schedule(&a1[-1].cocos2d::CCAccelerometerDelegate, TableView::checkBoundaryOfContent);
LOBYTE(a1->m_pCamera) = 1;
}
*(_DWORD *)(&a1->m_bUnkBool2 + 3) = HIDWORD(a1->m_pChildren);
return 1;
}