// // cocos2d::CCDirector::updateScreenScale from 0x5c34d4 to 0x5c3590 (188 bytes) // // 1 xrefs: // > cocos2d::CCDirector::setupScreenScale @ 0x5c3e52 // // 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 cocos2d::CCDirector::updateScreenScale(cocos2d::CCDirector *a1, cocos2d::CCSize a2) { int v3; // r7 cocos2d::CCEGLView *v4; // r0 cocos2d::CCDirector *v5; // r0 float width; // s14 float v7; // s13 float height; // s15 float v9; // s14 float v10; // s13 float v11; // s15 float v12; // s13 cocos2d::CCSize v13; // [sp+4h] [bp-10h] BYREF cocos2d::CCSize::operator=(&a1->m_obResolutionInPixels, (float *)LODWORD(a2.width)); if ( (float)(a1->m_obResolutionInPixels.height / a1->m_obScaleFactor.height) <= (float)(a1->m_obResolutionInPixels.width / a1->m_obScaleFactor.width) ) v3 = 3; else v3 = 4; v4 = cocos2d::CCEGLView::sharedOpenGLView(); ((void (__fastcall *)(cocos2d::CCEGLView *, _DWORD, _DWORD, int))v4->setDesignResolutionSize)( v4, LODWORD(a1->m_obScaleFactor.width), LODWORD(a1->m_obScaleFactor.height), v3); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v13, v5); width = v13.width; a1->m_fScreenBottom = 0.0; v7 = a1->m_obScaleFactor.width; a1->m_fScreenLeft = 0.0; height = v13.height; a1->m_fScreenRight = width; v9 = width / v7; v10 = a1->m_obScaleFactor.height; a1->m_fScreenTop = height; v11 = height / v10; a1->m_fScreenScaleFactorW = v9; a1->m_fScreenScaleFactorH = v11; if ( v9 > v11 ) v12 = v11; else v12 = v9; if ( v9 >= v11 ) v11 = v9; a1->m_fScreenScaleFactor = v12; a1->m_fScreenScaleFactorMax = v11; }
GD Web Decomp Icon

GD Web Decomp

Raw Source