//
// cocos2d::CCTexture2D::initWithETCFile from 0x10046dd20 to 0x10046ddd6 (182 bytes)
//
// 1 xrefs:
// > cocos2d::CCTextureCache::addETCImage @ 0x1006c17d4
//
// 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 12:30:32 +0000
//
__int64 __fastcall cocos2d::CCTexture2D::initWithETCFile(__int64 a1)
{
void *v1; // rbx
__int64 result; // rax
unsigned int v3; // r12d
int Height; // eax
float v5[10]; // [rsp+8h] [rbp-28h] BYREF
v1 = operator new(0x48u);
cocos2d::CCTextureETC::CCTextureETC((__int64)v1);
result = cocos2d::CCTextureETC::initWithFile();
if ( (_BYTE)result )
{
v3 = result;
*(_DWORD *)(a1 + 72) = cocos2d::CCTextureETC::getName((__int64)v1);
*(_QWORD *)(a1 + 76) = 0x3F8000003F800000LL;
*(_DWORD *)(a1 + 64) = cocos2d::CCTextureETC::getWidth((__int64)v1);
Height = cocos2d::CCTextureETC::getHeight((__int64)v1);
*(_DWORD *)(a1 + 68) = Height;
sub_100278260(v5, (float)*(int *)(a1 + 64), (float)Height);
sub_100278660((_QWORD *)(a1 + 84), v5);
*(_BYTE *)(a1 + 92) = 1;
cocos2d::CCObject::release(v1);
return v3;
}
return result;
}