//
// GameObject::duplicateColorMode from 0x44eabc to 0x44eb2a (110 bytes)
//
// 5 xrefs:
// > GameObject::duplicateValues @ 0x44ec82
// > LevelEditorLayer::pasteColorState @ 0x462450
// > LevelEditorLayer::pasteColorState @ 0x46248a
// > LevelEditorLayer::copyObjectState @ 0x4663ac
// > EditorUI::createRockEdges @ 0x66bdc2
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:48:36 +0000
//
int __fastcall GameObject::duplicateColorMode(GameObject *this, GameObject *a2)
{
int *v3; // r5
int *v4; // r4
GJSpriteColor *v5; // r0
int *v6; // r5
int ColorMode; // r0
int result; // r0
int v9; // r1
int v10; // r2
int v11; // r3
int *v12; // r7
int *v13; // r5
GJSpriteColor *v14; // r0
int *v15; // r4
int v16; // r0
int v17; // r1
int v18; // r2
int v19; // r3
int *v20; // r5
v3 = *((int **)a2 + 240);
v4 = *((int **)a2 + 241);
if ( *((_BYTE *)this + 902)
&& !*((_DWORD *)this + 241)
&& v4
&& GJSpriteColor::getColorMode(*((GJSpriteColor **)a2 + 241)) )
{
v3 = v4;
}
v5 = (GJSpriteColor *)v3;
v6 = v3 + 4;
ColorMode = GJSpriteColor::getColorMode(v5);
sub_44C26C(*((int **)this + 240), ColorMode);
result = *v6;
v9 = v6[1];
v10 = v6[2];
v11 = v6[3];
v12 = (int *)(*((_DWORD *)this + 240) + 16);
*v12 = *v6;
v12[1] = v9;
v12[2] = v10;
v12[3] = v11;
if ( v4 )
{
v13 = *((int **)this + 241);
if ( v13 )
{
v14 = (GJSpriteColor *)v4;
v15 = v4 + 4;
v16 = GJSpriteColor::getColorMode(v14);
sub_44C26C(v13, v16);
result = *v15;
v17 = v15[1];
v18 = v15[2];
v19 = v15[3];
v20 = (int *)(*((_DWORD *)this + 241) + 16);
*v20 = *v15;
v20[1] = v17;
v20[2] = v18;
v20[3] = v19;
}
}
return result;
}