// // DrawGridLayer::draw from 0x36ae68 to 0x36c0d8 (4720 bytes) // // 0 xrefs: // // 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 DrawGridLayer::draw(DrawGridLayer *a1) { LevelEditorLayer *m_editorLayer; // r6 PlaybackMode m_playbackMode; // r3 signed int v4; // r5 int m_showGrid; // r8 GameManager *v6; // r0 cocos2d::CCArray *m_effectGameObjects; // r0 int v8; // r3 float v9; // s20 _BOOL4 m_showGround; // r10 const cocos2d::CCPoint *v11; // r0 cocos2d::CCDirector *v12; // r0 cocos2d::CCNode *m_objectLayer; // r7 float x; // s18 float width; // s16 int v16; // r0 cocos2d::CCNode *v17; // r7 float v18; // s15 signed int v19; // r6 float y; // s19 float height; // s22 float v22; // r0 float m_gridSize; // s21 float v24; // s16 float v25; // s17 int v26; // s24 float v27; // s21 float v28; // s25 float v29; // r2 float v30; // r2 PlayerObject *v31; // r7 int v32; // r11 float v33; // r2 int v34; // r2 bool v35; // r3 PlayerObject *v36; // r11 float v37; // r2 int v38; // r2 bool v39; // r3 int v40; // s24 float v41; // s21 float v42; // r1 float v43; // r1 PlayerObject *v44; // r7 int v45; // r11 float v46; // r1 int v47; // r2 bool v48; // r3 PlayerObject *v49; // r11 float v50; // r1 int v51; // r2 bool v52; // r3 unsigned int v53; // r6 signed int v54; // r7 signed int v55; // r9 signed int v56; // r10 cocos2d::CCString *v57; // r0 float v58; // r0 float v59; // s21 cocos2d::CCString *v60; // r0 float v61; // r0 signed int v62; // r8 float v63; // r2 int v64; // r2 bool v65; // r3 float v66; // r1 cocos2d::CCPoint *v67; // r8 float v68; // r2 signed int v69; // r8 float v70; // r2 int v71; // r2 bool v72; // r3 signed int v73; // r8 float v74; // r2 int v75; // r2 bool v76; // r3 int v77; // r2 bool v78; // r3 signed int v79; // r6 std::__detail::_Hash_node_base *M_nxt; // r9 signed int v81; // r8 std::__detail::_Hash_node_base *v82; // r7 int v83; // r3 float m_normalSpeed; // s24 int v85; // r2 float v86; // s22 float *v87; // r0 float v88; // s22 float v89; // s21 float v90; // s25 float v91; // s22 cocos2d::CCArray *v92; // r3 cocos2d::ccArray *data; // r3 float v94; // s22 cocos2d::CCObject **arr; // r8 cocos2d::CCObject **v96; // r6 signed int v97; // r7 int v98; // r10 int v99; // t1 unsigned int i; // r6 GameObject *v101; // r0 float v102; // s25 float v103; // s22 float v104; // r1 float v105; // r1 LevelEditorLayer *v106; // r3 float v107; // s15 float m_playbackX; // s15 float v109; // r2 float v110; // r1 float v111; // r2 float m_playbackY; // s15 float v113; // r1 LevelEditorLayer *v114; // r3 float v115; // s21 float v116; // r2 float v117; // r2 LevelEditorLayer *v118; // r3 LevelEditorLayer *v119; // r3 PlayerObject *m_player1; // r3 float MinPortalY; // s24 float MaxPortalY; // r8 float v123; // r1 float v124; // r1 float v125; // r1 float v126; // r1 LevelEditorLayer *v127; // r3 cocos2d::CCArray *m_durationObjects; // r3 cocos2d::ccArray *v129; // r2 cocos2d::CCObject **v130; // r6 int v131; // r9 int v132; // t1 int v133; // s24 float v134; // r2 float v135; // r2 int v136; // r2 int v137; // r1 char v138; // r3 PlayerObject *v139; // r0 int v140; // r2 char v141; // r3 PlayerObject *v142; // r0 int v143; // r2 float v144; // s21 PlayerObject *v145; // r11 int v146; // r10 float v147; // r2 int v148; // r2 bool v149; // r3 PlayerObject *v150; // r10 float v151; // r2 int v152; // r2 bool v153; // r3 float v154; // r1 float v155; // r1 cocos2d::CCNode *v156; // r7 float v157; // r2 float v158; // r2 float v159; // r1 float v160; // r1 float v161; // s21 int v162; // r2 int v163; // r7 cocos2d::CCPoint v164; // r0 float v165; // s23 _BOOL4 LastGameplayRotated; // r10 int v167; // r2 bool v168; // r3 int v169; // r2 char x_low; // r3 float v171; // s15 int v172; // r8 PlayerObject *v173; // r9 int v174; // r8 float v175; // r2 int v176; // r2 bool v177; // r3 float v178; // s15 PlayerObject *v179; // r8 float v180; // r2 int v181; // r2 bool v182; // r3 _BOOL4 GameVariable; // [sp+18h] [bp-4Ch] _BOOL4 m_drawEffectLines; // [sp+1Ch] [bp-48h] PlayerObject *v185; // [sp+20h] [bp-44h] PlayerObject *v186; // [sp+20h] [bp-44h] PlayerObject *v187; // [sp+20h] [bp-44h] cocos2d::CCObject **v188; // [sp+20h] [bp-44h] signed int v189; // [sp+20h] [bp-44h] signed int v190; // [sp+20h] [bp-44h] cocos2d::CCPoint v191; // [sp+34h] [bp-30h] BYREF cocos2d::CCSize v192; // [sp+3Ch] [bp-28h] BYREF cocos2d::CCPoint v193; // [sp+44h] [bp-20h] BYREF cocos2d::CCPoint v194; // [sp+4Ch] [bp-18h] BYREF cocos2d::CCPoint v195; // [sp+54h] [bp-10h] BYREF m_editorLayer = a1->m_editorLayer; if ( !m_editorLayer->m_editorUI ) return; m_playbackMode = m_editorLayer->m_playbackMode; v4 = m_playbackMode == Playing; if ( m_editorLayer->m_showGrid ) m_showGrid = m_playbackMode != Playing || !m_editorLayer->m_hideGridOnPlay; else m_showGrid = m_editorLayer->m_showGrid; if ( m_editorLayer->m_drawEffectLines ) m_drawEffectLines = m_playbackMode != Playing; else m_drawEffectLines = m_editorLayer->m_drawEffectLines; v6 = GameManager::sharedState(); GameVariable = GameManager::getGameVariable(v6, "0121"); if ( m_drawEffectLines && a1->m_sortEffects ) { m_effectGameObjects = a1->m_effectGameObjects; a1->m_sortEffects = 0; if ( m_effectGameObjects ) { if ( cocos2d::CCArray::count(m_effectGameObjects) ) qsort( a1->m_effectGameObjects->data->arr, a1->m_effectGameObjects->data->num, 4u, (int (*)(const void *, const void *))xCompReal); } } cocos2d::ccGLBlendFunc((unsigned int)&dword_0 + 1, 0x303u); if ( a1->m_editorLayer->m_levelSettings->m_dynamicLevelHeight ) v8 = 1000; else v8 = 80; v9 = (float)((float)v8 * 30.0) + 90.0; cocos2d::ccDrawColor4B(0, 0, 0, 0x96u); glLineWidth(1.0); m_showGround = a1->m_editorLayer->m_showGround; v11 = a1->m_objectLayer->getPosition(a1->m_objectLayer); cocos2d::CCPoint::CCPoint(&v191, v11); v12 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v192, v12); m_objectLayer = a1->m_objectLayer; cocos2d::CCPoint::CCPoint(&v194, 0.0, 0.0); cocos2d::CCNode::convertToNodeSpace(&v195, m_objectLayer, &v194); x = v195.x; width = v192.width; *(float *)&v16 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCNode *))a1->m_objectLayer->getScale)(a1->m_objectLayer)); v17 = a1->m_objectLayer; v18 = *(float *)&v16; cocos2d::CCPoint::CCPoint(&v194, 0.0, 0.0); v19 = 0; cocos2d::CCNode::convertToNodeSpace(&v195, v17, &v194); y = v195.y; height = v192.height; v22 = a1->m_objectLayer->getScale(a1->m_objectLayer); m_gridSize = a1->m_gridSize; v24 = x + (float)(width / v18); v25 = y + (float)(height / v22); v26 = (int)floorf(x / m_gridSize); v27 = (float)v26 * m_gridSize; while ( 1 ) { v28 = a1->m_gridSize; if ( v27 >= v24 ) break; v27 = (float)v26 * v28; if ( v27 >= -3000.0 && v27 <= 240000.0 ) { if ( v27 == 0.0 || v27 == 240000.0 ) { cocos2d::ccDrawColor4B( (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, 0x96u); if ( y > -3000.0 ) v29 = y; else v29 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, (float)v26 * v28, v29); if ( v9 > v25 ) v30 = v25; else v30 = v9; cocos2d::CCPoint::CCPoint(&v195, (float)v26 * v28, v30); cocos2d::ccDrawLine(&v194, &v195); } else if ( m_showGrid && v19 < 398 ) { v31 = (PlayerObject *)&a1->m_pointArray1->__elems_[v19]; v32 = 8 * v19 + 8; if ( y > -3000.0 ) v33 = y; else v33 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, (float)v26 * v28, v33); v19 += 2; cocos2d::CCPoint::operator=(v31, COERCE_FLOAT(&v195), v34, v35); v36 = (PlayerObject *)((char *)a1->m_pointArray1 + v32); if ( v9 > v25 ) v37 = v25; else v37 = v9; cocos2d::CCPoint::CCPoint(&v195, (float)v26 * v28, v37); cocos2d::CCPoint::operator=(v36, COERCE_FLOAT(&v195), v38, v39); } } ++v26; } v40 = (int)floorf(y / v28); v41 = (float)v40 * v28; while ( v41 < v25 ) { v41 = (float)v40 * a1->m_gridSize; if ( v41 < -3000.0 || v41 > v9 ) goto LABEL_63; if ( v41 == 90.0 ) { if ( m_showGround ) goto LABEL_63; LABEL_47: cocos2d::ccDrawColor4B( (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, 0x96u); glLineWidth(2.0); if ( x > -3000.0 ) v42 = x; else v42 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v42, v41); if ( v24 < 240000.0 ) v43 = v24; else v43 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v43, v41); cocos2d::ccDrawLine(&v194, &v195); goto LABEL_63; } if ( v41 == v9 ) goto LABEL_47; if ( m_showGrid && v19 < 398 ) { v44 = (PlayerObject *)&a1->m_pointArray1->__elems_[v19]; v45 = 8 * v19 + 8; if ( x > -3000.0 ) v46 = x; else v46 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, v46, (float)v40 * a1->m_gridSize); v19 += 2; cocos2d::CCPoint::operator=(v44, COERCE_FLOAT(&v195), v47, v48); v49 = (PlayerObject *)((char *)a1->m_pointArray1 + v45); if ( v24 < 240000.0 ) v50 = v24; else v50 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v50, v41); cocos2d::CCPoint::operator=(v49, COERCE_FLOAT(&v195), v51, v52); } LABEL_63: ++v40; } if ( m_showGrid && v19 ) { cocos2d::ccDrawColor4B(0, 0, 0, 0x96u); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray1->__elems_, v19); } if ( GameManager::sharedState()->m_showSongMarkers && a1->m_timeMarkers ) { v53 = 0; v54 = 0; v55 = 0; v56 = 0; while ( 1 ) { if ( v53 >= cocos2d::CCArray::count(a1->m_timeMarkers) ) { LABEL_100: if ( v56 ) { cocos2d::ccDrawColor4B((unsigned __int8)&dword_FC + 3, 0x7Fu, 0, (unsigned __int8)&dword_FC + 3); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray1->__elems_, v56); } if ( v55 ) { cocos2d::ccDrawColor4B( (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, 0, (unsigned __int8)&dword_FC + 3); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray2->__elems_, v55); } if ( v54 ) { cocos2d::ccDrawColor4B((unsigned __int8)&dword_7C + 3, 0xFFu, 0, 0xFFu); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray3->__elems_, v54); } goto LABEL_106; } v57 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(a1->m_timeMarkers, v53); v58 = cocos2d::CCString::floatValue(v57); v59 = v58; if ( v58 >= -3000.0 ) break; LABEL_99: v53 += 2; } if ( v58 >= x && v58 <= v24 ) { v60 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(a1->m_timeMarkers, v53 + 1); v61 = cocos2d::CCString::floatValue(v60); if ( v61 == 0.9 ) { if ( v55 >= 398 ) goto LABEL_98; v62 = v55; v185 = (PlayerObject *)&a1->m_pointArray2->__elems_[v55]; if ( y > -3000.0 ) v63 = y; else v63 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, v59, v63); v55 += 2; cocos2d::CCPoint::operator=(v185, COERCE_FLOAT(&v195), v64, v65); v66 = v59; v67 = &a1->m_pointArray2->__elems_[v62 + 1]; if ( v9 > v25 ) v68 = v25; else v68 = v9; } else if ( v61 == 1.0 ) { if ( v54 >= 398 ) goto LABEL_98; v69 = v54; v186 = (PlayerObject *)&a1->m_pointArray3->__elems_[v54]; if ( y > -3000.0 ) v70 = y; else v70 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, v59, v70); v54 += 2; cocos2d::CCPoint::operator=(v186, COERCE_FLOAT(&v195), v71, v72); v66 = v59; v67 = &a1->m_pointArray3->__elems_[v69 + 1]; if ( v9 > v25 ) v68 = v25; else v68 = v9; } else { if ( v56 >= 398 ) goto LABEL_98; v73 = v56; v187 = (PlayerObject *)&a1->m_pointArray1->__elems_[v56]; if ( y > -3000.0 ) v74 = y; else v74 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, v59, v74); v56 += 2; cocos2d::CCPoint::operator=(v187, COERCE_FLOAT(&v195), v75, v76); v66 = v59; v67 = &a1->m_pointArray1->__elems_[v73 + 1]; if ( v9 > v25 ) v68 = v25; else v68 = v9; } cocos2d::CCPoint::CCPoint(&v195, v66, v68); cocos2d::CCPoint::operator=((PlayerObject *)v67, COERCE_FLOAT(&v195), v77, v78); } LABEL_98: if ( v59 > v24 ) goto LABEL_100; goto LABEL_99; } LABEL_106: v79 = 0; M_nxt = a1->m_audioLineObjects._M_h._M_before_begin._M_nxt; v81 = 0; while ( M_nxt ) { v82 = M_nxt[2]._M_nxt; if ( !LOBYTE(v82[412]._M_nxt) ) { v83 = (int)v82[409]._M_nxt; if ( v83 > 0 && (!GameVariable || !BYTE2(v82[276]._M_nxt) || BYTE1(v82[245]._M_nxt)) ) { m_normalSpeed = a1->m_normalSpeed; switch ( (unsigned int)v82[411]._M_nxt ) { case 1u: m_normalSpeed = a1->m_slowSpeed; break; case 2u: m_normalSpeed = a1->m_fastSpeed; break; case 3u: m_normalSpeed = a1->m_fasterSpeed; break; case 4u: m_normalSpeed = a1->m_fastestSpeed; break; default: break; } v85 = (int)v82[410]._M_nxt; if ( v85 > 0 ) v83 *= v85; v86 = (float)v83; v87 = (float *)((int (__fastcall *)(std::__detail::_Hash_node_base *))v82->_M_nxt[24]._M_nxt)(M_nxt[2]._M_nxt); v88 = 60.0 / v86; v89 = *v87; v90 = *v87 + (float)(m_normalSpeed * *(float *)&v82[316]._M_nxt); if ( v24 <= v90 ) v90 = v24; v91 = v88 * m_normalSpeed; if ( *v87 < x ) { v133 = (int)ceilf((float)(x - v89) / v91); v89 = v89 + (float)((float)v133 * v91); } else { v133 = 0; } while ( v89 < v90 ) { if ( y > -3000.0 ) v134 = y; else v134 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v89, v134); if ( v9 > v25 ) v135 = v25; else v135 = v9; cocos2d::CCPoint::CCPoint(&v195, v89, v135); v137 = (int)v82[410]._M_nxt; if ( v137 > 0 && v133 % v137 ) { if ( v79 < 398 ) { v141 = 8 * v79; v190 = v79; v142 = (PlayerObject *)&a1->m_pointArray2->__elems_[v79]; v79 += 2; cocos2d::CCPoint::operator=(v142, COERCE_FLOAT(&v194), v136, v141); cocos2d::CCPoint::operator=( (PlayerObject *)&a1->m_pointArray2->__elems_[v190 + 1], COERCE_FLOAT(&v195), v143, v190 * 8 + 8); } } else if ( v81 < 398 ) { v138 = 8 * v81; v189 = v81; v139 = (PlayerObject *)&a1->m_pointArray1->__elems_[v81]; v81 += 2; cocos2d::CCPoint::operator=(v139, COERCE_FLOAT(&v194), v136, v138); cocos2d::CCPoint::operator=( (PlayerObject *)&a1->m_pointArray1->__elems_[v189 + 1], COERCE_FLOAT(&v195), v140, v189 * 8 + 8); } v89 = v89 + v91; ++v133; } } } M_nxt = M_nxt->_M_nxt; } if ( v81 ) { cocos2d::ccDrawColor4B( (unsigned __int8)&dword_FC + 3, (unsigned __int8)&dword_FC + 3, 0, (unsigned __int8)&dword_FC + 3); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray1->__elems_, v81); } if ( v79 ) { cocos2d::ccDrawColor4B((unsigned __int8)&dword_FC + 3, 0x7Fu, 0, (unsigned __int8)&dword_FC + 3); glLineWidth(1.0); cocos2d::ccDrawLines(a1->m_pointArray2->__elems_, v79); } glLineWidth(1.0); if ( m_drawEffectLines ) { if ( v4 ) goto LABEL_155; cocos2d::ccDrawColor4B(0, 0xFFu, 0xFFu, 0x96u); v92 = a1->m_effectGameObjects; if ( v92 ) { data = v92->data; if ( data->num ) { v94 = -1.0; arr = data->arr; v96 = &arr[data->num] + 0x3FFFFFFF; v97 = 0; while ( arr <= v96 ) { v99 = (int)*arr++; v98 = v99; if ( !v99 ) break; v144 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v98 + 96))(v98); if ( v144 < x || v144 > v24 ) { if ( v144 > v24 ) break; } else if ( (!GameObject::getGroupDisabled((GameObject *)v98) && (!GameVariable || !*(_BYTE *)(v98 + 1106)) || *(_BYTE *)(v98 + 981)) && !*(_BYTE *)(v98 + 1284) && !*(_BYTE *)(v98 + 1285) && v144 > v94 ) { if ( v97 < 398 ) { v145 = (PlayerObject *)&a1->m_pointArray1->__elems_[v97]; v146 = 8 * v97 + 8; v97 += 2; if ( y > -3000.0 ) v147 = y; else v147 = -3000.0; cocos2d::CCPoint::CCPoint(&v195, v144, v147); cocos2d::CCPoint::operator=(v145, COERCE_FLOAT(&v195), v148, v149); v150 = (PlayerObject *)((char *)a1->m_pointArray1 + v146); if ( v9 > v25 ) v151 = v25; else v151 = v9; cocos2d::CCPoint::CCPoint(&v195, v144, v151); cocos2d::CCPoint::operator=(v150, COERCE_FLOAT(&v195), v152, v153); } v94 = v144; } } if ( v97 ) { cocos2d::ccDrawColor4B(0, 0xFFu, 0xFFu, 0x96u); cocos2d::ccDrawLines(a1->m_pointArray1->__elems_, v97); } } } } else if ( v4 ) { goto LABEL_155; } glLineWidth(2.0); cocos2d::ccDrawColor4B(0, 0xFFu, 0xFFu, 0xFFu); for ( i = 0; i < cocos2d::CCArray::count(a1->m_guideObjects); ++i ) { v101 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_guideObjects, i); if ( !GameVariable || !v101->m_isHide || v101->m_isSelected ) { DrawGridLayer::getPortalMinMax(&v193, a1, v101); v102 = v193.x; v103 = v193.y; if ( v193.x >= -3000.0 && v193.x <= v9 ) { if ( x > -3000.0 ) v104 = x; else v104 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v104, v193.x); if ( v24 < 240000.0 ) v105 = v24; else v105 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v105, v102); cocos2d::ccDrawLine(&v194, &v195); } if ( v103 >= -3000.0 && v103 <= v9 ) { if ( x > -3000.0 ) v154 = x; else v154 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v154, v103); if ( v24 < 240000.0 ) v155 = v24; else v155 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v155, v103); cocos2d::ccDrawLine(&v194, &v195); } } } LABEL_155: v106 = a1->m_editorLayer; if ( v106->m_playbackMode == Not ) { if ( v106->m_editorUI->m_playbackActive ) { cocos2d::ccDrawColor4B((unsigned __int8)&word_32, 0xFFu, (unsigned __int8)&word_32, 0xFFu); glLineWidth(5.0); LevelTools::posForTimeInternal( &v195, a1->m_playbackTime, a1->m_speedObjects, a1->m_editorLayer->m_levelSettings->m_startSpeed, a1->m_editorLayer->m_levelSettings->m_platformerMode, 1, 1, &a1->m_editorLayer->m_gameState.m_rotateChannel, 0); if ( v195.x <= 0.0 ) { v107 = v195.y; if ( v195.y > 0.0 ) { a1->m_playbackX = 0.0; a1->m_playbackY = v107; } } else { a1->m_playbackX = v195.x; a1->m_playbackY = 0.0; } } else { cocos2d::ccDrawColor4B((unsigned __int8)&word_32, 0xFFu, (unsigned __int8)&word_32, 0x64u); glLineWidth(3.0); a1->m_musicTime = -1.0; } m_playbackX = a1->m_playbackX; if ( m_playbackX <= 0.0 || m_playbackX < x || m_playbackX > v24 ) { m_playbackY = a1->m_playbackY; if ( m_playbackY <= 0.0 || m_playbackY < y || m_playbackY > v25 ) goto LABEL_181; if ( x > -3000.0 ) v113 = x; else v113 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v113, a1->m_playbackY); v111 = a1->m_playbackY; if ( v24 < 240000.0 ) v110 = v24; else v110 = 240000.0; } else { if ( y > -3000.0 ) v109 = y; else v109 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, a1->m_playbackX, v109); v110 = a1->m_playbackX; if ( v9 > v25 ) v111 = v25; else v111 = v9; } cocos2d::CCPoint::CCPoint(&v195, v110, v111); cocos2d::ccDrawLine(&v194, &v195); LABEL_181: v114 = a1->m_editorLayer; v115 = v114->m_previewPosition.x; if ( (v115 != 0.0 || v114->m_previewPosition.y != 0.0) && v115 > 0.0 && v115 >= x && v115 <= v24 ) { cocos2d::ccDrawColor4B((unsigned __int8)&dword_FC + 3, 0x96u, 0, (unsigned __int8)&dword_FC + 3); glLineWidth(2.0); if ( y > -3000.0 ) v116 = y; else v116 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v115, v116); if ( v9 > v25 ) v117 = v25; else v117 = v9; cocos2d::CCPoint::CCPoint(&v195, v115, v117); cocos2d::ccDrawLine(&v194, &v195); } goto LABEL_194; } a1->m_playbackX = 0.0; a1->m_playbackY = 0.0; LABEL_194: v118 = a1->m_editorLayer; if ( v118->m_playbackMode != Playing && v118->m_previewMode ) { v156 = v118->m_objectLayer; cocos2d::CCPoint::CCPoint( &v195, v192.width * 0.5, (float)(v118->m_editorUI->m_toolbarHeight * 0.5) + (float)(v192.height * 0.5)); cocos2d::CCNode::convertToNodeSpace(&v193, v156, &v195); cocos2d::ccDrawColor4B(0, 0, 0, 0x32u); glLineWidth(2.0); if ( y > -3000.0 ) v157 = y; else v157 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v193.x, v157); if ( v9 > v25 ) v158 = v25; else v158 = v9; cocos2d::CCPoint::CCPoint(&v195, v193.x, v158); cocos2d::ccDrawLine(&v194, &v195); if ( x > -3000.0 ) v159 = x; else v159 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v159, v193.y); if ( v24 < 240000.0 ) v160 = v24; else v160 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v160, v193.y); cocos2d::ccDrawLine(&v194, &v195); } v119 = a1->m_editorLayer; if ( v119->m_playbackMode ) { if ( v119->m_gameState.m_isDualMode || PlayerObject::isFlying(v119->m_player1) || (m_player1 = a1->m_editorLayer->m_player1, m_player1->m_isBall) || m_player1->m_isSpider ) { MinPortalY = GJBaseGameLayer::getMinPortalY(a1->m_editorLayer); MaxPortalY = GJBaseGameLayer::getMaxPortalY(a1->m_editorLayer); glLineWidth(2.0); cocos2d::ccDrawColor4B((unsigned __int8)&dword_FC + 3, 0xAFu, 0x32u, (unsigned __int8)&dword_FC + 3); if ( MinPortalY != 90.0 ) { if ( x > -3000.0 ) v123 = x; else v123 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v123, MinPortalY); if ( v24 < 240000.0 ) v124 = v24; else v124 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v124, MinPortalY); cocos2d::ccDrawLine(&v194, &v195); } if ( x > -3000.0 ) v125 = x; else v125 = -3000.0; cocos2d::CCPoint::CCPoint(&v194, v125, MaxPortalY); if ( v24 < 240000.0 ) v126 = v24; else v126 = 240000.0; cocos2d::CCPoint::CCPoint(&v195, v126, MaxPortalY); cocos2d::ccDrawLine(&v194, &v195); } } if ( !v4 ) { v127 = a1->m_editorLayer; if ( v127->m_showDurationLines ) { m_durationObjects = v127->m_durationObjects; if ( m_durationObjects ) { v129 = m_durationObjects->data; if ( v129->num ) { v130 = v129->arr; v188 = &v130[v129->num] + 0x3FFFFFFF; while ( v130 <= v188 ) { v132 = (int)*v130++; v131 = v132; if ( !v132 ) break; if ( !GameVariable || !*(_BYTE *)(v131 + 1106) || *(_BYTE *)(v131 + 981) ) { if ( a1->m_updateTimeMarkers ) cocos2d::CCPoint::operator=( (PlayerObject *)(v131 + 1608), COERCE_FLOAT(&flt_AC5CF0), a1->m_updateTimeMarkers, GameVariable); v161 = *(float *)(v131 + 1264); v162 = *(_DWORD *)(v131 + 884); if ( v162 == 1006 ) { v161 = (float)(*(float *)(v131 + 1404) + *(float *)(v131 + 1408)) + *(float *)(v131 + 1412); } else if ( v162 == 3602 ) { v161 = *(float *)(v131 + 1748); } if ( v161 > 0.0 ) { (*(void (__fastcall **)(cocos2d::CCPoint *, int))(*(_DWORD *)v131 + 672))(&v193, v131); if ( v193.x <= v24 && v193.y <= v9 && (!*(_BYTE *)(v131 + 550) || *(_BYTE *)(v131 + 981)) ) { cocos2d::CCPoint::CCPoint(&v194, (const cocos2d::CCPoint *)(v131 + 1608)); v163 = *(unsigned __int8 *)(v131 + 1285); if ( *(_BYTE *)(v131 + 1285) ) { v194.y = v193.y; v194.x = v193.x + (float)(v161 * 311.58); } else if ( v194.x == 0.0 && v194.y == 0.0 ) { cocos2d::CCPoint::CCPoint(&v195, &v193); LODWORD(v164.x) = &v195; LODWORD(v164.y) = a1->m_speedObjects; v165 = LevelTools::timeForPos( v164, (cocos2d::CCArray *)a1->m_editorLayer->m_levelSettings->m_startSpeed, *(_DWORD *)(v131 + 1580), *(_DWORD *)(v131 + 1584), v163, a1->m_editorLayer->m_levelSettings->m_platformerMode, 1, v163, v163, GameVariable); LastGameplayRotated = LevelTools::getLastGameplayRotated(); LevelTools::posForTimeInternal( &v195, v165 + v161, a1->m_speedObjects, a1->m_editorLayer->m_levelSettings->m_startSpeed, a1->m_editorLayer->m_levelSettings->m_platformerMode, v163, 1, &a1->m_editorLayer->m_gameState.m_rotateChannel, v163); cocos2d::CCPoint::operator=((PlayerObject *)&v194, COERCE_FLOAT(&v195), v167, v168); if ( LastGameplayRotated == LevelTools::getLastGameplayRotated() ) { if ( LastGameplayRotated ) { x_low = LOBYTE(v193.x); v194.x = v193.x; } else { x_low = LOBYTE(v193.y); v194.y = v193.y; } } cocos2d::CCPoint::operator=((PlayerObject *)(v131 + 1608), COERCE_FLOAT(&v194), v169, x_low); } if ( v194.x >= x && v194.y >= y && v4 < 398 ) { v171 = v193.x; v172 = 8 * v4; v4 += 2; v173 = (PlayerObject *)((char *)a1->m_pointArray1 + v172); v174 = v172 + 8; if ( x >= v193.x ) v171 = x; if ( y < v193.y ) v175 = v193.y; else v175 = y; cocos2d::CCPoint::CCPoint(&v195, v171, v175); cocos2d::CCPoint::operator=(v173, COERCE_FLOAT(&v195), v176, v177); v178 = v194.x; v179 = (PlayerObject *)((char *)a1->m_pointArray1 + v174); if ( v24 <= v194.x ) v178 = v24; if ( v25 > v194.y ) v180 = v194.y; else v180 = v25; cocos2d::CCPoint::CCPoint(&v195, v178, v180); cocos2d::CCPoint::operator=(v179, COERCE_FLOAT(&v195), v181, v182); } } } } } if ( v4 ) { glLineWidth(2.0); cocos2d::ccDrawColor4B( (unsigned __int8)&dword_64, (unsigned __int8)&dword_64, (unsigned __int8)&dword_64, 0x4Bu); cocos2d::ccDrawLines(a1->m_pointArray1->__elems_, v4); } } } } } glLineWidth(1.0); a1->m_updateTimeMarkers = 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source