//
// CCAnimatedSprite::initWithType from 0x68d3f8 to 0x68d5c8 (464 bytes)
//
// 4 xrefs:
// > CCAnimatedSprite::createWithType @ 0x68d660
// > GJRobotSprite::init @ 0xa3cf48
// > AnimatedShopKeeper::init @ 0xa7cb6c
// > ??> @ 0x61270
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:50:33 +0000
//
__int64 __fastcall CCAnimatedSprite::initWithType(
CCAnimatedSprite *this,
char *a2,
cocos2d::CCTexture2D *a3,
unsigned __int8 a4)
{
cocos2d::CCTexture2D *v4; // x20
unsigned __int8 v8; // w0
unsigned int v9; // w22
ObjectManager *v11; // x0
__int64 Definition; // x22
cocos2d::CCString *v13; // x0
size_t v14; // x0
cocos2d::CCTextureCache *v15; // x0
cocos2d::CCTextureCache *v16; // x0
char *v17; // x1
char *CString; // [xsp+48h] [xbp+48h]
_BYTE v19[16]; // [xsp+58h] [xbp+58h] BYREF
__int64 v20[2]; // [xsp+68h] [xbp+68h] BYREF
char *v21; // [xsp+78h] [xbp+78h]
__int64 v22[2]; // [xsp+80h] [xbp+80h] BYREF
void *v23; // [xsp+90h] [xbp+90h]
v4 = a3;
if ( !a3 )
{
v11 = (ObjectManager *)ObjectManager::instance(_stack_chk_guard);
Definition = ObjectManager::getDefinition(v11, a2);
v22[0] = 0;
v22[1] = 0;
v23 = nullptr;
std::string::__init(v22, "spriteSheet", 0xBu);
v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(Definition, v22);
CString = (char *)cocos2d::CCString::getCString(v13);
v20[0] = 0;
v20[1] = 0;
v21 = nullptr;
v14 = strlen(CString);
std::string::__init(v20, CString, v14);
if ( (v22[0] & 1) != 0 )
operator delete(v23);
v15 = (cocos2d::CCTextureCache *)std::string::append((__int64)v20, ".png", 4u);
v16 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v15);
v17 = (char *)v20 + 1;
if ( (v20[0] & 1) != 0 )
v17 = v21;
v4 = (cocos2d::CCTexture2D *)cocos2d::CCTextureCache::addImage(v16, v17, 0);
if ( (v20[0] & 1) != 0 )
operator delete(v21);
}
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v19, 0.0, 0.0, 0.0, 0.0);
v8 = cocos2d::CCSprite::initWithTexture(this, v4, (const cocos2d::CCRect *)v19);
v9 = v8;
if ( v8 )
{
*((_BYTE *)this + 559) = 1;
std::string::assign((__int64 *)this + 75, &byte_11B8890, 0);
CCAnimatedSprite::loadType(this, a2, v4, a4);
}
return v9;
}