//
// GJBaseGameLayer::countCollectedUserCoins from 0x100129510 to 0x10012955d (77 bytes)
//
// 1 xrefs:
// > PlayLayer::levelComplete @ 0x1000b39c5
//
// 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
//
int __fastcall GJBaseGameLayer::countCollectedUserCoins(GJBaseGameLayer *a1)
{
cocos2d::CCDictionary *m_collectedItems; // rax
int v2; // ebx
cocos2d::CCDictElement *m_pElements; // r14
cocos2d::CCObject *m_pObject; // rdi
m_collectedItems = a1->m_collectedItems;
v2 = 0;
if ( m_collectedItems )
{
m_pElements = m_collectedItems->m_pElements;
if ( m_pElements )
{
v2 = 0;
do
{
m_pObject = m_pElements->m_pObject;
m_pElements = (cocos2d::CCDictElement *)m_pElements->hh.next;
v2 += ((__int64 (__fastcall *)(cocos2d::CCObject *))m_pObject->__vftable[22].isEqual)(m_pObject) == 31;
}
while ( m_pElements );
}
}
return v2;
}