//
// cocos2d::CCTextureAtlas::createWithTexture from 0x1800a9d70 to 0x1800a9e3c (204 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1fa4
//
// 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:17 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCTextureAtlas *__fastcall cocos2d::CCTextureAtlas::createWithTexture(
struct cocos2d::CCTexture2D *a1,
unsigned int a2)
{
cocos2d::CCObject *v4; // rax
cocos2d::CCObject *v5; // rbx
cocos2d::CCTextureAtlas *(__fastcall *v7)(cocos2d::CCTextureAtlas *, char); // r8
v4 = (cocos2d::CCObject *)sub_1800E4AC0(0x70u);
v5 = v4;
if ( v4 )
{
cocos2d::CCObject::CCObject(v4);
*(_QWORD *)v5 = &cocos2d::CCTextureAtlas::`vftable';
*((_QWORD *)v5 + 7) = 0;
*((_BYTE *)v5 + 72) = 0;
*((_QWORD *)v5 + 11) = 0;
*((_QWORD *)v5 + 12) = 0;
*((_DWORD *)v5 + 26) = 0;
}
else
{
v5 = nullptr;
}
if ( v5 )
{
if ( cocos2d::CCTextureAtlas::initWithTexture(v5, a1, a2) )
{
cocos2d::CCObject::autorelease(v5);
return v5;
}
v7 = *(cocos2d::CCTextureAtlas *(__fastcall **)(cocos2d::CCTextureAtlas *, char))(*(_QWORD *)v5 + 8LL);
if ( v7 == sub_1800A9BF0 )
{
sub_1800A9BF0(v5, 1);
return nullptr;
}
v7(v5, 1);
}
return nullptr;
}