//
// MapSelectLayer::getConstrainedMapPos from 0xac2130 to 0xac2250 (288 bytes)
//
// 3 xrefs:
// > MapSelectLayer::update @ 0xac38e0
// > MapSelectLayer::ccTouchMoved @ 0xac3aec
// > ??> @ 0xf5980
//
// This function is hookable on this platform (idp: arm, 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 13:01:05 +0000
//
cocos2d::CCPoint *__usercall MapSelectLayer::getConstrainedMapPos@(
__int64 a1@,
float *a2@,
cocos2d::CCPoint *a3@)
{
cocos2d::CCDirector *v6; // x0
float v7; // s0
float v8; // s2
float v9; // s1
float v10; // s0
float v11; // s3
float v12; // s1
float v14; // s2
__int64 v15; // [xsp+30h] [xbp+30h] BYREF
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
cocos2d::CCDirector::getWinSize(&v15, v6);
v7 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 408) + 168LL))(*(_QWORD *)(a1 + 408));
v8 = *a2;
v9 = *(float *)&v15 + (float)(v7 * -3600.0);
v10 = *((float *)&v15 + 1) + (float)(v7 * -1500.0);
v11 = 0.0;
if ( *a2 <= 0.0 )
v11 = *a2;
if ( v11 <= v9 )
{
v14 = v9;
v12 = a2[1];
*a2 = v14;
if ( v12 > 0.0 )
goto LABEL_7;
}
else
{
if ( v8 > 0.0 )
v8 = 0.0;
v12 = a2[1];
*a2 = v8;
if ( v12 > 0.0 )
{
LABEL_7:
if ( v10 < 0.0 )
goto LABEL_8;
LABEL_13:
v12 = v10;
goto LABEL_10;
}
}
if ( v12 <= v10 )
goto LABEL_13;
LABEL_8:
if ( v12 > 0.0 )
v12 = 0.0;
LABEL_10:
a2[1] = v12;
cocos2d::CCPoint::CCPoint(a3, (const cocos2d::CCPoint *)a2);
return a3;
}