//
// cocos2d::CCTextureETC::loadTexture from 0xda9694 to 0xda9890 (508 bytes)
//
// 2 xrefs:
// > cocos2d::CCTextureETC::initWithFile @ 0xda98ec
// > ??> @ 0x8f548
//
// This function is hookable on this platform (idp: arm, 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 13:08:34 +0000
//
__int64 __fastcall cocos2d::CCTextureETC::loadTexture(cocos2d::CCTextureETC *this, const char *a2)
{
__int64 result; // x0
unsigned int v5; // w20
__int64 v6; // x23
int v7; // w24
int v8; // w2
int Error; // w24
char *v10; // [xsp+50h] [xbp+50h] BYREF
__int64 v11; // [xsp+58h] [xbp+58h]
__int64 v12; // [xsp+60h] [xbp+60h]
result = cocos2d::JniHelper::getStaticMethodInfo(
&v10,
(cocos2d::JniHelper *)"org/cocos2dx/lib/Cocos2dxETCLoader",
"loadTexture",
(__int64)"(Ljava/lang/String;)Z");
v5 = (unsigned __int8)result;
if ( (_BYTE)result )
{
v6 = (*(__int64 (__fastcall **)(char *, const char *))(*(_QWORD *)v10 + 1336LL))(v10, a2);
v7 = (unsigned __int8)_JNIEnv::CallStaticBooleanMethod((__int64)v10, v11, v12, v6);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v6);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v10 + 184LL))(v10, v11);
if ( !v7 )
return 0;
v8 = dword_1562364;
*((_DWORD *)this + 15) = dword_1562360;
*((_DWORD *)this + 16) = v8;
glGenTextures();
glBindTexture();
glTexParameteri();
glTexParameteri();
glTexParameteri();
glCompressedTexImage2D();
glBindTexture();
if ( qword_1562370 )
operator delete[]((void *)qword_1562370);
qword_1562370 = 0;
Error = glGetError();
if ( !Error )
return v5;
__android_log_print(
3,
"CCTextureETC.cpp",
"width %d, height %d, lenght %d",
*((_DWORD *)this + 15),
*((_DWORD *)this + 16),
dword_1562368);
__android_log_print(
3,
"CCTextureETC.cpp",
"cocos2d: TextureETC: Error uploading compressed texture %s glError: 0x%04X",
a2,
Error);
return 0;
}
return result;
}