//
// GameObject::duplicateValues from 0x358884 to 0x35898a (262 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::breakApartTextObject @ 0x371608
// > EditorUI::onCreateObject @ 0x3a3f64
//
// 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 GameObject::duplicateValues(GameObject *a1)
{
GameObject *v1; // r1
GameObject *v3; // r4
float v4; // s16
float v5; // r0
GameObject_vtbl *v6; // r3
GameObject_vtbl *v7; // r2
void (__fastcall *setRotationX)(GameObject *__hidden, float); // r6
int v9; // r0
void (__fastcall *setRotation)(GameObject *__hidden, float); // r6
int v11; // r0
void (__fastcall *setFlipX)(GameObject *__hidden, bool); // r6
int v13; // r0
void (__fastcall *setFlipY)(GameObject *__hidden, bool); // r6
int v15; // r0
int v16; // r6
ZLayer CustomZLayer; // r0
int v18; // r1
int (__fastcall *addToGroup)(GameObject *__hidden, int); // r7
int GroupID; // r0
v3 = v1;
v4 = COERCE_FLOAT(((int (__fastcall *)())v1->getRotationX)());
v5 = v3->getRotationY(v3);
v6 = v3->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v7 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( v4 == v5 )
{
setRotation = v7->setRotation;
v11 = ((int (__fastcall *)(GameObject *))v6->getRotation)(v3);
}
else
{
setRotationX = v7->setRotationX;
v9 = ((int (__fastcall *)(GameObject *))v6->getRotationX)(v3);
((void (__fastcall *)(GameObject *, int))setRotationX)(a1, v9);
setRotation = a1->setRotationY;
v11 = ((int (__fastcall *)(GameObject *))v3->getRotationY)(v3);
}
((void (__fastcall *)(GameObject *, int))setRotation)(a1, v11);
setFlipX = a1->setFlipX;
v13 = ((int (__fastcall *)(GameObject *))v3->isFlipX)(v3);
setFlipX(a1, v13);
setFlipY = a1->setFlipY;
v15 = ((int (__fastcall *)(GameObject *))v3->isFlipY)(v3);
setFlipY(a1, v15);
v16 = 0;
GameObject::duplicateColorMode(a1);
a1->m_zOrder = v3->m_zOrder;
CustomZLayer = GameObject::getCustomZLayer(v3);
GameObject::setCustomZLayer(a1, CustomZLayer);
a1->m_isDontFade = v3->m_isDontFade;
a1->m_isDontEnter = v3->m_isDontEnter;
a1->m_hasNoEffects = v3->m_hasNoEffects;
while ( v16 < v3->m_groupCount )
{
v18 = v16++;
addToGroup = a1->addToGroup;
GroupID = GameObject::getGroupID(v3, v18);
addToGroup(a1, GroupID);
}
GameObject::updateCustomScaleX(a1, v3->m_scaleX);
GameObject::updateCustomScaleY(a1, v3->m_scaleY);
}