//
// cocos2d::CCTexture2D::initWithETCFile from 0x1800a9420 to 0x1800a94e4 (196 bytes)
//
// 4 xrefs:
// > cocos2d::CCTextureCache::addETCImage @ 0x1800aaf28
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1efc
// > ??> @ 0x1801c1f08
//
// This function is hookable on this platform (idp: pc, 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 11:22:16 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall cocos2d::CCTexture2D::initWithETCFile(cocos2d::CCTexture2D *this, const char *a2)
{
cocos2d::CCTextureETC *v3; // rax
cocos2d::CCInteger *v4; // rbx
char result; // al
char v6; // di
int ScriptHandler; // eax
float *v8; // rax
cocos2d::CCTextureETC *v9; // [rsp+40h] [rbp+18h] BYREF
v3 = (cocos2d::CCTextureETC *)sub_1800E4AC0(0x48u);
v9 = v3;
if ( v3 )
v4 = (cocos2d::CCInteger *)cocos2d::CCTextureETC::CCTextureETC(v3);
else
v4 = nullptr;
result = kmRay2IntersectCircle();
v6 = result;
if ( result )
{
*((_DWORD *)this + 18) = cocos2d::CCInteger::getValue(v4);
*((_DWORD *)this + 19) = 1065353216;
*((_DWORD *)this + 20) = 1065353216;
*((_DWORD *)this + 16) = cocos2d::CCTextureETC::getWidth(v4);
ScriptHandler = cocos2d::CCNotificationCenter::getScriptHandler(v4);
*((_DWORD *)this + 17) = ScriptHandler;
v8 = kmVec2Fill((float *)&v9, (float)*((int *)this + 16), (float)ScriptHandler);
cocos2d::CCSize::operator=((_DWORD *)this + 21, v8);
*((_BYTE *)this + 92) = 1;
cocos2d::CCObject::release(v4);
return v6;
}
return result;
}