//
// CustomizeObjectLayer::colorSetupClosed from 0x1001dade0 to 0x1001daee9 (265 bytes)
//
// 2 xrefs:
// > sub_1001DB230 @ 0x1001db23c
// > ??> @ 0x100add9f0
//
// 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:26:26 +0000
//
__int64 __fastcall CustomizeObjectLayer::colorSetupClosed(__int64 a1, __int64 a2, double a3)
{
char v3; // al
int v4; // r14d
int v5; // r15d
__int64 v6; // rsi
unsigned int v7; // r12d
__int64 v8; // r13
__int64 CString; // rax
__int64 v10; // rax
const std::string::value_type *v11; // rsi
char v13; // [rsp-8h] [rbp-30h]
v13 = v3;
v4 = a2;
CustomizeObjectLayer::updateSelected(a1, a2);
v5 = a2;
if ( (unsigned int)(a2 - 10) <= 0x3DD )
{
*(_DWORD *)(a1 + 748) = a2;
*(_BYTE *)(a1 + 922) = 1;
CustomizeObjectLayer::updateCustomColorLabels(a1);
*(_BYTE *)(a1 + 922) = 0;
v5 = 1008;
}
v6 = 0;
if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 704)) )
{
v7 = 0;
while ( 1 )
{
v8 = sub_1007FEFE0(*(_QWORD *)(a1 + 704), v7);
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v8 + 64LL))(v8) == v5 )
break;
if ( ++v7 >= (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 704)) )
{
v6 = 0;
goto LABEL_9;
}
}
v6 = v8;
}
LABEL_9:
CustomizeObjectLayer::highlightSelected(a1, v6);
CustomizeObjectLayer::updateColorSprite(a1, a3);
if ( v4 < 1000 )
{
if ( v4 <= 0 )
{
v11 = " ";
return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(
*(_QWORD *)(a1 + 808),
v11);
}
v10 = sub_10088E820("%i", v13);
CString = cocos2d::CCString::getCString(v10);
}
else
{
CString = GJSpecialColorSelect::textForColorIdx((unsigned int)v4);
}
v11 = (const std::string::value_type *)CString;
return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(
*(_QWORD *)(a1 + 808),
v11);
}