//
// cocos2d::CCGLProgram::setUniformsForBuiltins from 0x100135d60 to 0x100135eec (396 bytes)
//
// 15 xrefs:
// > cocos2d::CCDrawNode::draw @ 0x1000420d8
// > cocos2d::CCLayerColor::draw @ 0x100149cf4
// > cocos2d::CCMotionStreak::draw @ 0x100177564
// > CCSpriteWithHue::draw @ 0x1001a3c8c
// > cocos2d::CCSpriteBatchNode::draw @ 0x1001d7c10
// > cocos2d::CCSprite::draw @ 0x1002385ac
// > cocos2d::ccDrawLines @ 0x10024c28c
// > cocos2d::ccDrawLine @ 0x10024c360
// > cocos2d::ccDrawSolidPoly @ 0x10024c4f4
// > cocos2d::ccDrawCircle @ 0x10024c668
// > cocos2d::ccDrawCircleSegment @ 0x10024c800
// > cocos2d::ccDrawFilledCircle @ 0x10024c960
// > cocos2d::CCParticleSystemQuad::draw @ 0x100253dbc
// > ShaderLayer::visit @ 0x100273274
// > cocos2d::CCProgressTimer::draw @ 0x1003fe41c
//
// 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 __fastcall cocos2d::CCGLProgram::setUniformsForBuiltins(cocos2d::CCGLProgram *a1)
{
cocos2d::CCDirector *v2; // x0
unsigned __int64 v3; // d0
float v4; // s8
int v5; // w20
int v6; // w20
float v7; // s8
float v8; // s9
float v9; // s10
unsigned int v10; // w0
float v11[16]; // [xsp+0h] [xbp-100h] BYREF
float v12[16]; // [xsp+40h] [xbp-C0h] BYREF
float v13[16]; // [xsp+80h] [xbp-80h] BYREF
__float2 v14; // 0:kr00_8.8
sub_100168698(5889, v13);
sub_100168698(5888, v12);
sub_1003B2DA0(v11, v13, v12);
cocos2d::CCGLProgram::setUniformLocationWithMatrix4fv(a1, a1->m_uUniforms[0], v13, 1u);
cocos2d::CCGLProgram::setUniformLocationWithMatrix4fv(a1, a1->m_uUniforms[1], v12, 1u);
cocos2d::CCGLProgram::setUniformLocationWithMatrix4fv(a1, a1->m_uUniforms[2], v11, 1u);
if ( a1->m_bUsesTime )
{
v2 = cocos2d::CCDirector::sharedDirector();
LODWORD(v3) = v2->m_uTotalFrames;
v4 = v2->m_dAnimationInterval * (double)v3;
cocos2d::CCGLProgram::setUniformLocationWith4f(a1, a1->m_uUniforms[3], v4 / 10.0, v4, v4 + v4, v4 * 4.0);
v5 = a1->m_uUniforms[4];
v14 = __sincosf_stret(v4);
cocos2d::CCGLProgram::setUniformLocationWith4f(a1, v5, v4 * 0.125, v4 * 0.25, v4 * 0.5, v14.__sinval);
cocos2d::CCGLProgram::setUniformLocationWith4f(
a1,
a1->m_uUniforms[5],
v4 * 0.125,
v4 * 0.25,
v4 * 0.5,
v14.__cosval);
}
v6 = a1->m_uUniforms[6];
if ( v6 != -1 )
{
v7 = vcvts_n_f32_s32(rand(), 0x1Fu);
v8 = vcvts_n_f32_s32(rand(), 0x1Fu);
v9 = vcvts_n_f32_s32(rand(), 0x1Fu);
v10 = rand();
cocos2d::CCGLProgram::setUniformLocationWith4f(a1, v6, v7, v8, v9, vcvts_n_f32_s32(v10, 0x1Fu));
}
}