//
// TouchControlEditLayer::beginDeadzoneDrag from 0xd04d4c to 0xd04e74 (296 bytes)
//
// 2 xrefs:
// > TouchControlEditLayer::ccTouchBegan @ 0xd051b0
// > ??> @ 0x85780
//
// 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:06:56 +0000
//
__int64 __fastcall TouchControlEditLayer::beginDeadzoneDrag(
TouchControlEditLayer *this,
GJUINode *a2,
const cocos2d::CCPoint *a3)
{
GameToolbox *v6; // x0
float v7; // s8
const cocos2d::CCPoint *v8; // x1
float v10; // s0
char *v11; // x19
float v12; // s0
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCPoint::operator=((char *)this + 1316, a3);
v6 = (GameToolbox *)*((unsigned int *)a2 + 94);
*((_DWORD *)this + 333) = (_DWORD)v6;
v7 = *((float *)a2 + 94);
if ( v7 < GameToolbox::touchUnitsForMM(v6, 1.6) || (cocos2d::ccpLength(a3, v8), v10 < 1.0) )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, 1.0, 0.0);
cocos2d::CCPoint::operator=((char *)this + 1324, &v13);
}
else if ( *((_BYTE *)a2 + 381) )
{
cocos2d::ccpNormalize(&v13, a3, (const cocos2d::CCPoint *)&v13);
cocos2d::CCPoint::operator=((char *)this + 1324, &v13);
}
else
{
v11 = (char *)this + 1324;
if ( *(float *)a3 < 0.0 )
v12 = -1.0;
else
v12 = 1.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, v12, 0.0);
cocos2d::CCPoint::operator=(v11, &v13);
}
return _stack_chk_guard;
}