//
// cocos2d::CCAtlasNode::initWithTexture from 0x7c30dc to 0x7c317c (160 bytes)
//
// 2 xrefs:
// > cocos2d::CCAtlasNode::initWithTileFile @ 0x7c31b0
// > cocos2d::CCLabelAtlas::initWithString @ 0x7d2412
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:22 +0000
//
int __fastcall cocos2d::CCAtlasNode::initWithTexture(
cocos2d::CCAtlasNode *this,
cocos2d::CCTexture2D *a2,
unsigned int a3,
unsigned int a4,
unsigned int a5)
{
cocos2d::CCTextureAtlas *v7; // r7
int result; // r0
float v9; // r1
float v10; // r2
int v11; // r3
cocos2d::CCShaderCache *v12; // r0
int v13; // r3
void (__fastcall *v14)(cocos2d::CCAtlasNode *, int); // r6
cocos2d::CCShaderCache *v15; // r0
int v16; // r0
*((_DWORD *)this + 74) = a4;
*((_DWORD *)this + 73) = a3;
*((_BYTE *)this + 308) = 1;
*((_DWORD *)this + 78) = 1;
*((_WORD *)this + 150) = -1;
*((_BYTE *)this + 302) = -1;
*((_DWORD *)this + 79) = 771;
v7 = (cocos2d::CCTextureAtlas *)operator new(0x58u);
cocos2d::CCTextureAtlas::CCTextureAtlas(v7);
*((_DWORD *)this + 76) = v7;
cocos2d::CCTextureAtlas::initWithTexture(v7, a2, a5);
result = *((_DWORD *)this + 76);
if ( result )
{
cocos2d::CCAtlasNode::updateBlendFunc(this);
cocos2d::CCAtlasNode::updateOpacityModifyRGB(this);
v12 = (cocos2d::CCShaderCache *)cocos2d::CCAtlasNode::calculateMaxItems(this, v9, v10, v11);
v13 = *(_DWORD *)this;
*((_DWORD *)this + 80) = a5;
v14 = *(void (__fastcall **)(cocos2d::CCAtlasNode *, int))(v13 + 332);
v15 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache(v12);
v16 = cocos2d::CCShaderCache::programForKey(v15, "ShaderPositionTexture_uColor");
v14(this, v16);
(*(void (__fastcall **)(cocos2d::CCAtlasNode *))(*(_DWORD *)this + 328))(this);
*((_DWORD *)this + 81) = glGetUniformLocation();
return 1;
}
return result;
}