//
// AchievementNotifier::showNextAchievement from 0x642d08 to 0x642e40 (312 bytes)
//
// 3 xrefs:
// > AchievementNotifier::notifyAchievement @ 0x642e98
// > AchievementNotifier::achievementDisplayFinished @ 0x642edc
// > ??> @ 0xbf698
//
// 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:50:18 +0000
//
__int64 __fastcall AchievementNotifier::showNextAchievement(cocos2d::CCArray **this)
{
FMODAudioEngine *v2; // x0
__int64 v4; // x0
cocos2d::CCArray *v5; // x0
cocos2d::CCObject *v6; // x0
__int64 v7; // x0
void *v8[3]; // [xsp+30h] [xbp+30h] BYREF
v2 = (FMODAudioEngine *)cocos2d::CCArray::count(*(this + 41));
if ( (_DWORD)v2 )
{
v4 = FMODAudioEngine::sharedEngine(v2);
BYTE1(v8[2]) = 0;
WORD1(v8[2]) = 0;
HIDWORD(v8[2]) = 0;
strcpy((char *)v8, "$achievement_01.");
FMODAudioEngine::playEffect(v4, (float)((float)dword_155A568 * 0.05) + 1.0, 0.0, 0.3);
if ( ((__int64)v8[0] & 1) != 0 )
operator delete(v8[2]);
v5 = *(this + 41);
++dword_155A568;
v6 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(v5, 0);
*(this + 42) = v6;
cocos2d::CCObject::retain(v6);
cocos2d::CCArray::removeObjectAtIndex(*(this + 41), 0, 1);
v7 = (__int64)*(this + 40);
if ( v7 )
*((_QWORD *)*(this + 42) + 45) = v7;
AchievementBar::show(*(this + 42));
}
else
{
dword_155A568 = 0;
}
return _stack_chk_guard;
}