//
// cocos2d::CCTexture2D::initWithImage from 0x5f4094 to 0x5f40c8 (52 bytes)
//
// 8 xrefs:
// > cocos2d::CCTexture2D::initWithString @ 0x5f4258
// > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x5f518e
// > cocos2d::CCTextureCache::addImage @ 0x5f548e
// > cocos2d::CCTextureCache::reloadTexture @ 0x5f55ce
// > cocos2d::CCTextureCache::addUIImage @ 0x5f56a6
// > cocos2d::CCTextureCache::addUIImage @ 0x5f56bc
// > cocos2d::VolatileTexture::reloadAllTextures @ 0x5f594a
// > cocos2d::VolatileTexture::reloadAllTextures @ 0x5f5980
//
// 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 cocos2d::CCTexture2D::initWithImage(cocos2d::CCTexture2D *a1, cocos2d::CCImage *a2)
{
unsigned int m_nWidth; // r6
unsigned int m_nHeight; // r5
cocos2d::CCConfiguration *v6; // r0
unsigned int MaxTextureSize; // r0
bool result; // r0
result = a2
&& (m_nWidth = a2->m_nWidth,
m_nHeight = a2->m_nHeight,
v6 = cocos2d::CCConfiguration::sharedConfiguration(),
MaxTextureSize = cocos2d::CCConfiguration::getMaxTextureSize(v6),
m_nWidth <= MaxTextureSize)
&& m_nHeight <= MaxTextureSize
&& cocos2d::CCTexture2D::initPremultipliedATextureWithImage(a1, a2, m_nWidth, m_nHeight);
return result;
}