//
// ParticleGameObject::updateParticle from 0x140642550 to 0x1406426ef (415 bytes)
//
// 5 xrefs:
// > CreateParticlePopup::onPasteSettings @ 0x1405c743f
// > CreateParticlePopup::onPasteSettings @ 0x1405c74c8
// > CreateParticlePopup::onClose @ 0x1405caafd
// > CreateParticlePopup::onClose @ 0x1405cab8c
// > ??> @ 0x1409310d0
//
// 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 11:35:35 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall ParticleGameObject::updateParticle(__int64 a1)
{
cocos2d::CCParticleSystem *v2; // rcx
struct cocos2d::CCParticleSystemQuad *v3; // rbx
bool v4; // al
int v5; // eax
__int64 v6; // rbx
__int64 v7; // rdx
double v8; // xmm0_8
float v9; // xmm6_4
__int64 v10; // rbx
__int64 v11; // rdx
unsigned int v12[66]; // [rsp+20h] [rbp-158h] BYREF
_BYTE v13[40]; // [rsp+128h] [rbp-50h] BYREF
v2 = *(cocos2d::CCParticleSystem **)(a1 + 776);
if ( v2 )
{
cocos2d::CCParticleSystem::stopSystem(v2);
v3 = *(struct cocos2d::CCParticleSystemQuad **)(a1 + 776);
if ( *(_QWORD *)(a1 + 1480) )
{
sub_14006BF90((__int64)v12);
GameToolbox::particleStringToStruct((__int64 *)(a1 + 1464), (__int64)v12);
GameToolbox::particleFromStruct(v12, v3, 0);
sub_14003D310((__int64)v13);
}
v4 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 776) + 912LL))(*(_QWORD *)(a1 + 776)) >= 0.0
|| *(_BYTE *)(a1 + 1433);
*(_BYTE *)(a1 + 1402) = v4;
v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 776) + 1520LL))(*(_QWORD *)(a1 + 776));
*(_BYTE *)(a1 + 828) = v5 != 2;
*(_BYTE *)(a1 + 1072) = v5 != 2;
if ( v5 != 2 )
{
v6 = *(_QWORD *)(a1 + 776);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 360LL))(a1);
ParticleGameObject::updateParticleAngle(a1, v7, v6);
}
if ( *(_BYTE *)(a1 + 828) )
{
v8 = (*(double (__fastcall **)(__int64))(*(_QWORD *)a1 + 128LL))(a1);
v9 = *(float *)&v8;
v10 = *(_QWORD *)(a1 + 776);
if ( v10 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 360LL))(a1);
ParticleGameObject::updateParticleAngle(a1, v11, v10);
cocos2d::CCParticleSystem::loadScaledDefaults(*(cocos2d::CCParticleSystem **)(a1 + 776), fabs(v9));
}
}
if ( *(_QWORD *)(a1 + 776) && (*(_BYTE *)(a1 + 817) || *(_BYTE *)(a1 + 1800)) )
GameObject::updateObjectEditorColor((_QWORD *)a1);
}
}