//
// GameObject::addColorSpriteToSelf from 0x14019c1c0 to 0x14019c2ba (250 bytes)
//
// 5 xrefs:
// > EditorUI::spriteFromObjectString @ 0x14010e4a5
// > GameObject::addColorSpriteToParent @ 0x14019c010
// > ??> @ 0x1406791f8
// > ??> @ 0x140679208
// > ??> @ 0x1406cbd48
//
// 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::addColorSpriteToSelf(GameObject *a1)
{
cocos2d::CCSprite *m_colorSprite; // rcx
__int64 v3; // r8
const struct cocos2d::CCSize *v4; // rax
double v5; // xmm0_8
cocos2d::CCSprite_vtbl *v6; // rbx
const cocos2d::CCPoint *v7; // rax
cocos2d::CCSize v8; // [rsp+30h] [rbp+8h] BYREF
if ( a1->m_colorSprite->getParent(a1->m_colorSprite) != a1 )
{
m_colorSprite = a1->m_colorSprite;
a1->m_colorSpriteLocked = 1;
m_colorSprite->removeFromParentAndCleanup(m_colorSprite, 0);
v3 = 4294967196LL;
if ( a1->m_colorZLayerRelated )
v3 = 100;
a1->addChild_0(a1, a1->m_colorSprite, v3);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->setScale_0)(a1->m_colorSprite);
((void (__fastcall *)(cocos2d::CCSprite *))a1->m_colorSprite->setRotation)(a1->m_colorSprite);
v4 = a1->getContentSize(a1);
v5 = cocos2d::CCSize::CCSize(&v8, v4);
v6 = a1->m_colorSprite->__vftable;
cocos2d::CCPoint::CCPoint(*(float *)&v5, v8.width * 0.5);
v6->setPosition_0(a1->m_colorSprite, v7);
}
}