// // EditorUI::scaleObjects from 0x6b7894 to 0x6b7c1c (904 bytes) // // 4 xrefs: // > EditorUI::scaleXChanged @ 0x6b7ccc // > EditorUI::scaleYChanged @ 0x6b7d8c // > EditorUI::scaleXYChanged @ 0x6b7e78 // > @ 0x8bd58 // // 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 // // local variable allocation has failed, the output may be wrong! void EditorUI::scaleObjects( EditorUI *a1, cocos2d::CCArray *a2, float a3, float a4, cocos2d::CCPoint a5, ObjectScaleType a6, bool a7) { unsigned __int8 v7; // w4 unsigned int v10; // w22 cocos2d::CCPoint *v13; // x24 int v14; // w20 int i; // w27 GameObject *v16; // x23 char *v17; // x25 float v18; // s3 float v19; // s1 float v20; // s0 float v21; // s0 unsigned int v22; // w23 GameObject *v23; // x28 char *v24; // x0 float v25; // s11 float m_pixelScaleX; // s12 float v27; // s10 __int64 v28; // x0 __int64 v29; // x0 __int64 v30; // [xsp+B0h] [xbp+B0h] BYREF __int64 v31; // [xsp+B8h] [xbp+B8h] BYREF __int64 v32; // [xsp+C0h] [xbp+C0h] BYREF cocos2d::CCPoint GroupCenter; // 0:kr00_8.8 cocos2d::CCPoint v34; // 0:s0.4,4:s1.4 v10 = 0; v13 = (cocos2d::CCPoint *)a6; v14 = a7; for ( i = v7; v10 < (unsigned int)cocos2d::CCArray::count(a2); ++v10 ) { v16 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v10); LODWORD(v32) = v16->m_uniqueID; v17 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[]( (__int64)&a1->m_objectEditorStates, (int *)&v32); if ( a1->m_increaseScale ) { v18 = 4.0; v19 = 0.25; } else { if ( GameObject::isTrigger(v16) ) v18 = 4.0; else v18 = 2.0; v19 = 0.5; } if ( v14 == 2 ) goto LABEL_9; v20 = (float)(int)llroundf((float)(a3 * *((float *)v17 + 2)) * 100.0) / 100.0; if ( v19 > v20 || v18 < v20 || (float)(v20 * v16->m_pixelScaleX) == v16->m_scaleX ) return; if ( v14 != 1 ) { LABEL_9: v21 = (float)(int)llroundf((float)(a4 * *((float *)v17 + 3)) * 100.0) / 100.0; if ( v19 > v21 || v18 < v21 || (float)(v21 * v16->m_pixelScaleY) == v16->m_scaleY ) return; } } if ( (unsigned __int8)cocos2d::CCPoint::equals(v13, (const cocos2d::CCPoint *)&dword_1242110) ) { GroupCenter = EditorUI::getGroupCenter(a1, a2, 0); cocos2d::CCPoint::operator=(v13, GroupCenter.x, GroupCenter.y); } v22 = 0; if ( (unsigned int)cocos2d::CCArray::count(a2) ) { while ( 1 ) { v23 = (GameObject *)cocos2d::CCArray::objectAtIndex(a2, v22); LODWORD(v32) = v23->m_uniqueID; v24 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[]( (__int64)&a1->m_objectEditorStates, (int *)&v32); v25 = *((float *)v24 + 2); m_pixelScaleX = v23->m_pixelScaleX; v27 = (float)(*((float *)v24 + 3) * v23->m_pixelScaleY) * a4; v28 = (__int64)v23->getPosition(v23); cocos2d::CCPoint::operator-(&v30, v28, v13); if ( v14 == 2 ) break; *(float *)&v30 = *(float *)&v30 * (float)((float)((float)(v25 * m_pixelScaleX) * a3) / v23->m_scaleX); if ( v14 != 1 ) { *((float *)&v30 + 1) = *((float *)&v30 + 1) * (float)(v27 / v23->m_scaleY); cocos2d::CCPoint::operator+(&v31, v13, &v30); GameObject::updateCustomScaleX(v23, (float)(v25 * m_pixelScaleX) * a3); goto LABEL_19; } cocos2d::CCPoint::operator+(&v31, v13, &v30); GameObject::updateCustomScaleX(v23, (float)(v25 * m_pixelScaleX) * a3); if ( !i ) { LABEL_27: ++v22; v29 = (__int64)v23->getPosition(v23); cocos2d::CCPoint::operator-(&v32, &v31, v29); EditorUI::moveObject(a1, v23, v34); goto LABEL_21; } LABEL_20: ++v22; LABEL_21: if ( v22 >= (unsigned int)cocos2d::CCArray::count(a2) ) return; } *((float *)&v30 + 1) = *((float *)&v30 + 1) * (float)(v27 / v23->m_scaleY); cocos2d::CCPoint::operator+(&v31, v13, &v30); LABEL_19: GameObject::updateCustomScaleY(v23, v27); if ( !i ) goto LABEL_27; goto LABEL_20; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source