//
// cocos2d::CCParticleSystemQuad::draw from 0x18006a5e0 to 0x18006a762 (386 bytes)
//
// 14 xrefs:
// > ??> @ 0x1800fa9d0
// > ??> @ 0x1800fb040
// > ??> @ 0x1800fb6b0
// > ??> @ 0x1800fbd20
// > ??> @ 0x1800fc390
// > ??> @ 0x1800fca00
// > ??> @ 0x1800fd070
// > ??> @ 0x1800fd6e0
// > ??> @ 0x1800fdd50
// > ??> @ 0x1800fe3c0
// > ??> @ 0x1800fea30
// > ??> @ 0x1800ffd18
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b3ccc
//
// 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::CCParticleSystemQuad::draw(cocos2d::CCParticleSystemQuad *this, float a2)
{
cocos2d::CCGLProgram *v3; // rax
cocos2d::CCGLProgram *v4; // rax
unsigned int v5; // eax
unsigned int v6; // edx
unsigned int v7; // r8d
unsigned int v8; // edx
if ( this->m_pTexture )
{
if ( this->m_uParticleCount )
{
cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)(unsigned int)this->m_eGLServerState, a2);
((void (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);
v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);
cocos2d::CCGLProgram::use(v3);
v4 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCParticleSystemQuad *))this->getShaderProgram)(this);
cocos2d::CCGLProgram::setUniformsForBuiltins(v4);
v5 = ((__int64 (__fastcall *)(cocos2d::CCTexture2D *))this->m_pTexture->getName)(this->m_pTexture);
cocos2d::ccGLBindTexture2D((cocos2d *)v5, v6);
cocos2d::ccGLBlendFunc(this->m_tBlendFunc.src, this->m_tBlendFunc.dst, v7);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v8);
_glewBindBuffer(34962, this->m_pBuffersVBO[0]);
_glewVertexAttribPointer(0, 3, 5126);
_glewVertexAttribPointer(1, 4, 5121);
_glewVertexAttribPointer(2, 2, 5126);
_glewBindBuffer(34963, this->m_pBuffersVBO[1]);
glDrawElements(4u, 6 * this->cocos2d::CCParticleSystem::m_uParticleIdx, 0x1403u, nullptr);
_glewBindBuffer(34962, 0);
_glewBindBuffer(34963, 0);
++g_uNumberOfDraws;
}
}
}