//
// LevelEditorLayer::addObjectsAtPosition from 0x65d840 to 0x65d978 (312 bytes)
//
// 1 xrefs:
// > ??> @ 0x9d6e0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void LevelEditorLayer::addObjectsAtPosition(
LevelEditorLayer *a1,
cocos2d::CCPoint a2,
cocos2d::CCArray *a3,
cocos2d::CCArray *a4)
{
cocos2d::CCArray *v4; // x3
bool *p_m_nonSquareRotation; // x23
unsigned int v8; // w19
cocos2d::CCArray *v10; // x26
GameObject *v11; // x20
cocos2d::CCRect v12; // [xsp+68h] [xbp+68h] BYREF
p_m_nonSquareRotation = &a1->m_nonSquareRotation;
v8 = 0;
v10 = v4;
while ( v8 < (unsigned int)cocos2d::CCArray::count(a4) )
{
v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(a4, v8);
if ( LevelEditorLayer::validGroup(a1, v11, 1) )
{
LevelEditorLayer::getObjectRect(a1, v11, 0, 0);
if ( !*p_m_nonSquareRotation )
{
if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v12, (const cocos2d::CCPoint *)a3) )
{
LABEL_8:
++v8;
cocos2d::CCArray::addObject(v10, v11);
continue;
}
if ( !*p_m_nonSquareRotation )
{
++v8;
continue;
}
}
if ( OBB2D::overlaps(a1->m_currentOBB2D) )
goto LABEL_8;
}
++v8;
}
}