//
// LevelSelectLayer::getColorValue from 0x409244 to 0x409374 (304 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::scrollLayerMoved @ 0x4093f6
//
// 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
//
cocos2d::ccColor3B LevelSelectLayer::getColorValue(LevelSelectLayer *a1, int a2, int a3, float a4)
{
float v6; // s16
int v7; // r0
int v8; // r0
float v9; // s11
__int16 v12; // [sp+1Ch] [bp-10h]
unsigned __int8 v13; // [sp+1Eh] [bp-Eh]
__int16 v14; // [sp+20h] [bp-Ch]
unsigned __int8 v15; // [sp+22h] [bp-Ah]
v6 = (float)(a4 / 0.66667) - 0.2;
if ( v6 >= 1.0 )
{
v6 = 1.0;
}
else if ( v6 <= 0.0 )
{
v6 = 0.0;
}
*(cocos2d::ccColor3B *)&v7 = LevelSelectLayer::colorForPage(a1, a2);
v12 = v7;
v13 = BYTE2(v7);
*(cocos2d::ccColor3B *)&v8 = LevelSelectLayer::colorForPage(a1, a3);
v14 = v8;
v15 = BYTE2(v8);
v9 = COERCE_DOUBLE(modifyValue(v6));
return (cocos2d::ccColor3B)((unsigned __int8)(unsigned int)(float)((float)((float)(unsigned __int8)v14 * v9)
+ (float)((float)(unsigned __int8)v12
* (float)(1.0 - v9)))
| (unsigned __int16)((unsigned __int8)(unsigned int)(float)((float)((float)HIBYTE(v14) * v9)
+ (float)((float)HIBYTE(v12)
* (float)(1.0 - v9))) << 8)
| ((unsigned __int8)(unsigned int)(float)((float)((float)v15 * v9)
+ (float)((float)v13 * (float)(1.0 - v9))) << 16));
}