//
// GJGameState::updateTweenActions from 0x1000ea310 to 0x1000ea583 (627 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::loadUpToPosition @ 0x10012c82f
// > GJBaseGameLayer::update @ 0x100130712
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:21:06 +0000
//
void __fastcall GJGameState::updateTweenActions(__int64 a1, __m128 a2)
{
__int64 v2; // rdx
__int64 *v4; // r14
__int64 v5; // r13
char v6; // al
__m128 v7; // xmm1
float v8; // xmm2_4
__int64 v9; // rdi
__int64 v10; // r13
__m128 v11; // kr00_16
void *v12; // rdi
void *__p; // [rsp+8h] [rbp-48h] BYREF
float v14; // [rsp+24h] [rbp-2Ch]
v14 = a2.f32[0];
v2 = *(_QWORD *)(a1 + 608);
if ( v2 )
{
v4 = (__int64 *)(a1 + 592);
while ( 2 )
{
v6 = *(_BYTE *)(v2 + 48);
if ( !*(_WORD *)(v2 + 48) )
{
v7 = (__m128)*(unsigned int *)(v2 + 32);
v7.f32[0] = v7.f32[0] + v14;
*(_DWORD *)(v2 + 32) = v7.i32[0];
v8 = *(float *)(v2 + 28);
a2 = (__m128)0x3F800000u;
if ( v7.f32[0] < v8 )
{
a2 = v7;
a2.f32[0] = v7.f32[0] / v8;
}
v9 = *(unsigned int *)(v2 + 40);
if ( (int)v9 > 0 )
{
v10 = v2;
*(double *)a2.i64 = GameToolbox::getEasedValue(v9, *(double *)a2.i64, *(float *)(v2 + 44));
v2 = v10;
v8 = *(float *)(v10 + 28);
v7.i32[0] = *(_DWORD *)(v10 + 32);
}
*(float *)(v2 + 36) = (float)((float)(*(float *)(v2 + 24) - *(float *)(v2 + 20)) * a2.f32[0])
+ *(float *)(v2 + 20);
v6 = v7.f32[0] >= v8;
*(_BYTE *)(v2 + 48) = v7.f32[0] >= v8;
}
v11 = a2;
a2 = (__m128)*(unsigned int *)(v2 + 36);
switch ( *(_DWORD *)(v2 + 16) )
{
case 1:
*(_DWORD *)(a1 + 568) = a2.i32[0];
if ( !v6 )
goto LABEL_3;
goto LABEL_46;
case 2:
*(_DWORD *)(a1 + 572) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 7:
*(_DWORD *)(a1 + 580) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 9:
*(_DWORD *)(a1 + 336) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xA:
*(_DWORD *)(a1 + 56) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xB:
*(_DWORD *)(a1 + 60) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xC:
*(_DWORD *)(a1 + 72) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xD:
*(_DWORD *)(a1 + 76) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xE:
*(_DWORD *)a1 = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0xF:
*(_DWORD *)(a1 + 8) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x10:
*(_DWORD *)(a1 + 12) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x11:
*(_DWORD *)(a1 + 380) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x12:
*(_DWORD *)(a1 + 216) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x13:
*(_DWORD *)(a1 + 220) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x14:
*(_DWORD *)(a1 + 276) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x15:
*(_DWORD *)(a1 + 104) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x16:
*(_DWORD *)(a1 + 108) = a2.i32[0];
if ( v6 )
goto LABEL_46;
goto LABEL_3;
case 0x19:
*(_DWORD *)(a1 + 588) = a2.i32[0];
goto LABEL_45;
default:
a2 = v11;
LABEL_45:
if ( v6 )
{
LABEL_46:
v5 = *(_QWORD *)v2;
sub_10001AE30((__int64)&__p, v4, (__int64 *)v2);
v12 = __p;
__p = nullptr;
if ( v12 )
operator delete(v12);
}
else
{
LABEL_3:
v5 = *(_QWORD *)v2;
}
v2 = v5;
if ( v5 )
continue;
return;
}
}
}
}