// // LevelEditorLayer::updateDebugDraw from 0x683a58 to 0x6853a8 (6480 bytes) // // 2 xrefs: // > @ 0x656d0 // > @ 0x1155298 // // 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::updateDebugDraw(LevelEditorLayer *a1) { LevelEditorLayer *v1; // x28 GameManager *v2; // x0 cocos2d::CCDirector *v3; // x0 float v4; // s14 GameManager *v5; // x0 unsigned int v6; // w24 float v7; // s11 __int64 v8; // x19 __int64 v9; // x0 cocos2d::CCDictionary *m_keyframeGroups; // x0 cocos2d::CCDictElement *m_pElements; // x3 int v12; // w0 unsigned int v13; // w0 unsigned __int8 *v14; // x2 float v15; // s0 float v16; // s1 float v17; // s2 cocos2d::CCArray *m_pObject; // x19 __int64 v19; // x0 KeyframeObject *m_start; // x3 KeyframeObject *m_finish; // x6 KeyframeObject *v22; // x2 __int64 v23; // x4 __int64 v24; // x25 unsigned __int64 i; // x27 KeyframeObject *v26; // x24 double m_unk170; // d13 float v28; // s13 cocos2d::CCPoint *v29; // x19 int v30; // w28 float v31; // s8 double v32; // d8 double v33; // d15 float v34; // s1 float v35; // s0 cocos2d::CCPoint *v36; // x0 float v37; // s0 float v38; // s1 float m_unk1b8; // w4 float v40; // s12 const cocos2d::CCPoint *v41; // x0 float v42; // s15 float v43; // s13 float v44; // s8 float v45; // s9 float v46; // w21 long double v47; // q0 float v48; // s8 float v49; // s1 cocos2d::CCDrawNode *v50; // x0 cocos2d::CCDrawNode *v51; // x20 cocos2d::CCPoint *v52; // x19 __int64 v53; // x3 unsigned __int64 j; // x25 const cocos2d::CCPoint *v55; // x1 __int64 v56; // x20 const cocos2d::CCPoint *v57; // x2 cocos2d::CCDrawNode *v58; // x0 EffectGameObject *m_traceInObject; // x0 unsigned int m_unk3b24; // w1 float *v61; // x19 EffectGameObject *m_traceOutObject; // x0 unsigned int v63; // w1 std::vector *, std::allocator *>> **v64; // x20 int m_rightSectionIndex; // w1 std::vector *, std::allocator *>> *v66; // x20 int m_bottomSectionIndex; // w0 int m_topSectionIndex; // w19 std::vector *v69; // x27 int v70; // w0 char *v71; // x19 __int64 v72; // x20 const cocos2d::CCRect *v73; // x0 float v74; // s0 float v75; // s1 float v76; // s0 float v77; // s1 float v78; // s0 float v79; // s1 float v80; // s0 float v81; // s1 float v82; // s0 float v83; // s1 __int64 v84; // x20 float v85; // s0 float v86; // s1 float v87; // s0 float v88; // s1 float v89; // s0 float v90; // s1 float v91; // s0 float v92; // s1 float v93; // s0 float v94; // s1 float v95; // s0 float v96; // s1 float v97; // s0 float v98; // s1 const cocos2d::CCPoint *v99; // x0 float v100; // s3 float v101; // s1 cocos2d::CCDrawNode *m_debugDrawNode; // x0 float v103; // s0 float v104; // s1 float v105; // s0 float v106; // s1 float v107; // s0 float v108; // s1 int v109; // w0 cocos2d::CCDrawNode *v110; // x0 cocos2d::CCPoint *elems; // x1 GameObject *m_selectedObject; // x25 int m_objectID; // w0 GameManager *v114; // x0 const cocos2d::CCPoint *v115; // x1 __int64 v116; // x2 int v117; // w22 __int64 v118; // x24 __int64 v119; // x21 int v120; // w19 __int64 v121; // x20 int v122; // w27 cocos2d::CCDrawNode *v123; // x23 cocos2d::CCPoint *v124; // x1 const cocos2d::CCPoint *v125; // x2 std::vector *v126; // x20 std::vector *v127; // x0 int v128; // w0 int v129; // w25 std::vector *v130; // x20 __int64 v131; // x0 int v132; // w24 __int64 v133; // x27 __int64 v134; // x21 __int64 v135; // x19 int v136; // w22 cocos2d::CCDrawNode *v137; // x3 const cocos2d::CCPoint *v138; // x1 const cocos2d::CCPoint *v139; // x2 GameManager *v140; // x0 const cocos2d::CCPoint *v141; // x19 cocos2d::CCPoint *v142; // x21 cocos2d::CCDrawNode *v143; // x27 int height_low; // w1 float m_fTrVertexMod; // w22 cocos2d::CCArray *Group; // x0 cocos2d::CCArray *v147; // x24 int v148; // w19 int m_fTlVertexMod_low; // w27 float v150; // s0 float v151; // s13 float v152; // s0 float v153; // s0 float v154; // s15 cocos2d::ccArray *data; // x0 float v156; // s0 int v157; // w1 cocos2d::CCObject **arr; // x23 __int64 v159; // x21 cocos2d::CCObject *v160; // x0 int v161; // w24 unsigned int v162; // w25 float v163; // s10 float v164; // s9 float v165; // s11 unsigned int v166; // w27 cocos2d::CCDrawNode *v167; // x0 float v168; // s0 cocos2d::CCDrawNode *v169; // x27 cocos2d::CCDrawNode *v170; // x27 cocos2d::CCDrawNode *v171; // x0 cocos2d::CCDrawNode *v172; // x27 cocos2d::CCDrawNode *v173; // x27 cocos2d::CCDrawNode *v174; // x27 cocos2d::CCDrawNode *v175; // x27 cocos2d::CCDrawNode *v176; // x0 int v177; // [xsp+ACh] [xbp+ACh] unsigned __int64 k; // [xsp+B0h] [xbp+B0h] const cocos2d::CCPoint *v179; // [xsp+B0h] [xbp+B0h] cocos2d::CCDictElement *next; // [xsp+C8h] [xbp+C8h] __int64 v181; // [xsp+C8h] [xbp+C8h] cocos2d::CCDrawNode *v182; // [xsp+C8h] [xbp+C8h] int m_leftSectionIndex; // [xsp+D0h] [xbp+D0h] _BOOL4 GameVariable; // [xsp+D4h] [xbp+D4h] int v185; // [xsp+D4h] [xbp+D4h] GroupCommandObject2 *v186; // [xsp+D8h] [xbp+D8h] __int64 v187; // [xsp+D8h] [xbp+D8h] int v188; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v189; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v190; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v191; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v192; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v193; // [xsp+D8h] [xbp+D8h] cocos2d::CCDrawNode *v194; // [xsp+D8h] [xbp+D8h] GJEffectManager *m_effectManager; // [xsp+E0h] [xbp+E0h] cocos2d::CCDrawNode *v196; // [xsp+E0h] [xbp+E0h] int v197; // [xsp+E0h] [xbp+E0h] _BOOL4 v198; // [xsp+E0h] [xbp+E0h] char *v199; // [xsp+E0h] [xbp+E0h] int v200; // [xsp+E8h] [xbp+E8h] __int64 v201; // [xsp+E8h] [xbp+E8h] int v202; // [xsp+E8h] [xbp+E8h] int v203; // [xsp+E8h] [xbp+E8h] unsigned int v204; // [xsp+E8h] [xbp+E8h] LevelEditorLayer *v205; // [xsp+F0h] [xbp+F0h] signed int v206; // [xsp+F0h] [xbp+F0h] __int64 v207; // [xsp+F0h] [xbp+F0h] float v208; // [xsp+F0h] [xbp+F0h] float pd; // [xsp+100h] [xbp+100h] cocos2d::CCPoint *p; // [xsp+100h] [xbp+100h] char *pa; // [xsp+100h] [xbp+100h] int pb; // [xsp+100h] [xbp+100h] cocos2d::CCPoint *pe; // [xsp+100h] [xbp+100h] float pc; // [xsp+100h] [xbp+100h] float v215; // [xsp+118h] [xbp+118h] float v216; // [xsp+11Ch] [xbp+11Ch] cocos2d::CCPoint v217; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCPoint v218; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCPoint v219; // [xsp+130h] [xbp+130h] BYREF cocos2d::CCPoint v220; // [xsp+138h] [xbp+138h] BYREF cocos2d::CCPoint v221; // [xsp+140h] [xbp+140h] BYREF cocos2d::CCPoint v222; // [xsp+148h] [xbp+148h] BYREF cocos2d::CCRect v223; // [xsp+150h] [xbp+150h] BYREF cocos2d::CCRect v224; // [xsp+160h] [xbp+160h] BYREF cocos2d::ccColor4F v225; // [xsp+170h] [xbp+170h] BYREF std::vector v226; // [xsp+180h] [xbp+180h] BYREF cocos2d::CCSize WinSize; // 0:kr00_8.8 v1 = a1; GJBaseGameLayer::updateDebugDraw(a1); v2 = GameManager::sharedState(); byte_12420D0 = GameManager::getGameVariable(v2, "0181"); clock_gettime(0, (struct timespec *)&v226); *(double *)&qword_12420D8 = (double)(__int64)v226.m_start + (double)(__int64)v226.m_finish / 1000000000.0; if ( byte_12420D0 ) { qword_12420C8 = 0x3FE0A3D700000000LL; } else { v168 = fmod((double)(__int64)v226.m_start + (double)(__int64)v226.m_finish / 1000000000.0, 2.0) * 0.5; *(double *)&qword_12420C8 = (float)(1.0 - v168); } v3 = cocos2d::CCDirector::sharedDirector(); WinSize = cocos2d::CCDirector::getWinSize(v3); v4 = 0.25 / ((float (__fastcall *)(cocos2d::CCLayer *, float, float))v1->m_objectLayer->getScale)( v1->m_objectLayer, WinSize.width, WinSize.height); cocos2d::CCRect::CCRect(&v223, &v1->m_debugDrawNode->m_rDrawArea); v5 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v5, "0121"); cocos2d::CCDrawNode::enableDrawArea(v1->m_debugDrawNode, &v223); if ( (unsigned int)cocos2d::CCArray::count(v1->m_cameraGuideTriggers) ) { v6 = 0; v7 = v215 + v215; while ( v6 < (unsigned int)cocos2d::CCArray::count(v1->m_cameraGuideTriggers) ) { v8 = cocos2d::CCArray::objectAtIndex(v1->m_cameraGuideTriggers, v6); pd = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8) - (float)(v7 * 0.5); v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8); cocos2d::CCRect::CCRect(&v224, pd, *(float *)(v9 + 4) - (float)((float)(v216 + v216) * 0.5), v7, v216 + v216); if ( *(_DWORD *)(v8 + 1012) == 2016 && (unsigned __int8)cocos2d::CCRect::intersectsRect(&v223, &v224) ) { if ( GameVariable && *(_BYTE *)(v8 + 1278) && !*(_BYTE *)(v8 + 1117) ) { ++v6; continue; } v40 = *(float *)(v8 + 1844); if ( v40 > 0.0 ) { v41 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 192LL))(v8); cocos2d::CCPoint::CCPoint(&v217, v41); v42 = *(float *)(v8 + 1728); if ( v42 > 3.0 ) goto LABEL_92; if ( v42 <= 0.4 ) { v44 = 800.0; v43 = 1200.0; v42 = 0.4; } else { if ( v42 <= 3.0 ) { v43 = 480.0 / v42; v44 = 320.0 / v42; goto LABEL_38; } LABEL_92: v44 = 106.67; v43 = 160.0; v42 = 3.0; } LABEL_38: v45 = v215 / v42; v46 = v216 / v42; cocos2d::CCPoint::CCPoint(&v218, (const cocos2d::CCPoint *)(v8 + 1472)); if ( (float)(v216 / v42) != v44 || v45 != v43 ) { *(float *)&v47 = v216 / v42; v99 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64, long double))(*(_QWORD *)v8 + 192LL))( v8, v47); cocos2d::CCPoint::CCPoint(&v220, v99); v100 = v46 * 0.5; v101 = v220.y - (float)(v46 * 0.5); if ( v101 < 0.0 ) { v101 = (float)(v100 + 0.0) - v100; v220.y = v100 + 0.0; } cocos2d::CCPoint::CCPoint(&v221, (float)(v220.x - (float)(v45 * 0.5)) + v218.x, v101 + v218.y); cocos2d::CCPoint::CCPoint( &v222, (float)(v220.x + (float)(v45 * 0.5)) + v218.x, (float)((float)(v46 * 0.5) + v220.y) + v218.y); m_debugDrawNode = v1->m_debugDrawNode; v225.r = 0.0; v225.g = 0.0; v225.b = 0.0; v225.a = 0.0; v226.m_start = (int *)__PAIR64__(0.5, 1.0); LODWORD(v226.m_finish) = 0; *((float *)&v226.m_finish + 1) = v40; cocos2d::CCDrawNode::drawRect(m_debugDrawNode, &v221, &v222, &v225, &v226, 0, v4); } v48 = v44 * 0.5; v49 = v217.y - v48; if ( (float)(v217.y - v48) < 0.0 ) { v49 = (float)(v48 + 0.0) - v48; v217.y = v48 + 0.0; } ++v6; cocos2d::CCPoint::CCPoint(&v219, (float)(v217.x - (float)(v43 * 0.5)) + v218.x, v49 + v218.y); cocos2d::CCPoint::CCPoint( &v220, (float)(v217.x + (float)(v43 * 0.5)) + v218.x, (float)(v48 + v217.y) + v218.y); cocos2d::CCPoint::CCPoint(&v221, v217.x - (float)((float)v1->m_gameState.m_unkInt1 / v42), v217.y); v50 = v1->m_debugDrawNode; v225.r = 0.0; v225.g = 0.0; v225.b = 0.0; v225.a = 0.0; LODWORD(v226.m_start) = 0; HIDWORD(v226.m_start) = 1.0; LODWORD(v226.m_finish) = 0; *((float *)&v226.m_finish + 1) = v40; cocos2d::CCDrawNode::drawRect(v50, &v219, &v220, &v225, &v226, 0, v4); v51 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v222, v221.x, v219.y); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v225, v221.x, v220.y); LODWORD(v226.m_finish) = 0; *((float *)&v226.m_finish + 1) = v40; LODWORD(v226.m_start) = 1.0; HIDWORD(v226.m_start) = 1.0; cocos2d::CCDrawNode::drawSegment( v51, &v222, (const cocos2d::CCPoint *)&v225, v4, (const cocos2d::ccColor4F *)&v226); continue; } } ++v6; } } m_keyframeGroups = v1->m_keyframeGroups; if ( m_keyframeGroups ) { m_pElements = m_keyframeGroups->m_pElements; if ( m_pElements ) { next = (cocos2d::CCDictElement *)m_pElements->hh.next; p = nullptr; v12 = 1; v205 = v1; v200 = 1; LABEL_11: v13 = v12 - 2; if ( v13 > 3 ) { v17 = 0.19608; v16 = 1.0; v200 = 1; v15 = 0.19608; } else { v14 = (unsigned __int8 *)&unk_EC3BF0 + v13; v15 = (float)v14[16] / 255.0; v16 = (float)v14[32] / 255.0; v17 = (float)v14[48] / 255.0; } while ( 1 ) { m_pObject = (cocos2d::CCArray *)m_pElements->m_pObject; v225.r = v17; v225.g = v16; v225.b = v15; v225.a = 1.0; if ( m_pObject ) { if ( (unsigned int)cocos2d::CCArray::count(m_pObject) > 1 ) { v19 = cocos2d::CCArray::objectAtIndex(m_pObject, 0); if ( !GameVariable || !*(_BYTE *)(v19 + 1278) || *(_BYTE *)(v19 + 1117) ) { m_effectManager = v205->m_effectManager; memset(&v226, 0, sizeof(v226)); v186 = GJEffectManager::createKeyframeCommand( m_effectManager, 0, m_pObject, nullptr, 0, 0, 1, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, &v226); if ( v226.m_start ) operator delete(v226.m_start); if ( v186 ) { m_start = v186->m_keyframes.m_start; m_finish = v186->m_keyframes.m_finish; v22 = m_start; if ( m_start != m_finish ) { v23 = (char *)m_finish - (char *)m_start; if ( 0x6DB6DB6DB6DB6DB7LL * (((char *)m_finish - (char *)m_start) >> 6) != 1 ) { v24 = 0; for ( i = 1; ; ++i ) { v26 = &m_start[v24]; m_unk170 = m_start[v24].m_unk170; if ( m_unk170 > 0.0 ) { v28 = m_unk170 / 50.0; if ( !p ) { p = (cocos2d::CCPoint *)operator new[](0x190u); v52 = p; do cocos2d::CCPoint::CCPoint(v52++); while ( v52 != &p[50] ); } v29 = p; v30 = 0; do { v31 = (float)v30++; v32 = (float)(v31 * v28); v33 = tk::spline::operator()(&v26->m_spline1, v32); v34 = tk::spline::operator()(&v26->m_spline2, v32); v35 = v33; cocos2d::CCPoint::CCPoint(&v224.origin, v35, v34); cocos2d::CCPoint::operator+(&v226, &v26->m_unk190, &v224); v36 = v29++; cocos2d::CCPoint::operator=(v36, v37, v38); } while ( v30 != 50 ); m_unk1b8 = v26->m_unk1b8; v196 = v205->m_debugDrawNode; LODWORD(v226.m_start) = 0; HIDWORD(v226.m_start) = 1.0; v226.m_finish = (int *)__PAIR64__(LODWORD(m_unk1b8), 1.0); cocos2d::CCDrawNode::drawLines(v196, p, 0x32u, v4, (const cocos2d::ccColor4F *)&v226); m_start = v186->m_keyframes.m_start; m_finish = v186->m_keyframes.m_finish; } v23 = (char *)m_finish - (char *)m_start; v22 = m_start; ++v24; if ( 0x6DB6DB6DB6DB6DB7LL * (((char *)m_finish - (char *)m_start) >> 6) - 1 <= i ) break; } } v53 = 0; for ( j = 0; j < 0x6DB6DB6DB6DB6DB7LL * (v23 >> 6) - 1; ++j ) { v55 = (const cocos2d::CCPoint *)((char *)v22 + v53); v56 = v53 + 448; if ( !*(&v22->m_unk01e + v53) ) { v57 = (const cocos2d::CCPoint *)((char *)v22 + v56); v58 = v205->m_debugDrawNode; v225.a = v57[55].x; cocos2d::CCDrawNode::drawSegment(v58, v55 + 50, v57 + 50, v4, &v225); v22 = v186->m_keyframes.m_start; v23 = (char *)v186->m_keyframes.m_finish - (char *)v22; } v53 = v56; } } } } } } GJEffectManager::resetTempGroupCommands(v205->m_effectManager, 0); if ( !next ) break; m_pElements = next; next = (cocos2d::CCDictElement *)next->hh.next; v12 = v200 + 1; v200 = v12; if ( v12 <= 5 ) goto LABEL_11; v17 = 0.19608; v200 = 0; v16 = 1.0; v15 = 0.19608; } v1 = v205; if ( p ) operator delete(p); } } cocos2d::CCDrawNode::disableDrawArea(v1->m_debugDrawNode); m_traceInObject = v1->m_traceInObject; if ( !m_traceInObject ) { m_traceOutObject = v1->m_traceOutObject; v61 = &v1->m_varianceValues.__elems_[1975]; if ( !m_traceOutObject ) goto LABEL_63; goto LABEL_60; } m_unk3b24 = v1->m_unk3b24; v61 = &v1->m_varianceValues.__elems_[1975]; if ( v1->m_unk3b28 < m_unk3b24 ) { v1->m_unk3b28 = m_unk3b24; processTrace(m_traceInObject, v1, (__int64 *)&v1->m_unk3b30, 1u); } drawTrace(v1, (GLfloat **)&v1->m_unk3b30, 1, v1->m_debugDrawNode); m_traceOutObject = v1->m_traceOutObject; if ( m_traceOutObject ) { LABEL_60: v63 = v1->m_unk3b24; if ( v1->m_unk3b2c < v63 ) { v1->m_unk3b2c = v63; processTrace(m_traceOutObject, v1, (__int64 *)v61 + 358, 0); } drawTrace(v1, (GLfloat **)v61 + 358, 0, v1->m_debugDrawNode); } LABEL_63: v64 = v1->m_sections.m_start; if ( *((_BYTE *)v61 + 1928) ) { m_leftSectionIndex = v1->m_leftSectionIndex; v177 = v1->m_sections.m_finish - v64; if ( m_leftSectionIndex < v177 ) { m_rightSectionIndex = v1->m_rightSectionIndex; if ( m_leftSectionIndex <= m_rightSectionIndex ) { v181 = m_leftSectionIndex; v206 = 0; v66 = v64[v181]; if ( !v66 ) goto LABEL_108; LABEL_67: for ( k = (unsigned __int64)((char *)v66->m_finish - (char *)v66->m_start) >> 3; ; LODWORD(k) = -1 ) { m_bottomSectionIndex = v1->m_bottomSectionIndex; v197 = m_bottomSectionIndex; if ( (int)k > m_bottomSectionIndex ) { m_topSectionIndex = v1->m_topSectionIndex; if ( m_bottomSectionIndex <= m_topSectionIndex ) { v201 = m_bottomSectionIndex; v187 = m_bottomSectionIndex; while ( 1 ) { v69 = v66->m_start[v201]; if ( v69 ) { v70 = v1->m_sectionSizes.m_start[v181]->m_start[v187]; if ( v70 > 0 ) { v71 = nullptr; pa = (char *)(8 * ((unsigned int)(v70 - 1) + 1LL)); do { while ( 1 ) { v72 = *(__int64 *)((char *)v69->m_start + (unsigned __int64)v71); if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v72 + 336LL))(v72) && LevelEditorLayer::validGroup(v1, (GameObject *)v72, 0) && (!GameVariable || !*(_BYTE *)(v72 + 1278) || *(_BYTE *)(v72 + 1117)) && (*(_DWORD *)(v72 + 1232) == 1 && *(_BYTE *)(v72 + 1456) || (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v72 + 1784LL))(v72) == 30 && !*(_BYTE *)(v72 + 954)) && (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v72 + 1704LL))(v72) && !*(_BYTE *)(v72 + 1330) ) { break; } v71 += 8; if ( v71 == pa ) goto LABEL_88; } v73 = (const cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v72 + 1312LL))(v72); cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v226, v73); if ( (int)(*(float (__fastcall **)(__int64))(*(_QWORD *)v72 + 352LL))(v72) % 90 ) { GameObject::calculateOrientedBox((GameObject *)v72); cocos2d::CCPoint::CCPoint(&v220); cocos2d::CCPoint::CCPoint(&v221); cocos2d::CCPoint::CCPoint(&v222); cocos2d::CCPoint::CCPoint(&v224.origin); (*(void (__fastcall **)(__int64))(*(_QWORD *)v72 + 1544LL))(v72); cocos2d::CCPoint::operator=(&v220, v103, v104); cocos2d::CCPoint::operator=(&v221, v105, v106); cocos2d::CCPoint::operator=(&v222, v107, v108); } else { cocos2d::CCPoint::CCPoint(&v220); cocos2d::CCPoint::CCPoint(&v221); cocos2d::CCPoint::CCPoint(&v222); cocos2d::CCPoint::CCPoint(&v224.origin); cocos2d::CCPoint::operator=(&v220, v74, v75); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v225, *(float *)&v226.m_start + *(float *)&v226.m_finish, *((float *)&v226.m_start + 1) + *((float *)&v226.m_finish + 1)); cocos2d::CCPoint::operator=(&v222, v76, v77); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v225, v220.x, v222.y); cocos2d::CCPoint::operator=(&v221, v78, v79); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v225, v222.x, v220.y); } cocos2d::CCPoint::operator=(&v224, v80, v81); if ( v206 > 391 ) break; v71 += 8; v84 = v206; v206 += 8; cocos2d::CCPoint::operator=((char *)v1->m_debugDrawPoints + v84 * 8, v82, v83); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 1], v85, v86); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 2], v87, v88); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 3], v89, v90); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 4], v91, v92); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 5], v93, v94); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 6], v95, v96); cocos2d::CCPoint::operator=(&v1->m_debugDrawPoints->__elems_[v84 + 7], v97, v98); } while ( v71 != pa ); LABEL_88: m_topSectionIndex = v1->m_topSectionIndex; } } ++v197; ++v201; ++v187; if ( m_topSectionIndex < v197 || (int)k <= v197 ) break; v66 = v1->m_sections.m_start[v181]; } m_rightSectionIndex = v1->m_rightSectionIndex; } } v109 = m_leftSectionIndex + 1; m_leftSectionIndex = v109; ++v181; if ( m_rightSectionIndex < v109 || v177 <= v109 ) break; v66 = v1->m_sections.m_start[v181]; if ( v66 ) goto LABEL_67; LABEL_108: ; } if ( v206 ) { v110 = v1->m_debugDrawNode; elems = v1->m_debugDrawPoints->__elems_; LODWORD(v226.m_start) = 0; HIDWORD(v226.m_start) = 1.0; LODWORD(v226.m_finish) = 1.0; HIDWORD(v226.m_finish) = 1.0; cocos2d::CCDrawNode::drawLines(v110, elems, v206, v4, (const cocos2d::ccColor4F *)&v226); } } } } cocos2d::CCDrawNode::enableDrawArea(v1->m_debugDrawNode, &v223); m_selectedObject = v1->m_editorUI->m_selectedObject; if ( m_selectedObject ) { m_objectID = m_selectedObject->m_objectID; if ( (unsigned int)(m_objectID - 3602) <= 1 || m_objectID == 3605 ) { height_low = LODWORD(m_selectedObject[1].m_obContentSize.height); m_fTrVertexMod = m_selectedObject[1].m_fTrVertexMod; if ( height_low > 0 ) { Group = GJBaseGameLayer::getGroup(v1, height_low); v147 = Group; if ( Group ) { if ( (unsigned int)cocos2d::CCArray::count(Group) ) { v203 = *(_DWORD *)&m_selectedObject[1].m_bUseVertexMod; v148 = *(_DWORD *)&m_selectedObject[1].m_bOpacityModifyRGB; m_fTlVertexMod_low = LODWORD(m_selectedObject[1].m_fTlVertexMod); cocos2d::CCRect::getMinX(&v223); v151 = v150; cocos2d::CCRect::getMinY(&v223); pc = v152; cocos2d::CCRect::getMaxX(&v223); v154 = v153; cocos2d::CCRect::getMaxY(&v223); data = v147->data; v208 = v156; v157 = v203; if ( data->num ) { arr = data->arr; v159 = 8LL * data->num - 8; v199 = (char *)arr + v159; if ( arr <= (cocos2d::CCObject **)((char *)arr + v159) ) { v160 = *arr; if ( *arr ) { v161 = 0; v162 = LODWORD(m_fTrVertexMod) - 1; v163 = (float)v148 * 3.0; v204 = LODWORD(m_fTrVertexMod) - 4; v164 = v163 + (float)((float)v157 * 3.0); v165 = v164 + (float)((float)m_fTlVertexMod_low * 3.0); while ( 1 ) { v160->__vftable[16].getTag((const cocos2d::CCObject *)&v222); if ( v163 > 0.0 ) { v225.r = 1.0; v225.g = 0.0; v225.b = 0.0; v225.a = 1.0; if ( m_fTrVertexMod == 0.0 ) { v167 = v1->m_debugDrawNode; v226.m_start = nullptr; v226.m_finish = nullptr; v161 += cocos2d::CCDrawNode::drawCircle( v167, &v222, v163, (const cocos2d::ccColor4F *)&v226, v4, &v225, (unsigned int)v163); } else { if ( v162 <= 1 ) { v174 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v222.x - v163, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v222.x - v163, v208); v161 += cocos2d::CCDrawNode::drawSegment( v174, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( (LODWORD(m_fTrVertexMod) & 0xFFFFFFFD) == 1 ) { v192 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v163 + v222.x, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v163 + v222.x, v208); v161 += cocos2d::CCDrawNode::drawSegment( v192, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( v204 <= 1 ) { v191 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v222.y - v163); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v222.y - v163); v161 += cocos2d::CCDrawNode::drawSegment( v191, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( (LODWORD(m_fTrVertexMod) & 0xFFFFFFFD) == 4 ) { v172 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v163 + v222.y); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v163 + v222.y); v161 += cocos2d::CCDrawNode::drawSegment( v172, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } } } if ( v163 != v164 ) { v225.r = 0.0; v225.g = 1.0; v225.b = 0.0; v225.a = 1.0; if ( m_fTrVertexMod == 0.0 ) { v176 = v1->m_debugDrawNode; v226.m_start = nullptr; v226.m_finish = nullptr; v161 += cocos2d::CCDrawNode::drawCircle( v176, &v222, v164, (const cocos2d::ccColor4F *)&v226, v4, &v225, (unsigned int)v164); } else { if ( v162 <= 1 ) { v175 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v222.x - v164, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v222.x - v164, v208); v161 += cocos2d::CCDrawNode::drawSegment( v175, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( (LODWORD(m_fTrVertexMod) & 0xFFFFFFFD) == 1 ) { v194 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v164 + v222.x, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v164 + v222.x, v208); v161 += cocos2d::CCDrawNode::drawSegment( v194, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( v204 <= 1 ) { v193 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v222.y - v164); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v222.y - v164); v161 += cocos2d::CCDrawNode::drawSegment( v193, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( (LODWORD(m_fTrVertexMod) & 0xFFFFFFFD) == 4 ) { v173 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v164 + v222.y); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v164 + v222.y); v161 += cocos2d::CCDrawNode::drawSegment( v173, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } } } if ( v164 == v165 ) goto LABEL_183; v225.r = 0.0; v225.g = 0.0; v225.b = 1.0; v225.a = 1.0; if ( m_fTrVertexMod == 0.0 ) { v171 = v1->m_debugDrawNode; v226.m_start = nullptr; v226.m_finish = nullptr; v161 += cocos2d::CCDrawNode::drawCircle( v171, &v222, v165, (const cocos2d::ccColor4F *)&v226, v4, &v225, (unsigned int)v165); } else { if ( v162 <= 1 ) { v170 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v222.x - v165, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v222.x - v165, v208); v161 += cocos2d::CCDrawNode::drawSegment( v170, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } v166 = LODWORD(m_fTrVertexMod) & 0xFFFFFFFD; if ( (LODWORD(m_fTrVertexMod) & 0xFFFFFFFD) == 1 ) { v190 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v165 + v222.x, pc); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v165 + v222.x, v208); v161 += cocos2d::CCDrawNode::drawSegment( v190, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } if ( v204 <= 1 ) { v189 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v222.y - v165); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v222.y - v165); v161 += cocos2d::CCDrawNode::drawSegment( v189, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); if ( v166 != 4 ) goto LABEL_183; } else if ( v166 != 4 ) { goto LABEL_183; } v169 = v1->m_debugDrawNode; cocos2d::CCPoint::CCPoint(&v224.origin, v151, v165 + v222.y); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v226, v154, v165 + v222.y); v161 += cocos2d::CCDrawNode::drawSegment( v169, &v224.origin, (const cocos2d::CCPoint *)&v226, v4, &v225); } LABEL_183: if ( v161 <= 100 && v199 >= (char *)++arr ) { v160 = *arr; if ( *arr ) continue; } break; } } } } } } } } } cocos2d::CCDrawNode::disableDrawArea(v1->m_debugDrawNode); if ( v1->m_playerPoints.m_finish != v1->m_playerPoints.m_start ) { v114 = GameManager::sharedState(); if ( !GameManager::getGameVariable(v114, "0152") ) { v115 = v1->m_playerPoints.m_start; v116 = v1->m_playerPoints.m_finish - v115; v117 = v116 - 1; v198 = v1->m_playbackMode == Playing; if ( (int)v116 - 1 > 0 ) { v118 = 0; v119 = 0; v120 = v116 - 2; v121 = 1; v122 = 1; if ( !(unsigned __int8)cocos2d::CCRect::containsPoint(&v223, v115) ) goto LABEL_123; LABEL_118: while ( 1 ) { v123 = v1->m_debugDrawNode; v124 = v1->m_playerPoints.m_start; if ( v120 == (_DWORD)v118 && v198 ) { pe = v1->m_playerPoints.m_start; v125 = v1->m_player1->getPosition(v1->m_player1); v124 = pe; } else { v125 = &v124[v121]; } ++v118; ++v121; LODWORD(v226.m_start) = 1045220557; HIDWORD(v226.m_start) = 1.0; LODWORD(v226.m_finish) = 1045220557; HIDWORD(v226.m_finish) = 1.0; cocos2d::CCDrawNode::drawSegment(v123, &v124[v119], v125, 0.5, (const cocos2d::ccColor4F *)&v226); if ( v117 <= v122 ) break; while ( 1 ) { v119 = v118; v122 = v118 + 1; if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v223, &v1->m_playerPoints.m_start[v118]) ) break; LABEL_123: if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v223, &v1->m_playerPoints.m_start[v121]) ) goto LABEL_118; ++v118; ++v121; if ( v117 <= v122 ) goto LABEL_125; } } } LABEL_125: v126 = v1->m_player2Points.m_start; v127 = v1->m_player2Points.m_finish; if ( v126 != v127 ) { v128 = -1431655765 * (((char *)v127 - (char *)v126) >> 3); if ( v128 > 0 ) { v188 = v128; v207 = 0; v202 = 0; v185 = v128 - 1; while ( 1 ) { v129 = 0; v130 = &v126[v207]; if ( v1->m_gameState.m_isDualMode ) v129 = v198 && v202 == v185; v131 = v130->m_finish - v130->m_start; v132 = v131 - 1; if ( (int)v131 - 1 > 0 ) { v133 = 0; v134 = 0; pb = v131 - 2; v135 = 1; v136 = 1; if ( !(unsigned __int8)cocos2d::CCRect::containsPoint(&v223, v130->m_start) ) goto LABEL_137; LABEL_132: while ( 1 ) { v137 = v1->m_debugDrawNode; v138 = v130->m_start; if ( v129 && pb == (_DWORD)v133 ) { v179 = v130->m_start; v182 = v1->m_debugDrawNode; v139 = v1->m_player2->getPosition(v1->m_player2); v137 = v182; v138 = v179; } else { v139 = &v138[v135]; } ++v133; ++v135; LODWORD(v226.m_start) = 1045220557; HIDWORD(v226.m_start) = 1.0; LODWORD(v226.m_finish) = 1.0; HIDWORD(v226.m_finish) = 1.0; cocos2d::CCDrawNode::drawSegment(v137, &v138[v134], v139, 0.5, (const cocos2d::ccColor4F *)&v226); if ( v132 <= v136 ) break; while ( 1 ) { v134 = v133; v136 = v133 + 1; if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v223, &v130->m_start[v133]) ) break; LABEL_137: if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v223, &v130->m_start[v135]) ) goto LABEL_132; ++v133; ++v135; if ( v132 <= v136 ) goto LABEL_139; } } } LABEL_139: ++v207; if ( ++v202 == v188 ) break; v126 = v1->m_player2Points.m_start; } } } } } if ( v1->m_touchPoints.m_start != v1->m_touchPoints.m_finish ) { v140 = GameManager::sharedState(); if ( GameManager::getGameVariable(v140, "0149") ) { v141 = v1->m_touchPoints.m_start; v142 = v1->m_touchPoints.m_finish; while ( v142 != v141 ) { while ( 1 ) { cocos2d::CCPoint::CCPoint(&v221, v141); if ( (unsigned __int8)cocos2d::CCRect::containsPoint(&v223, &v221) ) break; if ( v142 == ++v141 ) return; } v143 = v1->m_debugDrawNode; ++v141; cocos2d::CCPoint::CCPoint(&v222, v221.x - 2.0, v221.y - 2.0); cocos2d::CCPoint::CCPoint(&v224.origin, v221.x + 2.0, v221.y + 2.0); v225.r = 1.0; v225.g = 0.5; v225.b = 0.0; v225.a = 1.0; v226.m_start = nullptr; v226.m_finish = nullptr; cocos2d::CCDrawNode::drawRect(v143, &v222, &v224, &v225, &v226, 0, 0.0); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source