//
// cocos2d::CCSpriteBatchNode::initWithTexture from 0x7f2c38 to 0x7f2cce (150 bytes)
//
// 5 xrefs:
// > cocos2d::CCLabelBMFont::initWithString @ 0x7d5cae
// > cocos2d::CCSpriteBatchNode::createWithTexture @ 0x7f2cee
// > cocos2d::CCSpriteBatchNode::init @ 0x7f2d1c
// > cocos2d::CCSpriteBatchNode::initWithFile @ 0x7f2d3e
// > cocos2d::CCTMXLayer::initWithTilesetInfo @ 0x804668
//
// 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:01:06 +0000
//
int __fastcall cocos2d::CCSpriteBatchNode::initWithTexture(
cocos2d::CCSpriteBatchNode *this,
cocos2d::CCTexture2D *a2,
cocos2d *a3)
{
cocos2d::CCTextureAtlas *v6; // r7
cocos2d::CCArray *v7; // r7
cocos2d::CCArray *v8; // r7
cocos2d::CCShaderCache *v9; // r0
void (__fastcall *v10)(cocos2d::CCSpriteBatchNode *, int); // r5
cocos2d::CCShaderCache *v11; // r0
int v12; // r0
*((_DWORD *)this + 69) = 771;
*((_DWORD *)this + 68) = 1;
v6 = (cocos2d::CCTextureAtlas *)operator new(0x58u);
cocos2d::CCTextureAtlas::CCTextureAtlas(v6);
*((_DWORD *)this + 67) = v6;
if ( !a3 )
a3 = (cocos2d *)(&dword_1C + 1);
cocos2d::CCTextureAtlas::initWithTexture(v6, a2, (unsigned int)a3);
cocos2d::CCSpriteBatchNode::updateBlendFunc(this);
v7 = (cocos2d::CCArray *)operator new(0x38u);
cocos2d::CCArray::CCArray(v7);
*((_DWORD *)this + 48) = v7;
cocos2d::CCArray::initWithCapacity(v7, a3);
v8 = (cocos2d::CCArray *)operator new(0x38u);
cocos2d::CCArray::CCArray(v8);
*((_DWORD *)this + 70) = v8;
v9 = (cocos2d::CCShaderCache *)cocos2d::CCArray::initWithCapacity(v8, a3);
*((_BYTE *)this + 284) = 0;
*((_BYTE *)this + 285) = 0;
v10 = *(void (__fastcall **)(cocos2d::CCSpriteBatchNode *, int))(*(_DWORD *)this + 332);
v11 = (cocos2d::CCShaderCache *)cocos2d::CCShaderCache::sharedShaderCache(v9);
v12 = cocos2d::CCShaderCache::programForKey(v11, "ShaderPositionTextureColor");
v10(this, v12);
return 1;
}