//
// cocos2d::CCDrawNode::ensureCapacity from 0x180015260 to 0x1800152ae (78 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ae494
//
// 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::CCDrawNode::ensureCapacity(cocos2d::CCDrawNode *this, unsigned int a2)
{
unsigned int m_uBufferCapacity; // ecx
__int64 v4; // rax
cocos2d::ccV2F_C4B_T2F *m_pBuffer; // rcx
m_uBufferCapacity = this->m_uBufferCapacity;
if ( a2 + this->m_nBufferCount > m_uBufferCapacity )
{
if ( m_uBufferCapacity > a2 )
a2 = m_uBufferCapacity;
v4 = m_uBufferCapacity + a2;
m_pBuffer = this->m_pBuffer;
this->m_uBufferCapacity = v4;
this->m_pBuffer = (cocos2d::ccV2F_C4B_T2F *)realloc(m_pBuffer, 20 * v4);
}
}