//
// GJDifficultySprite::updateFeatureState from 0xa2f004 to 0xa2f2e0 (732 bytes)
//
// 10 xrefs:
// > GJRateLevelLayer::onFeature @ 0x95073c
// > RateStarsLayer::onFeature @ 0x957368
// > GJDifficultySprite::updateFeatureStateFromLevel @ 0xa2f31c
// > GJDifficultySprite::updateFeatureStateFromLevel @ 0xa2f32c
// > GJDifficultySprite::updateFeatureStateFromLevel @ 0xa2f334
// > GJDifficultySprite::updateFeatureStateFromLevel @ 0xa2f33c
// > GJDifficultySprite::updateFeatureStateFromLevel @ 0xa2f348
// > SongUsagePopup::buildUsageGrid @ 0xc8c890
// > RateStarsModLayer::onFeature @ 0xcfc864
// > ??> @ 0xa6558
//
// This function is hookable on this platform (idp: arm, 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 12:59:46 +0000
//
__int64 __fastcall GJDifficultySprite::updateFeatureState(_DWORD *a1, int a2)
{
__int64 v3; // x2
const char *v5; // x1
int v6; // w0
cocos2d::CCSprite *v7; // x0
__int64 v8; // x21
void (__fastcall *v9)(__int64, _BYTE *); // x23
float v10; // s8
__int64 v11; // x0
cocos2d::CCParticleSystem *v12; // x21
void (__fastcall *v13)(cocos2d::CCParticleSystem *, _BYTE *); // x23
float v14; // s8
__int64 v15; // x0
int v16; // w20
_BYTE v17[8]; // [xsp+40h] [xbp+40h] BYREF
__int64 v18[2]; // [xsp+48h] [xbp+48h] BYREF
void *v19; // [xsp+58h] [xbp+58h]
__int64 v20[2]; // [xsp+60h] [xbp+60h] BYREF
void *v21; // [xsp+70h] [xbp+70h]
if ( a1[149] != a2 )
{
v3 = *(_QWORD *)a1;
a1[149] = a2;
(*(void (**)(void))(v3 + 576))();
if ( a1[149] )
{
v18[0] = 0;
v18[1] = 0;
v19 = nullptr;
std::string::__init(v18, "GJ_featuredCoin_001.png", 0x17u);
v6 = a1[149];
switch ( v6 )
{
case 4:
std::string::assign(v18, "GJ_epicCoin3_001.png");
break;
case 3:
std::string::assign(v18, "GJ_epicCoin2_001.png");
break;
case 2:
std::string::assign(v18, "GJ_epicCoin_001.png");
break;
}
if ( (v18[0] & 1) != 0 )
v7 = (cocos2d::CCSprite *)v19;
else
v7 = (cocos2d::CCSprite *)((char *)v18 + 1);
v8 = cocos2d::CCSprite::createWithSpriteFrameName(v7, v5);
(*(void (__fastcall **)(_DWORD *, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v8, 4294967294LL);
v9 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 184LL);
v10 = *(float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1) * 0.5;
v11 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v10, *(float *)(v11 + 4) * 0.5);
v9(v8, v17);
if ( a1[149] == 4 )
{
v20[0] = 0;
v20[1] = 0;
v21 = nullptr;
std::string::__init(
v20,
"30a-1a1.3a0.2a20a90a0a10a5a20a20a0a0a8a0a0a0a4a1a0a0a0a0a1a0a1a0a1a0a1a1a0a0a0a0a0.784314a0a1a0a1a0a0.27a0a0.2"
"7a0a0a0a0a0a0a0a0a2a1a0a0a0a0a0a0a0.25a0a0a0a0a0a0a0a0a0a0a0",
0xAAu);
v12 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString((__int64)v20, 0, 0);
(*(void (__fastcall **)(_DWORD *, cocos2d::CCParticleSystem *, __int64))(*(_QWORD *)a1 + 464LL))(
a1,
v12,
0xFFFFFFFFLL);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, float))(*(_QWORD *)v12 + 160LL))(v12, 0.9);
cocos2d::CCParticleSystem::resetSystem(v12);
v13 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _BYTE *))(*(_QWORD *)v12 + 184LL);
v14 = *(float *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1) * 0.5;
v15 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a1 + 328LL))(a1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v14, *(float *)(v15 + 4) * 0.5);
v13(v12, v17);
v16 = 5;
do
{
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, float))(*(_QWORD *)v12 + 40LL))(v12, 0.15);
--v16;
}
while ( v16 );
if ( (v20[0] & 1) != 0 )
operator delete(v21);
}
if ( (v18[0] & 1) != 0 )
operator delete(v19);
}
}
return _stack_chk_guard;
}