//
// EnhancedGameObject::updateUserCoin from 0x1401a68f0 to 0x1401a6a6b (379 bytes)
//
// 3 xrefs:
// > GameObject::objectFromVector @ 0x14019e4a1
// > PlayLayer::createObjectsFromSetupFinished @ 0x1403ad967
// > ??> @ 0x1406cc0b4
//
// 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
//
// Hidden C++ exception states: #wind=1
void EnhancedGameObject::updateUserCoin(EnhancedGameObject *a1)
{
float v1; // xmm0_4
__int64 v3; // rcx
bool hasUniqueCoin; // al
cocos2d::CCParticleSystemQuad *v5; // rax
cocos2d::CCParticleSystemQuad *v6; // rdi
GLfloat a; // xmm1_4
GLfloat v8; // xmm1_4
__int64 v9; // rax
__int64 v10; // [rsp+30h] [rbp-28h] BYREF
int v11; // [rsp+38h] [rbp-20h]
GLfloat v12; // [rsp+3Ch] [rbp-1Ch]
if ( !a1->m_editorEnabled )
{
v3 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v10 = (__int64)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00(v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v3 = qword_1406C2ED8;
}
hasUniqueCoin = GJBaseGameLayer::hasUniqueCoin(*(GJBaseGameLayer **)(v3 + 520), (EffectGameObject *)a1);
a1->m_hasUniqueCoin = hasUniqueCoin;
if ( !hasUniqueCoin )
{
v5 = GameObject::createAndAddParticle(a1, a1->m_objectType, "coinEffect.plist", 0, kCCPositionTypeGrouped);
v6 = v5;
if ( v5 )
{
if ( a1->m_objectID != 142 )
{
a = v5->getStartColor(v5)->a;
v10 = 0x3F8000003F800000LL;
v11 = 1065353216;
v12 = a;
v6->setStartColor(v6, (const cocos2d::ccColor4F *)&v10);
v8 = v6->getEndColor(v6)->a;
v10 = 0x3F0000003F000000LL;
v11 = 1056964608;
v12 = v8;
v1 = ((float (__fastcall *)(cocos2d::CCParticleSystemQuad *, __int64 *))v6->setEndColor)(v6, &v10);
}
}
cocos2d::CCPoint::CCPoint(v1, 0.0);
cocos2d::CCPoint::operator=(&a1->m_particleOffset, v9);
}
}
}