//
// LevelEditorLayer::copyObjectState from 0x466308 to 0x4663e4 (220 bytes)
//
// 3 xrefs:
// > CustomizeObjectLayer::onCopy @ 0x57df9a
// > SetGroupIDLayer::onCopy @ 0x6394e4
// > EditorUI::onCopyState @ 0x6f28c4
//
// 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:56 +0000
//
int __fastcall LevelEditorLayer::copyObjectState(int this, GameObject *a2, int a3, int a4)
{
cocos2d::CCObject **v4; // r4
GameObject *v6; // r0
cocos2d::CCObject **v7; // r6
cocos2d::CCObject *v8; // r9
void (__fastcall *v9)(cocos2d::CCObject *, int *); // r10
int v10; // [sp+0h] [bp-10h] BYREF
GameObject *v11; // [sp+4h] [bp-Ch]
int v12; // [sp+8h] [bp-8h]
int v13; // [sp+Ch] [bp-4h]
v10 = this;
v11 = a2;
v12 = a3;
v13 = a4;
v4 = (cocos2d::CCObject **)this;
if ( a2 )
{
if ( !*(_DWORD *)(this + 11768) )
{
v6 = GameObject::createWithKey((GameObject *)((char *)&dword_CC + 3), (int)a2);
v4[2942] = v6;
(*(void (__fastcall **)(GameObject *))(*(_DWORD *)v6 + 632))(v6);
v7 = (cocos2d::CCObject **)v4[2942];
v10 = 0;
v11 = nullptr;
v12 = 0;
std::string::__init(&v10, "lightsquare_01_01_001.png", 0x19u);
GameObject::addColorSprite(v7, (int)&v10);
std::string::~string((int)&v10);
v8 = v4[2942];
v9 = *(void (__fastcall **)(cocos2d::CCObject *, int *))(*(_DWORD *)v8 + 636);
v10 = 0;
v11 = nullptr;
v12 = 0;
std::string::__init(&v10, "lightsquare_01_01_001.png", 0x19u);
v9(v8, &v10);
std::string::~string((int)&v10);
cocos2d::CCObject::retain(v4[2942]);
}
GameObject::setDefaultMainColorMode(v4[2942], 0);
GameObject::setDefaultSecondaryColorMode(v4[2942], 0);
GameObject::duplicateColorMode(v4[2942], a2);
GameObject::duplicateAttributes(v4[2942], a2);
return LevelEditorLayer::applyGroupState((LevelEditorLayer *)v4, v4[2942], a2);
}
return this;
}