//
// EditorUI::ccTouchEnded from 0x1401245e0 to 0x140125312 (3378 bytes)
//
// 2 xrefs:
// > ??> @ 0x140552678
// > ??> @ 0x1406c99d8
//
// 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
//
// Hidden C++ exception states: #wind=2
void EditorUI::ccTouchEnded(EditorUI *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
EditorUI *v6; // r14
int m_nId; // eax
_QWORD *p_FLAlert_Clicked; // rcx
CCMenuItemSpriteExtra *m_unlinkBtn; // rcx
GameManager *v10; // rcx
bool GameVariable; // r15
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
struct cocos2d::CCPoint v14; // rax
struct cocos2d::CCPoint v15; // rax
const struct cocos2d::CCPoint *v16; // r8
const struct cocos2d::CCPoint *v17; // r8
float v18; // xmm0_4
char v19; // bl
float v20; // xmm0_4
char v21; // r12
__int64 v22; // rcx
cocos2d::CCDirector *v23; // rax
struct cocos2d::CCPoint v24; // rax
struct cocos2d::CCPoint v25; // rax
GameManager *v26; // rcx
cocos2d::CCObject *m_unk3F0; // rcx
float v28; // xmm0_4
float *v29; // rax
float *v30; // rbx
float m_gridSize; // xmm8_4
float v32; // xmm7_4
float v33; // xmm0_4
cocos2d::CCObject *v34; // rbx
unsigned int i; // ebx
GameObject *v36; // rsi
cocos2d::CCPoint v37; // rax
__int64 v38; // rax
__int64 v39; // rax
__int64 v40; // rax
const struct cocos2d::CCPoint *v41; // rax
__int64 v42; // rax
struct cocos2d::CCObject *v43; // r14
CCMenuItemSpriteExtra *v44; // rsi
unsigned int v45; // ebx
cocos2d::CCObject *v46; // rcx
cocos2d::CCNode *v47; // rbx
__int64 v48; // rcx
cocos2d::CCDirector *v49; // rax
struct cocos2d::CCPoint v50; // rax
struct cocos2d::CCPoint v51; // rax
CCMenuItemSpriteExtra **v52; // r15
const struct cocos2d::CCPoint *v53; // r8
cocos2d::CCPoint v54; // rax
cocos2d::CCArray *v55; // r12
struct cocos2d::CCObject *v56; // rbx
unsigned int v57; // r14d
struct cocos2d::CCObject *v58; // rax
EditorUI *v59; // rcx
struct cocos2d::CCObject *v60; // rsi
const struct cocos2d::CCRect *v61; // rax
cocos2d::CCRect *v62; // rax
cocos2d::CCArray *v63; // rsi
unsigned int v64; // ebx
struct cocos2d::CCObject *v65; // rax
CCMenuItemSpriteExtra *v66; // rdx
__int64 v67; // rcx
cocos2d::CCDirector *v68; // rax
struct cocos2d::CCPoint v69; // rax
struct cocos2d::CCPoint v70; // rax
const struct cocos2d::CCPoint *v71; // r8
float v72; // xmm0_4
cocos2d::CCPoint v73; // rax
cocos2d::CCArray *v74; // r15
unsigned int v75; // r14d
struct cocos2d::CCObject *v76; // rax
EditorUI *m_uAutoReleaseCount; // rcx
struct cocos2d::CCObject *v78; // rsi
bool v79; // r8
CCMenuItemSpriteExtra **p_m_deleteButton; // rsi
GameObject *m_editSpecialBtn; // rcx
GameObject *Object; // rax
cocos2d::CCArray *v83; // rax
cocos2d::CCPoint v84; // rax
GameObject *v85; // rcx
char m_nTouchPriority; // bl
cocos2d::CCPoint v87; // [rsp+38h] [rbp-69h] BYREF
struct cocos2d::CCPoint v88; // [rsp+40h] [rbp-61h] BYREF
cocos2d::CCPoint v89; // [rsp+48h] [rbp-59h] BYREF
struct cocos2d::CCPoint v90; // [rsp+50h] [rbp-51h] BYREF
char v91[8]; // [rsp+58h] [rbp-49h] BYREF
cocos2d::CCRect v92; // [rsp+60h] [rbp-41h] BYREF
cocos2d::CCRect v93; // [rsp+70h] [rbp-31h] BYREF
cocos2d::CCRect v94[4]; // [rsp+80h] [rbp-21h] BYREF
cocos2d::CCPoint v95; // [rsp+108h] [rbp+67h] BYREF
struct cocos2d::CCPoint v96; // [rsp+110h] [rbp+6Fh] BYREF
cocos2d::CCPoint v97; // [rsp+120h] [rbp+7Fh] BYREF
LOBYTE(a1->m_nTouchPriority) = 0;
v6 = (EditorUI *)((char *)a1 - 320);
cocos2d::CCNode::stopActionByTag((EditorUI *)((char *)a1 - 320), 123);
m_nId = a2->m_nId;
if ( LODWORD(a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable) == m_nId )
{
LODWORD(a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable) = -1;
p_FLAlert_Clicked = &a1->m_pScriptKeypadHandlerEntry->cocos2d::CCLayer::__vftable;
LABEL_3:
(*(void (__fastcall **)(_QWORD *, cocos2d::CCTouch *, cocos2d::CCEvent *))(p_FLAlert_Clicked[40] + 24LL))(
p_FLAlert_Clicked + 40,
a2,
a3);
return;
}
if ( HIDWORD(a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable) == m_nId )
{
HIDWORD(a1->cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable) = -1;
p_FLAlert_Clicked = *(_QWORD **)&a1->m_uPreviousPriority;
goto LABEL_3;
}
if ( *(_DWORD *)&a1->m_bMouseEnabled == m_nId )
{
*(_DWORD *)&a1->m_bMouseEnabled = -1;
p_FLAlert_Clicked = &a1->FLAlert_Clicked;
goto LABEL_3;
}
m_unlinkBtn = a1->m_unlinkBtn;
if ( LODWORD(m_unlinkBtn[4].m_fScaleX) == 1 )
{
p_FLAlert_Clicked = *((_QWORD **)&m_unlinkBtn[25].m_activateSound.m_data.m_bigStorage + 1);
goto LABEL_3;
}
if ( *(_DWORD *)&a1->m_bTouchEnabled == m_nId )
{
v10 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v95 = (cocos2d::CCPoint)operator new(0x668u);
qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v95);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v10 = (GameManager *)qword_1406C2ED8;
}
GameVariable = GameManager::getGameVariable(v10, "0059");
cocos2d::CCTouch::getLocationInView(a2);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
v14 = cocos2d::CCDirector::convertToGL(v13, &v95);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v96, v14);
v15 = cocos2d::CCNode::convertToWorldSpace(v6, &v95);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v96, v15);
v18 = cocos2d::ccpDistance((cocos2d *)&a1->m_enableLinkBtn, &v96, v16);
if ( GameVariable && v18 < 2.0 )
{
v19 = 1;
v20 = cocos2d::ccpDistance((cocos2d *)&a1->m_editObjectBtn, &v96, v17);
}
else
{
v20 = cocos2d::ccpDistance((cocos2d *)&a1->m_editObjectBtn, &v96, v17);
v19 = 0;
if ( !GameVariable )
goto LABEL_19;
}
if ( v20 < 2.0 )
{
v21 = 1;
LABEL_20:
*(_DWORD *)&a1->m_bTouchEnabled = -1;
if ( BYTE1(a1->m_objectEditorStates._List._Mypair._Myval2._Mysize)
&& HIBYTE(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead)
&& a1->m_unk3F0 )
{
cocos2d::CCPoint::CCPoint(&v97);
cocos2d::CCTouch::getLocationInView(a2);
v23 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22);
v24 = cocos2d::CCDirector::convertToGL(v23, &v89);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v24);
v25 = cocos2d::CCNode::convertToWorldSpace(v6, &v89);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v25);
cocos2d::CCNode::convertToNodeSpace(*(cocos2d::CCNode **)&a1->m_unlinkBtn[7].m_nScriptTapHandler, &v90);
v26 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v89 = (cocos2d::CCPoint)operator new(0x668u);
qword_1406C2ED8 = ((__int64 (__fastcall *)(_QWORD))sub_14017AB00)(v89);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v26 = (GameManager *)qword_1406C2ED8;
}
if ( GameManager::getGameVariable(v26, "0008") )
{
m_unk3F0 = a1->m_unk3F0;
if ( m_unk3F0 )
{
v28 = ((float (__fastcall *)(cocos2d::CCObject *))m_unk3F0->__vftable[4].getTag)(m_unk3F0);
if ( (int)v28 == 90 * ((int)v28 / 90) && !cocos2d::CCPoint::equals(&v95) )
{
cocos2d::CCPoint::CCPoint(&v87);
v30 = v29;
m_gridSize = v6->m_editorLayer->m_drawGridLayer->m_gridSize;
v32 = (float)(floorf(*v29 / m_gridSize) + 0.5) * m_gridSize;
v33 = (float)(floorf(v30[1] / m_gridSize) + 0.5) * m_gridSize;
cocos2d::CCPoint::CCPoint(&v92.origin, v32, v33);
EditorUI::getLimitedPosition(v6, (cocos2d::CCPoint)&v88);
v34 = a1->m_unk3F0;
EditorUI::offsetForKey(v6, (int)&v92);
GameToolbox::getRelativeOffset((GameObject *)&v87, (cocos2d::CCPoint)v34);
cocos2d::CCPoint::CCPoint(&v93.origin);
EditorUI::applySpecialOffset(
v6,
(cocos2d::CCPoint)v91,
(GameObject *)&v87,
(cocos2d::CCPoint)a1->m_unk3F0);
cocos2d::CCPoint::operator+(&v88, &v87);
cocos2d::CCPoint::operator=(&v88, &v87);
a1->m_unk3F0->__vftable[2].getTag(a1->m_unk3F0);
cocos2d::CCPoint::CCPoint(&v89);
a1->m_unk3F0->__vftable[2].encodeWithCoder(a1->m_unk3F0, (DS_Dictionary *)&v88);
cocos2d::CCPoint::operator-(&v88, &v87, &v89);
cocos2d::CCPoint::operator=(&v97, &v87);
if ( cocos2d::CCArray::count((cocos2d::CCArray *)a1->m_objectEditorStates._Mask) )
{
for ( i = 0; i < cocos2d::CCArray::count((cocos2d::CCArray *)a1->m_objectEditorStates._Mask); ++i )
{
v36 = (GameObject *)cocos2d::CCArray::objectAtIndex(
(cocos2d::CCArray *)a1->m_objectEditorStates._Mask,
i);
if ( v36->m_uniqueID != a1->m_unk3F0[16].m_eObjType )
{
cocos2d::CCPoint::CCPoint(&v93.origin);
EditorUI::moveObject(v6, v36, v37);
}
}
}
cocos2d::CCPoint::operator+(&a1->m_pScriptAccelerateHandlerEntry, &v87);
cocos2d::CCPoint::operator=(&a1->m_pScriptAccelerateHandlerEntry, &v87);
if ( ((unsigned __int8 (__fastcall *)(cocos2d::CCScriptHandlerEntry *))a1->m_pScriptKeypadHandlerEntry->cocos2d::CCLayer::__vftable[4].encodeWithCoder)(a1->m_pScriptKeypadHandlerEntry) )
{
v38 = ((__int64 (__fastcall *)(cocos2d::CCScriptHandlerEntry *))a1->m_pScriptKeypadHandlerEntry->cocos2d::CCLayer::__vftable[2].getTag)(a1->m_pScriptKeypadHandlerEntry);
cocos2d::CCPoint::operator+(v38, &v87);
a1->m_pScriptKeypadHandlerEntry->cocos2d::CCLayer::__vftable[2].encodeWithCoder(
a1->m_pScriptKeypadHandlerEntry,
(DS_Dictionary *)&v87);
}
else if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_uPreviousPriority + 328LL))(*(_QWORD *)&a1->m_uPreviousPriority) )
{
v39 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1->m_uPreviousPriority + 200LL))(*(_QWORD *)&a1->m_uPreviousPriority);
cocos2d::CCPoint::operator+(v39, &v87);
(*(void (__fastcall **)(_QWORD, cocos2d::CCPoint *))(**(_QWORD **)&a1->m_uPreviousPriority + 184LL))(
*(_QWORD *)&a1->m_uPreviousPriority,
&v87);
}
else if ( (*((unsigned __int8 (__fastcall **)(FLAlertLayerProtocol_vtbl *))a1->FLAlert_Clicked + 41))(a1->FLAlertLayerProtocol::__vftable) )
{
v40 = (*((__int64 (__fastcall **)(FLAlertLayerProtocol_vtbl *))a1->FLAlert_Clicked + 25))(a1->FLAlertLayerProtocol::__vftable);
cocos2d::CCPoint::operator+(v40, &v87);
(*((void (__fastcall **)(FLAlertLayerProtocol_vtbl *, cocos2d::CCPoint *))a1->FLAlert_Clicked + 23))(
a1->FLAlertLayerProtocol::__vftable,
&v87);
GJTransformControl::refreshControl((GJTransformControl *)a1->FLAlertLayerProtocol::__vftable);
}
}
}
}
v41 = (const struct cocos2d::CCPoint *)((__int64 (__fastcall *)(cocos2d::CCObject *))a1->m_unk3F0->__vftable[2].getTag)(a1->m_unk3F0);
if ( cocos2d::CCPoint::equals(v41) )
BYTE1(a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable) = 1;
v42 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a1->m_unk3F0->__vftable[2].getTag)(a1->m_unk3F0);
cocos2d::CCPoint::operator-(v42, v94, &a1->m_objectEditorStates._Vec._Mypair._Myval2._Myend);
if ( !BYTE1(a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable) )
{
v43 = (struct cocos2d::CCObject *)a1->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable;
if ( v43 )
{
v44 = a1->m_unlinkBtn;
cocos2d::CCArray::removeAllObjects((cocos2d::CCArray *)v44[27].m_pScheduler);
v45 = 1000;
if ( !*((_BYTE *)&v44[26].m_iconType + 6) )
v45 = 200;
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)&v44[27].m_eGLServerState) >= v45 )
cocos2d::CCArray::removeObjectAtIndex(*(cocos2d::CCArray **)&v44[27].m_eGLServerState, 0, 1);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)&v44[27].m_eGLServerState, v43);
v46 = (cocos2d::CCObject *)a1->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable;
if ( v46 )
{
cocos2d::CCObject::release(v46);
a1->cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = nullptr;
}
}
}
goto LABEL_98;
}
if ( !BYTE5(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead) || v19 )
{
if ( LOBYTE(a1->m_copyPasteBtn) )
{
LOBYTE(a1->m_copyPasteBtn) = 0;
}
else
{
cocos2d::CCTouch::getLocationInView(a2);
v68 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v67);
v69 = cocos2d::CCDirector::convertToGL(v68, &v97);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v69);
v70 = cocos2d::CCNode::convertToWorldSpace((EditorUI *)((char *)a1 - 320), &v94[0].origin);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v70);
v72 = cocos2d::ccpDistance((cocos2d *)&a1->m_enableLinkBtn, &v95, v71);
if ( !BYTE6(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead) || v72 < 20.0 )
{
if ( LODWORD(a1->m_linkBtn) != 3 )
{
if ( !LOBYTE(a1->m_createButtonBars) )
{
cocos2d::CCPoint::CCPoint(&v95);
EditorUI::clickOnPosition((EditorUI *)((char *)a1 - 320), v84);
}
goto LABEL_98;
}
cocos2d::CCNode::convertToNodeSpace(*(cocos2d::CCNode **)&a1->m_unlinkBtn[7].m_nScriptTapHandler, &v95);
if ( !a1->m_unk3F0 || !BYTE2(a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable) )
{
cocos2d::CCPoint::CCPoint(&v97);
v74 = LevelEditorLayer::objectsAtPosition((LevelEditorLayer *)a1->m_unlinkBtn, v73);
v56 = nullptr;
v75 = 0;
if ( cocos2d::CCArray::count(v74) )
{
do
{
v76 = cocos2d::CCArray::objectAtIndex(v74, v75);
v78 = v76;
if ( !BYTE1(v76[20].m_uReference) )
{
if ( !v56
|| (m_uAutoReleaseCount = (EditorUI *)v56[20].m_uAutoReleaseCount,
(signed int)v76[20].m_uAutoReleaseCount < (int)m_uAutoReleaseCount) )
{
if ( EditorUI::canSelectObject(m_uAutoReleaseCount, (GameObject *)v76) )
v56 = v78;
}
}
++v75;
}
while ( v75 < cocos2d::CCArray::count(v74) );
if ( v56 )
{
v56[20].m_uAutoReleaseCount = HIDWORD(a1->m_pasteBtn);
EditorUI::createUndoSelectObject((EditorUI *)((char *)a1 - 320), 0);
if ( BYTE5(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead) )
{
if ( v21 )
{
if ( a1->m_editSpecialBtn )
{
p_m_deleteButton = &a1[-1].m_deleteButton;
cocos2d::CCNode::stopActionByTag((EditorUI *)((char *)a1 - 320), 124);
m_editSpecialBtn = (GameObject *)a1->m_editSpecialBtn;
if ( m_editSpecialBtn )
{
m_editSpecialBtn->m_isSelected = 0;
GameObject::updateObjectEditorColor(m_editSpecialBtn);
}
p_m_deleteButton[167] = nullptr;
EditorUI::toggleEditObjectButton((EditorUI *)((char *)a1 - 320));
*((_BYTE *)p_m_deleteButton + 712) = 1;
cocos2d::CCPoint::operator=(p_m_deleteButton + 164, &dword_1406C1AA8);
}
else
{
Object = (GameObject *)cocos2d::CCArray::lastObject((cocos2d::CCArray *)a1->m_objectEditorStates._Mask);
if ( Object )
{
Object->m_isSelected = 0;
GameObject::updateObjectEditorColor(Object);
cocos2d::CCArray::removeLastObject((cocos2d::CCArray *)a1->m_objectEditorStates._Mask, 1);
}
}
}
goto LABEL_95;
}
EditorUI::selectObject((EditorUI *)((char *)a1 - 320), (GameObject *)v56, v79);
}
}
}
}
}
}
else
{
v47 = *(cocos2d::CCNode **)&a1->m_unlinkBtn[7].m_nScriptTapHandler;
cocos2d::CCNode::convertToNodeSpace(v47, &v88);
cocos2d::CCNode::convertToNodeSpace(v47, &v97);
cocos2d::CCRect::CCRect(
&v92,
fminf(v88.x, v97.x),
fminf(v88.y, v97.y),
fabs(v88.x - v97.x),
fabs(v88.y - v97.y));
cocos2d::CCTouch::getLocationInView(a2);
v49 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v48);
v50 = cocos2d::CCDirector::convertToGL(v49, &v94[0].origin);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v50);
v51 = cocos2d::CCNode::convertToWorldSpace((EditorUI *)((char *)a1 - 320), &v93.origin);
((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&v95, v51);
v52 = &a1[-1].m_deleteButton;
if ( cocos2d::ccpDistance((cocos2d *)&a1->m_enableLinkBtn, &v95, v53) >= 2.0 )
{
v61 = (const struct cocos2d::CCRect *)cocos2d::CCRect::CCRect(v94, &v92);
v62 = (cocos2d::CCRect *)cocos2d::CCRect::CCRect(&v93, v61);
v63 = LevelEditorLayer::objectsInRect((LevelEditorLayer *)v52[160], v62, 0);
if ( cocos2d::CCArray::count(v63) )
{
v64 = 0;
if ( cocos2d::CCArray::count(v63) )
{
while ( 1 )
{
v65 = cocos2d::CCArray::objectAtIndex(v63, v64);
v66 = v52[167];
if ( v66 )
{
if ( HIDWORD(v66[1].m_pSelectedImage) != v65[16].m_eObjType )
break;
}
if ( !cocos2d::CCArray::containsObject((cocos2d::CCArray *)v52[104], v65) )
break;
if ( ++v64 >= cocos2d::CCArray::count(v63) )
goto LABEL_70;
}
EditorUI::createUndoSelectObject((EditorUI *)((char *)a1 - 320), 0);
}
LABEL_70:
EditorUI::selectObjects((EditorUI *)((char *)a1 - 320), v63, 0);
EditorUI::updateObjectInfoLabel((EditorUI *)((char *)a1 - 320));
(*(void (__fastcall **)(char *))&v52[54]->m_unknown2)((char *)v52 + 432);
}
goto LABEL_98;
}
cocos2d::CCPoint::CCPoint(&v95);
v55 = LevelEditorLayer::objectsAtPosition((LevelEditorLayer *)a1->m_unlinkBtn, v54);
v56 = nullptr;
v57 = 0;
if ( cocos2d::CCArray::count(v55) )
{
do
{
v58 = cocos2d::CCArray::objectAtIndex(v55, v57);
v60 = v58;
if ( !BYTE1(v58[20].m_uReference) )
{
if ( !v56
|| (v59 = (EditorUI *)v56[20].m_uAutoReleaseCount, (signed int)v58[20].m_uAutoReleaseCount < (int)v59) )
{
if ( EditorUI::canSelectObject(v59, (GameObject *)v58) )
v56 = v60;
}
}
++v57;
}
while ( v57 < cocos2d::CCArray::count(v55) );
if ( v56 )
{
v56[20].m_uAutoReleaseCount = *((_DWORD *)v52 + 343);
EditorUI::createUndoSelectObject((EditorUI *)((char *)a1 - 320), 0);
LABEL_95:
v83 = cocos2d::CCArray::createWithObject(v56);
EditorUI::selectObjects((EditorUI *)((char *)a1 - 320), v83, 0);
}
}
}
LABEL_98:
v85 = (GameObject *)a1->m_unk3F0;
if ( v85 )
{
if ( BYTE1(a1->m_objectEditorStates._List._Mypair._Myval2._Mysize)
&& HIBYTE(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead) )
{
if ( v85->m_isSelected )
{
LOWORD(v95.x) = -256;
BYTE2(v95.x) = 0;
v85->selectObject(v85, (cocos2d::ccColor3B *)&v95);
}
else
{
v85->m_isSelected = 0;
GameObject::updateObjectEditorColor(v85);
}
}
a1->m_unk3F0 = nullptr;
}
*(_WORD *)((char *)&a1->m_objectEditorStates._List._Mypair._Myval2._Myhead + 5) = 0;
BYTE1(a1->m_objectEditorStates._List._Mypair._Myval2._Mysize) = 0;
BYTE1(a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable) = 0;
cocos2d::CCPoint::operator=(&a1->m_objectEditorStates._Vec, &dword_1406C1AA8);
HIBYTE(a1->m_objectEditorStates._List._Mypair._Myval2._Myhead) = 0;
BYTE2(a1->cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable) = 0;
cocos2d::CCPoint::operator=(&a1->m_redoBtn, &a1->m_enableLinkBtn);
BYTE1(a1->m_copyPasteBtn) = 0;
m_nTouchPriority = a1->m_nTouchPriority;
EditorUI::updateButtons((EditorUI *)((char *)a1 - 320));
++HIDWORD(a1->m_pasteBtn);
cocos2d::CCArray::removeAllObjects((cocos2d::CCArray *)a1->m_objectEditorStates._Vec._Mypair._Myval2._Mylast);
if ( m_nTouchPriority )
{
EditorUI::updateObjectInfoLabel((EditorUI *)((char *)a1 - 320));
(*(void (__fastcall **)(float *))(*(_QWORD *)&a1->m_obContentSize.height + 40LL))(&a1->m_obContentSize.height);
(*(void (__fastcall **)(float *))(*(_QWORD *)&a1->m_sAdditionalTransform.b + 96LL))(&a1->m_sAdditionalTransform.b);
LOBYTE(a1->m_nTouchPriority) = 0;
}
cocos2d::CCPoint::operator=(&a1->m_editObjectBtn, &v96);
return;
}
LABEL_19:
v21 = 0;
goto LABEL_20;
}
}