//
// cocos2d::CCComponentContainer::add from 0x5f29a0 to 0x5f2a5a (186 bytes)
//
// 0 xrefs:
//
// 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
//
bool cocos2d::CCComponentContainer::add(cocos2d::CCComponentContainer *a1, cocos2d::CCComponent *a2)
{
cocos2d::CCDictionary *v4; // r0
cocos2d::CCDictionary *m_pComponents; // r7
char *Name; // r0
void *v7; // r0
void *v8; // r7
cocos2d::CCDictionary *v9; // r6
char *v10; // r0
int v11; // r1
const char *v13; // [sp+8h] [bp-Ch] BYREF
cocos2d::CCComponent::getOwner(a2);
if ( !a1->m_pComponents )
{
v4 = cocos2d::CCDictionary::create();
a1->m_pComponents = v4;
cocos2d::CCObject::retain(v4);
}
m_pComponents = a1->m_pComponents;
Name = (char *)cocos2d::CCComponent::getName(a2);
sub_776584((int)&v13, Name);
v7 = (void *)cocos2d::CCDictionary::objectForKey((int)m_pComponents, &v13);
v8 = v7;
if ( v7 )
v8 = _dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCComponent,
0);
sub_774008(&v13);
if ( v8 )
return 0;
cocos2d::CCComponent::setOwner(a2, a1->m_pOwner);
v9 = a1->m_pComponents;
v10 = (char *)cocos2d::CCComponent::getName(a2);
sub_776584((int)&v13, v10);
cocos2d::CCDictionary::setObject((int)v9, a2, &v13);
v11 = (unsigned __int64)sub_774008(&v13) >> 32;
((void (__fastcall *)(cocos2d::CCComponent *, int))a2->onEnter)(a2, v11);
return 1;
}