//
// cocos2d::CCTexture2D::initWithETCFile from 0x10012de14 to 0x10012dec8 (180 bytes)
//
// 1 xrefs:
// > cocos2d::CCTextureCache::addETCImage @ 0x10011469c
//
// 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 __fastcall cocos2d::CCTexture2D::initWithETCFile(cocos2d::CCTexture2D *a1, const char *a2)
{
cocos2d::CCTextureETC *v4; // x20
_BOOL4 v5; // w21
unsigned int Height; // w0
double v13; // [xsp+8h] [xbp-28h] BYREF
v4 = (cocos2d::CCTextureETC *)operator new(0x48u);
cocos2d::CCTextureETC::CCTextureETC();
v5 = cocos2d::CCTextureETC::initWithFile(v4, a2);
if ( v5 )
{
a1->m_uName = cocos2d::CCTextureETC::getName(v4);
__asm { FMOV V0.2S, #1.0 }
*(_QWORD *)&a1->m_fMaxS = _D0;
a1->m_uPixelsWide = cocos2d::CCTextureETC::getWidth(v4);
Height = cocos2d::CCTextureETC::getHeight(v4);
a1->m_uPixelsHigh = Height;
sub_100022988((float *)&v13, (float)a1->m_uPixelsWide, (float)Height);
sub_100022B14(&a1->m_tContentSize, &v13);
a1->m_bHasPremultipliedAlpha = 1;
cocos2d::CCObject::release(v4);
}
return v5;
}