//
// PlayLayer::getRelativeMod from 0x5ce030 to 0x5ce0a0 (112 bytes)
//
// 2 xrefs:
// > PlayLayer::updateVisibility @ 0x5ce7c4
// > ??> @ 0x56ee0
//
// 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
//
float PlayLayer::getRelativeMod(PlayLayer *a1, cocos2d::CCPoint a2, float a3, float a4, float a5)
{
float *v5; // x1
float x; // s6
float m_halfCameraWidth; // s3
float v8; // s5
float v9; // s3
float result; // s0
x = a1->m_gameState.m_cameraPosition2.x;
m_halfCameraWidth = a1->m_halfCameraWidth;
v8 = *v5;
if ( *v5 > (float)(m_halfCameraWidth + x) )
{
v9 = (float)(m_halfCameraWidth - (float)((float)((float)(v8 - a3) - x) - m_halfCameraWidth)) * a2.x;
if ( v9 >= 0.0 )
goto LABEL_3;
return 0.0;
}
v9 = (float)(m_halfCameraWidth - (float)((float)((float)(m_halfCameraWidth + x) - v8) - a3)) * a2.y;
if ( v9 < 0.0 )
return 0.0;
LABEL_3:
result = 1.0;
if ( v9 <= 1.0 )
return v9;
return result;
}