//
// CCSpriteWithHue::draw from 0x5bca40 to 0x5bcbd0 (400 bytes)
//
// 3 xrefs:
// > ??> @ 0x709c8
// > ??> @ 0x1144cc8
// > ??> @ 0x1145268
//
// 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
//
void CCSpriteWithHue::draw(CCSpriteWithHue *a1)
{
cocos2d::CCGLProgram *v2; // x0
cocos2d::CCGLProgram *v3; // x0
unsigned int v4; // w0
cocos2d::CCGLProgram *v5; // x0
cocos2d::CCGLProgram *v6; // x20
float Alpha; // s0
cocos2d::CCGLProgram *v8; // x0
int m_uAlphaLoc; // [xsp+28h] [xbp+28h]
if ( !a1->m_bDontDraw )
{
if ( a1->_realOpacity )
{
cocos2d::ccGLEnable(a1->m_eGLServerState);
a1->getShaderProgram(a1);
v2 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::use(v2);
v3 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
cocos2d::ccGLBlendFunc(a1->m_sBlendFunc.src, a1->m_sBlendFunc.dst);
v4 = a1->m_pobTexture->getName(a1->m_pobTexture);
cocos2d::ccGLBindTexture2D(v4);
cocos2d::ccGLEnableVertexAttribs((unsigned int)&byte_7);
v5 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::setUniformLocationWithMatrix3fv(v5, a1->m_uHueLoc, (float *)&a1->m_colorMatrix, 1u);
v6 = a1->getShaderProgram(a1);
m_uAlphaLoc = a1->m_uAlphaLoc;
Alpha = CCSpriteWithHue::getAlpha(a1);
cocos2d::CCGLProgram::setUniformLocationWith1f(v6, m_uAlphaLoc, Alpha);
v8 = a1->getShaderProgram(a1);
cocos2d::CCGLProgram::setUniformLocationWith3f(
v8,
a1->m_uLumLoc,
a1->m_luminance.__elems_[0],
a1->m_luminance.__elems_[1],
a1->m_luminance.__elems_[2]);
glVertexAttribPointer();
glVertexAttribPointer();
glVertexAttribPointer();
glDrawArrays();
++g_uNumberOfDraws;
}
}
}