//
// LevelEditorLayer::updatePreviewParticle from 0x368f40 to 0x368fc2 (130 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updatePreviewParticles @ 0x369020
// > LevelEditorLayer::addSpecial @ 0x370a96
//
// 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 LevelEditorLayer::updatePreviewParticle(LevelEditorLayer *a1, ParticleGameObject *a2)
{
ParticleGameObject_vtbl *v4; // r3
bool (__fastcall *isVisible)(cocos2d::CCNode *__hidden); // r3
float v6; // r1
ParticleGameObject *v7; // r0
void (__fastcall *unclaimParticle)(ParticleGameObject *__hidden); // r3
v4 = a2->EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( a1->m_previewParticles )
{
isVisible = v4->isVisible;
a2->m_notPreviewing = 0;
if ( ((int (__fastcall *)(ParticleGameObject *))isVisible)(a2) )
a2->claimParticle(a2);
if ( a1->m_hideParticleIcons )
{
v6 = 0.0;
}
else if ( a1->m_playbackMode == Playing )
{
v6 = 0.0;
}
else
{
v6 = 50.0;
}
v7 = a2;
}
else
{
unclaimParticle = v4->unclaimParticle;
a2->m_notPreviewing = 1;
unclaimParticle(a2);
v7 = a2;
if ( a1->m_playbackMode == Playing )
v6 = 0.0;
else
v6 = 255.0;
}
ParticleGameObject::updateParticlePreviewArtOpacity(v7, v6);
}