//
// cocos2d::CCSpriteBatchNode::updateQuadFromSprite from 0x1001781b0 to 0x100178285 (213 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall cocos2d::CCSpriteBatchNode::updateQuadFromSprite(
cocos2d::CCSpriteBatchNode *a1,
cocos2d::CCSprite *a2,
unsigned int a3)
{
int v4; // r12d
unsigned int v5; // r12d
while ( 1 )
{
if ( ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getCapacity)(a1->m_pobTextureAtlas) > a3 )
{
v4 = ((__int64 (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getCapacity)(a1->m_pobTextureAtlas);
if ( v4 != ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getTotalQuads)(a1->m_pobTextureAtlas) )
break;
}
v5 = (4
* ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getCapacity)(a1->m_pobTextureAtlas)
+ 4)
/ 3;
if ( ((unsigned int (__fastcall *)(cocos2d::CCTextureAtlas *))a1->m_pobTextureAtlas->getCapacity)(a1->m_pobTextureAtlas) < v5 )
cocos2d::CCTextureAtlas::resizeCapacity(a1->m_pobTextureAtlas, v5);
}
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteBatchNode *))a2->setBatchNode)(a2, a1);
a2->m_uAtlasIndex = a3;
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a2->setDirty)(a2, 1);
((void (__fastcall *)(cocos2d::CCSprite *))a2->updateTransform)(a2);
}