//
// cocos2d::CCEGLView::updateFrameSize from 0x1800790a0 to 0x180079208 (360 bytes)
//
// 6 xrefs:
// > cocos2d::CCEGLView::setFrameSize @ 0x180078876
// > cocos2d::CCEGLView::setFrameZoomFactor @ 0x1800788a8
// > ??> @ 0x18013b5c4
// > ??> @ 0x18013b5d4
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b4b3c
//
// 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::CCEGLView::updateFrameSize(cocos2d::CCEGLView *this)
{
__int64 v2; // rcx
__int64 v3; // rcx
cocos2d::CCSize *p_m_obScreenSize; // rcx
int v5; // ecx
int v6; // [rsp+40h] [rbp+8h] BYREF
int v7; // [rsp+48h] [rbp+10h] BYREF
int v8; // [rsp+50h] [rbp+18h] BYREF
int v9; // [rsp+58h] [rbp+20h] BYREF
if ( this->m_obScreenSize.width > 0.0 && this->m_obScreenSize.height > 0.0 )
{
v2 = *((_QWORD *)this + 25);
v6 = 0;
v8 = 0;
sub_1800D4A20(v2, &v6, &v8);
v3 = *((_QWORD *)this + 25);
v7 = 0;
v9 = 0;
sub_1800D4A20(v3, &v7, &v9);
p_m_obScreenSize = &this->m_obScreenSize;
if ( v7 == 2 * v6 )
{
if ( v9 == 2 * v8 )
{
v5 = 2 - (*((_BYTE *)this + 179) != 0);
*((_DWORD *)this + 45) = v5;
sub_1800D4C40(
*((_QWORD *)this + 25),
(unsigned int)(int)(float)((float)((float)(this->m_obScreenSize.width * 0.5) * (float)v5)
* *((float *)this + 48)),
(unsigned int)(int)(float)((float)((float)(this->m_obScreenSize.height * 0.5) * (float)v5)
* *((float *)this + 48)));
*((_BYTE *)this + 178) = 1;
return;
}
p_m_obScreenSize = &this->m_obScreenSize;
}
if ( *((_BYTE *)this + 178) )
*((_DWORD *)this + 45) = 1;
else
p_m_obScreenSize = &this->m_obScreenSize;
sub_1800D4C40(
*((_QWORD *)this + 25),
(unsigned int)(int)(float)((float)((float)*((int *)this + 45) * p_m_obScreenSize->width) * *((float *)this + 48)),
(unsigned int)(int)(float)((float)((float)*((int *)this + 45) * this->m_obScreenSize.height)
* *((float *)this + 48)));
*((_BYTE *)this + 178) = 0;
}
}