// // GJScaleControl::loadValues from 0x3a00a0 to 0x3a0354 (692 bytes) // // 1 xrefs: // > EditorUI::updateScaleControl @ 0x3a0402 // // 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 GJScaleControl::loadValues( GJScaleControl *a1, GameObject *a2, cocos2d::CCArray *a3, std::unordered_map *a4) { float v8; // s16 unsigned int v9; // r10 float v10; // s17 float *v11; // r7 float *v12; // r0 float v13; // s14 float v14; // s15 unsigned int v15; // r7 GameObject *v16; // r0 GameObject *v17; // r11 GameObjectEditorState *v18; // r10 Slider *m_sliderX; // r5 float v20; // r0 Slider *m_sliderY; // r5 float v22; // r0 float v23; // r5 Slider *m_sliderXY; // r7 float v25; // r0 Slider *v26; // r0 int v27; // r3 _BOOL4 v28; // r5 Slider_vtbl *v29; // r3 cocos2d::CCNode *v30; // r0 cocos2d::CCNode_vtbl *v31; // r3 cocos2d::CCNode *v32; // r7 Slider *v33; // r0 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 Slider *v35; // r2 int v36; // r5 cocos2d::CCPoint v37; // [sp+4h] [bp-18h] BYREF cocos2d::CCPoint v38; // [sp+Ch] [bp-10h] BYREF a1->m_scale1Lock = 1; if ( a3 && cocos2d::CCArray::count(a3) ) { v8 = -1.0; v9 = 0; v10 = -1.0; while ( v9 < cocos2d::CCArray::count(a3) ) { v11 = (float *)cocos2d::CCArray::objectAtIndex(a3, v9); v38.x = v11[193]; v12 = (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[]( a4, (unsigned int *)&v38); v13 = v11[250] / v11[281]; v14 = v11[251] / v11[282]; if ( v10 == -1.0 ) { v10 = v11[250] / v11[281]; } else if ( v10 != v13 ) { v10 = -2.0; } if ( v8 == -1.0 ) { v8 = v11[251] / v11[282]; } else if ( v8 != v14 ) { v8 = -2.0; } v12[2] = v13; ++v9; v12[3] = v14; } v15 = 0; if ( v10 == -2.0 ) v10 = 1.0; if ( v8 == -2.0 ) v8 = 1.0; while ( v15 < cocos2d::CCArray::count(a3) ) { v16 = (GameObject *)cocos2d::CCArray::objectAtIndex(a3, v15++); v17 = v16; LODWORD(v38.x) = v16->m_uniqueID; v18 = (GameObjectEditorState *)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[]( a4, (unsigned int *)&v38); GameObjectEditorState::loadValues(v18, v17); v18->m_scaleX = v18->m_scaleX / v10; v18->m_scaleY = v18->m_scaleY / v8; } goto LABEL_24; } if ( a2 ) { v10 = a2->m_scaleX / a2->m_pixelScaleX; v8 = a2->m_scaleY / a2->m_pixelScaleY; LABEL_24: m_sliderX = a1->m_sliderX; v20 = GJScaleControl::valueFromScale(a1, v10); Slider::setValue(m_sliderX, v20); m_sliderY = a1->m_sliderY; v22 = GJScaleControl::valueFromScale(a1, v8); Slider::setValue(m_sliderY, v22); if ( v10 < v8 ) v23 = v8; else v23 = v10; goto LABEL_27; } v8 = -1.0; v10 = -1.0; v23 = -1.0; LABEL_27: m_sliderXY = a1->m_sliderXY; v25 = GJScaleControl::valueFromScale(a1, v23); Slider::setValue(m_sliderXY, v25); GJScaleControl::updateLabelX(a1, v10); GJScaleControl::updateLabelY(a1, v8); GJScaleControl::updateLabelXY(a1, v23); v26 = a1->m_sliderXY; v27 = a1->m_senderTag - 30; a1->m_valueX = v10; v28 = v27 == 0; v29 = v26->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; a1->m_valueY = v8; v29->setVisible(v26, !v28); a1->m_scaleLabel->setVisible(a1->m_scaleLabel, !v28); a1->m_sliderX->setVisible(a1->m_sliderX, v28); a1->m_scaleXLabel->setVisible(a1->m_scaleXLabel, v28); a1->m_sliderY->setVisible(a1->m_sliderY, v28); a1->m_scaleYLabel->setVisible(a1->m_scaleYLabel, v28); v30 = a1->m_scaleLockButton->getParent(a1->m_scaleLockButton); v31 = v30->__vftable; v32 = v30; v33 = a1->m_sliderY; setPosition = v31->setPosition; if ( v28 ) { v35 = a1->m_sliderY; } else { v35 = a1->m_sliderXY; v33 = v35; } v36 = (int)v35->getPosition(v33); cocos2d::CCPoint::CCPoint(&v37, 0.0, 60.0); cocos2d::CCPoint::operator+(&v38, v36, &v37); setPosition(v32, &v38); }
GD Web Decomp Icon

GD Web Decomp

Raw Source