//
// CCAnimatedSprite::initWithType from 0x3c3bb0 to 0x3c3ca4 (244 bytes)
//
// 3 xrefs:
// > CCAnimatedSprite::createWithType @ 0x3c3d2c
// > GJRobotSprite::init @ 0x5e6b22
// > AnimatedShopKeeper::init @ 0x611204
//
// 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:32 +0000
//
int __fastcall CCAnimatedSprite::initWithType(
CCAnimatedSprite *this,
const char *a2,
cocos2d::CCTexture2D *a3,
cocos2d::CCTexture2D *a4)
{
cocos2d::CCTexture2D *v7; // r4
ObjectManager *v8; // r0
int Definition; // r5
cocos2d::CCString *v10; // r0
const char *CString; // r10
size_t v12; // r0
cocos2d::CCTextureCache *v13; // r0
cocos2d::CCTextureCache *v14; // r0
char *v15; // r1
int v16; // r5
int v18[2]; // [sp+Ch] [bp-2Ch] BYREF
char *v19; // [sp+14h] [bp-24h]
int v20[3]; // [sp+18h] [bp-20h] BYREF
_BYTE v21[16]; // [sp+24h] [bp-14h] BYREF
v7 = a3;
if ( !a3 )
{
v8 = (ObjectManager *)ObjectManager::instance(this);
memset(v20, 0, sizeof(v20));
Definition = ObjectManager::getDefinition(v8, a2);
std::string::__init(v20, "spriteSheet", 0xBu);
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(Definition, v20);
CString = (const char *)cocos2d::CCString::getCString(v10);
v18[0] = 0;
v18[1] = 0;
v19 = nullptr;
v12 = strlen(CString);
std::string::__init(v18, CString, v12);
std::string::~string((int)v20);
v13 = (cocos2d::CCTextureCache *)std::string::append(v18, ".png");
v14 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v13);
if ( (v18[0] & 1) != 0 )
v15 = v19;
else
v15 = (char *)v18 + 1;
v7 = (cocos2d::CCTexture2D *)cocos2d::CCTextureCache::addImage(v14, v15, 0);
std::string::~string((int)v18);
}
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v21, 0.0, 0.0, 0.0, 0.0);
v16 = cocos2d::CCSprite::initWithTexture(this, v7, (const cocos2d::CCRect *)v21);
if ( v16 )
{
*((_BYTE *)this + 471) = 1;
std::string::assign((int *)this + 127, (char *)&unk_B6B226);
CCAnimatedSprite::loadType(this, a2, v7, a4);
}
return v16;
}