//
// GJBaseGameLayer::animateInDualGroundNew from 0x1001e6bb8 to 0x1001e6d88 (464 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::updateDualGround @ 0x1001e67a0
//
// 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 __fastcall GJBaseGameLayer::animateInDualGroundNew(
GJBaseGameLayer *a1,
GameObject *a2,
float a3,
bool a4,
float a5)
{
_BOOL4 v5; // w20
__n128 v8; // q1
int v9; // s9
float v10; // s11
__n128 v11; // q0
float v12; // s0
float v13; // s10
float m_unkFloat9; // s0
cocos2d::CCDirector *v15; // x0
float v16; // s2
float v17; // s3
int v18; // [xsp+8h] [xbp-38h] BYREF
float v19; // [xsp+Ch] [xbp-34h]
cocos2d::CCPoint v20; // 0:s0.4,4:s1.4
v5 = a4;
*(float *)&v9 = GJBaseGameLayer::getTargetFlyCameraY(a1, a2);
v10 = a3 * 0.5;
v11.n128_f32[0] = *(float *)&v9 - (float)(a3 * 0.5);
if ( !a1->m_gameState.m_unkBool9 )
v11.n128_f32[0] = floorf(v11.n128_f32[0] / 30.0) * 30.0;
*(float *)&a1->m_gameState.m_unkInt14 = v10 + fmaxf(v11.n128_f32[0], 90.0);
if ( a1->m_gameState.m_isDualMode || (v12 = 0.5, a1->m_gameState.m_unkBool7) )
v12 = 0.4;
if ( v5 )
v13 = 0.0;
else
v13 = v12;
if ( v13 <= 0.0 )
{
v18 = 25;
sub_10001B104(&a1->m_gameState.m_tweenActions.__table_.__bucket_list_.__ptr_.__value_, &v18);
a1->m_gameState.m_unkFloat9 = 1.0;
}
else if ( !a1->m_gameState.m_unkBool7 || *(float *)&a1->m_gameState.m_unkInt11 != a3 )
{
m_unkFloat9 = a1->m_gameState.m_unkFloat9;
if ( m_unkFloat9 >= 0.0 )
{
if ( m_unkFloat9 > 0.0 )
{
v15 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v15);
m_unkFloat9 = (float)(a1->m_gameState.m_unkFloat9
* (float)((float)(v19 * 0.5)
+ (float)(1.0 - (float)(*(float *)&a1->m_gameState.m_unkInt11 * 0.5))))
/ (float)((float)(1.0 - v10) + (float)(v19 * 0.5));
a1->m_gameState.m_unkFloat9 = m_unkFloat9;
}
}
else
{
a1->m_gameState.m_unkFloat9 = 0.0;
m_unkFloat9 = 0.0;
}
GJGameState::tweenValue(&a1->m_gameState, m_unkFloat9, 1.0, 25, v13, 1, 2.0, -1, -1);
}
if ( a1->m_gameState.m_unkPoint17.y == 0.0 || a1->m_gameState.m_unkBool1 )
{
v8.n128_u32[0] = a1->m_gameState.m_unkInt14;
v11.n128_u32[0] = 0;
sub_100022980(v11, v8, &v18);
v20.y = 2.0;
v20.x = v13;
GJBaseGameLayer::updateStaticCameraPos(a1, v20, (bool)&v18, 0, 1, v16, 0, v17);
a1->m_gameState.m_unkBool1 = 1;
}
a1->m_gameState.m_unkBool7 = 1;
*(float *)&a1->m_gameState.m_unkInt11 = a3;
a1->m_gameState.m_unkInt10 = v9;
}