//
// cocos2d::CCAtlasNode::initWithTexture from 0xaca3c4 to 0xaca4cc (264 bytes)
//
// 3 xrefs:
// > cocos2d::CCAtlasNode::initWithTileFile @ 0xaca518
// > cocos2d::CCLabelAtlas::initWithString @ 0xae1b6c
// > ??> @ 0x39b88
//
// 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::CCAtlasNode::initWithTexture(
cocos2d::CCAtlasNode *a1,
cocos2d::CCTexture2D *a2,
unsigned int a3,
unsigned int a4,
unsigned int a5)
{
cocos2d::CCTextureAtlas *v7; // x21
void (__fastcall *setShaderProgram)(cocos2d::CCNode *__hidden, cocos2d::CCGLProgram *); // x21
cocos2d::CCShaderCache *v9; // x0
cocos2d::CCGLProgram *v10; // x0
a1->m_uItemWidth = a3;
a1->m_uItemHeight = a4;
a1->m_tColorUnmodified.r = -1;
a1->m_tColorUnmodified.g = -1;
a1->m_tColorUnmodified.b = -1;
a1->m_bIsOpacityModifyRGB = 1;
a1->m_tBlendFunc.src = 1;
a1->m_tBlendFunc.dst = 771;
v7 = (cocos2d::CCTextureAtlas *)operator new(0x70u);
cocos2d::CCTextureAtlas::CCTextureAtlas(v7);
a1->m_pTextureAtlas = v7;
cocos2d::CCTextureAtlas::initWithTexture(v7, a2, a5);
if ( !a1->m_pTextureAtlas )
return 0;
cocos2d::CCAtlasNode::updateBlendFunc(a1);
cocos2d::CCAtlasNode::updateOpacityModifyRGB(a1);
cocos2d::CCAtlasNode::calculateMaxItems(a1);
a1->m_uQuadsToDraw = a5;
setShaderProgram = a1->setShaderProgram;
v9 = cocos2d::CCShaderCache::sharedShaderCache();
v10 = cocos2d::CCShaderCache::programForKey(v9, "ShaderPositionTexture_uColor");
setShaderProgram(a1, v10);
a1->getShaderProgram(a1);
a1->m_nUniformColor = glGetUniformLocation();
return 1;
}