//
// ShaderLayer::init from 0x1003ca680 to 0x1003ca73b (187 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092ef50
//
// 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 ShaderLayer::init(ShaderLayer *a1)
{
bool result; // al
bool v2; // r14
GameManager *v3; // rax
double v4; // xmm0_8
result = cocos2d::CCLayer::init(a1);
if ( result )
{
v2 = result;
v3 = GameManager::sharedState();
ShaderLayer::setupShader(a1, v3->m_shouldResetShader);
v4 = (float)((float)((float)((float)rand() * 4.6566129e-10) * 100.0) + 10000.0);
a1->m_state.m_startTime = v4;
a1->m_state.m_time = v4;
if ( a1->m_state.m_minBlendingLayer == 1 )
{
if ( a1->m_state.m_maxBlendingLayer == 15 )
goto LABEL_4;
}
else
{
a1->m_state.m_minBlendingLayer = 1;
if ( a1->m_state.m_maxBlendingLayer == 15 )
{
LABEL_4:
result = v2;
if ( !a1->m_state.m_noPlayerParticles )
{
LABEL_6:
a1->m_state.m_zLayerDirty = 1;
return result;
}
LABEL_5:
a1->m_state.m_noPlayerParticles = 0;
goto LABEL_6;
}
}
a1->m_state.m_maxBlendingLayer = 15;
result = v2;
if ( !a1->m_state.m_noPlayerParticles )
goto LABEL_6;
goto LABEL_5;
}
return result;
}