//
// cocos2d::CCTileMapAtlas::calculateItemsToRender from 0x80758c to 0x8075d0 (68 bytes)
//
// 1 xrefs:
// > cocos2d::CCTileMapAtlas::initWithTileFile @ 0x80764a
//
// 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 12:01:26 +0000
//
int __fastcall cocos2d::CCTileMapAtlas::calculateItemsToRender(int this)
{
int v1; // r1
int v2; // r3
int i; // r4
v1 = *(_DWORD *)(this + 332);
v2 = 0;
*(_DWORD *)(this + 340) = 0;
while ( v2 < *(__int16 *)(v1 + 6) )
{
for ( i = 0; i < *(__int16 *)(v1 + 8); ++i )
{
if ( *(_BYTE *)(*(_DWORD *)(v1 + 12) + 3 * (v2 + *(__int16 *)(v1 + 6) * i)) )
++*(_DWORD *)(this + 340);
}
++v2;
}
return this;
}