//
// GJOptionsLayer::nextPosition from 0x10029cbc0 to 0x10029ccbd (253 bytes)
//
// 3 xrefs:
// > GJOptionsLayer::addToggleInternal @ 0x10029c71b
// > GameOptionsLayer::setupOptions @ 0x1002b132e
// > GameOptionsLayer::setupOptions @ 0x1002b1511
//
// 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!
cocos2d::CCPoint __fastcall GJOptionsLayer::nextPosition(GJOptionsLayer *a1, int a2)
{
int v2; // edx
int v3; // r15d
float *v4; // r13
int v5; // r15d
__m128 v7; // xmm0
float v8; // [rsp+0h] [rbp-40h] BYREF
float v9[2]; // [rsp+8h] [rbp-38h] BYREF
float v10[12]; // [rsp+10h] [rbp-30h] BYREF
cocos2d::CCPoint result; // 0:xmm0_8.8
v3 = v2;
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v10);
sub_10028CBE0(
v9,
(float)(v10[0] * 0.5) + -160.0,
(float)((float)(v10[1] * 0.5) + 80.0) + *(float *)(*(_QWORD *)&a2 + 1000LL));
v4 = &v8;
sub_10028CBE0(&v8, (float)(0.5 * v10[0]) + 32.0, v9[1]);
v5 = GJOptionsLayer::countForPage(*(GJOptionsLayer **)&a2, v3);
if ( (v5 & 1) == 0 )
v4 = v9;
*(double *)&result = sub_10028CC60(a1, (double *)v4);
if ( v5 >= 2 )
{
v7 = 0;
v7.f32[0] = (float)v5 * 0.5;
result = (cocos2d::CCPoint)_mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_round_ss(v7, v7, 9))).u64[0];
result.x = result.x * *(float *)(*(_QWORD *)&a2 + 940LL);
*((float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ 1) = *((float *)&a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ 1)
- result.x;
}
return result;
}