//
// GJOptionsLayer::nextPosition from 0x100287830 to 0x10028793e (270 bytes)
//
// 3 xrefs:
// > sub_100287300 @ 0x10028736a
// > GameOptionsLayer::setupOptions @ 0x10029e5ae
// > GameOptionsLayer::setupOptions @ 0x10029e779
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:27:45 +0000
//
__int64 __fastcall GJOptionsLayer::nextPosition(__int64 a1, float *a2, unsigned int a3)
{
__int64 v4; // rax
float *v5; // r13
int v6; // r15d
__m128 v7; // xmm0
float v9; // [rsp+0h] [rbp-40h] BYREF
float v10[2]; // [rsp+8h] [rbp-38h] BYREF
float v11[12]; // [rsp+10h] [rbp-30h] BYREF
v4 = cocos2d::CCDirector::sharedDirector(a1, a2);
cocos2d::CCDirector::getWinSize(v11, v4);
sub_100278250(
v10,
(float)(v11[0] * 0.5) + -160.0,
(float)((float)((float)(a2[184] * 0.5) + (float)(v11[1] * 0.5)) + -60.0) + a2[268]);
v5 = &v9;
sub_100278250(&v9, (float)(0.5 * v11[0]) + 32.0, v10[1]);
v6 = sub_100288170(a2, a3);
if ( (v6 & 1) == 0 )
v5 = v10;
sub_1002782D0((_QWORD *)a1, v5);
if ( v6 >= 2 )
{
v7 = 0;
v7.f32[0] = (float)v6 * 0.5;
*(float *)(a1 + 4) = *(float *)(a1 + 4)
- (float)(_mm_cvtepi32_ps(_mm_cvttps_epi32(_mm_round_ss(v7, v7, 9))).f32[0] * a2[253]);
}
return a1;
}