// // EditorUI::scaleObjects from 0x39e448 to 0x39e6b2 (618 bytes) // // 3 xrefs: // > EditorUI::scaleXChanged @ 0x39e728 // > EditorUI::scaleYChanged @ 0x39e7b8 // > EditorUI::scaleXYChanged @ 0x39e84c // // 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 EditorUI::scaleObjects( EditorUI *a1, cocos2d::CCArray *a2, float a3, float a4, cocos2d::CCPoint a5, ObjectScaleType a6, bool a7) { unsigned int v9; // r7 int v12; // r11 float v13; // s16 float v14; // s20 float v15; // s15 float v16; // s15 int v17; // r2 bool v18; // r3 unsigned int i; // r7 float *v20; // r11 float *v21; // r0 float v22; // s16 float v23; // s17 int v24; // r0 float v25; // s16 float v26; // s17 int v27; // r0 cocos2d::CCPoint v28; // r2 std::unordered_map *p_m_objectEditorStates; // [sp+Ch] [bp-28h] float v30; // [sp+14h] [bp-20h] BYREF float v31; // [sp+18h] [bp-1Ch] _BYTE v32[8]; // [sp+1Ch] [bp-18h] BYREF cocos2d::CCPoint v33; // [sp+24h] [bp-10h] BYREF v9 = 0; p_m_objectEditorStates = &a1->m_objectEditorStates; while ( v9 < cocos2d::CCArray::count(a2) ) { v12 = cocos2d::CCArray::objectAtIndex(a2, v9); v33.x = *(float *)(v12 + 772); 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[]( p_m_objectEditorStates, (unsigned int *)&v33); if ( a1->m_increaseScale ) { v13 = 4.0; v14 = 0.25; } else { v13 = 4.0; v14 = 0.5; if ( !GameObject::isTrigger((GameObject *)v12) ) v13 = 2.0; } if ( LODWORD(a5.y) == 2 ) goto LABEL_9; v16 = (float)lroundf() / 100.0; if ( v16 < v14 || v16 > v13 || (float)(v16 * *(float *)(v12 + 1124)) == *(float *)(v12 + 1000) ) return; if ( LODWORD(a5.y) != 1 ) { LABEL_9: v15 = (float)lroundf() / 100.0; if ( v15 < v14 || v15 > v13 || (float)(v15 * *(float *)(v12 + 1128)) == *(float *)(v12 + 1004) ) return; } ++v9; } if ( cocos2d::CCPoint::equals((cocos2d::CCPoint *)LODWORD(a5.x), (const cocos2d::CCPoint *)&flt_AC5D38) ) { EditorUI::getGroupCenter(&v33, a1, a2, 0); cocos2d::CCPoint::operator=((PlayerObject *)LODWORD(a5.x), COERCE_FLOAT(&v33), v17, v18); } for ( i = 0; i < cocos2d::CCArray::count(a2); ++i ) { v20 = (float *)cocos2d::CCArray::objectAtIndex(a2, i); v33.x = v20[193]; v21 = (float *)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[]( &a1->m_objectEditorStates._M_h._M_buckets, (unsigned int *)&v33); v22 = v21[2] * v20[281]; v23 = v21[3] * v20[282]; v24 = (*(int (__fastcall **)(float *))(*(_DWORD *)v20 + 96))(v20); v25 = v22 * a3; v26 = v23 * a4; cocos2d::CCPoint::operator-(&v30, v24, LODWORD(a5.x)); if ( LODWORD(a5.y) == 2 || (v30 = v30 * (float)(v25 / v20[250]), LODWORD(a5.y) != 1) ) v31 = v31 * (float)(v26 / v20[251]); cocos2d::CCPoint::operator+(v32, LODWORD(a5.x), &v30); if ( LODWORD(a5.y) == 2 || (GameObject::updateCustomScaleX((GameObject *)v20, v25), LODWORD(a5.y) != 1) ) GameObject::updateCustomScaleY((GameObject *)v20, v26); if ( !(_BYTE)a6 ) { v27 = (*(int (__fastcall **)(float *))(*(_DWORD *)v20 + 96))(v20); cocos2d::CCPoint::operator-(&v33, v32, v27); LODWORD(v28.x) = &v33; EditorUI::moveObject(a1, (GameObject *)v20, v28); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source