//
// LevelEditorLayer::rotationForSlopeNearObject from 0x78b450 to 0x78b604 (436 bytes)
//
// 3 xrefs:
// > EditorUI::getSnapAngle @ 0xc00e0c
// > EditorUI::getSnapAngle @ 0xc00e60
// > ??> @ 0x6d0a8
//
// 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:26 +0000
//
__int64 __fastcall LevelEditorLayer::rotationForSlopeNearObject(LevelEditorLayer *this, GameObject *a2)
{
unsigned int v4; // w19
cocos2d::CCArray *v5; // x21
GameObject *v6; // x20
_QWORD v8[2]; // [xsp+58h] [xbp+58h] BYREF
float v9[4]; // [xsp+68h] [xbp+68h] BYREF
v4 = 0;
GameObject::updateStartPos(a2);
(*(void (__fastcall **)(_QWORD *__return_ptr, GameObject *, float, float))(*(_QWORD *)a2 + 1336LL))(v8, a2, 1.0, 1.0);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v9, (const cocos2d::CCRect *)v8);
v5 = LevelEditorLayer::objectsInRect((__int64)this, v9, 1u);
while ( v4 < (unsigned int)cocos2d::CCArray::count(v5) )
{
v6 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, v4);
if ( (*(unsigned int (__fastcall **)(GameObject *))(*(_QWORD *)v6 + 1800LL))(v6) == 25 )
{
GameObject::determineSlopeDirection(v6);
GameObject::getSlopeAngle(v6);
if ( (!(unsigned __int8)GameObject::slopeFloorTop(v6)
|| (*(unsigned __int8 (__fastcall **)(GameObject *))(*(_QWORD *)a2 + 1432LL))(a2))
&& !(unsigned __int8)GameObject::slopeFloorTop(v6) )
{
(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)a2 + 1432LL))(a2);
}
return _stack_chk_guard;
}
++v4;
}
return _stack_chk_guard;
}