//
// CCTextInputNode::ccTouchBegan from 0x3e25e4 to 0x3e26c8 (228 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'CCTextInputNode::ccTouchBegan @ 0x3e26d4
//
// 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:47:02 +0000
//
int __fastcall CCTextInputNode::ccTouchBegan(int a1, cocos2d::CCTouch *a2)
{
int isVisibleInTree; // r7
ScrollableContentLayer *v5; // r0
int v6; // r0
_BYTE v8[8]; // [sp+4h] [bp-28h] BYREF
float v9[2]; // [sp+Ch] [bp-20h] BYREF
_BYTE v10[16]; // [sp+14h] [bp-18h] BYREF
isVisibleInTree = CCTextInputNode::isVisibleInTree((CCTextInputNode *)a1);
if ( isVisibleInTree )
{
cocos2d::CCTouch::getLocation((cocos2d::CCTouch *)v8);
if ( cocos2d::ccTouchClippedByAncestor((void *)a1, (int)v8) )
return 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, (const cocos2d::CCPoint *)v8);
isVisibleInTree = CCTextInputNode::containsTouchPoint(a1);
if ( !isVisibleInTree )
{
if ( *(_BYTE *)(a1 + 344) && *(_BYTE *)(a1 + 442) )
{
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)a1 + 580))(a1, 0);
return isVisibleInTree;
}
return 0;
}
v5 = *(ScrollableContentLayer **)(a1 + 452);
if ( v5 )
{
ScrollableContentLayer::handleTouchBegan(v5, a2);
}
else
{
v6 = *(_DWORD *)(a1 + 420);
if ( v6 && !(*(int (__fastcall **)(int, int))(*(_DWORD *)v6 + 20))(v6, a1) )
return 0;
(*(void (__fastcall **)(int, int))(*(_DWORD *)a1 + 580))(a1, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v9, (const cocos2d::CCPoint *)v8);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v10, (const cocos2d::CCRect *)&unk_D2B360);
CCTextInputNode::updateCursorPosition(a1, v9);
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v10, (const cocos2d::CCPoint *)v8);
CCTextInputNode::armHold(a1, (int)v10);
}
return isVisibleInTree;
}