//
// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x10026a4e0 to 0x10026a5c8 (232 bytes)
//
// 1 xrefs:
// > cocos2d::CCTextureAtlas::drawQuads @ 0x10026a4dc
//
// 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 *a1,
unsigned int a2,
unsigned int a3)
{
unsigned int v6; // w0
void *v7; // x0
if ( a2 )
{
v6 = ((__int64 (__fastcall *)(cocos2d::CCTexture2D *))a1->m_pTexture->getName)(a1->m_pTexture);
cocos2d::ccGLBindTexture2D(v6);
if ( LOBYTE(a1->m_uTotalQuads) == 1 )
{
glBindBuffer(0x8892u, a1->m_pBuffersVBO[1]);
glBufferData(0x8892u, 96LL * (a2 - a3), nullptr, 0x88E8u);
v7 = (void *)glMapBufferOES(34962, 35001);
memcpy(v7, a1->m_pQuads, 96LL * (a2 - a3));
glUnmapBufferOES(34962);
glBindBuffer(0x8892u, 0);
LOBYTE(a1->m_uTotalQuads) = 0;
}
cocos2d::ccGLBindVAO(a1->m_pBuffersVBO[0]);
glDrawElements(4u, 6 * a2, 0x1403u, (const GLvoid *)(12LL * a3));
++dword_100885D50;
}
}