//
// GJBaseGameLayer::updateStaticCameraPos from 0x87fa40 to 0x87fc80 (576 bytes)
//
// 4 xrefs:
// > PlayLayer::playEndAnimationToPos @ 0x5cc18c
// > GJBaseGameLayer::animateInDualGroundNew @ 0x87fde4
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x88066c
// > ??> @ 0x30f90
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void GJBaseGameLayer::updateStaticCameraPos(
GJBaseGameLayer *a1,
cocos2d::CCPoint a2,
bool a3,
bool a4,
bool a5,
float a6,
int a7,
float a8)
{
int v8; // w5
int v10; // w27
float x; // s8
float y; // s9
cocos2d::CCPoint v13; // x0
_BOOL4 v14; // w24
_BOOL4 v15; // w23
int v16; // w26
float *v17; // x25
cocos2d::CCDirector *v18; // x0
float v19; // s0
float v20; // s1
float v21; // w2
float v22; // s0
float v23; // w0
float v24; // w2
float v25; // s0
float v26; // w0
float v27; // [xsp+70h] [xbp+70h]
float v28; // [xsp+74h] [xbp+74h]
__int64 v29; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCPoint v30[2]; // [xsp+80h] [xbp+80h] BYREF
v10 = v8;
x = a2.x;
y = a2.y;
v13 = (cocos2d::CCPoint)_stack_chk_guard;
v14 = a4;
a1->m_gameState.m_unkBool1 = 0;
v15 = a5;
v16 = (unsigned __int8)a7;
v17 = (float *)a3;
v30[1] = v13;
v18 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v18);
cocos2d::CCPoint::CCPoint(
v30,
(float)(v27 * 0.5) / a1->m_gameState.m_cameraZoom,
(float)(v28 * 0.5) / a1->m_gameState.m_cameraZoom);
cocos2d::CCPoint::operator+(&v29, &a1->m_gameState.m_cameraPosition2, v30);
cocos2d::CCPoint::operator-(v30, &v29, &a1->m_gameState.m_cameraOffset);
cocos2d::CCPoint::operator=(&v29, v19, v20);
if ( v14 )
{
v21 = *(float *)&v29;
a1->m_gameState.m_unkPoint17.x = 1.0;
a1->m_gameState.m_unkPoint6.x = v21;
a1->m_gameState.m_unkPoint8.x = 0.0;
GJGameState::stopTweenAction(&a1->m_gameState, 12);
v22 = cocos2d::clampf(a1->m_gameState.m_unkPoint4.x, -10000.0, 10000.0);
v23 = *(float *)&v29;
a1->m_gameState.m_unkPoint10.x = v22;
a1->m_gameState.m_unkPoint11.x = x;
a1->m_gameState.m_unkPoint5.x = v23;
a1->m_gameState.m_unkPoint7.x = *v17;
}
if ( v15 )
{
v24 = *((float *)&v29 + 1);
a1->m_gameState.m_unkPoint17.y = 1.0;
a1->m_gameState.m_unkPoint6.y = v24;
a1->m_gameState.m_unkPoint8.y = 0.0;
GJGameState::stopTweenAction(&a1->m_gameState, 13);
v25 = cocos2d::clampf(a1->m_gameState.m_unkPoint4.y, -10000.0, 10000.0);
v26 = *((float *)&v29 + 1);
a1->m_gameState.m_unkPoint10.y = v25;
a1->m_gameState.m_unkPoint11.y = x;
a1->m_gameState.m_unkPoint5.y = v26;
a1->m_gameState.m_unkPoint7.y = v17[1];
}
if ( !v16 )
{
if ( x <= 0.0 )
{
if ( v14 )
{
GJGameState::stopTweenAction(&a1->m_gameState, 10);
a1->m_gameState.m_unkPoint6.x = a1->m_gameState.m_unkPoint7.x;
}
if ( v15 )
{
GJGameState::stopTweenAction(&a1->m_gameState, 11);
a1->m_gameState.m_unkPoint6.y = a1->m_gameState.m_unkPoint7.y;
}
}
else
{
if ( !v14 )
{
if ( !v15 )
return;
LABEL_14:
GJGameState::tweenValue(
&a1->m_gameState,
a1->m_gameState.m_unkPoint6.y,
a1->m_gameState.m_unkPoint7.y,
11,
x,
v10,
y,
-1,
-1);
return;
}
GJGameState::tweenValue(
&a1->m_gameState,
a1->m_gameState.m_unkPoint6.x,
a1->m_gameState.m_unkPoint7.x,
10,
x,
v10,
y,
-1,
-1);
if ( v15 )
goto LABEL_14;
}
}
}