//
// cocos2d::CCParticleSystemQuad::setTotalParticles from 0x7e6766 to 0x7e6842 (220 bytes)
//
// 0 xrefs:
//
// 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:00:54 +0000
//
void *__fastcall cocos2d::CCParticleSystemQuad::setTotalParticles(cocos2d::CCParticleSystemQuad *this, unsigned int a2)
{
size_t v4; // r11
size_t v5; // r10
size_t v6; // r9
void *v7; // r8
void *v8; // r7
void *result; // r0
int v10; // r3
unsigned int i; // r5
if ( a2 <= *((_DWORD *)this + 92) )
{
*((_DWORD *)this + 145) = a2;
return (void *)cocos2d::CCParticleSystem::resetSystem(this);
}
v4 = 148 * a2;
v5 = 96 * a2;
v6 = 12 * a2;
v7 = realloc(*((void **)this + 86), 148 * a2);
v8 = realloc(*((void **)this + 175), v5);
result = realloc(*((void **)this + 176), v6);
if ( v7 )
{
*((_DWORD *)this + 86) = v7;
if ( v8 )
{
if ( result )
{
*((_DWORD *)this + 176) = result;
*((_DWORD *)this + 175) = v8;
memset(v7, 0, v4);
memset(*((void **)this + 175), 0, v5);
memset(*((void **)this + 176), 0, v6);
v10 = *((_DWORD *)this + 89);
*((_DWORD *)this + 92) = a2;
*((_DWORD *)this + 145) = a2;
if ( v10 )
{
for ( i = 0; i < *((_DWORD *)this + 145); ++i )
*(_DWORD *)(*((_DWORD *)this + 86) + 148 * i + 72) = i;
}
cocos2d::CCParticleSystemQuad::initIndices((int)this);
cocos2d::CCParticleSystemQuad::setupVBO(this);
cocos2d::CCParticleSystemQuad::updateTexCoords(this);
return (void *)cocos2d::CCParticleSystem::resetSystem(this);
}
}
}
if ( v8 )
*((_DWORD *)this + 175) = v8;
if ( result )
*((_DWORD *)this + 176) = result;
return result;
}