//
// cocos2d::CCMotionStreak::draw from 0x1005a4690 to 0x1005a479a (266 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b73178
//
// 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:32:34 +0000
//
int *__fastcall cocos2d::CCMotionStreak::draw(__int64 a1, __m128 a2)
{
__int64 v3; // rax
__int64 v4; // rax
GLuint v5; // eax
int *result; // rax
if ( *(_DWORD *)(a1 + 392) >= 2u )
{
cocos2d::ccGLEnable();
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::use(v3);
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v4, a2);
cocos2d::ccGLEnableVertexAttribs(7);
cocos2d::ccGLBlendFunc(*(_DWORD *)(a1 + 368), *(_DWORD *)(a1 + 372));
v5 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 360) + 104LL))(*(_QWORD *)(a1 + 360));
cocos2d::ccGLBindTexture2D(v5);
glVertexAttribPointer(0, 2, 0x1406u, 0, 0, *(const GLvoid **)(a1 + 416));
glVertexAttribPointer(2u, 2, 0x1406u, 0, 0, *(const GLvoid **)(a1 + 432));
glVertexAttribPointer(1u, 4, 0x1401u, 1u, 0, *(const GLvoid **)(a1 + 424));
glDrawArrays(5u, 0, 2 * *(_DWORD *)(a1 + 392));
++dword_100BE8BE8;
return &dword_100BE8BE8;
}
return result;
}