// // cocos2d::CCEGLViewProtocol::updateDesignResolutionSize from 0x18006c230 to 0x18006c3e6 (438 bytes) // // 4 xrefs: // > @ 0x18013a390 // > @ 0x18013a414 // > @ 0x1801438a8 // > @ 0x1801b3ec4 // // 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::CCEGLViewProtocol::updateDesignResolutionSize(cocos2d::CCEGLViewProtocol *this) { float width; // xmm11_4 float height; // xmm10_4 float v4; // xmm8_4 float v5; // xmm9_4 cocos2d::ResolutionPolicy m_eResolutionPolicy; // eax float v7; // xmm7_4 float v8; // xmm6_4 float v9; // xmm0_4 float v10; // xmm0_4 float v11; // xmm0_4 float v12; // xmm8_4 float v13; // xmm11_4 struct cocos2d::CCDirector *v14; // rbx _DWORD *v15; // rax width = this->m_obScreenSize.width; if ( width > 0.0 ) { height = this->m_obScreenSize.height; if ( height > 0.0 ) { v4 = this->m_obDesignResolutionSize.width; if ( v4 > 0.0 ) { v5 = this->m_obDesignResolutionSize.height; if ( v5 > 0.0 ) { m_eResolutionPolicy = this->m_eResolutionPolicy; v7 = height / v5; v8 = width / v4; this->m_fScaleY = height / v5; this->m_fScaleX = width / v4; switch ( m_eResolutionPolicy ) { case kResolutionNoBorder: v8 = fmaxf(v8, v7); this->m_fScaleY = v8; this->m_fScaleX = v8; LABEL_13: v7 = v8; v9 = v8; break; case kResolutionShowAll: v9 = fminf(v8, v7); this->m_fScaleY = v9; v7 = v9; this->m_fScaleX = v9; break; case kResolutionFixedHeight: this->m_fScaleX = v7; v10 = ceilf(width / v7); this->m_obDesignResolutionSize.width = v10; v4 = v10; v9 = height / v5; break; default: v9 = width / v4; if ( m_eResolutionPolicy == kResolutionFixedWidth ) { this->m_fScaleY = v8; v11 = ceilf(height / v8); this->m_obDesignResolutionSize.height = v11; v5 = v11; goto LABEL_13; } break; } v12 = v4 * v9; v13 = (float)(width - v12) * 0.5; cocos2d::CCRect::setRect(&this->m_obViewPortRect, v13, (float)(height - (float)(v5 * v7)) * 0.5, v12, v5 * v7); v14 = cocos2d::CCDirector::sharedDirector(); v15 = (_DWORD *)((__int64 (__fastcall *)(cocos2d::CCEGLViewProtocol *))this->getDesignResolutionSize)(this); cocos2d::CCSize::operator=(&v14->m_obWinSizeInPoints, v15); cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)v14, v13); cocos2d::CCDirector::setGLDefaultValues(v14); } } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source