//
// cocos2d::CCTileMapAtlas::initWithTileFile from 0x1800ab250 to 0x1800ab337 (231 bytes)
//
// 3 xrefs:
// > cocos2d::CCTileMapAtlas::create @ 0x1800ab1d6
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b804c
//
// 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
char __fastcall cocos2d::CCTileMapAtlas::initWithTileFile(
cocos2d::CCTileMapAtlas *this,
const char *a2,
const char *a3,
unsigned int a4,
unsigned int a5)
{
cocos2d::CCDictionary *v8; // rax
cocos2d::CCTileMapAtlas_vtbl *v9; // rbx
float *v10; // rax
cocos2d::CCDictionary *v12; // [rsp+40h] [rbp+8h] BYREF
cocos2d::CCTileMapAtlas::loadTGAfile(this, a3);
cocos2d::CCTileMapAtlas::calculateItemsToRender(this);
if ( !cocos2d::CCAtlasNode::initWithTileFile(this, a2, a4, a5, this->m_nItemsToRender) )
return 0;
v8 = (cocos2d::CCDictionary *)operator new(0x48u);
v12 = v8;
if ( v8 )
v8 = cocos2d::CCDictionary::CCDictionary(v8);
this->m_pPosToAtlasIndex = v8;
((void (__fastcall *)(cocos2d::CCTileMapAtlas *))this->updateAtlasValues)(this);
v9 = this->cocos2d::CCAtlasNode::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v10 = kmVec2Fill(
(float *)&v12,
(float)(this->m_uItemWidth * this->m_pTGAInfo->width),
(float)(this->m_uItemHeight * this->m_pTGAInfo->height));
((void (__fastcall *)(cocos2d::CCTileMapAtlas *, float *))v9->setContentSize)(this, v10);
return 1;
}