//
// PlayerObject::touchedObject from 0x766270 to 0x766490 (544 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8b68
// > ??> @ 0xb7e50
//
// 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 12:53:07 +0000
//
__int64 __fastcall PlayerObject::touchedObject(PlayerObject *this, GameObject *a2)
{
int v4; // w1
float v6; // s8
int v7; // [xsp+64h] [xbp+64h] BYREF
int *v8; // [xsp+70h] [xbp+70h] BYREF
v4 = *((_DWORD *)a2 + 257);
if ( v4 == 1859 )
{
*((_DWORD *)this + 711) = 2;
}
else if ( v4 > 1859 )
{
if ( v4 == 2866 )
{
*((_DWORD *)this + 712) = 2;
}
else if ( v4 == 3645 || v4 == 2069 )
{
*((_DWORD *)this + 714) = 2;
v7 = *((_DWORD *)a2 + 464);
if ( v7 > 0 )
{
v8 = &v7;
if ( *(_BYTE *)(std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
(__int64 **)this + 359,
&v7,
(__int64)&unk_113CFA8,
&v8)
+ 32) )
return _stack_chk_guard;
v8 = &v7;
*(_BYTE *)(std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::__emplace_unique_key_args,std::tuple<>>(
(__int64 **)this + 359,
&v7,
(__int64)&unk_113CFA8,
&v8)
+ 32) = 1;
}
ForceBlockGameObject::calculateForceToTarget(a2, this);
cocos2d::CCPoint::operator+(&v8, (char *)this + 2860);
cocos2d::CCPoint::operator=((char *)this + 2860, &v8);
v6 = sqrtf(
(float)(*((float *)this + 716) * *((float *)this + 716))
+ (float)(*((float *)this + 715) * *((float *)this + 715)));
if ( v6 > 9999.0 )
{
cocos2d::CCPoint::operator*((char *)this + 2860, 9999.0 / v6);
cocos2d::CCPoint::operator=((char *)this + 2860, &v8);
}
}
}
else
{
switch ( v4 )
{
case 1813:
*((_DWORD *)this + 709) = 2;
break;
case 1829:
if ( *((_BYTE *)this + 2460) )
{
PlayerObject::stopDashing(this);
*((_BYTE *)this + 2365) = 0;
}
break;
case 1755:
*((_DWORD *)this + 710) = (unsigned int)&dword_0 + 2;
break;
}
}
return _stack_chk_guard;
}