//
// cocos2d::CCProgressTimer::draw from 0x18005fcf0 to 0x18005ff15 (549 bytes)
//
// 5 xrefs:
// > ??> @ 0x180100028
// > ??> @ 0x180142648
// > ??> @ 0x180142658
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bd4b0
//
// 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 11:21:50 +0000
//
void __fastcall cocos2d::CCProgressTimer::draw(cocos2d::CCProgressTimer *this, float a2)
{
cocos2d::CCGLProgram *v3; // rax
cocos2d::CCGLProgram *v4; // rax
__int64 v5; // rdi
GLenum *v6; // rbx
__int64 v7; // rax
unsigned int v8; // r8d
unsigned int v9; // edx
__int64 v10; // rax
unsigned int v11; // eax
unsigned int v12; // edx
__int64 v13; // r9
int v14; // eax
GLsizei v15; // eax
char v16; // [rsp+40h] [rbp+8h] BYREF
char v17; // [rsp+48h] [rbp+10h] BYREF
if ( *((_QWORD *)this + 46) && *((_QWORD *)this + 44) )
{
cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)*((unsigned int *)this + 62), a2);
(*(void (__fastcall **)(cocos2d::CCProgressTimer *))(*(_QWORD *)this + 648LL))(this);
v3 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::CCProgressTimer *))(*(_QWORD *)this + 648LL))(this);
cocos2d::CCGLProgram::use(v3);
v4 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(cocos2d::CCProgressTimer *))(*(_QWORD *)this + 648LL))(this);
cocos2d::CCGLProgram::setUniformsForBuiltins(v4);
v5 = *((_QWORD *)this + 44);
v6 = (GLenum *)(*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)(v5 + 344) + 8LL))(v5 + 344, &v16);
v7 = (*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)(v5 + 344) + 8LL))(v5 + 344, &v17);
cocos2d::ccGLBlendFunc(*v6, *(_DWORD *)(v7 + 4), v8);
cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v9);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*((_QWORD *)this + 44) + 344LL) + 16LL))(*((_QWORD *)this + 44) + 344LL);
v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 96LL))(v10);
cocos2d::ccGLBindTexture2D((cocos2d *)v11, v12);
_glewVertexAttribPointer(0, 2, 5126, 0, 20, *((_QWORD *)this + 46));
_glewVertexAttribPointer(2, 2, 5126, 0, 20, *((_QWORD *)this + 46) + 12LL);
LOBYTE(v13) = 1;
_glewVertexAttribPointer(1, 4, 5121, v13, 20, *((_QWORD *)this + 46) + 8LL);
v14 = *((_DWORD *)this + 86);
if ( !v14 )
{
glDrawArrays(6u, 0, *((_DWORD *)this + 90));
++g_uNumberOfDraws;
return;
}
if ( v14 == 1 )
{
v15 = *((_DWORD *)this + 90);
if ( !*((_BYTE *)this + 392) )
{
glDrawArrays(5u, 0, v15);
++g_uNumberOfDraws;
return;
}
glDrawArrays(5u, 0, v15 / 2);
glDrawArrays(5u, 4, *((_DWORD *)this + 90) / 2);
++g_uNumberOfDraws;
}
++g_uNumberOfDraws;
}
}