//
// cocos2d::CCSpriteBatchNode::draw from 0xb17034 to 0xb1711c (232 bytes)
//
// 5 xrefs:
// > ??> @ 0xc4ba8
// > ??> @ 0x1137aa8
// > ??> @ 0x1202cd8
// > ??> @ 0x1218dc8
// > ??> @ 0x121ac48
//
// 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
//
void cocos2d::CCSpriteBatchNode::draw(cocos2d::CCSpriteBatchNode *a1)
{
cocos2d::CCGLProgram *v2; // x0
cocos2d::CCGLProgram *v3; // x0
cocos2d::CCArray *m_pChildren; // x0
cocos2d::ccArray *data; // x1
cocos2d::CCObject **arr; // x20
cocos2d::CCObject **v7; // x21
cocos2d::CCObject *v8; // x0
if ( a1->m_pobTextureAtlas->getTotalQuads(a1->m_pobTextureAtlas) )
{
cocos2d::ccGLEnable(a1->m_eGLServerState);
a1->getShaderProgram(a1);
v2 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::use(v2);
v3 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
data = m_pChildren->data;
if ( data->num )
{
arr = data->arr;
v7 = &arr[data->num - 1];
while ( v7 >= arr )
{
v8 = *arr;
if ( !*arr )
break;
++arr;
v8->__vftable[9].canEncode(v8);
}
}
}
cocos2d::ccGLBlendFunc(a1->m_blendFunc.src, a1->m_blendFunc.dst);
cocos2d::CCTextureAtlas::drawQuads(a1->m_pobTextureAtlas);
}
}