//
// LevelEditorLayer::init from 0x100356bb4 to 0x1003577cc (3096 bytes)
//
// 1 xrefs:
// > LevelEditorLayer::create @ 0x100356b64
//
// 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
//
bool __fastcall LevelEditorLayer::init(LevelEditorLayer *a1, GJGameLevel *a2, bool a3)
{
_BOOL4 v6; // w0
MusicDownloadManager *v7; // x0
GameManager *v8; // x0
GameManager *v9; // x0
GameManager *v10; // x0
bool GameVariable; // w0
GameManager *v12; // x0
int v13; // w8
FMODAudioEngine *v14; // x0
cocos2d::CCArray *v15; // x0
cocos2d::CCDictionary *v16; // x0
cocos2d::CCDictionary *v17; // x0
cocos2d::CCDictionary *v18; // x0
cocos2d::CCArray *v19; // x0
cocos2d::CCArray *v20; // x0
cocos2d::CCArray *v21; // x0
cocos2d::CCArray *v22; // x0
cocos2d::CCArray *v23; // x0
cocos2d::CCArray *v24; // x0
cocos2d::CCArray *v25; // x0
cocos2d::CCDictionary *v26; // x0
cocos2d::CCArray *v27; // x0
cocos2d::CCArray *v28; // x0
cocos2d::CCArray *v29; // x0
cocos2d::CCArray *v30; // x0
cocos2d::CCArray *v31; // x0
cocos2d::CCArray *v32; // x0
cocos2d::CCArray *v33; // x0
std::__vector_base::pointer begin; // x8
unsigned __int64 v35; // x9
unsigned __int64 i; // x8
__int64 v37; // x11
GJGameLevel *m_level; // x8
std::string::size_type size; // x8
cocos2d::CCArray *v40; // x23
std::string *p_str; // x8
std::string::size_type v42; // x28
std::string *v43; // x9
std::string::size_type v44; // x11
std::string *v45; // x10
__int64 v46; // x8
__int64 v47; // x22
std::string::size_type v48; // x24
std::string *p_dst; // x1
__int64 v50; // x19
bool v51; // zf
std::string::size_type v52; // x11
std::string *v53; // x8
_BYTE *v54; // x9
_BYTE *v55; // x10
std::string::size_type v56; // x11
__int64 v57; // x8
unsigned int j; // w24
cocos2d::CCString *v59; // x0
int v60; // w0
std::__vector_base::pointer v61; // x23
__int64 v62; // x8
unsigned __int64 v63; // x19
GJGameLevel *v64; // x8
std::string::size_type v65; // x8
std::string::size_type v66; // x8
__int64 v67; // x22
__int64 v68; // x24
unsigned __int64 v69; // x21
unsigned __int64 v70; // x28
std::string::size_type v71; // x25
const char *v72; // x0
int v73; // w23
const char *v74; // x0
int v75; // w0
__n128 v76; // q0
__n128 v77; // q1
bool v78; // cf
float v79; // s3
float v80; // s4
OBB2D *v81; // x0
cocos2d::CCDirector *v82; // x0
DrawGridLayer *v83; // x23
cocos2d::CCLayer *m_objectLayer; // x24
GameManager *v85; // x0
__int64 v86; // x2
cocos2d::CCDrawNode *v87; // x0
GJGameLevel *v88; // x8
std::string *p_m_levelString; // x8
void **v90; // x23
LevelSettingsObject *m_levelSettings; // x8
LevelSettingsObject *v92; // x0
ColorAction *ColorAction; // x0
PlayerObject *m_player1; // x8
GLubyte b; // w9
ColorAction *v96; // x0
PlayerObject *v97; // x8
cocos2d::ccColor3B *p_m_playerColor2; // x9
cocos2d::CCLayer *v99; // x22
float v100; // s0
EditorUI *m_editorUI; // x0
EditorUI *v102; // x0
cocos2d::CCArray *m_objects; // x8
cocos2d::ccArray *data; // x9
__int64 num; // x8
LabelGameObject **arr; // x19
unsigned __int64 v107; // x21
LabelGameObject *v108; // x1
cocos2d::CCArray *m_batchNodes; // x8
cocos2d::ccArray *v110; // x8
__int64 v111; // x9
unsigned __int64 v112; // x8
unsigned __int64 v113; // x9
GameManager *v114; // x0
GJGameLevel *v116; // [xsp+8h] [xbp-E8h]
bool v117; // [xsp+10h] [xbp-E0h]
bool v118; // [xsp+14h] [xbp-DCh]
void *__p[2]; // [xsp+20h] [xbp-D0h] BYREF
char *longStorage; // [xsp+30h] [xbp-C0h]
__int64 v121; // [xsp+40h] [xbp-B0h] BYREF
std::string __str; // [xsp+50h] [xbp-A0h] BYREF
std::string __a; // [xsp+68h] [xbp-88h] BYREF
std::string __dst; // [xsp+80h] [xbp-70h] BYREF
cocos2d::SEL_SCHEDULE v125; // 0:x1.16
cocos2d::CCPoint v126; // 0:s0.4,4:s1.4
v6 = GJBaseGameLayer::init(a1);
if ( v6 )
{
v117 = v6;
v7 = MusicDownloadManager::sharedState();
MusicDownloadManager::tryLoadLibraries(v7);
UILayer::enableEditorMode(a1->m_uiLayer);
a1->m_isEditor = 1;
a1->m_initializing = 1;
v8 = GameManager::sharedState();
a1->m_playTestSmoothFix = GameManager::getGameVariable(v8, "0102");
v9 = GameManager::sharedState();
a1->m_previewParticles = GameManager::getGameVariable(v9, "0117");
v10 = GameManager::sharedState();
a1->m_previewAnimations = GameManager::getGameVariable(v10, "0118");
GameVariable = 1;
if ( !a1->m_alwaysHideParticleIcons )
{
v12 = GameManager::sharedState();
GameVariable = GameManager::getGameVariable(v12, "0137");
}
a1->m_hideParticleIcons = GameVariable;
LevelEditorLayer::updateOptions(a1);
a1->m_objectCount.value = 0;
v13 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);
a1->m_objectCount.seed = v13;
a1->m_objectCount.random = v13;
v14 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::stopAllMusic(v14, 1);
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
GameManager::sharedState()->m_editorEnabled = 1;
GameManager::sharedState()->m_levelEditorLayer = a1;
v15 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_durationObjects = v15;
cocos2d::CCObject::retain(v15);
v16 = cocos2d::CCDictionary::create();
a1->m_triggerGroupsDict = v16;
cocos2d::CCObject::retain(v16);
v17 = cocos2d::CCDictionary::create();
a1->m_unk3778 = v17;
cocos2d::CCObject::retain(v17);
v18 = cocos2d::CCDictionary::create();
a1->m_unk3780 = v18;
cocos2d::CCObject::retain(v18);
v19 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_pulseTriggers = v19;
cocos2d::CCObject::retain(v19);
v20 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_colorTriggers = v20;
cocos2d::CCObject::retain(v20);
v21 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_alphaTriggers = v21;
cocos2d::CCObject::retain(v21);
v22 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_spawnTriggers = v22;
cocos2d::CCObject::retain(v22);
v23 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_playtestTriggers = v23;
cocos2d::CCObject::retain(v23);
v24 = (cocos2d::CCArray *)cocos2d::CCDictionary::create();
a1->m_spawnOrderTriggers = v24;
cocos2d::CCObject::retain(v24);
v25 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_spawnOrderObjects = v25;
cocos2d::CCObject::retain(v25);
v26 = cocos2d::CCDictionary::create();
a1->m_unk3740 = v26;
cocos2d::CCObject::retain(v26);
v27 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_unk3748 = v27;
cocos2d::CCObject::retain(v27);
a1->m_unk3751 = 1;
v28 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_moveTriggers = v28;
cocos2d::CCObject::retain(v28);
v29 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_undoObjects = v29;
cocos2d::CCObject::retain(v29);
v30 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_redoObjects = v30;
cocos2d::CCObject::retain(v30);
v31 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_cameraGuideTriggers = v31;
cocos2d::CCObject::retain(v31);
v32 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_particleObjects = v32;
cocos2d::CCObject::retain(v32);
v33 = (cocos2d::CCArray *)sub_10024A15C();
a1->m_keyframeObjects = v33;
cocos2d::CCObject::retain(v33);
sub_10000EC70(&a1->m_objectVector.__begin_, 0x2710u);
sub_10000ECA0((__int64 *)&a1->m_toggledGroups, 0x2710u, 0);
sub_10000ECA0((__int64 *)&a1->m_lockedLayers, 0x2710u, 0);
begin = a1->m_toggledGroupStates.__begin_;
v35 = a1->m_toggledGroupStates.__end_ - begin;
v116 = a2;
v118 = a3;
if ( v35 >> 4 > 0x270 )
{
if ( v35 != 10000 )
a1->m_toggledGroupStates.__end_ = begin + 10000;
}
else
{
sub_10036C950((_DWORD)a1 + 14368, 10000 - v35);
}
sub_10000ECA0((__int64 *)&a1->m_blendingColors2, 0x2710u, 0);
sub_10000ECA0((__int64 *)&a1->m_blendingColors, 0x2710u, 0);
sub_10000EC70(&a1->m_triggerGroups.__begin_, 0x2710u);
sub_10000ECA0((__int64 *)&a1->m_sortedGroups, 0x2710u, 0);
sub_10011C2E0(&a1->m_spawnGroupDelays.__begin_, 0x2710u);
for ( i = 0; i != 10000; ++i )
{
a1->m_objectVector.__begin_[i] = nullptr;
v37 = (i >> 3) & 0x1FFFFFFFFFFFFFF8LL;
*(_QWORD *)&a1->m_toggledGroups.__begin_[v37] &= ~(1LL << i);
*(_QWORD *)&a1->m_blendingColors2.__begin_[v37] &= ~(1LL << i);
*(_QWORD *)&a1->m_lockedLayers.__begin_[v37] &= ~(1LL << i);
*(_QWORD *)&a1->m_blendingColors.__begin_[v37] &= ~(1LL << i);
*(_QWORD *)&a1->m_sortedGroups.__begin_[v37] &= ~(1LL << i);
a1->m_toggledGroupStates.__begin_[i] = 0;
a1->m_triggerGroups.__begin_[i] = nullptr;
a1->m_spawnGroupDelays.__begin_[i] = 0.0;
}
m_level = a1->m_level;
if ( m_level->m_lockedEditorLayers.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(
&__str,
(void *)m_level->m_lockedEditorLayers.m_data.m_long.capacitym1,
m_level->m_lockedEditorLayers.m_data.m_long.size);
else
__str = (std::string)m_level->m_lockedEditorLayers;
size = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = __str.__r_.__value_.__l.__size_;
if ( size )
{
v40 = (cocos2d::CCArray *)sub_10024A15C();
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_str = &__str;
else
p_str = (std::string *)__str.__r_.__value_.__r.__words[0];
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v42 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
else
v42 = __str.__r_.__value_.__l.__size_;
if ( v42 )
{
v43 = (std::string *)((char *)p_str + v42);
v44 = v42;
v45 = p_str;
do
{
if ( v45->__r_.__value_.__s.__data_[0] == 44 )
goto LABEL_27;
v45 = (std::string *)((char *)v45 + 1);
--v44;
}
while ( v44 );
v45 = (std::string *)((char *)p_str + v42);
LABEL_27:
v46 = (char *)v45 - (char *)p_str;
if ( v45 == v43 )
v47 = -1;
else
v47 = v46;
}
else
{
v47 = -1;
}
v48 = 0;
while ( 1 )
{
std::string::basic_string(&__dst, &__str, v48, v47 - v48, (std::allocator *)&__a);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
{
if ( v48 != v42 || __dst.__r_.__value_.__l.__size_ )
{
p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0];
LABEL_39:
sub_100009900(&__a, (char *)p_dst);
sub_100268E48((__int128 *)&__a);
sub_10024A2D0((__int64)v40);
if ( SHIBYTE(__a.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__a.__r_.__value_.__l.__data_);
}
}
else if ( v48 != v42 || *((_BYTE *)&__dst.__r_.__value_.__s + 23) )
{
p_dst = &__dst;
goto LABEL_39;
}
if ( v47 == -1 )
goto LABEL_42;
v48 = v47 + 1;
v52 = __str.__r_.__value_.__l.__size_;
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v53 = &__str;
else
v53 = (std::string *)__str.__r_.__value_.__r.__words[0];
if ( (__str.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
v52 = HIBYTE(__str.__r_.__value_.__r.__words[2]);
if ( v52 <= v48 )
{
LABEL_42:
v50 = -1;
}
else
{
v54 = (char *)v53 + v52;
v55 = (char *)v53 + v48;
v56 = ~v47 + v52;
while ( *v55 != 44 )
{
++v55;
if ( !--v56 )
{
v55 = v54;
break;
}
}
v57 = v55 - (_BYTE *)v53;
if ( v55 == v54 )
v50 = -1;
else
v50 = v57;
}
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
v51 = v47 == -1;
v47 = v50;
if ( v51 )
{
for ( j = 0; j < (unsigned int)sub_10024A36C((__int64)v40); ++j )
{
v59 = cocos2d::CCArray::stringAtIndex(v40, j);
v60 = cocos2d::CCString::intValue(v59);
if ( v60 <= 9999 )
*(_QWORD *)&a1->m_lockedLayers.__begin_[((unsigned __int64)v60 >> 3) & 0x1FFFFFFFFFFFFFF8LL] |= 1LL << v60;
}
break;
}
}
}
sub_100357A80(&a1->m_savedPositions, 10);
v61 = a1->m_savedPositions.__begin_;
v62 = a1->m_savedPositions.__end_ - v61;
if ( v62 >= 1 )
{
v63 = v62 + 1;
do
{
sub_1000229D0(v61++, (double *)&dword_10086E330);
--v63;
}
while ( v63 > 1 );
}
v64 = a1->m_level;
if ( v64->m_savedCameraPositions.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(
&__dst,
(void *)v64->m_savedCameraPositions.m_data.m_long.capacitym1,
v64->m_savedCameraPositions.m_data.m_long.size);
else
__dst = (std::string)v64->m_savedCameraPositions;
v65 = HIBYTE(__dst.__r_.__value_.__r.__words[2]);
if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v65 = __dst.__r_.__value_.__l.__size_;
if ( v65 )
{
memset(&__a, 0, sizeof(__a));
sub_100357AB0((int)&__dst, ",");
v66 = __a.__r_.__value_.__r.__words[0];
if ( __a.__r_.__value_.__l.__size_ - __a.__r_.__value_.__r.__words[0] != 24 )
{
v67 = 0;
v68 = 0;
v69 = 0;
v70 = 2;
do
{
v71 = v66 + v68;
if ( *(char *)(v66 + v68 + 23) < 0 )
v72 = *(const char **)v71;
else
v72 = (const char *)(v66 + v68);
v73 = atoi(v72);
v74 = (const char *)(v71 + 24);
if ( *(char *)(v71 + 47) < 0 )
v74 = *(const char **)v74;
v75 = atoi(v74);
v76.n128_f32[0] = (float)v73;
v77.n128_f32[0] = (float)v75;
sub_100022980(v76, v77, __p);
sub_1000229D0(&a1->m_savedPositions.__begin_[v67], (double *)__p);
v66 = __a.__r_.__value_.__r.__words[0];
v78 = 0xAAAAAAAAAAAAAAABLL
* ((__int64)(__a.__r_.__value_.__l.__size_ - __a.__r_.__value_.__r.__words[0]) >> 3)
- 1 <= v70
|| v69++ >= 9;
v68 += 48;
v70 += 2LL;
++v67;
}
while ( !v78 );
}
__p[0] = &__a;
sub_1000177FC((void ***)__p);
}
sub_1000229B8((__int64 *)&__a, (__int64 *)&a1->m_level->m_previewLock);
sub_1000229D0(&a1->m_previewPosition, (double *)&__a);
sub_1000229B8((__int64 *)&__a, (__int64 *)&dword_10086E330);
v126.x = 1.0;
v126.y = 1.0;
v81 = OBB2D::create(v126, 0.0, v79, v80);
a1->m_currentOBB2D = v81;
cocos2d::CCObject::retain(v81);
v82 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v82);
GJBaseGameLayer::setupLayers(a1);
v83 = DrawGridLayer::create(a1->m_objectLayer, a1);
a1->m_drawGridLayer = v83;
m_objectLayer = a1->m_objectLayer;
v85 = GameManager::sharedState();
if ( GameManager::getGameVariable(v85, "0039") )
v86 = 1399;
else
v86 = 4294965697LL;
((void (__fastcall *)(cocos2d::CCLayer *, DrawGridLayer *, __int64))m_objectLayer->addChild_0)(
m_objectLayer,
v83,
v86);
v87 = cocos2d::CCDrawNode::create();
a1->m_debugDrawNode = v87;
v121 = 0x30300000302LL;
cocos2d::CCDrawNode::setBlendFunc(v87, (const cocos2d::ccBlendFunc *)&v121);
((void (__fastcall *)(cocos2d::CCDrawNode *, __int64))a1->m_debugDrawNode->setTag)(
a1->m_debugDrawNode,
4294957297LL);
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCDrawNode *, __int64))a1->m_aboveShaderObjectLayer->addChild_0)(
a1->m_aboveShaderObjectLayer,
a1->m_debugDrawNode,
1401);
GJBaseGameLayer::createPlayer(a1);
a1->m_playtestDeathSprite = cocos2d::CCSprite::createWithSpriteFrameName("d_cross_01_001.png");
((void (__fastcall *)(cocos2d::CCSpriteBatchNode *))a1->m_gameLayerT1->addChild_0)(a1->m_gameLayerT1);
((void (__fastcall *)(cocos2d::CCSprite *, void *))a1->m_playtestDeathSprite->setColor)(
a1->m_playtestDeathSprite,
&unk_100645670);
((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_playtestDeathSprite->setVisible)(
a1->m_playtestDeathSprite,
0);
((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_playtestDeathSprite->setScale)(
a1->m_playtestDeathSprite,
0.7);
GJBaseGameLayer::createPlayerCollisionBlock(a1);
a1->m_collisionBlocksAdded = 1;
LevelEditorLayer::removePlayerCollisionBlock(a1);
v88 = a1->m_level;
if ( v88->m_levelString.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(__p, (void *)v88->m_levelString.m_data.m_long.capacitym1, v88->m_levelString.m_data.m_long.size);
}
else
{
p_m_levelString = &v88->m_levelString;
*(_OWORD *)__p = *(_OWORD *)&p_m_levelString->m_data.m_short.sizex2;
longStorage = p_m_levelString->m_data.m_long.longStorage;
}
cocos2d::ZipUtils::decompressString(__p, 0, 11, &__a);
v90 = (void **)&a1->m_levelString;
if ( a1->m_levelString.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete(*v90);
*(_OWORD *)v90 = *(_OWORD *)&__a.__r_.__value_.__l.__data_;
a1->m_levelString.m_data.m_long.longStorage = (char *)__a.__r_.__value_.__r.__words[2];
*((_BYTE *)&__a.__r_.__value_.__s + 23) = 0;
__a.__r_.__value_.__s.__data_[0] = 0;
if ( SHIBYTE(longStorage) < 0 )
operator delete(__p[0]);
LevelEditorLayer::createObjectsFromSetup(a1, &a1->m_levelString);
GJBaseGameLayer::createTextLayers(a1);
GJBaseGameLayer::increaseBatchNodeCapacity(a1);
m_levelSettings = a1->m_levelSettings;
if ( !m_levelSettings )
{
v92 = LevelSettingsObject::create();
a1->m_levelSettings = v92;
v92->m_level = a1->m_level;
cocos2d::CCObject::retain(v92);
GJBaseGameLayer::loadLevelSettings(a1);
m_levelSettings = a1->m_levelSettings;
}
ColorAction = GJEffectManager::getColorAction(m_levelSettings->m_effectManager, 1005);
ColorAction->m_duration = 0.0;
m_player1 = a1->m_player1;
b = m_player1->m_playerColor1.b;
*(_WORD *)&ColorAction->m_fromColor.r = *(_WORD *)&m_player1->m_playerColor1.r;
ColorAction->m_fromColor.b = b;
ColorAction->m_blending = 1;
v96 = GJEffectManager::getColorAction(a1->m_levelSettings->GJBaseGameLayer::m_effectManager, 1006);
v96->m_duration = 0.0;
v97 = a1->m_player1;
p_m_playerColor2 = &v97->m_playerColor2;
LOBYTE(v97) = v97->m_playerColor2.b;
*(_WORD *)&v96->m_fromColor.r = *(_WORD *)&p_m_playerColor2->r;
v96->m_fromColor.b = (unsigned __int8)v97;
v96->m_blending = 1;
if ( !v118 )
{
a1->m_editorUI = EditorUI::create(a1);
((void (__fastcall *)(LevelEditorLayer *))a1->addChild_0)(a1);
}
GJBaseGameLayer::createGroundLayer(a1, a1->m_levelSettings->m_groundIndex, a1->m_levelSettings->m_groundLineIndex);
a1->m_spawnOrderObjectsChanged = 1;
GJBaseGameLayer::createBackground(a1, a1->m_levelSettings->m_backgroundIndex);
GJBaseGameLayer::createMiddleground(a1, a1->m_levelSettings->m_middleGroundIndex);
sub_1000229B8((__int64 *)&__a, (__int64 *)&a1->m_level->m_lastCameraPos);
if ( *(float *)&__a.__r_.__value_.__l.__data_ != *(float *)&dword_10086E330
|| (sub_1000229B8((__int64 *)__p, (__int64 *)&a1->m_level->m_lastCameraPos),
*((float *)__p + 1) != *(float *)&dword_10086E334) )
{
v99 = a1->m_objectLayer;
v100 = sub_1000229B8((__int64 *)&__a, (__int64 *)&v116->m_lastCameraPos);
((void (__fastcall *)(cocos2d::CCLayer *, std::string *, float))v99->setPosition)(v99, &__a, v100);
m_editorUI = a1->m_editorUI;
if ( m_editorUI )
EditorUI::updateSlider(m_editorUI);
}
if ( a1->m_level->m_lastEditorZoom != 0.0 )
{
((void (__fastcall *)(cocos2d::CCLayer *))a1->m_objectLayer->setScale)(a1->m_objectLayer);
v102 = a1->m_editorUI;
if ( v102 )
EditorUI::updateSlider(v102);
}
m_objects = a1->m_objects;
if ( m_objects )
{
data = m_objects->data;
num = data->num;
if ( (_DWORD)num )
{
arr = (LabelGameObject **)data->arr;
v107 = (unsigned __int64)&arr[num - 1];
do
{
v108 = *arr;
if ( !*arr )
break;
if ( v108->m_objectID == 1615 )
GJBaseGameLayer::addObjectCounter(a1, v108);
++arr;
}
while ( (unsigned __int64)arr <= v107 );
}
}
GJBaseGameLayer::resetGroupCounters(a1, 0);
GJBaseGameLayer::sortStickyGroups(a1);
((void (__fastcall *)(LevelEditorLayer *))a1->levelSettingsUpdated)(a1);
m_batchNodes = a1->m_batchNodes;
if ( m_batchNodes )
{
v110 = m_batchNodes->data;
v111 = v110->num;
if ( (_DWORD)v111 )
{
v112 = (unsigned __int64)v110->arr;
v113 = v112 + 8 * v111 - 8;
do
{
if ( !*(_QWORD *)v112 )
break;
*(_BYTE *)(*(_QWORD *)v112 + 352LL) = 1;
v112 += 8LL;
}
while ( v112 <= v113 );
}
}
v125.ptr = (void (__cdecl *)(float))LevelEditorLayer::updateEditor;
v125.adj = 0;
cocos2d::CCNode::schedule_1(a1, v125);
a1->m_previewMode = 1;
LevelEditorLayer::updateGameObjects(a1);
LevelEditorLayer::updateEditorMode(a1);
GJBaseGameLayer::refreshKeyframeAnims(a1);
LevelEditorLayer::updateAnimateOnTriggerObjects(a1, 1);
a1->m_initializing = 0;
v114 = GameManager::sharedState();
a1->m_hideGround = !GameManager::getGameVariable(v114, "0037");
((void (__fastcall *)(GJGroundLayer *))a1->m_groundLayer->setVisible)(a1->m_groundLayer);
a1->m_loadingProgress = 1.0;
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
LOBYTE(v6) = v117;
}
return v6;
}