//
// cocos2d::extension::CCScrollView::beforeDraw from 0x180013110 to 0x1800132b0 (416 bytes)
//
// 5 xrefs:
// > cocos2d::extension::CCScrollView::visit @ 0x180013377
// > ??> @ 0x180030fb0
// > ??> @ 0x180030ff0
// > ??> @ 0x180032408
// > ??> @ 0x18004c428
//
// This function is hookable on this platform (idp: pc, 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 12:15:40 +0000
//
void __fastcall cocos2d::extension::CCScrollView::beforeDraw(cocos2d::extension::CCScrollView *this)
{
__int64 v2; // rax
__int64 v3; // rax
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rax
int v7; // [rsp+30h] [rbp-68h] BYREF
_BYTE v8[16]; // [rsp+40h] [rbp-58h] BYREF
if ( *((_BYTE *)this + 477) )
{
*((_BYTE *)this + 544) = 0;
cocos2d::extension::CCScrollView::getViewRect(this, &v7);
v2 = cocos2d::CCEGLView::sharedOpenGLView();
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v2 + 112LL))(v2) )
{
*((_BYTE *)this + 544) = 1;
v3 = cocos2d::CCEGLView::sharedOpenGLView();
v4 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 120LL))(v3, v8);
cocos2d::CCRect::operator=((char *)this + 528, v4);
if ( cocos2d::CCRect::intersectsRect(
(cocos2d::CCRect *)&v7,
(cocos2d::extension::CCScrollView *)((char *)this + 528)) )
{
v5 = cocos2d::CCEGLView::sharedOpenGLView();
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 104LL))(v5);
}
}
else
{
glEnable(0xC11u);
v6 = cocos2d::CCEGLView::sharedOpenGLView();
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);
}
}
}