// // cocos2d::CCAnimationCache::parseVersion2 from 0x5e5b30 to 0x5e5d40 (528 bytes) // // 1 xrefs: // > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0x5e5e0c // // 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::CCAnimationCache::parseVersion2(cocos2d::CCAnimationCache *a1, cocos2d::CCDictionary *a2) { cocos2d::CCDictElement *m_pElements; // r5 cocos2d::CCDictElement *next; // r6 int m_pObject; // r8 int v6; // r2 int v7; // r3 int v8; // r2 int v9; // r3 cocos2d::CCString *v10; // r0 cocos2d::CCArray *v11; // r7 cocos2d::CCArray *v12; // r0 unsigned int v13; // r1 cocos2d::CCArray *v14; // r10 cocos2d::ccArray *data; // r3 int v16; // r2 int v17; // r3 cocos2d::CCString *v18; // r0 float v19; // r7 cocos2d::CCAnimation *v20; // r4 unsigned int v21; // r3 int *arr; // r7 int v23; // r9 int v24; // t1 cocos2d::CCAnimationCache *v25; // r0 cocos2d::CCDictElement *v26; // r3 int v27; // r2 int v28; // r3 cocos2d::CCString *v29; // r0 cocos2d::CCSpriteFrame *v30; // r3 int v31; // r2 int v32; // r3 cocos2d::CCString *v33; // r0 cocos2d::CCDictionary *v34; // r9 cocos2d::CCAnimationFrame *v35; // r4 cocos2d::CCObject *v36; // r2 cocos2d::CCString *v37; // [sp+4h] [bp-48h] cocos2d::CCSpriteFrameCache *v38; // [sp+8h] [bp-44h] bool v39; // [sp+Ch] [bp-40h] int *v40; // [sp+10h] [bp-3Ch] char *CString; // [sp+14h] [bp-38h] float v42; // [sp+14h] [bp-38h] cocos2d::CCSpriteFrame *v43; // [sp+34h] [bp-18h] const char *v44; // [sp+40h] [bp-Ch] BYREF v38 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); if ( a2 ) { m_pElements = a2->m_pElements; if ( m_pElements ) next = (cocos2d::CCDictElement *)m_pElements->hh.next; else next = nullptr; while ( m_pElements ) { m_pObject = (int)m_pElements->m_pObject; sub_776584((int)&v44, "loops"); v37 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_pObject, &v44, v6, v7); sub_774008(&v44); sub_776584((int)&v44, "restoreOriginalFrame"); v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_pObject, &v44, v8, v9); v39 = cocos2d::CCString::boolValue(v10); sub_774008(&v44); sub_776584((int)&v44, "frames"); v11 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(m_pObject, &v44); sub_774008(&v44); if ( v11 ) { v12 = (cocos2d::CCArray *)cocos2d::CCArray::count(v11); v14 = cocos2d::CCArray::createWithCapacity(v12, v13); cocos2d::CCObject::retain(v14); data = v11->data; if ( data->num ) { arr = (int *)data->arr; v40 = &arr[data->num - 1]; while ( arr <= v40 ) { v24 = *arr++; v23 = v24; if ( !v24 ) break; sub_776584((int)&v44, "spriteframe"); v29 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v23, &v44, v27, v28); CString = (char *)cocos2d::CCString::getCString(v29); sub_774008(&v44); v30 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v38, CString); if ( v30 ) { v43 = v30; sub_776584((int)&v44, "delayUnits"); v33 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v23, &v44, v31, v32); v42 = cocos2d::CCString::floatValue(v33); sub_774008(&v44); sub_776584((int)&v44, "notification"); v34 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(v23, &v44); sub_774008(&v44); v35 = (cocos2d::CCAnimationFrame *)operator new(0x40u); cocos2d::CCAnimationFrame::CCAnimationFrame(v35); cocos2d::CCAnimationFrame::initWithSpriteFrame(v35, v43, v42, v34); cocos2d::CCArray::addObject(v14, (cocos2d::_ccArray *)v35, v36); cocos2d::CCObject::release(v35); } } } sub_776584((int)&v44, "delayPerUnit"); v18 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(m_pObject, &v44, v16, v17); v19 = cocos2d::CCString::floatValue(v18); sub_774008(&v44); v20 = (cocos2d::CCAnimation *)operator new(0x4Cu); cocos2d::CCAnimation::CCAnimation(v20); if ( cocos2d::CCString::length(v37) ) v21 = cocos2d::CCString::intValue(v37); else v21 = 1; cocos2d::CCAnimation::initWithAnimationFrames(v20, v14, v19, v21); cocos2d::CCObject::release(v14); v20->m_bRestoreOriginalFrame = v39; v25 = cocos2d::CCAnimationCache::sharedAnimationCache(); cocos2d::CCAnimationCache::addAnimation(v25, v20, (const char *)m_pElements); cocos2d::CCObject::release(v20); } if ( next ) v26 = (cocos2d::CCDictElement *)next->hh.next; else v26 = nullptr; m_pElements = next; next = v26; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source