//
// GJBaseGameLayer::increaseBatchNodeCapacity from 0x14020cc20 to 0x14020ccf2 (210 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::init @ 0x1402d29a4
// > PlayLayer::setupHasCompleted @ 0x1403a6850
// > ??> @ 0x1406ccd74
//
// 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
//
// Hidden C++ exception states: #wind=1
void GJBaseGameLayer::increaseBatchNodeCapacity(GJBaseGameLayer *a1)
{
GameManager *v2; // rcx
signed int v3; // esi
cocos2d::CCArray *m_batchNodes; // rbx
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCSpriteBatchNode **arr; // rbx
cocos2d::CCSpriteBatchNode **i; // rbp
cocos2d::CCSpriteBatchNode *v9; // rdi
void *v10; // [rsp+30h] [rbp+8h]
v2 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v10 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v2 = (GameManager *)qword_1406C2ED8;
}
v3 = 200;
if ( GameManager::getGameVariable(v2, "0066") )
v3 = 1000;
m_batchNodes = a1->m_batchNodes;
if ( m_batchNodes )
{
data = m_batchNodes->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (cocos2d::CCSpriteBatchNode **)data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v9 = *arr;
if ( !*arr )
break;
if ( cocos2d::CCSpriteBatchNode::getAtlasCapacity(*arr) < v3 )
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v9, v3);
}
}
}
}