//
// cocos2d::CCParticleGalaxy::initWithTotalParticles from 0x10047a260 to 0x10047a43e (478 bytes)
//
// 3 xrefs:
// > cocos2d::CCParticleGalaxy::create @ 0x10047a19c
// > cocos2d::CCParticleGalaxy::createWithTotalParticles @ 0x10047a21d
// > ??> @ 0x100b490e0
//
// 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:37 +0000
//
__int64 __fastcall cocos2d::CCParticleGalaxy::initWithTotalParticles(_QWORD *a1, __int64 a2)
{
__int64 result; // rax
unsigned int v3; // r15d
__int64 v4; // rax
__int64 v5; // rax
float v6; // [rsp+8h] [rbp-28h] BYREF
_QWORD v7[4]; // [rsp+10h] [rbp-20h] BYREF
result = cocos2d::CCParticleSystemQuad::initWithTotalParticles(a1, a2, 0);
if ( (_BYTE)result )
{
v3 = result;
*((_DWORD *)a1 + 115) = -1082130432;
(*(void (__fastcall **)(_QWORD *, _QWORD))(*a1 + 1600LL))(a1, 0);
sub_100278250((float *)v7, 0.0, 0.0);
(*(void (__fastcall **)(_QWORD *, _QWORD *))(*a1 + 1048LL))(a1, v7);
(*(void (__fastcall **)(_QWORD *, float))(*a1 + 1064LL))(a1, 60.0);
(*(void (__fastcall **)(_QWORD *, float))(*a1 + 1080LL))(a1, 10.0);
(*(void (__fastcall **)(_QWORD *, float))(*a1 + 1128LL))(a1, -80.0);
(*(void (__fastcall **)(_QWORD *, double))(*a1 + 1144LL))(a1, 0.0);
(*(void (__fastcall **)(_QWORD *, float))(*a1 + 1096LL))(a1, 80.0);
(*(void (__fastcall **)(_QWORD *, double))(*a1 + 1112LL))(a1, 0.0);
a1[61] = 0x43B4000042B40000LL;
v4 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v7, v4);
sub_100278250(&v6, *(float *)v7 * 0.5, 0.5 * *((float *)v7 + 1));
(*(void (__fastcall **)(_QWORD *, float *))(*a1 + 184LL))(a1, &v6);
(*(void (__fastcall **)(_QWORD *, void *))(*a1 + 960LL))(a1, &unk_100BE3D70);
a1[60] = 0x3F80000040800000LL;
a1[70] = 0x4120000042140000LL;
*((_DWORD *)a1 + 142) = -1082130432;
*((float *)a1 + 164) = (float)*((int *)a1 + 165) * 0.25;
*((_OWORD *)a1 + 36) = xmmword_100A0B280;
*((_OWORD *)a1 + 37) = 0;
*(_OWORD *)((char *)a1 + 604) = 0;
*((_DWORD *)a1 + 155) = 1065353216;
*((_OWORD *)a1 + 39) = 0;
v5 = sub_100479B90((__int64)a1);
if ( v5 )
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1520LL))(a1, v5);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1280LL))(a1, 1);
return v3;
}
return result;
}