//
// cocos2d::CCTexture2D::initWithPVRFile from 0x1800a5a60 to 0x1800a5b40 (224 bytes)
//
// 3 xrefs:
// > cocos2d::CCTextureCache::addPVRImage @ 0x1800a8910
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7c68
//
// 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
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall cocos2d::CCTexture2D::initWithPVRFile(cocos2d::CCTexture2D *this, char *a2)
{
void *v4; // rax
__int64 v5; // rbx
__int64 result; // rax
unsigned __int8 v7; // di
signed int v8; // edx
signed int v9; // ecx
float *v10; // rax
void *v11; // [rsp+40h] [rbp+18h] BYREF
v4 = operator new(0x158u);
v11 = v4;
if ( v4 )
v5 = sub_1800A9DF0(v4);
else
v5 = 0;
result = sub_1800AA090((cocos2d::CCObject *)v5, a2);
v7 = result;
if ( (_BYTE)result )
{
*(_BYTE *)(v5 + 331) = 1;
this->m_uName = *(_DWORD *)(v5 + 324);
this->m_fMaxS = 1.0;
this->m_fMaxT = 1.0;
v8 = *(_DWORD *)(v5 + 316);
this->m_uPixelsWide = v8;
v9 = *(_DWORD *)(v5 + 320);
this->m_uPixelsHigh = v9;
v10 = kmVec2Fill((float *)&v11, (float)v8, (float)v9);
cocos2d::CCSize::operator=(&this->m_tContentSize, v10);
this->m_bHasPremultipliedAlpha = byte_1801A9A68;
this->m_ePixelFormat = *(_DWORD *)(v5 + 332);
this->m_bHasMipmaps = *(_DWORD *)(v5 + 312) > 1u;
cocos2d::CCObject::release((cocos2d::CCObject *)v5);
return v7;
}
return result;
}