// // cocos2d::CCEGLViewProtocol::setDesignResolutionSize from 0x18006bea0 to 0x18006c070 (464 bytes) // // 6 xrefs: // > @ 0x1801002c0 // > @ 0x1801008f0 // > @ 0x18013a208 // > @ 0x18013a23c // > @ 0x1801438a8 // > @ 0x1801b3e58 // // 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::setDesignResolutionSize(cocos2d::CCRect *a1, float a2, float a3, int a4) { float x; // xmm11_4 float y; // xmm10_4 float width; // xmm7_4 float height; // xmm8_4 float v10; // xmm0_4 float v11; // xmm6_4 float v12; // xmm0_4 float v13; // xmm0_4 float v14; // xmm7_4 float v15; // xmm11_4 cocos2d::CCPoint origin; // rax _DWORD *v17; // rbx struct cocos2d::CCDirector *v18; // rax cocos2d::CCNode *v19; // rax cocos2d::CCDirector *v20; // rax if ( a2 != 0.0 && a3 != 0.0 ) { cocos2d::CCSize::setSize(&a1[1].size, a2, a3); x = a1[1].origin.x; y = a1[1].origin.y; width = a1[1].size.width; height = a1[1].size.height; v10 = x / width; v11 = y / height; a1[6].origin.y = x / width; a1[6].size.width = y / height; switch ( a4 ) { case 1: v10 = fmaxf(v10, v11); a1[6].size.width = v10; v11 = v10; a1[6].origin.y = v10; break; case 2: v10 = fminf(v10, v11); a1[6].size.width = v10; v11 = v10; a1[6].origin.y = v10; break; case 3: a1[6].origin.y = v11; v12 = ceilf(x / v11); a1[1].size.width = v12; width = v12; v10 = y / height; break; case 4: a1[6].size.width = v10; v13 = ceilf(y / v10); a1[1].size.height = v13; height = v13; v10 = x / width; v11 = x / width; break; } v14 = width * v10; v15 = (float)(x - v14) * 0.5; cocos2d::CCRect::setRect(a1 + 2, v15, (float)(y - (float)(v11 * height)) * 0.5, v14, v11 * height); origin = a1->origin; LODWORD(a1[6].size.height) = a4; v17 = (_DWORD *)(*(__int64 (__fastcall **)(cocos2d::CCRect *))(*(_QWORD *)&origin + 80LL))(a1); v18 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCSize::operator=(&v18->m_obWinSizeInPoints, v17); v19 = (cocos2d::CCNode *)cocos2d::CCDirector::sharedDirector(); cocos2d::CCNode::updateTweenActionInt(v19, v15); v20 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::setGLDefaultValues(v20); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source