//
// GJBaseGameLayer::resetGradientLayers from 0x140328d10 to 0x140328d92 (130 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::triggerGradientCommand @ 0x1403274d7
// > GJBaseGameLayer::resetLevelVariables @ 0x140345500
// > LevelEditorLayer::updateGameObjects @ 0x1403fb1ca
// > ??> @ 0x1408b5cf4
// > ??> @ 0x1408b5d04
// > ??> @ 0x14091f058
//
// 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:30:28 +0000
//
__int64 __fastcall GJBaseGameLayer::resetGradientLayers(__int64 a1)
{
__int64 v1; // rdi
__int64 v2; // rdi
__int64 i; // rbx
__int64 *v4; // rdi
__int64 v5; // rax
__int64 result; // rax
v1 = *(_QWORD *)(a1 + 12880);
if ( v1 )
{
v2 = *(_QWORD *)(v1 + 56);
if ( v2 )
{
for ( i = *(_QWORD *)(v2 + 288); ; i = *(_QWORD *)(i + 288) )
{
v4 = *(__int64 **)(v2 + 264);
(*(void (__fastcall **)(__int64 *, _QWORD))(*v4 + 520))(v4, 0);
v5 = *v4;
v4[73] = 0;
*((_BYTE *)v4 + 592) = 0;
result = (*(__int64 (__fastcall **)(__int64 *, _QWORD))(v5 + 336))(v4, 0);
v2 = i;
if ( !i )
break;
}
}
}
return result;
}