// // cocos2d::CCAnimate::update from 0x5b6c78 to 0x5b6e26 (430 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::CCAnimate::update(cocos2d::CCAnimate *a1, float a2) { float v3; // s16 unsigned int v4; // r2 float v5; // s16 float *m_finish; // r9 unsigned int v7; // r0 unsigned int m_pOrigFrame; // r4 int v9; // r7 _DWORD *m_nNextFrame; // r2 int v11; // r0 cocos2d::CCNode *v12; // r0 const cocos2d::CCSize *v13; // r0 cocos2d::CCNode *m_pTarget; // r8 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r5 cocos2d::CCArray *v16; // r8 unsigned int v17; // r5 const cocos2d::CCSize *v18; // r0 int v19; // r0 unsigned int v20; // [sp+0h] [bp-24h] cocos2d::CCSize v21; // [sp+Ch] [bp-18h] BYREF cocos2d::CCPoint v22; // [sp+14h] [bp-10h] BYREF v3 = a2; if ( a2 < 1.0 ) { v4 = *(_DWORD *)&a1->m_bRecenterFrames; v5 = a2 * (float)(unsigned int)a1->m_pSplitTimes[6].m_start; if ( (unsigned int)v5 > v4 ) { *(_DWORD *)&a1->m_bRecenterFrames = v4 + 1; a1->m_pOrigFrame = nullptr; } v3 = fmodf(v5, 1.0); } m_finish = a1->m_pSplitTimes[5].m_finish; v7 = cocos2d::CCArray::count((cocos2d::CCArray *)m_finish); m_pOrigFrame = (unsigned int)a1->m_pOrigFrame; v9 = 4 * m_pOrigFrame; v20 = v7; while ( m_pOrigFrame < v20 ) { m_nNextFrame = (_DWORD *)a1->m_nNextFrame; if ( m_pOrigFrame >= (m_nNextFrame[1] - *m_nNextFrame) >> 2 ) sub_7732C4("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", m_pOrigFrame); if ( *(float *)(*m_nNextFrame + v9) > v3 ) break; v11 = cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)m_finish, m_pOrigFrame); ((void (__fastcall *)(cocos2d::CCNode *, _DWORD))a1->m_pTarget->cocos2d::CCActionInterval::cocos2d::CCFiniteTimeAction::cocos2d::CCAction::__vftable[1].setSkewY)( a1->m_pTarget, *(_DWORD *)(v11 + 52)); if ( LOBYTE(a1[1].__vftable) && a1->m_pTarget->getParent(a1->m_pTarget) ) { v12 = a1->m_pTarget->getParent(a1->m_pTarget); v13 = v12->getContentSize(v12); cocos2d::CCSize::CCSize(&v21, v13); m_pTarget = a1->m_pTarget; setPosition = m_pTarget->setPosition; cocos2d::CCPoint::CCPoint(&v22, v21.width * 0.5, v21.height * 0.5); setPosition(m_pTarget, &v22); } if ( BYTE1(a1[1].__vftable) ) { v16 = a1->m_pTarget->getChildren(a1->m_pTarget); if ( v16 ) { v17 = 0; v18 = a1->m_pTarget->getContentSize(a1->m_pTarget); cocos2d::CCSize::CCSize(&v21, v18); cocos2d::CCPoint::CCPoint(&v22, v21.width * 0.5, v21.height * 0.5); while ( v17 < cocos2d::CCArray::count(v16) ) { v19 = cocos2d::CCArray::objectAtIndex(v16, v17++); (*(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v19 + 92))(v19, &v22); } } } ++m_pOrigFrame; v9 += 4; a1->m_pOrigFrame = (cocos2d::CCSpriteFrame *)m_pOrigFrame; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source