//
// GameObject::duplicateValues from 0x100261f90 to 0x10026219c (524 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::breakApartTextObject @ 0x100362588
// > EditorUI::onCreateObject @ 0x1003eb56c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameObject::duplicateValues(GameObject *a1)
{
__int64 *v1; // x1
__int64 *v2; // x20
float v4; // s8
float v5; // s0
__int64 v6; // x8
void (__fastcall **v7)(__int64 *); // x8
__int64 v8; // x21
__int64 v9; // x0
__int64 v10; // x0
unsigned __int64 v11; // x21
__int64 v12; // x8
__int64 v13; // x1
float v14; // s0
float v15; // s0
v2 = v1;
v4 = (*(float (__fastcall **)())(*v1 + 368))();
v5 = (*(float (__fastcall **)(__int64 *))(*v2 + 384))(v2);
v6 = *v2;
if ( v4 == v5 )
{
v7 = (void (__fastcall **)(__int64 *))(v6 + 352);
v8 = 344;
}
else
{
(*(void (__fastcall **)(__int64 *))(v6 + 368))(v2);
((void (__fastcall *)(GameObject *))a1->setRotationX)(a1);
v7 = (void (__fastcall **)(__int64 *))(*v2 + 384);
v8 = 376;
}
(*v7)(v2);
(*(void (__fastcall **)(GameObject *))((char *)&a1->copyWithZone + v8))(a1);
v9 = (*(__int64 (__fastcall **)(__int64 *))(*v2 + 1408))(v2);
((void (__fastcall *)(GameObject *, __int64))a1->setFlipX)(a1, v9);
v10 = (*(__int64 (__fastcall **)(__int64 *))(*v2 + 1416))(v2);
((void (__fastcall *)(GameObject *, __int64))a1->setFlipY)(a1, v10);
GameObject::duplicateColorMode(a1);
a1->m_zOrder = *((_DWORD *)v2 + 282);
if ( !a1->m_zFixedZLayer )
a1->m_zLayer = *((_DWORD *)v2 + 281);
*(_WORD *)&a1->m_isDontFade = *(_WORD *)((char *)v2 + 1043);
a1->m_isDontEnter = *((_BYTE *)v2 + 1042);
if ( *((__int16 *)v2 + 584) >= 1 )
{
v11 = 0;
do
{
if ( v11 <= 9 && (v12 = v2[145]) != 0 )
v13 = (unsigned int)*(__int16 *)(v12 + 2 * v11);
else
v13 = 0;
((void (__fastcall *)(GameObject *, __int64))a1->addToGroup)(a1, v13);
++v11;
}
while ( (__int64)v11 < *((__int16 *)v2 + 584) );
}
v14 = (float)(int)roundf(*((float *)v2 + 288) * 1000.0) / 1000.0;
a1->m_scaleX = v14;
a1->m_customScaleX = v14;
a1->m_fScaleX = 0.0;
((void (__fastcall *)(GameObject *, float))a1->setRScaleX)(a1, 1.0);
a1->m_isDirty = 1;
a1->m_isObjectRectDirty = 1;
v15 = (float)(int)roundf(*((float *)v2 + 289) * 1000.0) / 1000.0;
a1->m_scaleY = v15;
a1->m_customScaleY = v15;
a1->m_fScaleY = 0.0;
((void (__fastcall *)(GameObject *, float))a1->setRScaleY)(a1, 1.0);
a1->m_isDirty = 1;
a1->m_isObjectRectDirty = 1;
}