//
// GJMapObject::init from 0x100266b20 to 0x100266c19 (249 bytes)
//
// 1 xrefs:
// > GJMapObject::create @ 0x100266ac0
//
// 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 __fastcall GJMapObject::init(GJMapObject *a1, cocos2d::CCNode *a2)
{
cocos2d::CCSprite *v2; // rax
cocos2d::CCSprite *m_shadowSprite; // rbx
_BYTE v5[32]; // [rsp-20h] [rbp-20h] BYREF
if ( !a2 )
return 0;
if ( !cocos2d::CCNode::init(a1) )
return 0;
a1->m_mainNode = a2;
cocos2d::CCObject::retain(a2);
((void (__fastcall *)(GJMapObject *, cocos2d::CCNode *, __int64))a1->addChild_0)(a1, a1->m_mainNode, 2);
v2 = cocos2d::CCSprite::createWithSpriteFrameName("chest_shadow_001.png");
a1->m_shadowSprite = v2;
((void (__fastcall *)(GJMapObject *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v2, 1);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_shadowSprite->setScaleX)(a1->m_shadowSprite, 0.16);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_shadowSprite->setScaleY)(a1->m_shadowSprite, 0.44999999);
((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_shadowSprite->setOpacity)(a1->m_shadowSprite, 50);
m_shadowSprite = a1->m_shadowSprite;
sub_10028CBE0(v5, 0.0, -9.0);
((void (__fastcall *)(cocos2d::CCSprite *, _BYTE *))m_shadowSprite->setPosition)(m_shadowSprite, v5);
return 1;
}