//
// cocos2d::CCTMXLayer::reusedTileWithRect from 0x1800accf0 to 0x1800acdac (188 bytes)
//
// 5 xrefs:
// > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abecf
// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac50f
// > cocos2d::CCTMXLayer::updateTileForGID @ 0x1800ad736
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b81cc
//
// 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
__int64 __fastcall cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCTMXLayer *this, struct cocos2d::CCRect *a2)
{
__int64 v4; // rcx
cocos2d::CCSprite *v5; // rax
cocos2d::CCSprite_vtbl *v6; // rbx
__int64 v7; // rax
v4 = *((_QWORD *)this + 58);
if ( v4 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 952LL))(v4, 0);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCRect *, _QWORD, cocos2d::CCSize *))(**((_QWORD **)this + 58)
+ 968LL))(
*((_QWORD *)this + 58),
a2,
0,
&a2->size);
}
else
{
v5 = (cocos2d::CCSprite *)operator new(0x258u);
if ( v5 )
v5 = cocos2d::CCSprite::CCSprite(v5);
*((_QWORD *)this + 58) = v5;
v6 = v5->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v7 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))this->m_pobTextureAtlas->getTexture)(this->m_pobTextureAtlas);
((void (__fastcall *)(_QWORD, __int64, struct cocos2d::CCRect *, _QWORD))v6->initWithTexture)(
*((_QWORD *)this + 58),
v7,
a2,
0);
}
(*(void (__fastcall **)(_QWORD, cocos2d::CCTMXLayer *))(**((_QWORD **)this + 58) + 952LL))(
*((_QWORD *)this + 58),
this);
return *((_QWORD *)this + 58);
}