// // cocos2d::CCEGLView::initWithRect from 0x180077280 to 0x1800774ec (620 bytes) // // 7 xrefs: // > cocos2d::CCEGLView::create @ 0x18007683c // > cocos2d::CCEGLView::createWithFullScreen @ 0x180076a07 // > cocos2d::CCEGLView::createWithRect @ 0x180076a9e // > cocos2d::CCEGLView::initWithFullScreen @ 0x180077161 // > cocos2d::CCEGLView::initWithFullscreen @ 0x180077265 // > @ 0x1801438a8 // > @ 0x1801b4950 // // 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 // char __fastcall cocos2d::CCEGLView::initWithRect( cocos2d::CCEGLView *this, _QWORD *a2, const struct cocos2d::CCRect *a3, float a4) { float *v6; // rax struct cocos2d::CCRect *v7; // rax const char *String; // rdi HWND v9; // rax __int64 v11; // rcx int v12; // r8d HWND v13; // rax int v14; // [rsp+40h] [rbp-158h] BYREF cocos2d::CCRect v15; // [rsp+48h] [rbp-150h] BYREF char Buffer[256]; // [rsp+60h] [rbp-138h] BYREF if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) && *((_BYTE *)this + 234) ) { a3->size.width = a3->size.width + 1.0; a3->size.height = a3->size.height + 1.0; } if ( a2[3] > 0xFu ) a2 = (_QWORD *)*a2; ((void (__fastcall *)(cocos2d::CCEGLView *, _QWORD *))this->setViewName)(this, a2); *((float *)this + 48) = a4; sub_1800D4D00(131075, 1); sub_1800D4D00(135181, 0); sub_1800D4D00(135184, 1); v6 = kmVec2Fill((float *)&v15.origin, a3->size.width, a3->size.height); cocos2d::CCSize::operator=((_DWORD *)this + 54, v6); v7 = cocos2d::CCRect::CCRect(&v15, a3); cocos2d::CCEGLView::setupWindow(this, v7); ((void (__fastcall *)(cocos2d::CCEGLView *))this->setFrameSize)(this); String = (const char *)glGetString(0x1F02u); if ( atof(String) >= 1.5 ) { cocos2d::CCEGLView::initGlew(this); glEnable(0x8642u); if ( !*((_QWORD *)this + 26) ) { v11 = *((_QWORD *)this + 25); v12 = (int)*((float *)this + 55); LODWORD(v15.origin.x) = (int)*((float *)this + 54); v14 = v12; sub_1800D4AD0(v11); sub_1800D4A20(*((_QWORD *)this + 25), &v15, &v14); cocos2d::CCEGLViewProtocol::setFrameSize(this, (float)SLODWORD(v15.origin.x), (float)v14); sub_1800D44D0(*((_QWORD *)this + 25)); } if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) ) { if ( *((_BYTE *)this + 234) ) { v13 = (HWND)sub_1800D8320(*((_QWORD *)this + 25)); SetWindowPos(v13, HWND_MESSAGE|0x2LL, 0, 0, 0, 0, 0x53u); } } return 1; } else { memset(Buffer, 0, sizeof(Buffer)); sub_180009530( Buffer, "OpenGL 1.5 or higher is required (your version is %s). Please upgrade the driver of your video card.", String); v9 = (HWND)sub_1800D8320(*((_QWORD *)this + 25)); MessageBoxW(v9, L"OpenGL 1.5 or higher is required", L"OpenGL version too old", 0); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source