//
// CreateParticlePopup::onSelectParticleTexture from 0x530fb4 to 0x531098 (228 bytes)
//
// 0 xrefs:
//
// 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 CreateParticlePopup::onSelectParticleTexture(CreateParticlePopup *a1, cocos2d::CCObject *a2)
{
int v4; // r0
cocos2d::CCParticleSystemQuad *m_particle; // r7
cocos2d::CCSpriteFrameCache *v6; // r8
cocos2d::CCString *v7; // r0
const char *CString; // r0
cocos2d::CCSpriteFrame *v9; // r0
cocos2d::CCSprite *m_selectSprite; // r5
void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8
cocos2d::CCNode *v12; // r9
cocos2d::CCNode *v13; // r10
const cocos2d::CCPoint *v14; // r0
cocos2d::CCPoint v15; // [sp+4h] [bp-14h] BYREF
cocos2d::CCPoint v16; // [sp+Ch] [bp-Ch] BYREF
if ( a2->getTag(a2) <= 0 || a2->getTag(a2) <= 212 )
{
if ( a2->getTag(a2) > 0 )
v4 = a2->getTag(a2);
else
v4 = 0;
}
else
{
v4 = 212;
}
a1->m_particleIndex = v4;
m_particle = a1->m_particle;
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"particle_%02d_001.png",
(const char *)a1->m_particleIndex);
CString = cocos2d::CCString::getCString(v7);
v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, CString);
cocos2d::CCParticleSystemQuad::setDisplayFrame(m_particle, v9);
CreateParticlePopup::updateParticleValueForType(a1, (float)a1->m_particleIndex, ParticleIdx, nullptr);
m_selectSprite = a1->m_selectSprite;
setPosition = m_selectSprite->setPosition;
v12 = m_selectSprite->getParent(m_selectSprite);
v13 = (cocos2d::CCNode *)((int (__fastcall *)(cocos2d::CCObject *))a2->__vftable[6].~CCObject_0)(a2);
v14 = (const cocos2d::CCPoint *)((int (__fastcall *)(cocos2d::CCObject *))a2->__vftable[2].acceptVisitor)(a2);
cocos2d::CCNode::convertToWorldSpace(&v15, v13, v14);
cocos2d::CCNode::convertToNodeSpace(&v16, v12, &v15);
setPosition(m_selectSprite, &v16);
}