//
// cocos2d::CCTMXLayer::reusedTileWithRect from 0x5f7150 to 0x5f71c2 (114 bytes)
//
// 3 xrefs:
// > cocos2d::CCTMXLayer::insertTileForGID @ 0x5f79e2
// > cocos2d::CCTMXLayer::updateTileForGID @ 0x5f7b16
// > cocos2d::CCTMXLayer::appendTileForGID @ 0x5f7c28
//
// 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
//
cocos2d::CCSprite *cocos2d::CCTMXLayer::reusedTileWithRect(cocos2d::CCTMXLayer *a1, cocos2d::CCRect a2)
{
float m_fRotationY; // r5
float x; // r7
cocos2d::CCSprite *v5; // r6
cocos2d::CCSprite_vtbl *v6; // r3
cocos2d::CCTextureAtlas *m_pobTextureAtlas; // r0
bool (__fastcall *initWithTexture_1)(cocos2d::CCSprite *__hidden, cocos2d::CCTexture2D *, const cocos2d::CCRect *, bool); // r8
int v9; // r0
m_fRotationY = a1[1].m_fRotationY;
x = a2.origin.x;
if ( m_fRotationY == 0.0 )
{
v5 = (cocos2d::CCSprite *)operator new(0x1FCu);
cocos2d::CCSprite::CCSprite(v5);
v6 = v5->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
m_pobTextureAtlas = a1->m_pobTextureAtlas;
LODWORD(a1[1].m_fRotationY) = v5;
initWithTexture_1 = v6->initWithTexture_1;
v9 = (int)m_pobTextureAtlas->getTexture(m_pobTextureAtlas);
initWithTexture_1(v5, (cocos2d::CCTexture2D *)v9, (const cocos2d::CCRect *)LODWORD(x), 0);
}
else
{
(*(void (__fastcall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)LODWORD(m_fRotationY) + 552))(
LODWORD(a1[1].m_fRotationY),
0,
LODWORD(a2.origin.y));
(*(void (__fastcall **)(_DWORD, float, _DWORD, int))(*(_DWORD *)LODWORD(a1[1].m_fRotationY) + 564))(
LODWORD(a1[1].m_fRotationY),
COERCE_FLOAT(LODWORD(x)),
0,
LODWORD(x) + 8);
}
(*(void (__fastcall **)(_DWORD, cocos2d::CCTMXLayer *))(*(_DWORD *)LODWORD(a1[1].m_fRotationY) + 552))(
LODWORD(a1[1].m_fRotationY),
a1);
return (cocos2d::CCSprite *)LODWORD(a1[1].m_fRotationY);
}