//
// TableView::cellForTouch from 0x2e92f8 to 0x2e9428 (304 bytes)
//
// 1 xrefs:
// > TableView::touchFinish @ 0x2e9a0e
//
// 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
//
TableViewCell *TableView::cellForTouch(TableView *a1, cocos2d::CCTouch *a2)
{
cocos2d::CCDirector *v3; // r0
cocos2d::CCArray *m_cellArray; // r0
unsigned int i; // r5
cocos2d::CCNode *v6; // r0
TableViewCell *v7; // r4
float x; // s17
float width; // s16
float v10; // s17
float y; // s16
float height; // s18
float v13; // s15
int v14; // r0
float v16; // [sp+Ch] [bp-18h]
cocos2d::CCPoint v17; // [sp+14h] [bp-10h] BYREF
cocos2d::CCPoint v18; // [sp+1Ch] [bp-8h] BYREF
cocos2d::CCRect v19; // [sp+24h] [bp+0h] BYREF
cocos2d::CCTouch::getLocationInView(&v17, a2);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::convertToGL(&v19.origin, v3, &v17);
cocos2d::CCPoint::operator=(&v17, &v19);
m_cellArray = a1->m_cellArray;
if ( m_cellArray && cocos2d::CCArray::count(m_cellArray) )
{
for ( i = 0; i < cocos2d::CCArray::count(a1->m_cellArray); ++i )
{
v6 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(a1->m_cellArray, i);
v7 = (TableViewCell *)v6;
if ( v6 )
{
cocos2d::CCNode::convertToNodeSpace(&v18, v6, &v17);
x = v7->getPosition(v7)->x;
width = v7->getContentSize(v7)->width;
v10 = x - (float)(width * v7->getAnchorPoint(v7)->x);
y = v7->getPosition(v7)->y;
height = v7->getContentSize(v7)->height;
v13 = v7->getAnchorPoint(v7)->y;
v16 = v7->getContentSize(v7)->width;
v14 = (int)v7->getContentSize(v7);
cocos2d::CCRect::CCRect(&v19, v10, y - (float)(height * v13), v16, *(float *)(v14 + 4));
cocos2d::CCPoint::operator=(&v19, &stru_AC5424);
if ( cocos2d::CCRect::containsPoint(&v19, &v18) )
return v7;
}
}
}
return nullptr;
}