//
// GJOptionsLayer::nextPosition from 0x8c8468 to 0x8c8580 (280 bytes)
//
// 4 xrefs:
// > GJOptionsLayer::addToggleInternal @ 0x8dad04
// > GameOptionsLayer::setupOptions @ 0x8dbee4
// > GameOptionsLayer::setupOptions @ 0x8dc1d4
// > ??> @ 0x63270
//
// 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
//
cocos2d::CCPoint GJOptionsLayer::nextPosition(GJOptionsLayer *a1, int a2)
{
cocos2d::CCPoint *v2; // x8
cocos2d::CCPoint *v4; // x23
cocos2d::CCDirector *v5; // x0
int v6; // w0
int v7; // w25
int v8; // w19
const cocos2d::CCPoint *v9; // x1
float v13; // [xsp+60h] [xbp+60h]
float v14; // [xsp+64h] [xbp+64h]
cocos2d::CCPoint v15; // [xsp+68h] [xbp+68h] BYREF
cocos2d::CCPoint v16; // [xsp+70h] [xbp+70h] BYREF
cocos2d::CCPoint result; // 0:s0.4,4:s1.4
v4 = v2;
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v5);
cocos2d::CCPoint::CCPoint(&v15, (float)(v13 * 0.5) + -160.0, (float)((float)(v14 * 0.5) + 80.0) + a1->m_offset);
cocos2d::CCPoint::CCPoint(&v16, (float)(v13 * 0.5) + 32.0, v15.y);
v6 = GJOptionsLayer::countForPage(a1, a2);
v7 = v6 + 1;
v8 = v6;
if ( ((v6 + 1) & 1) != 0 )
v9 = &v15;
else
v9 = &v16;
cocos2d::CCPoint::CCPoint(v4, v9);
if ( v7 > 2 )
{
result.y = (float)(int)vcvtms_s32_f32((float)v8 * 0.5);
result.x = v4->y - (float)(result.y * a1->m_gap);
v4->y = result.x;
}
return result;
}