// // TableView::checkBoundaryOfContent from 0x140075dc0 to 0x14007637f (1471 bytes) // // 4 xrefs: // > TableView::ccTouchBegan @ 0x1400753ec // > TableView::ccTouchEnded @ 0x140075462 // > TableView::ccTouchCancelled @ 0x1400754e5 // > @ 0x1406c6498 // // 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 // // Hidden C++ exception states: #wind=4 void TableView::checkBoundaryOfContent(TableView *a1, float a2) { int v3; // eax int v4; // ebx cocos2d::CCArray *m_cellArray; // rcx struct cocos2d::CCObject *v6; // r14 TableViewCell *v7; // r12 int v8; // ebx int v9; // r13d const struct cocos2d::CCPoint *v10; // rax const cocos2d::CCSize *v11; // rax CCIndexPath *v12; // r14 __int64 v13; // rax double v14; // xmm0_8 float v15; // xmm6_4 TableViewCell *v16; // rax TableViewCell *v17; // rsi TableViewCell_vtbl *v18; // rbx const cocos2d::CCPoint *v19; // rax TableViewCell_vtbl *v20; // rbx const cocos2d::CCSize *v21; // rax const cocos2d::CCSize *v22; // rax cocos2d::CCArray *v23; // rcx cocos2d::CCArray *m_indexPathArray; // rcx struct cocos2d::CCObject *v25; // rdx float height; // xmm0_4 unsigned int v27; // esi int m_row; // eax cocos2d::CCArray *v29; // rcx struct cocos2d::CCObject *v30; // rax double v31; // xmm0_8 float v32; // xmm6_4 TableViewCell *v33; // rax TableViewCell_vtbl *v34; // rbx const cocos2d::CCPoint *v35; // rax TableViewCell_vtbl *v36; // rbx const cocos2d::CCSize *v37; // rax const cocos2d::CCSize *v38; // rax TableViewCell_vtbl *v39; // rbx const cocos2d::CCSize *v40; // rax const cocos2d::CCPoint *v41; // rax TableViewDelegate *m_tableDelegate; // rcx TableViewDelegate *v43; // rcx cocos2d::CCObject v44; // [rsp+28h] [rbp-79h] BYREF __int64 v45; // [rsp+60h] [rbp-41h] cocos2d::CCObject v46; // [rsp+68h] [rbp-39h] BYREF int v47; // [rsp+A0h] [rbp-1h] int v48; // [rsp+A4h] [rbp+3h] cocos2d::CCPoint v49; // [rsp+108h] [rbp+67h] BYREF CCIndexPath *v50; // [rsp+118h] [rbp+77h] BYREF cocos2d::CCPoint v51; // [rsp+120h] [rbp+7Fh] BYREF v3 = cocos2d::CCArray::count(a1->m_cellArray); v4 = v3; m_cellArray = a1->m_cellArray; if ( m_cellArray && v3 > 0 ) { v6 = cocos2d::CCArray::objectAtIndex(m_cellArray, 0); v7 = (TableViewCell *)cocos2d::CCArray::objectAtIndex(a1->m_cellArray, v4 - 1); if ( v4 == 1 ) { v8 = ((__int64 (__fastcall *)(TableViewDataSource *, _QWORD, TableView *))a1->m_dataSource->numberOfRowsInSection)( a1->m_dataSource, (unsigned int)v6[8].m_uUnknown, a1) - 1; cocos2d::CCObject::CCObject(&v44); v44.__vftable = (cocos2d::CCObject_vtbl *)&CCIndexPath::`vftable'; v45 = 0; cocos2d::CCObject::CCObject(&v46); v46.__vftable = (cocos2d::CCObject_vtbl *)&CCIndexPath::`vftable'; v47 = v8; v48 = 0; if ( *(_QWORD *)&v6[8].m_uIndexInArray == v45 ) { TableView::checkLastCell(a1, v7); } else if ( !v7->m_indexPath.m_section && v7->m_indexPath.m_row == v8 ) { TableView::checkFirstCell(a1, (TableViewCell *)v6); } cocos2d::CCObject::~CCObject(&v46); cocos2d::CCObject::~CCObject(&v44); } else { TableView::checkFirstCell(a1, (TableViewCell *)v6); TableView::checkLastCell(a1, v7); } return; } v9 = a1->m_dataSource->numberOfRowsInSection(a1->m_dataSource, 0, a1); if ( !v9 ) return; v10 = a1->m_contentLayer->getPosition_0(a1->m_contentLayer); cocos2d::CCPoint::CCPoint(&v49, v10); v11 = a1->m_contentLayer->getContentSize(a1->m_contentLayer); if ( (float)(v49.y - v11->height) >= 0.0 ) { v12 = (CCIndexPath *)operator new(0x40u); v50 = v12; cocos2d::CCObject::CCObject(v12); v12->__vftable = (CCIndexPath_vtbl *)&CCIndexPath::`vftable'; v12->m_row = v9 - 1; v12->m_section = 0; cocos2d::CCObject::autorelease(v12); if ( v12->m_row >= v9 ) return; LOBYTE(v13) = TableView::isDuplicateInVisibleCellArray(a1, v12); if ( v13 ) return; v14 = ((double (__fastcall *)(TableViewDelegate *, CCIndexPath *, TableView *))a1->m_tableDelegate->cellHeightForRowAtIndexPath)( a1->m_tableDelegate, v12, a1); v15 = *(float *)&v14; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v50, &a1->m_lastCellPos); if ( TableView::checkBoundaryOfCell(a1, (cocos2d::CCPoint *)&v50, v15) == 1 ) return; v16 = a1->m_dataSource->cellForRowAtIndexPath(a1->m_dataSource, v12, a1); v17 = v16; if ( !v16 ) return; v18 = v16->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v51, 0.0, 1.0); v18->setAnchorPoint(v17, v19); v20 = v17->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v21 = a1->getContentSize(a1); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v51, v21->width * 0.5, v15); v20->setContentSize(v17, v22); cocos2d::CCPoint::CCPoint(&v51, &a1->m_lastCellPos); v17->setPosition_0(v17, &v51); cocos2d::CCObject::operator=(&v17->m_indexPath, v12); v17->m_indexPath.m_row = v12->m_row; v17->m_indexPath.m_section = v12->m_section; v23 = a1->m_cellArray; if ( v9 == 1 ) cocos2d::CCArray::insertObject(v23, v17, 0); else cocos2d::CCArray::addObject(v23, v17); if ( TableView::isDuplicateIndexPath(a1, v12) ) goto LABEL_39; m_indexPathArray = a1->m_indexPathArray; v25 = v12; if ( v9 != 1 ) { cocos2d::CCArray::addObject(m_indexPathArray, v12); LABEL_39: m_tableDelegate = a1->m_tableDelegate; if ( m_tableDelegate ) m_tableDelegate->TableViewWillDisplayCellForRowAtIndexPath(m_tableDelegate, v12, v17, a1); a1->m_contentLayer->addChild_1(a1->m_contentLayer, v17); v43 = a1->m_tableDelegate; if ( v43 ) v43->TableViewDidDisplayCellForRowAtIndexPath(v43, v12, v17, a1); return; } LABEL_38: cocos2d::CCArray::insertObject(m_indexPathArray, v25, 0); goto LABEL_39; } height = a1->getContentSize(a1)->height; if ( height >= v49.y ) { v12 = (CCIndexPath *)operator new(0x40u); v50 = v12; cocos2d::CCObject::CCObject(v12); v12->__vftable = (CCIndexPath_vtbl *)&CCIndexPath::`vftable'; v27 = 0; *(_QWORD *)&v12->m_row = 0; cocos2d::CCObject::autorelease(v12); m_row = v12->m_row; if ( m_row >= 0 && m_row < v9 ) { v29 = a1->m_cellArray; if ( !v29 || !cocos2d::CCArray::count(v29) || !cocos2d::CCArray::count(a1->m_cellArray) ) goto LABEL_34; while ( 1 ) { v30 = cocos2d::CCArray::objectAtIndex(a1->m_cellArray, v27); if ( v30[8].m_uUnknown == v12->m_section && v30[8].m_uIndexInArray == v12->m_row ) break; if ( ++v27 >= cocos2d::CCArray::count(a1->m_cellArray) ) goto LABEL_34; } if ( !v30 ) { LABEL_34: v31 = ((double (__fastcall *)(TableViewDelegate *, CCIndexPath *, TableView *))a1->m_tableDelegate->cellHeightForRowAtIndexPath)( a1->m_tableDelegate, v12, a1); v32 = *(float *)&v31; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v50, &a1->m_lastCellPos); if ( TableView::checkBoundaryOfCell(a1, (cocos2d::CCPoint *)&v50, v32) == 1 ) return; v33 = a1->m_dataSource->cellForRowAtIndexPath(a1->m_dataSource, v12, a1); v17 = v33; if ( !v33 ) return; v34 = v33->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(&v51, 0.0, 1.0); v34->setAnchorPoint(v17, v35); v36 = v17->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v37 = a1->getContentSize(a1); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v51, v37->width, v32); v36->setContentSize(v17, v38); v39 = v17->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v40 = a1->m_contentLayer->getContentSize(a1->m_contentLayer); cocos2d::CCPoint::CCPoint(&v51, 0.0, v40->height - v32); v39->setPosition_0(v17, v41); cocos2d::CCObject::operator=(&v17->m_indexPath, v12); v17->m_indexPath.m_row = v12->m_row; v17->m_indexPath.m_section = v12->m_section; cocos2d::CCArray::insertObject(a1->m_cellArray, v17, 0); if ( TableView::isDuplicateIndexPath(a1, v12) ) goto LABEL_39; v25 = v12; m_indexPathArray = a1->m_indexPathArray; goto LABEL_38; } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source