//
// cocos2d::CCTexture2D::initWithETCFile from 0x7ff47c to 0x7ff512 (150 bytes)
//
// 1 xrefs:
// > cocos2d::CCTextureCache::addETCImage @ 0x800f70
//
// 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 12:01:18 +0000
//
int __fastcall cocos2d::CCTexture2D::initWithETCFile(cocos2d::CCTexture2D *this, const char *a2, float a3, float a4)
{
cocos2d::CCTextureETC *v6; // r6
int v7; // r8
int Name; // r0
unsigned int Height; // r0
float v10; // r1
float v12[3]; // [sp+4h] [bp-Ch] BYREF
LODWORD(v12[0]) = a2;
v12[1] = a3;
v12[2] = a4;
v6 = (cocos2d::CCTextureETC *)operator new(0x40u);
cocos2d::CCTextureETC::CCTextureETC(v6);
v7 = cocos2d::CCTextureETC::initWithFile(v6, a2);
if ( v7 )
{
Name = cocos2d::CCTextureETC::getName(v6);
*((_DWORD *)this + 18) = 1065353216;
*((_DWORD *)this + 19) = 1065353216;
*((_DWORD *)this + 17) = Name;
*((_DWORD *)this + 15) = cocos2d::CCTextureETC::getWidth(v6);
Height = cocos2d::CCTextureETC::getHeight(v6);
v10 = (float)*((unsigned int *)this + 15);
*((_DWORD *)this + 16) = Height;
cocos2d::CCSize::CCSize(v12, v10, (float)Height);
cocos2d::CCSize::operator=((float *)this + 20, v12);
*((_BYTE *)this + 88) = 1;
cocos2d::CCObject::release(v6);
}
return v7;
}