//
// GJBaseGameLayer::getCapacityString from 0x5bcce4 to 0x5bcdda (246 bytes)
//
// 1 xrefs:
// > PlayLayer::levelComplete @ 0x407c66
//
// 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 11:53:43 +0000
//
GJBaseGameLayer *__fastcall GJBaseGameLayer::getCapacityString(GJBaseGameLayer *this, int a2)
{
int v2; // r6
int v4; // r2
const char *v5; // r0
const char *v6; // r5
size_t v7; // r0
_DWORD *v8; // r3
cocos2d::CCSpriteBatchNode **v9; // r7
int v10; // r9
cocos2d::CCSpriteBatchNode **v11; // r11
cocos2d::CCSpriteBatchNode *v12; // r0
cocos2d::CCSpriteBatchNode *v13; // t1
int UsedAtlasCapacity; // r10
unsigned int v16[3]; // [sp+1Ch] [bp-208h] BYREF
char v17; // [sp+28h] [bp-1FCh] BYREF
v2 = 0;
v16[0] = 0;
v16[1] = 500;
v16[2] = (unsigned int)&v17;
v4 = *(_DWORD *)(a2 + 2468);
if ( v4 )
{
v8 = *(_DWORD **)(v4 + 52);
if ( *v8 )
{
v9 = (cocos2d::CCSpriteBatchNode **)v8[3];
v10 = 1;
v11 = &v9[*v8] + 0x3FFFFFFF;
while ( v9 <= v11 )
{
v13 = *v9++;
v12 = v13;
if ( !v13 )
break;
UsedAtlasCapacity = cocos2d::CCSpriteBatchNode::getUsedAtlasCapacity(v12);
if ( UsedAtlasCapacity > 200 )
{
if ( !v10 )
fmt::BasicWriter::operator<<(v16, ",", 0);
fmt::BasicWriter::operator<<(v16, v2);
fmt::BasicWriter::operator<<(v16, ",", 0);
fmt::BasicWriter::operator<<(v16, UsedAtlasCapacity);
v10 = 0;
}
++v2;
}
}
}
v5 = (const char *)fmt::BasicWriter::c_str((int *)v16);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v6 = v5;
*((_DWORD *)this + 2) = 0;
v7 = strlen(v5);
std::string::__init((int *)this, v6, v7);
fmt::internal::Array::free((int)v16);
return this;
}