// // cocos2d::CCTexturePVR::createGLTexture from 0x100370720 to 0x1003708f0 (464 bytes) // // 1 xrefs: // > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x100370af4 // // 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 // bool __fastcall cocos2d::CCTexturePVR::createGLTexture(cocos2d::CCTexturePVR *a1) { unsigned int m_nZOrder; // w0 bool v3; // w20 GLint v4; // w2 unsigned __int64 v5; // x20 cocos2d::CCTexturePVR_vtbl *v6; // x8 GLenum copyWithZone; // w21 GLenum copyWithZone_high; // w22 GLenum v9; // w23 int v10; // w24 cocos2d::CCTexturePVR *v11; // x25 cocos2d::CCConfiguration *v12; // x0 int8x8_t v13; // d1 uint32x2_t v15; // [xsp+10h] [xbp-60h] if ( !a1[5].m_uIndexInArray ) return 1; v15 = *(uint32x2_t *)&a1[5].m_uUnknown; m_nZOrder = a1[5].m_nZOrder; if ( m_nZOrder ) cocos2d::ccGLDeleteTexture(m_nZOrder); v3 = 1; glPixelStorei(0xCF5u, 1); glGenTextures(1, (GLuint *)&a1[5].m_nZOrder); cocos2d::ccGLBindTexture2D(a1[5].m_nZOrder); if ( a1[5].m_uIndexInArray == 1 ) v4 = 9729; else v4 = 9985; glTexParameteri(0xDE1u, 0x2801u, v4); glTexParameteri(0xDE1u, 0x2800u, 9729); glTexParameteri(0xDE1u, 0x2802u, 33071); glTexParameteri(0xDE1u, 0x2803u, 33071); if ( a1[5].m_uIndexInArray ) { v5 = 0; v6 = a1[6].__vftable; copyWithZone = (GLenum)v6->copyWithZone; copyWithZone_high = HIDWORD(v6->copyWithZone); v9 = (GLenum)v6->~CCTexturePVR; v10 = LOBYTE(v6->~CCTexturePVR_0); v11 = a1 + 1; while ( v10 ) { v12 = cocos2d::CCConfiguration::sharedConfiguration(); if ( !cocos2d::CCConfiguration::supportsPVRTC(v12) ) return 0; glCompressedTexImage2D(0xDE1u, v5, copyWithZone, v15.i32[0], v15.i32[1], 0, v11->m_uID, v11->__vftable); if ( v5 ) goto LABEL_14; LABEL_16: if ( glGetError() ) return 0; v13 = (int8x8_t)vcgt_u32(v15, (uint32x2_t)0x100000001LL); v15 = (uint32x2_t)vsub_s32((int32x2_t)vand_s8((int8x8_t)vshr_n_u32(v15, 1u), v13), (int32x2_t)vmvn_s8(v13)); ++v5; v11 = (cocos2d::CCTexturePVR *)((char *)v11 + 16); if ( v5 >= (unsigned int)a1[5].m_uIndexInArray ) return 1; } glTexImage2D(0xDE1u, v5, copyWithZone, v15.i32[0], v15.i32[1], 0, copyWithZone_high, v9, v11->__vftable); if ( !v5 ) goto LABEL_16; LABEL_14: if ( v15.i32[0] == v15.i32[1] ) sub_100084720(v15.u32[0]); goto LABEL_16; } return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source