//
// cocos2d::CCTexture2D::initWithImage from 0x1800a59f0 to 0x1800a5a56 (102 bytes)
//
// 6 xrefs:
// > cocos2d::CCTextureCache::addImage @ 0x1800a7d84
// > cocos2d::CCTextureCache::addImageAsyncCallBack @ 0x1800a8592
// > cocos2d::CCTextureCache::addUIImage @ 0x1800a8d05
// > cocos2d::CCTextureCache::reloadTexture @ 0x1800a97bb
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7c5c
//
// 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
//
char __fastcall cocos2d::CCTexture2D::initWithImage(cocos2d::CCTexture2D *this, struct cocos2d::CCImage *a2)
{
unsigned int m_nWidth; // esi
unsigned int m_nHeight; // edi
cocos2d::CCInteger *v6; // rax
unsigned int Value; // eax
if ( a2
&& (m_nWidth = a2->m_nWidth,
m_nHeight = a2->m_nHeight,
v6 = (cocos2d::CCInteger *)cocos2d::CCConfiguration::sharedConfiguration(),
Value = cocos2d::CCInteger::getValue(v6),
m_nWidth <= Value)
&& m_nHeight <= Value )
{
return cocos2d::CCTexture2D::initPremultipliedATextureWithImage(this, a2, m_nWidth, m_nHeight);
}
else
{
return 0;
}
}