//
// SetItemIDLayer::valueDidChange from 0x140598910 to 0x140598abf (431 bytes)
//
// 4 xrefs:
// > ??> @ 0x1407e62c0
// > ??> @ 0x1408ddffc
// > ??> @ 0x1408de03c
// > ??> @ 0x14092d20c
//
// 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:34:34 +0000
//
void __fastcall SetItemIDLayer::valueDidChange(cocos2d::CCDictionary **a1, __int64 a2, __int64 a3)
{
float v3; // xmm2_4
cocos2d::CCArray *v5; // rsi
unsigned int v6; // ebx
int v7; // r14d
struct cocos2d::CCObject *v8; // rax
__int64 *v9; // rdi
__int64 v10; // rbp
float v11; // xmm1_4
cocos2d::CCPoint *v12; // rcx
__int64 v13; // rax
struct cocos2d::CCObject *v14; // rax
int v15; // edx
char v16; // [rsp+20h] [rbp-48h] BYREF
char v17; // [rsp+28h] [rbp-40h] BYREF
char v18; // [rsp+88h] [rbp+20h] BYREF
switch ( (_DWORD)a2 )
{
case 0x187:
if ( a1[85] )
{
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
cocos2d::CCArray::addObject(v5, a1[85]);
}
else
{
v5 = a1[86];
}
v6 = 0;
if ( cocos2d::CCArray::count(v5) )
{
v7 = (int)v3;
do
{
v8 = cocos2d::CCArray::objectAtIndex(v5, v6);
v9 = *((__int64 **)v8 + 232);
*((_DWORD *)v8 + 477) = v7;
if ( v9 )
{
v10 = *v9;
if ( v7 == 1 )
{
v11 = 0.0;
v12 = (cocos2d::CCPoint *)&v18;
}
else if ( v7 == 2 )
{
v11 = 1.0;
v12 = (cocos2d::CCPoint *)&v16;
}
else
{
v11 = 0.5;
v12 = (cocos2d::CCPoint *)&v17;
}
cocos2d::CCPoint::CCPoint(v12, v11, 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v10 + 288))(v9, v13);
}
++v6;
}
while ( v6 < cocos2d::CCArray::count(v5) );
}
break;
case 0x186:
if ( v3 == -1.0 )
{
LOBYTE(a3) = 1;
(*((void (__fastcall **)(cocos2d::CCDictionary **, __int64, __int64))*a1 + 136))(a1, a2, a3);
}
else
{
(*((void (__fastcall **)(cocos2d::CCDictionary **, __int64, _QWORD))*a1 + 136))(a1, 390, 0);
}
break;
case 0x1D2:
v14 = cocos2d::CCDictionary::objectForKey(a1[123], 80);
if ( v14 )
{
v15 = 2;
if ( v3 != 0.0 )
v15 = 4;
IDNameInput::setType((__int64)v14, v15);
}
break;
}
}