//
// cocos2d::CCLayerColor::initWithColor from 0x5cf730 to 0x5cf7f8 (200 bytes)
//
// 5 xrefs:
// > CCContentLayer::create @ 0x2e5372
// > BoomListLayer::init @ 0x2f5e7c
// > GJListLayer::init @ 0x40bc6c
// > GJCommentListLayer::init @ 0x4ab8f2
// > ParticlePreviewLayer::init @ 0x53257e
//
// 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::CCLayerColor::initWithColor(cocos2d::CCLayerColor *a1, const cocos2d::ccColor4B *a2, float a3, float a4)
{
GLubyte r; // r3
GLubyte g; // r3
GLubyte b; // r3
GLubyte a; // r3
void (__fastcall *setContentSize)(cocos2d::CCLayerColor *__hidden, const cocos2d::CCSize *); // r9
void (__fastcall *setShaderProgram)(cocos2d::CCNode *__hidden, cocos2d::CCGLProgram *); // r5
cocos2d::CCShaderCache *v14; // r0
cocos2d::CCGLProgram *v15; // r0
cocos2d::CCSize v17; // [sp+4h] [bp-10h] BYREF
if ( cocos2d::CCLayer::init(a1) )
{
a1->m_tBlendFunc.src = 770;
a1->m_tBlendFunc.dst = 771;
r = a2->r;
a1->_realColor.r = a2->r;
a1->_displayedColor.r = r;
g = a2->g;
a1->_realColor.g = g;
a1->_displayedColor.g = g;
b = a2->b;
a1->_realColor.b = b;
a1->_displayedColor.b = b;
a = a2->a;
a1->_realOpacity = a;
a1->_displayedOpacity = a;
a1->m_pSquareVertices[1].x = 0.0;
a1->m_pSquareVertices[1].y = 0.0;
a1->m_pSquareVertices[2].x = 0.0;
a1->m_pSquareVertices[2].y = 0.0;
a1->m_pSquareVertices[3].x = 0.0;
a1->m_pSquareVertices[3].y = 0.0;
a1->m_pSquareVertices[0].x = 0.0;
a1->m_pSquareVertices[0].y = 0.0;
a1->updateColor(a1);
setContentSize = a1->setContentSize;
cocos2d::CCSize::CCSize(&v17, a3, a4);
setContentSize(a1, &v17);
setShaderProgram = a1->setShaderProgram;
v14 = cocos2d::CCShaderCache::sharedShaderCache();
v15 = cocos2d::CCShaderCache::programForKey(v14, "ShaderPositionColor");
setShaderProgram(a1, v15);
}
return 1;
}