//
// GJBaseGameLayer::increaseBatchNodeCapacity from 0x8581b0 to 0x858258 (168 bytes)
//
// 3 xrefs:
// > PlayLayer::setupHasCompleted @ 0x5dc334
// > LevelEditorLayer::init @ 0x67c934
// > ??> @ 0x46a88
//
// 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 GJBaseGameLayer::increaseBatchNodeCapacity(GJBaseGameLayer *a1)
{
GameManager *v2; // x0
bool GameVariable; // w0
cocos2d::CCArray *m_batchNodes; // x19
signed int v5; // w21
cocos2d::ccArray *data; // x1
cocos2d::CCSpriteBatchNode **arr; // x19
__int64 v8; // x0
char *v9; // x22
cocos2d::CCSpriteBatchNode *v10; // x20
v2 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v2, "0066");
m_batchNodes = a1->m_batchNodes;
if ( GameVariable )
v5 = 1000;
else
v5 = 200;
if ( m_batchNodes )
{
data = m_batchNodes->data;
if ( data->num )
{
arr = (cocos2d::CCSpriteBatchNode **)data->arr;
v8 = 8LL * data->num - 8;
v9 = (char *)arr + v8;
if ( arr <= (cocos2d::CCSpriteBatchNode **)((char *)arr + v8) )
{
do
{
v10 = *arr;
if ( !*arr )
break;
if ( v5 > cocos2d::CCSpriteBatchNode::getAtlasCapacity(*arr) )
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v10, v5);
++arr;
}
while ( v9 >= (char *)arr );
}
}
}
}