//
// LevelSelectLayer::scrollLayerMoved from 0x511b34 to 0x511cce (410 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'LevelSelectLayer::scrollLayerMoved @ 0x511ce0
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:51:32 +0000
//
int __fastcall LevelSelectLayer::scrollLayerMoved(int a1, float *a2)
{
float v3; // s16
int PageCount; // r0
int v5; // r6
float v6; // r0
float v7; // s17
int v8; // r7
float v9; // r0
int v10; // r2
int ColorValue; // r0
unsigned __int8 v12; // r3
int v13; // r0
int v14; // r0
int v15; // r0
unsigned __int8 v17; // [sp+0h] [bp-14h] BYREF
unsigned __int8 v18; // [sp+1h] [bp-13h]
unsigned __int8 v19; // [sp+2h] [bp-12h]
int v20; // [sp+4h] [bp-10h]
int v21; // [sp+8h] [bp-Ch]
v3 = (float)-*a2 / *(float *)(a1 + 324);
PageCount = getPageCount();
v5 = PageCount;
while ( v3 < 0.0 )
v3 = v3 + (float)PageCount;
v6 = floorf(v3);
*(_DWORD *)(a1 + 344) = (int)v6;
v7 = v3 - (float)(int)v6;
v8 = (int)v6 % v5;
v9 = floorf(v3 + 0.5);
LevelSelectLayer::updateDeathButton(a1, (int)v9);
v10 = v8 + 1;
if ( v8 + 1 == v5 )
v10 = 0;
ColorValue = LevelSelectLayer::getColorValue((LevelSelectLayer *)a1, v8, v10, v7);
v12 = BYTE1(ColorValue);
v17 = ColorValue;
v19 = BYTE2(ColorValue);
v13 = *(_DWORD *)(a1 + 328);
v18 = v12;
(*(void (__fastcall **)(int, unsigned __int8 *))(*(_DWORD *)v13 + 480))(v13, &v17);
v14 = *(_DWORD *)(a1 + 332);
BYTE1(v20) = (unsigned int)(float)((float)v18 * 0.8);
BYTE2(v20) = (unsigned int)(float)((float)v19 * 0.8);
LOBYTE(v20) = (unsigned int)(float)((float)v17 * 0.8);
GJGroundLayer::updateGround01Color(v14, v20);
v15 = *(_DWORD *)(a1 + 332);
BYTE1(v21) = (unsigned int)(float)((float)v18 * 0.9);
BYTE2(v21) = (unsigned int)(float)((float)v19 * 0.9);
LOBYTE(v21) = (unsigned int)(float)((float)v17 * 0.9);
return GJGroundLayer::updateGround02Color(v15, v21);
}