//
// cocos2d::CCEGLViewProtocol::updateDesignResolutionSize from 0x7ea5dc to 0x7ea70a (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::updateDesignResolutionSize(cocos2d::CCEGLViewProtocol *this)
{
float v2; // s17
float v3; // s16
float v4; // s14
float v5; // s15
float v6; // s14
int v7; // r3
float v8; // s15
float v9; // r3
float *v10; // r0
float *v11; // r5
float *v12; // r0
int v13; // r1
unsigned int v14; // r2
float v15; // [sp+0h] [bp-Ch]
v2 = *((float *)this + 2);
if ( v2 > 0.0 )
{
v3 = *((float *)this + 3);
if ( v3 > 0.0 )
{
v4 = *((float *)this + 4);
if ( v4 > 0.0 )
{
v5 = *((float *)this + 5);
if ( v5 > 0.0 )
{
v6 = v2 / v4;
v7 = *((_DWORD *)this + 25);
v8 = v3 / v5;
*((float *)this + 23) = v6;
*((float *)this + 24) = v8;
if ( v7 == 1 )
{
if ( v6 >= v8 )
v8 = v6;
}
else
{
if ( v7 != 2 )
{
if ( v7 == 3 )
{
*((float *)this + 23) = v8;
*((float *)this + 4) = ceilf(v2 / v8);
}
else if ( v7 == 4 )
{
*((float *)this + 24) = v6;
*((float *)this + 5) = ceilf(v3 / v6);
}
goto LABEL_17;
}
if ( v6 <= v8 )
v8 = v6;
}
*((float *)this + 24) = v8;
*((float *)this + 23) = v8;
LABEL_17:
v9 = *((float *)this + 4) * *((float *)this + 23);
v15 = *((float *)this + 5) * *((float *)this + 24);
v10 = cocos2d::CCRect::setRect((float *)this + 6, (float)(v2 - v9) * 0.5, (float)(v3 - v15) * 0.5, v9, v15);
v11 = (float *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v10);
v12 = (float *)(*(int (__fastcall **)(cocos2d::CCEGLViewProtocol *))(*(_DWORD *)this + 44))(this);
cocos2d::CCSize::operator=(v11 + 62, v12);
cocos2d::CCDirector::createStatsLabel((cocos2d::CCDirector *)v11);
cocos2d::CCDirector::setGLDefaultValues((cocos2d::CCDirector *)v11, v13, v14);
}
}
}
}
}