//
// GameObject::createSpriteColor from 0x64325c to 0x643334 (216 bytes)
//
// 18 xrefs:
// > GameObject::commonSetup @ 0x643368
// > GameObject::addCustomColorChild @ 0x643ae0
// > GameObject::addColorSprite @ 0x648730
// > GameObject::addColorSprite @ 0x648848
// > GameObject::addColorSprite @ 0x648924
// > GameObject::addColorSprite @ 0x6489d0
// > GameObject::addColorSprite @ 0x648a90
// > GameObject::addColorSprite @ 0x648b30
// > GameObject::addColorSprite @ 0x648be0
// > GameObject::addColorSprite @ 0x648c90
// > GameObject::addColorSprite @ 0x648d88
// > GameObject::addColorSprite @ 0x648e50
// > GameObject::addColorSprite @ 0x648ea4
// > GameObject::addColorSprite @ 0x648f54
// > GameObject::addColorSprite @ 0x649058
// > AnimatedGameObject::setupChildSprites @ 0x75609c
// > AnimatedGameObject::setupChildSprites @ 0x7564bc
// > ??> @ 0x42e88
//
// 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
//
void GameObject::createSpriteColor(GameObject *a1, int a2)
{
__int64 v3; // x0
__int64 v4; // x4
__int64 v5; // x5
__int64 v6; // x0
__int64 v7; // x4
__int64 v8; // x5
if ( a2 == 2 )
{
if ( !a1->m_detailColor )
{
v3 = operator new(0x28u);
*(_DWORD *)v3 = 0;
*(_BYTE *)(v3 + 32) = 0;
*(_BYTE *)(v3 + 33) = 0;
*(_BYTE *)(v3 + 34) = -1;
*(_BYTE *)(v3 + 35) = -1;
v4 = qword_1242070;
v5 = qword_1242078;
*(float *)(v3 + 8) = 1.0;
*(_BYTE *)(v3 + 36) = -1;
*(float *)(v3 + 12) = 1.0;
*(_QWORD *)(v3 + 16) = v4;
*(_QWORD *)(v3 + 24) = v5;
a1->m_detailColor = (GJSpriteColor *)v3;
*(_DWORD *)(v3 + 4) = 1;
}
}
else if ( !a1->m_baseColor )
{
v6 = operator new(0x28u);
*(_DWORD *)v6 = 0;
*(_DWORD *)(v6 + 4) = 0;
*(_BYTE *)(v6 + 32) = 0;
*(_BYTE *)(v6 + 33) = 0;
*(_BYTE *)(v6 + 34) = -1;
v7 = qword_1242070;
v8 = qword_1242078;
*(float *)(v6 + 8) = 1.0;
*(_BYTE *)(v6 + 35) = -1;
*(float *)(v6 + 12) = 1.0;
*(_BYTE *)(v6 + 36) = -1;
*(_QWORD *)(v6 + 16) = v7;
*(_QWORD *)(v6 + 24) = v8;
a1->m_baseColor = (GJSpriteColor *)v6;
}
}