//
// CurrencyRewardLayer::incrementDiamondsCount from 0x100321864 to 0x100321950 (236 bytes)
//
// 1 xrefs:
// > CurrencyRewardLayer::update @ 0x100321388
//
// 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 CurrencyRewardLayer::incrementDiamondsCount(CurrencyRewardLayer *a1, int a2)
{
cocos2d::CCLabelBMFont *m_diamondsLabel; // x19
__int128 v4; // kr00_16
unsigned int m_diamonds; // [xsp+Ch] [xbp-244h] BYREF
__int128 v6; // [xsp+10h] [xbp-240h] BYREF
void *__p; // [xsp+20h] [xbp-230h]
_BYTE v8[512]; // [xsp+28h] [xbp-228h] BYREF
if ( a1->m_diamondsLabel )
{
a1->m_diamonds += a2;
CurrencyRewardLayer::pulseSprite(a1, a1->m_diamondsSprite);
v6 = xmmword_1006350E0;
__p = v8;
m_diamonds = a1->m_diamonds;
sub_100009A40((int)&v6, m_diamonds, (int)&m_diamonds);
m_diamondsLabel = a1->m_diamondsLabel;
v4 = v6;
if ( *((_QWORD *)&v6 + 1) < (unsigned __int64)(v6 + 1) )
sub_100009ED4((__int64)&v6, v6 + 1);
*((_BYTE *)__p + v4) = 0;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))m_diamondsLabel->setString)(m_diamondsLabel, __p);
if ( __p != v8 )
{
if ( __p )
operator delete[](__p);
}
}
}