// // cocos2d::CCDirector::updateScreenScale from 0xad6a44 to 0xad6b3c (248 bytes) // // 2 xrefs: // > cocos2d::CCDirector::setupScreenScale @ 0xad7a48 // > @ 0x46a58 // // 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) { float *v2; // x1 char *v4; // x1 cocos2d::CCEGLView *v5; // x0 cocos2d::CCDirector *v6; // x0 float height; // s4 float v8; // s1 float v9; // s0 float v10; // s2 char *v11; // [xsp+28h] [xbp+28h] float v12; // [xsp+30h] [xbp+30h] float v13; // [xsp+34h] [xbp+34h] cocos2d::CCSize::operator=(&a1->m_obResolutionInPixels, v2); if ( (float)(a1->m_obResolutionInPixels.width / a1->m_obScaleFactor.width) >= (float)(a1->m_obResolutionInPixels.height / a1->m_obScaleFactor.height) ) v4 = (_BYTE *)(&dword_0 + 3); else v4 = &byte_4; v11 = v4; v5 = cocos2d::CCEGLView::sharedOpenGLView(); ((void (__fastcall *)(cocos2d::CCEGLView *, char *, float, float))v5->setDesignResolutionSize)( v5, v11, a1->m_obScaleFactor.width, a1->m_obScaleFactor.height); v6 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v6); height = a1->m_obScaleFactor.height; v8 = v12 / a1->m_obScaleFactor.width; a1->m_fScreenTop = v13; a1->m_fScreenRight = v12; v9 = v13 / height; a1->m_fScreenBottom = 0.0; a1->m_fScreenLeft = 0.0; a1->m_fScreenScaleFactorW = v8; a1->m_fScreenScaleFactorH = v13 / height; v10 = v13 / height; if ( v8 <= (float)(v13 / height) ) v10 = v8; a1->m_fScreenScaleFactor = v10; if ( v8 >= v9 ) v9 = v8; a1->m_fScreenScaleFactorMax = v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source