// // EditorWindowPopup::clampWindowCenter from 0x14017e930 to 0x14017ea9b (363 bytes) // // 5 xrefs: // > EditorWindowPopup::initWindow @ 0x14017e333 // > EditorWindowPopup::ccTouchMoved @ 0x14017f709 // > EditorWindowPopup::ccTouchEnded @ 0x14017f8bd // > EditorWindowPopup::ccTouchCancelled @ 0x14017fa1a // > @ 0x140918a40 // // 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 11:27:36 +0000 // cocos2d::CCPoint *__fastcall EditorWindowPopup::clampWindowCenter(__int64 a1, cocos2d::CCPoint *a2, float *a3) { __int64 v3; // rax float v6; // xmm8_4 float v7; // xmm10_4 float v8; // xmm6_4 cocos2d::CCDirector *v9; // rax float v10; // xmm9_4 __int64 v11; // rcx cocos2d::CCDirector *v12; // rax float v13; // xmm10_4 float v14; // xmm6_4 float v15; // xmm8_4 __int64 v16; // rcx cocos2d::CCDirector *v17; // rax float v18; // xmm7_4 __int64 v19; // rcx cocos2d::CCDirector *v20; // rax float v21; // xmm0_4 float v22; // xmm0_4 v3 = *(_QWORD *)(a1 + 1000); v6 = *(float *)(a1 + 1048) * *(float *)(a1 + 1040); if ( v3 ) v7 = *(float *)(v3 + 904); else v7 = 0.0; v8 = (float)(*(float *)(a1 + 1048) * *(float *)(a1 + 1044)) * 0.5; v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1); v10 = (float)((float)((float)(cocos2d::CCDirector::getScreenBottom(v9) + v7) + 10.0) - v8) + 6.0; v12 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v11); v13 = cocos2d::CCDirector::getScreenTop(v12) - v8; v14 = v6 * 0.30000001; v15 = v6 * 0.5; v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16); v18 = (float)(cocos2d::CCDirector::getScreenLeft(v17) - v15) + v14; v20 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v19); v21 = (float)(cocos2d::CCDirector::getScreenRight(v20) + v15) - v14; if ( v18 <= *a3 ) { if ( *a3 > v21 ) *a3 = v21; } else { *a3 = v18; } v22 = a3[1]; if ( v10 <= v22 ) { if ( v22 > v13 ) a3[1] = v13; } else { a3[1] = v10; } cocos2d::CCPoint::CCPoint(a2, (const struct cocos2d::CCPoint *)a3); return a2; }