//
// GJBaseGameLayer::increaseBatchNodeCapacity from 0x1001dea1c to 0x1001deab0 (148 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x100116980
// > LevelEditorLayer::init @ 0x1003574d0
//
// 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 __fastcall GJBaseGameLayer::increaseBatchNodeCapacity(GJBaseGameLayer *a1)
{
GameManager *v2; // x0
signed int v3; // w19
cocos2d::CCArray *m_batchNodes; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
cocos2d::CCSpriteBatchNode **arr; // x21
unsigned __int64 v8; // x22
cocos2d::CCSpriteBatchNode *v9; // x20
v2 = GameManager::sharedState();
if ( GameManager::getGameVariable(v2, "0066") )
v3 = 1000;
else
v3 = 200;
m_batchNodes = a1->m_batchNodes;
if ( m_batchNodes )
{
data = m_batchNodes->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (cocos2d::CCSpriteBatchNode **)data->arr;
v8 = (unsigned __int64)&arr[num - 1];
do
{
v9 = *arr;
if ( !*arr )
break;
if ( cocos2d::CCSpriteBatchNode::getAtlasCapacity(*arr) < v3 )
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v9, v3);
++arr;
}
while ( (unsigned __int64)arr <= v8 );
}
}
}