//
// GameObject::updateBlendMode from 0x10068f400 to 0x10068f4bc (188 bytes)
//
// 4 xrefs:
// > PlayLayer::manualUpdateObjectColors @ 0x100086b3c
// > LevelEditorLayer::manualUpdateObjectColors @ 0x1000be6c0
// > EditorUI::spriteFromObjectString @ 0x100638d5e
// > GameObject::addMainSpriteToParent @ 0x10068f4d4
//
// 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:35:07 +0000
//
char __fastcall GameObject::updateBlendMode(__int64 a1)
{
int *v1; // rcx
int v2; // eax
int v3; // r14d
__int64 v4; // rax
char result; // al
int *v6; // rsi
int v7; // ecx
__int64 v8; // rax
v1 = *(int **)(a1 + 1096);
v2 = *v1;
if ( !*v1 )
v2 = v1[1];
v3 = 0;
if ( !*(_BYTE *)(a1 + 867) )
v3 = v2;
if ( *(_BYTE *)(a1 + 649) == 1 )
{
v4 = GameManager::sharedState();
result = LevelEditorLayer::shouldBlend(*(_QWORD *)(v4 + 552), v3);
}
else
{
result = 1;
if ( (unsigned int)(v3 - 1005) >= 3 )
{
if ( v3 != 1012 && v3 )
{
v8 = GameManager::sharedState();
result = PlayLayer::shouldBlend(*(_QWORD *)(v8 + 544));
}
else
{
result = 0;
}
}
}
*(_BYTE *)(a1 + 884) = result;
if ( *(_QWORD *)(a1 + 888) )
{
v6 = *(int **)(a1 + 1104);
v7 = *v6;
if ( !*v6 )
v7 = v6[1];
if ( v7 != 1012 )
result = GameObject::shouldBlendColor(a1, v6, 0);
}
else
{
result = 0;
}
*(_BYTE *)(a1 + 885) = result;
return result;
}