//
// GameObject::commonSetup from 0x354600 to 0x35470e (270 bytes)
//
// 2 xrefs:
// > GameObject::init @ 0x354736
// > GameObject::initWithTexture @ 0x354790
//
// 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::commonSetup(GameObject *a1)
{
_BOOL4 m_editorEnabled; // r3
GJSpriteColor *m_baseColor; // r3
int v4; // r0
int v5; // r2
GameObject_vtbl *v6; // r3
m_editorEnabled = GameManager::sharedState()->m_editorEnabled;
a1->m_editorEnabled = m_editorEnabled;
if ( !m_editorEnabled && GameManager::sharedState()->m_playLayer )
a1->m_goEffectManager = GameManager::sharedState()->m_playLayer->m_effectManager;
GameObject::createSpriteColor(a1, 1);
m_baseColor = a1->m_baseColor;
m_baseColor->m_defaultColorID = 1004;
m_baseColor->m_colorID = 0;
v4 = dword_AC5CB8;
a1->m_defaultZOrder = 2;
a1->m_enterType = -1;
a1->m_exitType = -1;
v5 = dword_AC5CBC;
a1->m_opacityMod = 1.0;
a1->m_unk3E8 = 1;
a1->m_spriteWidthScale = 1.0;
a1->m_spriteHeightScale = 1.0;
*(_QWORD *)&dword_AC5CB8 = 214013 * __PAIR64__(v5, v4) + 2531011;
a1->m_varianceIndex = (int)(float)((float)((float)(HIWORD(dword_AC5CB8) & 0x7FFF) / 32767.0) * 1900.0);
a1->m_width = a1->m_obRect.size.width;
a1->m_height = a1->m_obRect.size.height;
GameObject::assignUniqueID(a1);
a1->m_startRotationX = 0.0;
a1->m_startRotationY = 0.0;
v6 = a1->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
a1->m_startScaleX = 1.0;
a1->m_startScaleY = 1.0;
((void (__fastcall *)(GameObject *, int))v6->setScaleX)(a1, 1065353216);
((void (__fastcall *)(GameObject *, int))a1->setScaleY)(a1, 1065353216);
a1->m_isActivated = 0;
a1->m_isDirty = 1;
a1->m_isObjectRectDirty = 1;
}