//
// cocos2d::CCTextureAtlas::drawNumberOfQuads from 0x8005cc to 0x80069a (206 bytes)
//
// 3 xrefs:
// > cocos2d::CCAtlasNode::draw @ 0x7c2f82
// > cocos2d::CCTextureAtlas::drawQuads @ 0x8006a4
// > cocos2d::CCTextureAtlas::drawNumberOfQuads @ 0x8006aa
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:19 +0000
//
int __fastcall cocos2d::CCTextureAtlas::drawNumberOfQuads(int this, unsigned int a2, unsigned int a3)
{
int v3; // r5
__int64 v6; // r0
unsigned int v7; // r2
unsigned int v8; // r1
v3 = this;
if ( a2 )
{
v6 = ((__int64 (__fastcall *)(_DWORD))*(_DWORD *)(**(_DWORD **)(this + 76) + 52))(*(_DWORD *)(this + 76));
cocos2d::ccGLBindTexture2D((cocos2d *)v6, HIDWORD(v6), v7);
glBindBuffer();
if ( *(_BYTE *)(v3 + 64) )
{
glBufferSubData();
*(_BYTE *)(v3 + 64) = 0;
}
cocos2d::ccGLEnableVertexAttribs((unsigned int)&byte_7, v8);
glVertexAttribPointer();
glVertexAttribPointer();
glVertexAttribPointer();
glBindBuffer();
glDrawElements(4u, 6 * a2, 0x1403u, (const GLvoid *)(12 * a3));
glBindBuffer();
this = glBindBuffer();
++g_uNumberOfDraws;
}
return this;
}