//
// BoomScrollLayer::ccTouchBegan from 0x1400420b0 to 0x1400421a1 (241 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407061b0
// > ??> @ 0x14090f5c0
//
// 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
//
char __fastcall BoomScrollLayer::ccTouchBegan(__int64 a1, __int64 a2)
{
__int64 v4; // rax
__int64 v5; // rax
unsigned int millitm; // eax
double time_low; // xmm0_8
__m128i v8; // xmm1
int v10; // [rsp+20h] [rbp-28h] BYREF
struct __timeb64 Time; // [rsp+28h] [rbp-20h] BYREF
if ( *(_BYTE *)(a1 + 308) )
return 0;
cocos2d::CCTouch::getLocationInView(a2, &v10);
v4 = cocos2d::CCDirector::sharedDirector();
v5 = cocos2d::CCDirector::convertToGL(v4, &Time, &v10);
cocos2d::CCPoint::operator=(&v10, v5);
if ( !cocos2d::CCRect::containsPoint((cocos2d::CCRect *)(a1 + 192), (const struct cocos2d::CCPoint *)&v10)
|| *(_QWORD *)(a1 + 152) )
{
return 0;
}
*(_QWORD *)(a1 + 152) = a2;
ftime64(&Time);
millitm = Time.millitm;
time_low = (double)SLODWORD(Time.time);
*(_DWORD *)(a1 + 140) = 0;
v8 = _mm_cvtsi32_si128(millitm);
*(_DWORD *)(a1 + 108) = v10;
*(double *)(a1 + 168) = _mm_cvtepi32_pd(v8).m128d_f64[0] / 1000.0 + time_low;
return 1;
}