//
// sub_6F13BC from 0x6f13bc to 0x6f161a (606 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x6f1a08
// > EditorUI::handleEditorAction @ 0x6f1a1c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:57:35 +0000
//
int __fastcall sub_6F13BC(EditorUI **a1, const char *a2, int a3)
{
int v6; // r0
float v7; // s18
EditorUI *v8; // r3
float v9; // s17
float v10; // s16
const cocos2d::CCPoint *v11; // r0
EditorSFXManager *v12; // r0
EditorSFXManager *v13; // r0
cocos2d::CCString *v14; // r0
const char *CString; // r0
const char *v16; // r8
size_t v17; // r0
EditorUI *v18; // r8
void (__fastcall *v19)(EditorUI *, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v20; // r0
int v21; // r7
void (__fastcall *v22)(int, _BYTE *); // r8
EditorSFXManager *updated; // r0
EditorSFXManager *v24; // r0
cocos2d::CCString *v26; // r0
const char *v27; // r0
const char *v28; // r7
size_t v29; // r0
EditorUI *v30; // r8
void (__fastcall *v31)(EditorUI *, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v32; // r0
float v33[2]; // [sp+8h] [bp-44h] BYREF
float v34; // [sp+10h] [bp-3Ch] BYREF
float v35; // [sp+14h] [bp-38h]
_BYTE v36[8]; // [sp+18h] [bp-34h] BYREF
int v37; // [sp+20h] [bp-2Ch] BYREF
int v38; // [sp+24h] [bp-28h]
int v39; // [sp+28h] [bp-24h]
int v40[3]; // [sp+2Ch] [bp-20h] BYREF
int v41; // [sp+38h] [bp-14h] BYREF
int v42; // [sp+3Ch] [bp-10h]
int v43; // [sp+40h] [bp-Ch]
v6 = *(_DWORD *)(*((_DWORD *)*a1 + 236) + 2436);
v7 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v6 + 84))(v6));
cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v7));
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v33);
v8 = *a1;
v9 = v33[0] * 0.5;
v10 = (float)(*((float *)*a1 + 158) * 0.5) + (float)(v33[1] * 0.5);
if ( a3 )
{
v11 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)v8 + 236) + 2436) + 96))(*(_DWORD *)(*((_DWORD *)v8 + 236) + 2436));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v34, v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, (float)(v9 - v34) / v7, (float)(v10 - v35) / v7);
v12 = (EditorSFXManager *)LevelEditorLayer::saveEditorPosition(
*((_DWORD *)*a1 + 236),
(cocos2d::CCPoint *)v36,
(unsigned int)a2);
v13 = (EditorSFXManager *)EditorSFXManager::sharedState(v12);
EditorSFXManager::playAction(v13, 162);
v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Position %i saved.", a2);
CString = (const char *)cocos2d::CCString::getCString(v14);
v37 = 0;
v38 = 0;
v39 = 0;
v16 = CString;
v17 = strlen(CString);
std::string::__init(&v37, v16, v17);
v18 = *a1;
v19 = *(void (__fastcall **)(EditorUI *, cocos2d::CCNode *, int))(*(_DWORD *)*a1 + 232);
std::string::basic_string(v40, (int)&v37);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, &unk_B6B226, 0);
v20 = TextAlertPopup::create((int)v40, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)&v41);
v19(v18, v20, 100);
std::string::~string((int)&v41);
std::string::~string((int)v40);
}
else
{
LevelEditorLayer::getSavedEditorPosition((LevelEditorLayer *)&v34, *((_DWORD *)v8 + 236), (unsigned int)a2);
if ( v34 != 0.0 || v35 != 0.0 )
{
v21 = *(_DWORD *)(*((_DWORD *)*a1 + 236) + 2436);
v22 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36, v9 - (float)(v34 * v7), v10 - (float)(v35 * v7));
v22(v21, v36);
EditorUI::constrainGameLayerPosition(*a1);
updated = (EditorSFXManager *)EditorUI::updateSlider(*a1);
v24 = (EditorSFXManager *)EditorSFXManager::sharedState(updated);
return EditorSFXManager::playAction(v24, 163);
}
v26 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Position %i empty.", a2);
v27 = (const char *)cocos2d::CCString::getCString(v26);
v37 = 0;
v38 = 0;
v39 = 0;
v28 = v27;
v29 = strlen(v27);
std::string::__init(&v37, v28, v29);
v30 = *a1;
v31 = *(void (__fastcall **)(EditorUI *, cocos2d::CCNode *, int))(*(_DWORD *)*a1 + 232);
std::string::basic_string(v40, (int)&v37);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, &unk_B6B226, 0);
v32 = TextAlertPopup::create((int)v40, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)&v41);
v31(v30, v32, 100);
std::string::~string((int)&v41);
std::string::~string((int)v40);
}
return std::string::~string((int)&v37);
}