//
// cocos2d::CCEGLViewProtocol::updateDesignResolutionSize from 0xd7b01c to 0xd7b160 (324 bytes)
//
// 1 xrefs:
// > ??> @ 0xd37c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:08:07 +0000
//
__int64 __fastcall cocos2d::CCEGLViewProtocol::updateDesignResolutionSize(__int64 this)
{
float v1; // s0
float v2; // s4
float v3; // s2
float v4; // s3
float v5; // s5
int v6; // w1
float v7; // s1
__int64 v8; // x19
float *v9; // x0
float *v10; // x20
float *v11; // x0
__int64 v12; // x1
unsigned int v13; // w2
v1 = *(float *)(this + 16);
if ( v1 > 0.0 )
{
v2 = *(float *)(this + 20);
if ( v2 > 0.0 )
{
v3 = *(float *)(this + 24);
if ( v3 > 0.0 )
{
v4 = *(float *)(this + 28);
if ( v4 > 0.0 )
{
v5 = v1 / v3;
v6 = *(_DWORD *)(this + 108);
v7 = v2 / v4;
*(float *)(this + 100) = v1 / v3;
*(float *)(this + 104) = v2 / v4;
if ( v6 == 1 )
{
if ( v5 >= v7 )
{
LABEL_16:
v7 = v1 / v3;
*(float *)(this + 104) = v5;
*(float *)(this + 100) = v5;
goto LABEL_10;
}
}
else
{
if ( v6 != 2 )
{
if ( v6 == 3 )
{
*(float *)(this + 100) = v7;
v5 = v2 / v4;
v3 = ceilf(v1 / v7);
*(float *)(this + 24) = v3;
}
else if ( v6 == 4 )
{
v7 = v1 / v3;
*(float *)(this + 104) = v5;
v4 = ceilf(v2 / v5);
*(float *)(this + 28) = v4;
}
goto LABEL_10;
}
if ( v5 <= v7 )
goto LABEL_16;
}
*(float *)(this + 104) = v7;
*(float *)(this + 100) = v7;
v5 = v2 / v4;
LABEL_10:
v8 = this;
v9 = cocos2d::CCRect::setRect(
(float *)(this + 32),
(float)(v1 - (float)(v3 * v5)) * 0.5,
(float)(v2 - (float)(v4 * v7)) * 0.5,
v3 * v5,
v4 * v7);
v10 = (float *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v9);
v11 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 88LL))(v8);
cocos2d::CCSize::operator=(v10 + 80, v11);
cocos2d::CCDirector::createStatsLabel((cocos2d::CCDirector *)v10);
return cocos2d::CCDirector::setGLDefaultValues((cocos2d::CCDirector *)v10, v12, v13);
}
}
}
}
return this;
}