//
// cocos2d::extension::CCScrollView::ccTouchBegan from 0x1800134a0 to 0x1800136fe (606 bytes)
//
// 4 xrefs:
// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x180016117
// > ??> @ 0x18002a960
// > ??> @ 0x180032408
// > ??> @ 0x18004c4ac
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:15:40 +0000
//
char __fastcall cocos2d::extension::CCScrollView::ccTouchBegan(
cocos2d::extension::CCScrollView *this,
struct cocos2d::CCTouch *a2,
struct cocos2d::CCEvent *a3)
{
cocos2d::CCArray **v3; // rsi
__int64 v6; // rax
const struct cocos2d::CCPoint *v7; // rax
__int64 v8; // rax
__int64 v9; // rax
struct cocos2d::CCObject *v11; // rax
__int64 v12; // rbx
struct cocos2d::CCObject *v13; // rax
__int64 v14; // rax
__int64 v15; // rax
struct cocos2d::CCObject *v16; // rax
const struct cocos2d::CCPoint *v17; // rbx
struct cocos2d::CCObject *v18; // rax
cocos2d *v19; // rax
const struct cocos2d::CCPoint *v20; // r8
_BYTE v21[8]; // [rsp+20h] [rbp-28h] BYREF
_BYTE v22[8]; // [rsp+28h] [rbp-20h] BYREF
_BYTE v23[24]; // [rsp+30h] [rbp-18h] BYREF
char v24; // [rsp+50h] [rbp+8h] BYREF
char v25; // [rsp+68h] [rbp+20h] BYREF
v3 = (cocos2d::CCArray **)((char *)this - 320);
if ( !(*(unsigned __int8 (__fastcall **)(char *, struct cocos2d::CCTouch *, struct cocos2d::CCEvent *))(*((_QWORD *)this - 40) + 344LL))(
(char *)this - 320,
a2,
a3) )
return 0;
cocos2d::extension::CCScrollView::getViewRect(v3, v23);
if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 23)) > 2 )
return 0;
if ( *((_BYTE *)this + 136) )
return 0;
v6 = cocos2d::CCNode::convertTouchToNodeSpace(*((_QWORD *)this + 16), &v24, a2);
v7 = (const struct cocos2d::CCPoint *)cocos2d::CCNode::convertToWorldSpace(*((_QWORD *)this + 16), &v25, v6);
if ( !cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v23, v7) )
return 0;
if ( !cocos2d::CCArray::containsObject(*((cocos2d::CCArray **)this + 23), a2) )
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 23), a2);
if ( cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 23)) == 1 )
{
v8 = cocos2d::CCNode::convertTouchToNodeSpace(v3, &v24, a2);
cocos2d::CCPoint::operator=((char *)this + 168, v8);
*((_BYTE *)this + 136) = 0;
*((_BYTE *)this + 116) = 1;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, 0.0, 0.0);
cocos2d::CCPoint::operator=((char *)this + 160, v9);
*((_DWORD *)this + 44) = 0;
return 1;
}
else
{
if ( cocos2d::CCArray::count(v3[63]) == 2 )
{
v11 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 23), 1u);
v12 = cocos2d::CCNode::convertTouchToNodeSpace(v3, &v25, v11);
v13 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 23), 0);
v14 = cocos2d::CCNode::convertTouchToNodeSpace(v3, v21, v13);
v15 = cocos2d::CCPoint::operator+(v14, v22, v12);
cocos2d::CCPoint::operator/(v15, &v24);
cocos2d::CCPoint::operator=((char *)this + 168, &v24);
v16 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 23), 1u);
v17 = (const struct cocos2d::CCPoint *)cocos2d::CCNode::convertTouchToNodeSpace(*((_QWORD *)this + 16), &v24, v16);
v18 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 23), 0);
v19 = (cocos2d *)cocos2d::CCNode::convertTouchToNodeSpace(*((_QWORD *)this + 16), &v25, v18);
*((float *)this + 44) = cocos2d::ccpDistance(v19, v17, v20);
*((_BYTE *)this + 116) = 0;
}
return 1;
}
}