//
// cocos2d::CCAnimationCache::addAnimationsWithDictionary from 0x5e5d60 to 0x5e5e9a (314 bytes)
//
// 1 xrefs:
// > cocos2d::CCAnimationCache::addAnimationsWithFile @ 0x5e5ee0
//
// 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::addAnimationsWithDictionary(
cocos2d::CCAnimationCache *a1,
cocos2d::CCDictionary *a2,
const char *a3)
{
cocos2d::CCDictionary *v6; // r6
int v7; // r11
int v8; // r2
int v9; // r3
cocos2d::CCString *v10; // r0
int v11; // r7
int v12; // r10
_DWORD *v13; // r2
cocos2d::CCString **v14; // r4
cocos2d::CCString **v15; // r10
cocos2d::CCString *v16; // r11
cocos2d::CCString *v17; // t1
const char *CString; // r0
int v19; // r11
cocos2d::CCSpriteFrameCache *v20; // r0
const char *v21; // r1
cocos2d::CCSpriteFrameCache *getFileData; // [sp+0h] [bp-1Ch]
cocos2d::CCSpriteFrameCache *v23; // [sp+0h] [bp-1Ch]
cocos2d::CCFileUtils *v24; // [sp+4h] [bp-18h]
const char *v25; // [sp+10h] [bp-Ch] BYREF
sub_776584((int)&v25, "animations");
v6 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey((int)a2, &v25);
sub_774008(&v25);
if ( v6 )
{
sub_776584((int)&v25, "properties");
v7 = cocos2d::CCDictionary::objectForKey((int)a2, &v25);
sub_774008(&v25);
if ( !v7 )
goto LABEL_12;
sub_776584((int)&v25, "format");
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v7, &v25, v8, v9);
v11 = cocos2d::CCString::intValue(v10);
sub_774008(&v25);
sub_776584((int)&v25, "spritesheets");
v12 = cocos2d::CCDictionary::objectForKey(v7, &v25);
sub_774008(&v25);
if ( v12 )
{
v13 = *(_DWORD **)(v12 + 52);
if ( *v13 )
{
v14 = (cocos2d::CCString **)v13[3];
v15 = &v14[*v13] + 0x3FFFFFFF;
while ( v14 <= v15 )
{
v17 = *v14++;
v16 = v17;
if ( !v17 )
break;
if ( a3 )
{
v24 = cocos2d::CCFileUtils::sharedFileUtils();
getFileData = (cocos2d::CCSpriteFrameCache *)v24->getFileData;
CString = cocos2d::CCString::getCString(v16);
v19 = ((int (__fastcall *)(cocos2d::CCFileUtils *, const char *, const char *))getFileData)(
v24,
CString,
a3);
v20 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v21 = (const char *)v19;
}
else
{
v23 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v21 = cocos2d::CCString::getCString(v16);
v20 = v23;
}
cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v20, v21);
}
}
}
if ( v11 == 1 )
{
LABEL_12:
cocos2d::CCAnimationCache::parseVersion1(a1, v6);
}
else if ( v11 == 2 )
{
cocos2d::CCAnimationCache::parseVersion2(a1, v6);
}
}
}