//
// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x1004a7780 to 0x1004a7854 (212 bytes)
//
// 3 xrefs:
// > cocos2d::CCAtlasNode::draw @ 0x1003165fe
// > cocos2d::CCTextureAtlas::drawQuads @ 0x1004a777a
// > cocos2d::CCTextureAtlas::drawNumberOfQuads_1 @ 0x1004a7867
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:30:55 +0000
//
void __fastcall cocos2d::CCTextureAtlas::drawNumberOfQuads(__int64 a1, int a2, int a3)
{
GLuint v4; // eax
void *v5; // rax
if ( a2 )
{
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 88) + 104LL))(*(_QWORD *)(a1 + 88));
cocos2d::ccGLBindTexture2D(v4);
if ( *(_BYTE *)(a1 + 76) == 1 )
{
glBindBuffer(0x8892u, *(_DWORD *)(a1 + 68));
glBufferData(0x8892u, 96LL * (unsigned int)(a2 - a3), nullptr, 0x88E8u);
v5 = glMapBuffer(0x8892u, 0x88B9u);
memcpy(v5, *(const void **)(a1 + 96), 96LL * (unsigned int)(a2 - a3));
glUnmapBuffer(0x8892u);
glBindBuffer(0x8892u, 0);
*(_BYTE *)(a1 + 76) = 0;
}
cocos2d::ccGLBindVAO(*(_DWORD *)(a1 + 64));
glDrawElements(4u, 6 * a2, 0x1403u, (const GLvoid *)(2LL * (unsigned int)(6 * a3)));
++dword_100BE8BE8;
}
}