// // cocos2d::CCDirector::updateContentScale from 0x100483b70 to 0x100483cae (318 bytes) // // 2 xrefs: // > VideoOptionsLayer::onApply @ 0x1007a0568 // > GraphicsReloadLayer::performReload @ 0x1007a5117 // // 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 __fastcall cocos2d::CCDirector::updateContentScale(cocos2d::CCDirector *a1, cocos2d::TextureQuality a2) { float height; // xmm0_4 float v3; // xmm1_4 float width; // xmm2_4 float v5; // xmm3_4 float *p_m_fContentScaleFactor; // rax bool v7; // cf float m_fContentScaleFactor; // xmm0_4 if ( a2 == kTextureQualityLow ) { if ( a1->m_fContentScaleFactor == 1.0 ) { LABEL_20: a1->m_eTextureQuality = kTextureQualityLow; return; } p_m_fContentScaleFactor = &a1->m_fContentScaleFactor; LABEL_19: *p_m_fContentScaleFactor = 1.0; goto LABEL_20; } if ( a2 == kTextureQualityMedium ) { if ( a1->m_fContentScaleFactor == 2.0 ) { LABEL_16: a1->m_eTextureQuality = kTextureQualityMedium; return; } p_m_fContentScaleFactor = &a1->m_fContentScaleFactor; LABEL_15: *p_m_fContentScaleFactor = 2.0; goto LABEL_16; } if ( a2 != kTextureQualityHigh ) { height = a1->m_obScaleFactor.height; v3 = a1->m_obResolutionInPixels.height; if ( v3 < (float)(3.0 * height) ) { width = a1->m_obScaleFactor.width; v5 = a1->m_obResolutionInPixels.width; if ( v5 < (float)(3.0 * width) ) { p_m_fContentScaleFactor = &a1->m_fContentScaleFactor; v7 = v3 < (float)(height * 1.5); m_fContentScaleFactor = a1->m_fContentScaleFactor; if ( v7 && v5 < (float)(width * 1.5) ) { if ( m_fContentScaleFactor == 1.0 ) goto LABEL_20; goto LABEL_19; } if ( m_fContentScaleFactor == 2.0 ) { a1->m_eTextureQuality = kTextureQualityMedium; return; } goto LABEL_15; } } } if ( a1->m_fContentScaleFactor != 4.0 ) a1->m_fContentScaleFactor = 4.0; a1->m_eTextureQuality = kTextureQualityHigh; }
GD Web Decomp Icon

GD Web Decomp

Raw Source