//
// CustomizeObjectLayer::onSelectColor from 0x140143e40 to 0x140143ef2 (178 bytes)
//
// 4 xrefs:
// > CustomizeObjectLayer::init @ 0x14013fff5
// > CustomizeObjectLayer::init @ 0x14014029c
// > CustomizeObjectLayer::init @ 0x1401404b2
// > ??> @ 0x14091745c
//
// 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:27:10 +0000
//
__int64 __fastcall CustomizeObjectLayer::onSelectColor(__int64 a1, __int64 a2)
{
__int64 v4; // rax
__int64 v5; // rdx
int ActiveMode; // eax
const char *CString; // rdx
cocos2d::CCString *v8; // rax
(*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
CustomizeObjectLayer::updateSelected(a1);
v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 952LL))(a2);
CustomizeObjectLayer::highlightSelected(a1, v4);
CustomizeObjectLayer::updateColorSprite(a1, v5);
ActiveMode = CustomizeObjectLayer::getActiveMode(a1, 1);
if ( ActiveMode < 1000 )
{
if ( ActiveMode <= 0 )
{
CString = " ";
}
else
{
v8 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, (unsigned int)ActiveMode);
CString = cocos2d::CCString::getCString(v8);
}
}
else
{
CString = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)ActiveMode);
}
return (**(__int64 (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 808) + 360LL))(
*(_QWORD *)(a1 + 808) + 360LL,
CString);
}