//
// EditorUI::selectAllWithDirection from 0x6c31e8 to 0x6c3380 (408 bytes)
//
// 3 xrefs:
// > EditorPauseLayer::onSelectAllLeft @ 0x78abd4
// > EditorPauseLayer::onSelectAllRight @ 0x78abe4
// > ??> @ 0x834c0
//
// 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 EditorUI::selectAllWithDirection(EditorUI *a1, bool a2)
{
_BOOL4 v2; // w24
cocos2d::CCArray *AllObjects; // x21
cocos2d::CCDirector *v5; // x0
unsigned int v6; // w19
cocos2d::CCLayer *m_objectLayer; // x20
cocos2d::CCArray *v8; // x0
cocos2d::CCArray *v9; // x26
GameObject *v10; // x20
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1
float v12; // [xsp+60h] [xbp+60h]
float v13; // [xsp+64h] [xbp+64h]
float v14; // [xsp+68h] [xbp+68h]
cocos2d::CCPoint v15; // [xsp+70h] [xbp+70h] BYREF
v2 = a2;
AllObjects = LevelEditorLayer::getAllObjects(a1->m_editorLayer);
v5 = cocos2d::CCDirector::sharedDirector();
v6 = 0;
cocos2d::CCDirector::getWinSize(v5);
m_objectLayer = a1->m_editorLayer->m_objectLayer;
cocos2d::CCPoint::CCPoint(&v15, v12 * 0.5, (float)(a1->m_toolbarHeight * 0.5) + (float)(v13 * 0.5));
cocos2d::CCNode::convertToNodeSpace(m_objectLayer, &v15);
v9 = (cocos2d::CCArray *)cocos2d::CCArray::create(v8);
if ( (unsigned int)cocos2d::CCArray::count(AllObjects) )
{
do
{
v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(AllObjects, v6);
if ( LevelEditorLayer::validGroup(a1->m_editorLayer, v10, 0) )
{
getPosition = v10->getPosition;
if ( v2 )
{
if ( getPosition(v10)->x < v14 )
goto LABEL_9;
}
else if ( getPosition(v10)->x > v14 )
{
LABEL_9:
++v6;
cocos2d::CCArray::addObject(v9, v10);
continue;
}
}
++v6;
}
while ( v6 < (unsigned int)cocos2d::CCArray::count(AllObjects) );
}
EditorUI::processSelectObjects(a1, v9);
EditorUI::updateButtons(a1);
EditorUI::deactivateRotationControl(a1);
EditorUI::deactivateScaleControl(a1);
EditorUI::deactivateTransformControl(a1);
EditorUI::updateObjectInfoLabel(a1);
}