//
// cocos2d::CCLayerRGBA::init from 0x18004ff30 to 0x18004ffdb (171 bytes)
//
// 5 xrefs:
// > ??> @ 0x1800ed3f8
// > ??> @ 0x1801380f4
// > ??> @ 0x180138104
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b1efc
//
// 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 cocos2d::CCLayerRGBA::init(cocos2d::CCLayerRGBA *this)
{
cocos2d::CCDirector *v2; // rax
cocos2d::CCLayerRGBA_vtbl *v3; // rbx
struct cocos2d::CCSize WinSize; // rax
cocos2d::CCRGBAProtocol_vtbl *v5; // rax
v2 = cocos2d::CCDirector::sharedDirector();
if ( v2 )
{
v3 = this->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
WinSize = cocos2d::CCDirector::getWinSize(v2);
((void (__fastcall *)(cocos2d::CCLayerRGBA *, struct cocos2d::CCSize))v3->setContentSize)(this, WinSize);
*(_WORD *)&this->_realColor.r = -1;
*(_WORD *)&this->_displayedColor.r = -1;
this->_realColor.b = -1;
this->_displayedColor.b = -1;
v5 = this->cocos2d::CCRGBAProtocol::__vftable;
*(_WORD *)&this->m_bTouchEnabled = 0;
*(_WORD *)&this->_displayedOpacity = -1;
((void (__fastcall *)(cocos2d::CCRGBAProtocol *, _QWORD))v5->setCascadeOpacityEnabled)(
&this->cocos2d::CCRGBAProtocol,
0);
((void (__fastcall *)(cocos2d::CCRGBAProtocol *, _QWORD))this->setCascadeColorEnabled)(
&this->cocos2d::CCRGBAProtocol,
0);
LOBYTE(v2) = 1;
}
return (char)v2;
}