//
// CCSpriteWithHue::draw from 0x100238a60 to 0x100238bdc (380 bytes)
//
// 2 xrefs:
// > ??> @ 0x100904038
// > ??> @ 0x100904600
//
// This function is hookable on this platform (idp: arm, 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:01:20 +0000
//
void __fastcall CCSpriteWithHue::draw(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
unsigned int v7; // s0
__int64 v8; // x0
if ( (*(_BYTE *)(a1 + 559) & 1) == 0 )
{
if ( *(_BYTE *)(a1 + 329) )
{
cocos2d::ccGLEnable();
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::use(v2);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::setUniformsForBuiltins(v3);
cocos2d::ccGLBlendFunc(*(unsigned int *)(a1 + 404), *(_DWORD *)(a1 + 408));
v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 104LL))(*(_QWORD *)(a1 + 416));
cocos2d::ccGLBindTexture2D(v4);
cocos2d::ccGLEnableVertexAttribs(7);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::setUniformLocationWithMatrix3fv(v5, *(_DWORD *)(a1 + 648), (GLfloat *)(a1 + 612), 1);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
LOBYTE(v7) = *(_BYTE *)(a1 + 328);
cocos2d::CCGLProgram::setUniformLocationWith1f(v6, *(_DWORD *)(a1 + 652), (float)v7 / 255.0);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 656LL))(a1);
cocos2d::CCGLProgram::setUniformLocationWith3f(
v8,
*(_DWORD *)(a1 + 656),
*(GLfloat *)(a1 + 600),
*(GLfloat *)(a1 + 604),
*(GLfloat *)(a1 + 608));
glVertexAttribPointer(0, 3, 0x1406u, 0, 24, (const GLvoid *)(a1 + 460));
glVertexAttribPointer(2u, 2, 0x1406u, 0, 24, (const GLvoid *)(a1 + 476));
glVertexAttribPointer(1u, 4, 0x1401u, 1u, 24, (const GLvoid *)(a1 + 472));
glDrawArrays(5u, 0, 4);
++dword_100A0F904;
}
}
}