// // BoomScrollLayer::pageNumberForPosition from 0x140041650 to 0x14004174a (250 bytes) // // 5 xrefs: // > BoomScrollLayer::updateDots @ 0x14004131a // > BoomScrollLayer::moveToPageEnded @ 0x140041621 // > BoomScrollLayer::ccTouchMoved @ 0x1400423e3 // > BoomScrollLayer::ccTouchEnded @ 0x140042641 // > @ 0x14090f524 // // 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:25:29 +0000 // __int64 __fastcall BoomScrollLayer::pageNumberForPosition(__int64 a1) { float *v2; // rbx float v3; // xmm6_4 int v4; // eax int v5; // ebx cocos2d::CCArray *v6; // rcx v2 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 320LL))(a1); v3 = (float)-*(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 504) + 200LL))(*(_QWORD *)(a1 + 504)) / (float)(*v2 - *(float *)(a1 + 592)); v4 = (int)ceilf(v3); v5 = v4 - 1; if ( (float)((float)v4 - v3) < 0.5 ) v5 = v4; if ( *(_BYTE *)(a1 + 436) ) return (unsigned int)v5; if ( v5 < 0 ) v5 = 0; v6 = *(_BYTE *)(a1 + 456) ? *(cocos2d::CCArray **)(a1 + 448) : *(cocos2d::CCArray **)(a1 + 480); if ( (int)(cocos2d::CCArray::count(v6) - 1) >= v5 ) return (unsigned int)v5; if ( *(_BYTE *)(a1 + 456) ) return cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 448)) - 1; return cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 480)) - 1; }