// // cocos2d::extension::CCScrollView::deaccelerateScrolling from 0x5a87c8 to 0x5a8a0e (582 bytes) // // 0 xrefs: // // 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::deaccelerateScrolling(cocos2d::extension::CCScrollView *a1, float a2) { cocos2d::CCNode *m_pContainer; // r3 int v4; // r0 int v5; // r2 int v6; // r2 bool v7; // r3 cocos2d::CCPoint *p_m_fMinInset; // r1 int v9; // r2 bool v10; // r3 const cocos2d::CCPoint *v11; // r0 const cocos2d::CCPoint *v12; // r0 float x; // s17 float y; // s16 float v15; // s18 const cocos2d::CCPoint *v16; // r0 int v17; // r2 bool v18; // r3 int v19; // r2 bool v20; // r3 bool v21; // r3 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+0h] [bp-34h] cocos2d::CCNode *v23; // [sp+4h] [bp-30h] cocos2d::CCPoint v24; // [sp+Ch] [bp-28h] BYREF cocos2d::CCPoint v25; // [sp+14h] [bp-20h] BYREF _DWORD v26[2]; // [sp+1Ch] [bp-18h] BYREF cocos2d::CCPoint v27; // [sp+24h] [bp-10h] BYREF if ( a1->m_bDragging ) { v26[0] = cocos2d::extension::CCScrollView::deaccelerateScrolling; v26[1] = 0; cocos2d::CCNode::unschedule( a1, (cocos2d::SEL_SCHEDULE)(unsigned int)cocos2d::extension::CCScrollView::deaccelerateScrolling); } else { cocos2d::CCPoint::CCPoint(&v24); cocos2d::CCPoint::CCPoint(&v25); m_pContainer = a1->m_pContainer; v23 = m_pContainer; setPosition = m_pContainer->setPosition; v4 = (int)m_pContainer->getPosition(m_pContainer); cocos2d::CCPoint::operator+(&v27, v4, &a1->m_tScrollDistance); setPosition(v23, &v27); if ( a1->m_bBounceable ) { cocos2d::CCPoint::operator=( (PlayerObject *)&v24, COERCE_FLOAT((cocos2d::extension::CCScrollView *)&a1->m_fMaxInset), v5, a1->m_bBounceable); p_m_fMinInset = &a1->m_fMinInset; } else { cocos2d::extension::CCScrollView::maxContainerOffset(&v27, a1); cocos2d::CCPoint::operator=((PlayerObject *)&v24, COERCE_FLOAT(&v27), v9, v10); cocos2d::extension::CCScrollView::minContainerOffset(&v27, a1); p_m_fMinInset = &v27; } cocos2d::CCPoint::operator=((PlayerObject *)&v25, *(float *)&p_m_fMinInset, v6, v7); v11 = a1->m_pContainer->getPosition(a1->m_pContainer); if ( v11->x <= v24.x ) a1->m_pContainer->getPosition(a1->m_pContainer); v12 = a1->m_pContainer->getPosition(a1->m_pContainer); if ( v12->y <= v24.y ) a1->m_pContainer->getPosition(a1->m_pContainer); x = a1->m_pContainer->getPosition(a1->m_pContainer)->x; y = a1->m_pContainer->getPosition(a1->m_pContainer)->y; v15 = a1->m_pContainer->getPosition(a1->m_pContainer)->x; v16 = a1->m_pContainer->getPosition(a1->m_pContainer); cocos2d::CCPoint::CCPoint(&v27, x - v15, y - v16->y); cocos2d::CCPoint::operator-(v26, &a1->m_tScrollDistance, &v27); cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_tScrollDistance, COERCE_FLOAT(v26), v17, v18); cocos2d::CCPoint::operator*(&v27, &a1->m_tScrollDistance, 1064514355); cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_tScrollDistance, COERCE_FLOAT(&v27), v19, v20); cocos2d::CCPoint::CCPoint(&v27, x, y); cocos2d::extension::CCScrollView::setContentOffset(a1, (cocos2d::CCPoint)(unsigned int)&v27, v21); if ( fabsf(a1->m_tScrollDistance.x) <= 1.0 && fabsf(a1->m_tScrollDistance.y) <= 1.0 || y > v24.y || y < v25.y || x > v24.x || x < v25.x || x == v24.x || x == v25.x || y == v24.y || y == v25.y ) { LODWORD(v27.x) = cocos2d::extension::CCScrollView::deaccelerateScrolling; v27.y = 0.0; cocos2d::CCNode::unschedule( a1, (cocos2d::SEL_SCHEDULE)(unsigned int)cocos2d::extension::CCScrollView::deaccelerateScrolling); cocos2d::extension::CCScrollView::relocateContainer(a1, 1); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source