//
// cocos2d::CCTileMapAtlas::updateAtlasValues from 0x5fa44c to 0x5fa55e (274 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::CCTileMapAtlas::updateAtlasValues(cocos2d::CCTileMapAtlas *a1)
{
const char *v1; // r4
signed int v3; // r8
void *v4; // r12
int i; // r6
cocos2d::sImageTGA *m_pTGAInfo; // r3
int v7; // r3
__int16 v8; // r2
int v9; // r3
cocos2d::CCObject *v10; // r5
char *CString; // r0
cocos2d::CCDictionary *m_pPosToAtlasIndex; // [sp+4h] [bp-28h]
cocos2d::CCString *v13; // [sp+8h] [bp-24h]
void *v14; // [sp+Ch] [bp-20h]
cocos2d::ccColor3B v15; // [sp+18h] [bp-14h] BYREF
cocos2d::CCPoint v16; // [sp+1Ch] [bp-10h] BYREF
v1 = nullptr;
v3 = 0;
v4 = &_stack_chk_guard;
while ( (int)v1 < a1->m_pTGAInfo->width )
{
for ( i = 0; ; ++i )
{
m_pTGAInfo = a1->m_pTGAInfo;
if ( i >= m_pTGAInfo->height )
break;
if ( v3 < a1->m_nItemsToRender )
{
v7 = (int)&m_pTGAInfo->imageData[3 * (_DWORD)&v1[m_pTGAInfo->width * i]];
v8 = *(_WORD *)v7;
LOBYTE(v7) = *(_BYTE *)(v7 + 2);
*(_WORD *)&v15.r = v8;
v15.b = v7;
if ( (_BYTE)v8 )
{
v14 = v4;
cocos2d::CCPoint::CCPoint(&v16, (float)(int)v1, (float)i);
cocos2d::CCTileMapAtlas::updateAtlasValueAt(a1, &v16, &v15, v3);
v13 = cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%d,%d", v1, i, v9);
v10 = (cocos2d::CCObject *)operator new(0x38u);
cocos2d::CCObject::CCObject(v10);
v10[1].__vftable = (cocos2d::CCObject_vtbl *)v3++;
v10->__vftable = (cocos2d::CCObject_vtbl *)&off_A45350;
cocos2d::CCObject::autorelease(v10);
m_pPosToAtlasIndex = a1->m_pPosToAtlasIndex;
CString = (char *)cocos2d::CCString::getCString(v13);
sub_776584((int)&v16, CString);
cocos2d::CCDictionary::setObject((int)m_pPosToAtlasIndex, v10, (const char **)&v16);
sub_774008(&v16);
v4 = v14;
}
}
}
++v1;
}
}