//
// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x1800a6350 to 0x1800a64af (351 bytes)
//
// 5 xrefs:
// > cocos2d::CCAtlasNode::draw @ 0x180001b85
// > cocos2d::CCTextureAtlas::drawNumberOfQuads @ 0x1800a6343
// > cocos2d::CCTextureAtlas::drawQuads @ 0x1800a64b6
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b7d04
//
// 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::CCTextureAtlas::drawNumberOfQuads(
cocos2d::CCTextureAtlas *this,
unsigned int a2,
unsigned int a3)
{
__int64 v4; // rsi
__int64 v5; // rdi
unsigned int v6; // eax
if ( a2 )
{
v4 = a3;
v5 = a2;
v6 = ((__int64 (__fastcall *)(cocos2d::CCTexture2D *))this->m_pTexture->getName)(this->m_pTexture);
cocos2d::ccGLBindTexture2D((cocos2d *)v6);
_glewBindBuffer(34962, this->m_pBuffersVBO[0]);
if ( this->m_bDirty )
{
_glewBufferSubData(34962, 96 * v4, 96 * v5, &this->m_pQuads[v4]);
this->m_bDirty = 0;
}
cocos2d::ccGLEnableVertexAttribs((cocos2d *)7);
_glewVertexAttribPointer(0, 3, 5126);
_glewVertexAttribPointer(1, 4, 5121);
_glewVertexAttribPointer(2, 2, 5126);
_glewBindBuffer(34963, this->m_pBuffersVBO[1]);
glDrawElements(4u, 6 * v5, 0x1403u, (const GLvoid *)(2LL * (unsigned int)(6 * v4)));
_glewBindBuffer(34962, 0);
_glewBindBuffer(34963, 0);
++g_uNumberOfDraws;
}
}