//
// GJBaseGameLayer::generateEnterEasingBuffer from 0x1001e2c28 to 0x1001e2d88 (352 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::generateEnterEasingBuffers @ 0x1001e2c00
// > GJBaseGameLayer::generateEnterEasingBuffers @ 0x1001e2c14
//
// 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
//
int __fastcall GJBaseGameLayer::generateEnterEasingBuffer(GJBaseGameLayer *a1, int a2, float a3)
{
int *v6; // x8
int v7; // w21
int m_enterEasingValuesIndex; // w23
int v9; // w22
int v10; // w8
int v11; // w24
int v13; // [xsp+0h] [xbp-50h] BYREF
int *v14; // [xsp+8h] [xbp-48h] BYREF
if ( (unsigned int)a2 < 0xA && ((0x389u >> a2) & 1) != 0 )
{
v6 = (int *)((char *)&unk_10063A3D0 + 4 * (unsigned int)a2);
return *v6;
}
v7 = (int)(float)((float)(10000 * a2) + (float)(a3 * 100.0));
v13 = v7;
if ( (v7 & 0x80000000) == 0 )
{
if ( sub_100018814(&a1->m_enterEasingIndices.__table_.__bucket_list_.__ptr_.__value_, &v13) )
{
v14 = &v13;
v6 = (int *)sub_10001D150((unsigned __int64)&a1->m_enterEasingIndices, &v13, (__int64)&unk_10063A31C, &v14) + 5;
return *v6;
}
m_enterEasingValuesIndex = a1->m_enterEasingValuesIndex;
v14 = &v13;
v9 = 0;
*((_DWORD *)sub_10001D150((unsigned __int64)&a1->m_enterEasingIndices, &v13, (__int64)&unk_10063A31C, &v14) + 5) = m_enterEasingValuesIndex;
v7 = a1->m_enterEasingValuesIndex;
v10 = v7 + 100;
if ( __OFSUB__(v7, v7 + 100) )
v10 = a1->m_enterEasingValuesIndex;
v11 = v10 - v7 + 1;
do
{
LODWORD(v14) = GameToolbox::getEasedValue((float)v9 / 100.0, a2, a3);
sub_10018D41C((const void **)&a1->m_enterEasingValues.__begin_, (int *)&v14);
++a1->m_enterEasingValuesIndex;
++v9;
}
while ( v11 != v9 );
}
return v7;
}