//
// cocos2d::CCEGLViewProtocol::setDesignResolutionSize from 0x7ea2a6 to 0x7ea3d4 (302 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:58 +0000
//
void __fastcall cocos2d::CCEGLViewProtocol::setDesignResolutionSize(int a1, float a2, float a3, int a4)
{
float v6; // s17
float v7; // s16
float v8; // s14
float v9; // s15
float v10; // r3
float *v11; // r0
int v12; // r5
float *v13; // r0
float *v14; // r0
cocos2d::CCDirector *v15; // r0
cocos2d::CCDirector *v16; // r0
cocos2d::CCDirector *v17; // r0
int v18; // r1
unsigned int v19; // r2
float v20; // [sp+0h] [bp-Ch]
if ( a2 != 0.0 && a3 != 0.0 )
{
cocos2d::CCSize::setSize((float *)(a1 + 16), a2, a3);
v6 = *(float *)(a1 + 8);
v7 = *(float *)(a1 + 12);
v8 = v6 / *(float *)(a1 + 16);
v9 = v7 / *(float *)(a1 + 20);
*(float *)(a1 + 92) = v8;
*(float *)(a1 + 96) = v9;
if ( a4 == 1 )
{
if ( v8 >= v9 )
v9 = v8;
}
else
{
if ( a4 != 2 )
{
if ( a4 == 3 )
{
*(float *)(a1 + 92) = v9;
*(float *)(a1 + 16) = ceilf(v6 / v9);
}
else if ( a4 == 4 )
{
*(float *)(a1 + 96) = v8;
*(float *)(a1 + 20) = ceilf(v7 / v8);
}
goto LABEL_15;
}
if ( v8 <= v9 )
v9 = v8;
}
*(float *)(a1 + 96) = v9;
*(float *)(a1 + 92) = v9;
LABEL_15:
v10 = *(float *)(a1 + 16) * *(float *)(a1 + 92);
v20 = *(float *)(a1 + 20) * *(float *)(a1 + 96);
v11 = cocos2d::CCRect::setRect((float *)(a1 + 24), (float)(v6 - v10) * 0.5, (float)(v7 - v20) * 0.5, v10, v20);
*(_DWORD *)(a1 + 100) = a4;
v12 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v11);
v13 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)a1 + 44))(a1);
v14 = cocos2d::CCSize::operator=((float *)(v12 + 248), v13);
v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v14);
cocos2d::CCDirector::createStatsLabel(v15);
v17 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v16);
cocos2d::CCDirector::setGLDefaultValues(v17, v18, v19);
}
}