//
// DialogLayer::handleDialogTap from 0x1003b12b0 to 0x1003b13e0 (304 bytes)
//
// 4 xrefs:
// > DialogLayer::ccTouchBegan @ 0x1003b16c9
// > sub_1003B16E0 @ 0x1003b1700
// > DialogLayer::keyDown @ 0x1003b1ba3
// > sub_1003B1BB0 @ 0x1003b1bea
//
// 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:29:26 +0000
//
int __fastcall DialogLayer::handleDialogTap(double *a1)
{
int result; // eax
double v3; // xmm0_8
float v4; // xmm0_4
__int64 v5; // rdi
void (__fastcall ***v6)(_QWORD, double *); // rdi
__int64 v7; // rax
timeb v8; // [rsp+8h] [rbp-18h] BYREF
result = ftime(&v8);
v3 = a1[69];
if ( v3 <= 0.0
|| (result = v8.millitm, v4 = (double)v8.millitm / 1000.0 + (double)SLODWORD(v8.time) - v3, v4 >= 0.2)
|| *((_BYTE *)a1 + 632)
|| v4 < 0.0 )
{
if ( *((_BYTE *)a1 + 616) == 1 )
{
if ( !*((_BYTE *)a1 + 617) )
return DialogLayer::finishCurrentAnimation(a1);
}
else
{
v5 = *((_QWORD *)a1 + 74);
if ( v5 && (unsigned int)sub_1007FEF90(v5) )
{
return DialogLayer::displayNextObject((__int64)a1);
}
else
{
v6 = *((void (__fastcall ****)(_QWORD, double *))a1 + 78);
if ( v6 )
(**v6)(v6, a1);
a1[78] = 0.0;
v7 = *((_QWORD *)a1 + 72);
if ( v7 )
*(_QWORD *)(v7 + 696) = 0;
(*(void (__fastcall **)(double *, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
result = (*(__int64 (__fastcall **)(double *, _QWORD))(*(_QWORD *)a1 + 1088LL))(a1, 0);
if ( !*((_BYTE *)a1 + 640) )
return (*(__int64 (__fastcall **)(double *, __int64))(*(_QWORD *)a1 + 528LL))(a1, 1);
}
}
}
return result;
}