// // SpriteAnimationManager::loadAnimations from 0x3d8ef4 to 0x3d92f6 (1026 bytes) // // 1 xrefs: // > SpriteAnimationManager::initWithOwner @ 0x3d9428 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:46:46 +0000 // unsigned int __fastcall SpriteAnimationManager::loadAnimations(cocos2d::CCAnimationCache *a1, int a2) { ObjectManager *v4; // r0 const char *v5; // r1 int Definition; // r5 unsigned int v7; // r10 unsigned int result; // r0 cocos2d::CCString *v9; // r8 const char *CString; // r0 const char *v11; // r5 size_t v12; // r0 int v13; // r5 cocos2d::CCString *v14; // r0 cocos2d::CCString *v15; // r0 cocos2d::CCString *v16; // r0 cocos2d::CCString *v17; // r0 cocos2d::CCString *v18; // r9 const char *v19; // r0 size_t v20; // r0 cocos2d::CCString *v21; // r0 float v22; // r6 const char *v23; // r0 size_t v24; // r0 int v25; // r3 const char *v26; // r2 int v27; // r6 int v28; // r4 int v29; // r5 cocos2d::CCSequence *v30; // r5 cocos2d::CCObject *v31; // r9 int v32; // r0 cocos2d::CCAnimation *v33; // r1 int v34; // r6 cocos2d::CCSequence *v35; // r0 cocos2d::CCActionInterval *v36; // r1 cocos2d::CCObject *v37; // r0 cocos2d::CCFiniteTimeAction *v38; // r0 const char *v39; // r8 size_t v40; // r0 cocos2d::CCDictionary *v41; // [sp+10h] [bp-274h] cocos2d::CCArray *v42; // [sp+14h] [bp-270h] int v43; // [sp+18h] [bp-26Ch] int v44; // [sp+1Ch] [bp-268h] char *v45; // [sp+1Ch] [bp-268h] cocos2d::CCAnimationCache *v46; // [sp+20h] [bp-264h] char *v47; // [sp+24h] [bp-260h] int v48; // [sp+28h] [bp-25Ch] _BOOL4 v49; // [sp+48h] [bp-23Ch] const char *v50; // [sp+48h] [bp-23Ch] const char *v51; // [sp+4Ch] [bp-238h] const char *v52; // [sp+54h] [bp-230h] int v53[3]; // [sp+64h] [bp-220h] BYREF int v54; // [sp+70h] [bp-214h] BYREF int v55; // [sp+74h] [bp-210h] int v56; // [sp+78h] [bp-20Ch] int v57; // [sp+7Ch] [bp-208h] BYREF unsigned int v58; // [sp+80h] [bp-204h] void *v59; // [sp+84h] [bp-200h] _BYTE v60[500]; // [sp+88h] [bp-1FCh] BYREF v46 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache(a1); v4 = (ObjectManager *)ObjectManager::instance(v46); if ( (*(_BYTE *)a2 & 1) != 0 ) v5 = *(const char **)(a2 + 8); else v5 = (const char *)(a2 + 1); v57 = 0; v58 = 0; v59 = nullptr; Definition = ObjectManager::getDefinition(v4, v5); std::string::__init(&v57, "animations", 0xAu); v41 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(Definition, &v57); std::string::~string((int)&v57); v7 = 0; v42 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v41); while ( 1 ) { result = cocos2d::CCArray::count(v42); if ( v7 >= result ) return result; v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v42, v7); CString = (const char *)cocos2d::CCString::getCString(v9); v57 = 0; v58 = 0; v59 = nullptr; v11 = CString; v12 = strlen(CString); std::string::__init(&v57, v11, v12); v13 = cocos2d::CCDictionary::objectForKey(v41, &v57); std::string::~string((int)&v57); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "prio", 4u); v14 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v13, &v57); v47 = (char *)cocos2d::CCString::intValue(v14); std::string::~string((int)&v57); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "looped", 6u); v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v13, &v57); v48 = cocos2d::CCString::boolValue(v15); std::string::~string((int)&v57); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "usesParts", 9u); v16 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v13, &v57); v44 = cocos2d::CCString::boolValue(v16); std::string::~string((int)&v57); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "dontPlayNext", 0xCu); v17 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v13, &v57); v43 = cocos2d::CCString::boolValue(v17); std::string::~string((int)&v57); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "sound", 5u); v18 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v13, &v57); std::string::~string((int)&v57); if ( v18 ) { v19 = (const char *)cocos2d::CCString::getCString(v18); v54 = 0; v55 = 0; v56 = 0; v51 = v19; v20 = strlen(v19); std::string::__init(&v54, v51, v20); v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "0", 1u); v49 = sub_3D7D88((unsigned __int8 *)&v54, (unsigned __int8 *)&v57); std::string::~string((int)&v57); std::string::~string((int)&v54); if ( !v49 ) { v57 = 0; v58 = 0; v59 = nullptr; std::string::__init(&v57, "soundDelay", 0xAu); v21 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v13, &v57); v22 = COERCE_FLOAT(cocos2d::CCString::floatValue(v21)); std::string::~string((int)&v57); v23 = (const char *)cocos2d::CCString::getCString(v9); v57 = 0; v58 = 0; v59 = nullptr; v50 = v23; v24 = strlen(v23); std::string::__init(&v57, v50, v24); SpriteAnimationManager::storeSoundForAnimation((int)a1, v18, (int)&v57, v22); std::string::~string((int)&v57); } } v58 = 500; v59 = v60; if ( v44 ) v25 = 2; else v25 = 1; v45 = (char *)v25; if ( (*(_BYTE *)a2 & 1) != 0 ) v26 = *(const char **)(a2 + 8); else v26 = (const char *)(a2 + 1); v57 = 0; fmt::BasicWriter::operator<<((unsigned int *)&v57, v26, 0); fmt::BasicWriter::operator<<((unsigned int *)&v57, "_", 0); v52 = (const char *)cocos2d::CCString::getCString(v9); fmt::BasicWriter::operator<<((unsigned int *)&v57, v52, 0); v27 = v57; if ( v57 + 1 > v58 ) fmt::internal::Array::grow((int)&v57, v57 + 1); *((_BYTE *)v59 + v27) = 0; v28 = cocos2d::CCAnimationCache::animationByName(v46, (const char *)v59); memset(v53, 0, sizeof(v53)); std::string::__init(v53, "singleFrame", 0xBu); v29 = cocos2d::CCDictionary::objectForKey(v13, v53); std::string::~string((int)v53); if ( v29 ) { v30 = (cocos2d::CCSequence *)v28; *(_DWORD *)(v28 + 24) = 2; v31 = (cocos2d::CCObject *)v28; goto LABEL_28; } v32 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v28 + 64), 0); v34 = v32; if ( *(_DWORD *)(v32 + 24) == 14 ) v34 = *(_DWORD *)(v32 + 52); v35 = (cocos2d::CCSequence *)cocos2d::CCAnimate::create((cocos2d::CCAnimate *)v28, v33); *((_DWORD *)v35 + 6) = 0; v30 = v35; if ( v48 ) { v37 = (cocos2d::CCObject *)cocos2d::CCRepeatForever::create(v35, v36); } else { if ( v43 ) { v31 = v35; goto LABEL_27; } v38 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(a1, SpriteAnimationManager::animationFinished, 0); v37 = (cocos2d::CCObject *)cocos2d::CCSequence::create(v30, v38, 0); } v31 = v37; LABEL_27: v28 = v34; *((_DWORD *)v31 + 6) = 0; LABEL_28: v39 = (const char *)cocos2d::CCString::getCString(v9); v54 = 0; v55 = 0; v56 = 0; v40 = strlen(v39); std::string::__init(&v54, v39, v40); SpriteAnimationManager::storeAnimation(a1, v30, v31, (int)&v54, v47, v45, (cocos2d::CCObject *)v28); std::string::~string((int)&v54); if ( v59 != v60 ) { if ( v59 ) operator delete[](v59); } ++v7; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source