//
// cocos2d::CCTileMapAtlas::initWithTileFile from 0x1800aea50 to 0x1800aeb37 (231 bytes)
//
// 3 xrefs:
// > cocos2d::CCTileMapAtlas::create @ 0x1800ae9d6
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c2310
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:22:18 +0000
//
// Hidden C++ exception states: #wind=1
char __fastcall cocos2d::CCTileMapAtlas::initWithTileFile(
cocos2d::CCTileMapAtlas *this,
const char *a2,
const char *a3,
int a4,
unsigned int a5)
{
cocos2d::CCDictionary *v8; // rax
__int64 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, *((_DWORD *)this + 106)) )
return 0;
v8 = (cocos2d::CCDictionary *)sub_1800E4AC0(0x48u);
v12 = v8;
if ( v8 )
v8 = cocos2d::CCDictionary::CCDictionary(v8);
*((_QWORD *)this + 52) = v8;
(*(void (__fastcall **)(cocos2d::CCTileMapAtlas *))(*(_QWORD *)this + 920LL))(this);
v9 = *(_QWORD *)this;
v10 = kmVec2Fill(
(float *)&v12,
(float)(*((_DWORD *)this + 90) * *(__int16 *)(*((_QWORD *)this + 51) + 6LL)),
(float)(*((_DWORD *)this + 91) * *(__int16 *)(*((_QWORD *)this + 51) + 8LL)));
(*(void (__fastcall **)(cocos2d::CCTileMapAtlas *, float *))(v9 + 312))(this, v10);
return 1;
}