//
// LevelSelectLayer::scrollLayerMoved from 0x409380 to 0x4094f4 (372 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'LevelSelectLayer::scrollLayerMoved @ 0x409504
//
// 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 LevelSelectLayer::scrollLayerMoved(LevelSelectLayer *a1, cocos2d::CCPoint a2)
{
float v3; // s16
int PageCount; // r0
int v5; // r6
float v6; // r0
int v7; // r1
int v8; // r2
int v9; // r0
unsigned __int8 v10; // r3
cocos2d::CCSprite *m_backgroundSprite; // r0
GJGroundLayer *m_groundLayer; // r0
GJGroundLayer *v13; // r0
unsigned __int8 v14; // [sp+0h] [bp-10h] BYREF
unsigned __int8 v15; // [sp+1h] [bp-Fh]
unsigned __int8 v16; // [sp+2h] [bp-Eh]
int v17; // [sp+4h] [bp-Ch]
int v18; // [sp+8h] [bp-8h]
v3 = (float)-*(float *)LODWORD(a2.x) / a1->m_width;
PageCount = getPageCount();
v5 = PageCount;
while ( v3 < 0.0 )
v3 = v3 + (float)PageCount;
v6 = floorf(v3);
a1->m_scrolls = (int)v6;
v7 = (int)v6 % v5;
v8 = v7 + 1;
if ( v7 + 1 == v5 )
v8 = 0;
*(cocos2d::ccColor3B *)&v9 = LevelSelectLayer::getColorValue(a1, v7, v8, v3 - (float)(int)v6);
v10 = BYTE1(v9);
v14 = v9;
v16 = BYTE2(v9);
m_backgroundSprite = a1->m_backgroundSprite;
v15 = v10;
m_backgroundSprite->setColor(m_backgroundSprite, (const cocos2d::ccColor3B *)&v14);
m_groundLayer = a1->m_groundLayer;
BYTE1(v17) = (unsigned int)(float)((float)v15 * 0.8);
BYTE2(v17) = (unsigned int)(float)((float)v16 * 0.8);
LOBYTE(v17) = (unsigned int)(float)((float)v14 * 0.8);
GJGroundLayer::updateGround01Color(m_groundLayer, (cocos2d::ccColor3B)v17);
v13 = a1->m_groundLayer;
BYTE1(v18) = (unsigned int)(float)((float)v15 * 0.9);
BYTE2(v18) = (unsigned int)(float)((float)v16 * 0.9);
LOBYTE(v18) = (unsigned int)(float)((float)v14 * 0.9);
GJGroundLayer::updateGround02Color(v13, (cocos2d::ccColor3B)v18);
}