//
// GJBaseGameLayer::animateInDualGroundNew from 0x487be0 to 0x487d80 (416 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::updateDualGround @ 0x487df2
//
// 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 GJBaseGameLayer::animateInDualGroundNew(GJBaseGameLayer *a1, GameObject *a2, float a3, bool a4, float a5)
{
_BOOL4 v5; // r5
float v8; // s19
int v9; // s18
float v10; // s15
_BOOL4 m_isDualMode; // r3
float v12; // r5
float m_unkFloat9; // s15
cocos2d::CCDirector *v14; // r0
int v15; // [sp+10h] [bp-1Ch]
cocos2d::CCPoint v16; // [sp+1Ch] [bp-10h] BYREF
v5 = a4;
v8 = a3 * 0.5;
*(float *)&v9 = GJBaseGameLayer::getTargetFlyCameraY(a1, a2);
v10 = *(float *)&v9 - v8;
if ( !a1->m_gameState.m_unkBool9 )
v10 = floorf(v10 / 30.0) * 30.0;
m_isDualMode = a1->m_gameState.m_isDualMode;
if ( v10 <= 90.0 )
v10 = 90.0;
*(float *)&a1->m_gameState.m_unkInt14 = v10 + v8;
if ( !m_isDualMode )
{
if ( !a1->m_gameState.m_unkBool7 )
{
if ( !v5 )
{
v12 = 0.5;
goto LABEL_16;
}
LABEL_9:
LOBYTE(v12) = 0;
GJGameState::stopTweenAction(&a1->m_gameState, 25);
a1->m_gameState.m_unkFloat9 = 1.0;
goto LABEL_10;
}
if ( v5 )
goto LABEL_9;
LABEL_15:
v12 = 0.4;
if ( a3 == *(float *)&a1->m_gameState.m_unkInt11 )
goto LABEL_10;
goto LABEL_16;
}
if ( v5 )
goto LABEL_9;
if ( a1->m_gameState.m_unkBool7 )
goto LABEL_15;
v12 = 0.4;
LABEL_16:
m_unkFloat9 = a1->m_gameState.m_unkFloat9;
if ( m_unkFloat9 >= 0.0 )
{
if ( m_unkFloat9 > 0.0 )
{
v14 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCSize *)&v16, v14);
a1->m_gameState.m_unkFloat9 = (float)((float)((float)(v16.y * 0.5)
+ (float)(1.0 - (float)(*(float *)&a1->m_gameState.m_unkInt11 * 0.5)))
* a1->m_gameState.m_unkFloat9)
/ (float)((float)(v16.y * 0.5) + (float)(1.0 - v8));
}
}
else
{
a1->m_gameState.m_unkFloat9 = 0.0;
}
GJGameState::tweenValue(&a1->m_gameState, a1->m_gameState.m_unkFloat9, 1.0, 25, v12, 1, 2.0, -1, -1);
LABEL_10:
if ( a1->m_gameState.m_unkPoint17.y == 0.0 || a1->m_gameState.m_unkBool1 )
{
cocos2d::CCPoint::CCPoint(&v16, 0.0, *(float *)&a1->m_gameState.m_unkInt14);
GJBaseGameLayer::updateStaticCameraPos(
a1,
(cocos2d::CCPoint)(unsigned int)&v16,
1,
0,
SLOBYTE(v12),
COERCE_FLOAT(1),
0x40000000,
*(float *)&v15);
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;
}