//
// cocos2d::CCImage::initWithImageFile from 0x5e1fa0 to 0x5e2026 (134 bytes)
//
// 2 xrefs:
// > cocos2d::CCTextureCache::addImage @ 0x5f5478
// > cocos2d::CCTextureCache::reloadTexture @ 0x5f55c2
//
// 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
//
bool cocos2d::CCImage::initWithImageFile(cocos2d::CCImage *a1, const char *a2, cocos2d::CCImage::EImageFormat a3)
{
cocos2d::CCFileUtils *v6; // r0
cocos2d::CCFileUtils *v7; // r0
void *v8; // r5
bool v9; // r4
int v11; // [sp+14h] [bp-4h] BYREF
int v12; // [sp+18h] [bp+0h] BYREF
v11 = 0;
v6 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(int *, cocos2d::CCFileUtils *, const char *, _DWORD))v6->createCCArrayWithContentsOfFile)(
&v12,
v6,
a2,
0);
v7 = cocos2d::CCFileUtils::sharedFileUtils();
v8 = (void *)((int (__fastcall *)(cocos2d::CCFileUtils *, int, const char *, int *))v7->addSearchResolutionsOrder)(
v7,
v12,
"rb",
&v11);
if ( v8 )
{
if ( v11 )
v9 = cocos2d::CCImage::initWithImageData(a1, v8, v11, a3, 0, 0, 8, 0);
else
v9 = 0;
operator delete[](v8);
}
else
{
v9 = 0;
}
sub_774008(&v12);
return v9;
}