//
// CreateParticlePopup::onSelectParticleTexture from 0x100474a40 to 0x100474b66 (294 bytes)
//
// 1 xrefs:
// > CreateParticlePopup::init @ 0x1004728e5
//
// 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 __fastcall CreateParticlePopup::onSelectParticleTexture(CreateParticlePopup *a1, cocos2d::CCObject *a2)
{
int v2; // ecx
int v3; // eax
cocos2d::CCParticleSystemQuad *m_particle; // r15
cocos2d::CCSpriteFrameCache *v5; // r12
cocos2d::CCString *v6; // rax
const char *CString; // rax
cocos2d::CCSpriteFrame *v8; // rax
cocos2d::CCSprite *m_selectSprite; // r14
const cocos2d::CCPoint *v10; // r15
const cocos2d::CCPoint *v11; // r12
char v12; // [rsp+0h] [rbp-30h] BYREF
char v13; // [rsp+8h] [rbp-28h] BYREF
double v14; // 0:xmm0_8.8
if ( ((int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) <= 0
|| (v2 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2), v3 = 212, v2 <= 212) )
{
if ( ((int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) <= 0 )
v3 = 0;
else
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
}
a1->m_particleIndex = v3;
m_particle = a1->m_particle;
v5 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v6 = (cocos2d::CCString *)sub_1007AB580("particle_%02d_001.png", v12);
CString = cocos2d::CCString::getCString(v6);
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v5, CString);
cocos2d::CCParticleSystemQuad::setDisplayFrame(m_particle, v8);
CreateParticlePopup::updateParticleValueForType(a1, (float)a1->m_particleIndex, ParticleIdx, nullptr);
m_selectSprite = a1->m_selectSprite;
v10 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCSprite *))m_selectSprite->getParent)(m_selectSprite);
v11 = (const cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCObject *))a2->__vftable[6].~CCObject_0)(a2);
((void (__fastcall *)(cocos2d::CCObject *))a2->__vftable[2].acceptVisitor)(a2);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v13, v11);
*(cocos2d::CCPoint *)&v14 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v12, v10);
((void (__fastcall *)(cocos2d::CCSprite *, char *, double))m_selectSprite->setPosition)(m_selectSprite, &v12, v14);
}