//
// CustomizeObjectLayer::onSelectColor from 0x1001d9f20 to 0x1001d9fc8 (168 bytes)
//
// 2 xrefs:
// > CustomizeObjectLayer::init @ 0x1001d7e1a
// > CustomizeObjectLayer::init @ 0x1001d81b7
//
// 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:25 +0000
//
__int64 __fastcall CustomizeObjectLayer::onSelectColor(__int64 a1, __int64 a2)
{
unsigned int v2; // eax
__int64 v3; // rax
int ActiveMode; // eax
__int64 CString; // rax
__int64 v6; // rax
const std::string::value_type *v7; // rsi
char v9; // [rsp+0h] [rbp-10h]
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( v2 == 1008 )
v2 = *(_DWORD *)(a1 + 748);
CustomizeObjectLayer::updateSelected(a1, v2);
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1072LL))(a2);
CustomizeObjectLayer::highlightSelected(a1, v3);
CustomizeObjectLayer::updateColorSprite(a1);
ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);
if ( ActiveMode < 1000 )
{
if ( ActiveMode <= 0 )
{
v7 = " ";
return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(
*(_QWORD *)(a1 + 808),
v7);
}
v6 = sub_10088E820("%i", v9);
CString = cocos2d::CCString::getCString(v6);
}
else
{
CString = GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);
}
v7 = (const std::string::value_type *)CString;
return (*(__int64 (__fastcall **)(_QWORD, const std::string::value_type *))(**(_QWORD **)(a1 + 808) + 928LL))(
*(_QWORD *)(a1 + 808),
v7);
}