// // cocos2d::extension::CCScrollView::ccTouchMoved from 0xaa6704 to 0xaa6aa0 (924 bytes) // // 4 xrefs: // > `non-virtual thunk to'cocos2d::extension::CCScrollView::ccTouchMoved @ 0xaa6aa8 // > cocos2d::extension::CCTableView::ccTouchMoved @ 0xaa8e4c // > @ 0xc8d00 // > @ 0x11f94c8 // // 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 // void cocos2d::extension::CCScrollView::ccTouchMoved( cocos2d::extension::CCScrollView *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3) { cocos2d::extension::CCScrollView_vtbl *v3; // x2 cocos2d::CCNode *v5; // x23 cocos2d::CCTouch *v6; // x0 cocos2d::CCNode *v7; // x23 cocos2d::CCTouch *v8; // x0 float v9; // s8 float ZoomScale; // s0 cocos2d::CCTouch *v11; // x0 float v12; // s0 float v13; // s1 float v14; // s0 float v15; // s1 cocos2d::CCScrollViewDirection m_eDirection; // w0 float y; // s8 float v18; // s0 float v19; // s1 cocos2d::CCScrollViewDirection v20; // w0 float v21; // s0 float v22; // s1 float v23; // s0 float v24; // s1 float x; // s0 cocos2d::CCNode *m_pContainer; // x0 __int128 v27; // q0 const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1 __int64 v29; // x0 __int128 v30; // q1 float v31; // s0 cocos2d::CCEGLView *v32; // x0 float ScaleX; // s9 cocos2d::CCEGLView *v34; // x0 float v35; // s8 int DPI; // w0 float v37; // s0 float v38; // s1 __int64 v39; // [xsp+0h] [xbp+0h] BYREF __int128 v40; // [xsp+70h] [xbp+70h] cocos2d::CCObject *v41[2]; // [xsp+80h] [xbp+80h] cocos2d::CCPoint v42; // [xsp+98h] [xbp+98h] BYREF cocos2d::CCPoint v43; // [xsp+A0h] [xbp+A0h] BYREF cocos2d::CCPoint v44; // [xsp+A8h] [xbp+A8h] BYREF cocos2d::CCPoint v45; // [xsp+B0h] [xbp+B0h] BYREF cocos2d::CCRect v46; // [xsp+B8h] [xbp+B8h] BYREF cocos2d::CCPoint v47[2]; // [xsp+C8h] [xbp+C8h] BYREF cocos2d::CCPoint v48; // 0:kr20_8.8 cocos2d::CCPoint v49; // 0:s0.4,4:s1.4 v3 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v41[0] = a2; if ( v3->isVisible(a1) && (unsigned __int8)cocos2d::CCArray::containsObject(a1->m_pTouches, v41[0]) ) { if ( (unsigned int)cocos2d::CCArray::count(a1->m_pTouches) == 1 && a1->m_bDragging ) { cocos2d::CCPoint::CCPoint(&v42); cocos2d::CCPoint::CCPoint(&v43); cocos2d::CCPoint::CCPoint(&v44); cocos2d::CCPoint::CCPoint(&v45); cocos2d::CCRect::CCRect(&v46); cocos2d::extension::CCScrollView::getViewRect(a1); cocos2d::CCRect::operator=(&v46, v47); v11 = (cocos2d::CCTouch *)cocos2d::CCArray::objectAtIndex(a1->m_pTouches, 0); v48 = cocos2d::CCNode::convertTouchToNodeSpace(a1, v11); cocos2d::CCPoint::operator=(&v43, v48.x, v48.y); cocos2d::CCPoint::operator-(v47, &v43, &a1->m_tTouchPoint); cocos2d::CCPoint::operator=(&v42, v12, v13); m_eDirection = a1->m_eDirection; if ( m_eDirection == kCCScrollViewDirectionVertical ) { y = v42.y; } else if ( m_eDirection ) { v15 = v42.y * v42.y; v14 = (float)(v42.y * v42.y) + (float)(v42.x * v42.x); y = sqrtf(v14); } else { y = v42.x; } if ( !a1->m_bTouchMoved ) { v32 = cocos2d::CCEGLView::sharedOpenGLView(); ScaleX = cocos2d::CCEGLViewProtocol::getScaleX(v32); v34 = cocos2d::CCEGLView::sharedOpenGLView(); v35 = y * (float)((float)(ScaleX + cocos2d::CCEGLViewProtocol::getScaleY(v34)) * 0.5); DPI = cocos2d::CCDevice::getDPI(); v14 = 0.04375; if ( fabsf(v35 / (float)DPI) < 0.04375 ) return; if ( !a1->m_bTouchMoved ) cocos2d::CCPoint::operator=(&v42, 0.04375, v15); } cocos2d::CCPoint::operator=(&a1->m_tTouchPoint, v14, v15); a1->m_bTouchMoved = 1; cocos2d::CCNode::convertToWorldSpace(a1, &v43); if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v46, v47) ) { v20 = a1->m_eDirection; if ( v20 ) { if ( v20 == kCCScrollViewDirectionVertical ) { cocos2d::CCPoint::CCPoint(v47, 0.0, v42.y); cocos2d::CCPoint::operator=(&v42, v21, v22); } } else { cocos2d::CCPoint::CCPoint(v47, v42.x, 0.0); cocos2d::CCPoint::operator=(&v42, v37, v38); } cocos2d::CCPoint::operator=(&v44, v18, v19); cocos2d::CCPoint::operator=(&v45, v23, v24); x = a1->m_pContainer->getPosition(a1->m_pContainer)->x; m_pContainer = a1->m_pContainer; *(float *)&v27 = x + v42.x; getPosition = m_pContainer->getPosition; v40 = v27; v29 = (__int64)getPosition(m_pContainer); *(float *)&v30 = *(float *)(v29 + 4) + v42.y; *(_OWORD *)v41 = v30; cocos2d::CCPoint::operator=(&a1->m_tScrollDistance, v31, *(float *)&v30); cocos2d::CCPoint::CCPoint(v47, *(float *)&v40, *(float *)v41); cocos2d::extension::CCScrollView::setContentOffset(a1, v49, (unsigned __int8)&v39 - 56); } } else if ( (unsigned int)cocos2d::CCArray::count(a1->m_pTouches) == 2 && !a1->m_bDragging ) { v5 = a1->m_pContainer; v6 = (cocos2d::CCTouch *)cocos2d::CCArray::objectAtIndex(a1->m_pTouches, 0); cocos2d::CCNode::convertTouchToNodeSpace(v5, v6); v7 = a1->m_pContainer; v8 = (cocos2d::CCTouch *)cocos2d::CCArray::objectAtIndex(a1->m_pTouches, 1u); cocos2d::CCNode::convertTouchToNodeSpace(v7, v8); v9 = cocos2d::ccpDistance(&v46.origin, v47); ZoomScale = cocos2d::extension::CCScrollView::getZoomScale(a1); cocos2d::extension::CCScrollView::setZoomScale(a1, (float)(v9 * ZoomScale) / a1->m_fTouchLength); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source