//
// KeyframeGameObject::updateShadowObjects from 0x1001c68c0 to 0x1001c6ae4 (548 bytes)
//
// 3 xrefs:
// > EditorUI::createNewKeyframeAnim @ 0x10004566c
// > LevelEditorLayer::updateVisibility @ 0x1000eb760
// > LevelEditorLayer::updateKeyframeObjects @ 0x1000eb7e0
//
// 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 __fastcall KeyframeGameObject::updateShadowObjects(KeyframeGameObject *a1, GJBaseGameLayer *a2, EditorUI *a3)
{
double v3; // xmm0_8
cocos2d::CCSprite *m_previewSprite; // rdi
cocos2d::CCArray *Group; // r12
GameObject *GroupParent; // r15
cocos2d::CCSprite *v9; // rax
double v10; // xmm0_8
unsigned __int8 v11; // al
char v12; // [rsp+18h] [rbp-68h] BYREF
_BYTE v13[8]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v14[8]; // [rsp+28h] [rbp-58h] BYREF
__int128 v15; // [rsp+30h] [rbp-50h] BYREF
void *__p; // [rsp+40h] [rbp-40h]
std::string v17; // [rsp+48h] [rbp-38h] BYREF
double v18; // 0:xmm0_8.8
m_previewSprite = a1->m_previewSprite;
if ( m_previewSprite )
{
((void (__fastcall *)(cocos2d::CCSprite *))m_previewSprite->removeMeAndCleanup)(m_previewSprite);
a1->m_previewSprite = nullptr;
}
sub_100720270(a1->m_shadowObjects);
if ( a1->m_previewArt )
{
a1->m_bDontDraw = 1;
Group = GJBaseGameLayer::getGroup(a2, a1->m_targetGroupID);
GroupParent = GJBaseGameLayer::getGroupParent(a2, a1->m_targetGroupID);
if ( (unsigned int)sub_100720070(Group) != 0 && GroupParent != nullptr )
{
EditorUI::copyObjects(&v17, (__int64)a3, (__int64)Group, 0, 0);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
{
sub_100006B70(&v15, v17.__r_.__value_.__l.__data_, v17.__r_.__value_.__l.__size_, v3);
}
else
{
__p = v17.__r_.__value_.__l.__data_;
v15 = *(_OWORD *)&v17.__r_.__value_.__l.0;
}
v9 = (cocos2d::CCSprite *)EditorUI::spriteFromObjectString(
a3,
(__int64)&v15,
0,
1,
0,
(__int64)a1->m_shadowObjects,
(__int64)Group,
(__int64)GroupParent);
a1->m_previewSprite = v9;
if ( (v15 & 1) != 0 )
{
operator delete(__p);
v9 = a1->m_previewSprite;
}
((void (__fastcall *)(KeyframeGameObject *, cocos2d::CCSprite *))a1->addChild)(a1, v9);
((void (__fastcall *)(KeyframeGameObject *, void *))a1->setContentSize)(a1, &unk_10099F130);
a1->m_updateCustomContentSize = 1;
a1->m_width = *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_previewSprite->getContentSize)(a1->m_previewSprite);
a1->m_height = *(float *)(((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_previewSprite->getContentSize)(a1->m_previewSprite)
+ 4);
((void (__fastcall *)(cocos2d::CCSprite *, void *))a1->m_previewSprite->setPosition)(
a1->m_previewSprite,
&unk_10099F128);
*(cocos2d::CCPoint *)&v18 = EditorUI::getGroupCenter((EditorUI *)&v12, (cocos2d::CCArray *)a3, (bool)Group);
((void (__fastcall *)(GameObject *, double))GroupParent->getPosition)(GroupParent, v18);
sub_10028CC60(v13);
sub_10028CD00(v14, &v12, v13);
v10 = sub_10028CC90();
a1->m_isObjectRectDirty = 1;
v11 = ((__int64 (__fastcall *)(KeyframeGameObject *, _BYTE *, double))a1->getOpacity)(a1, v14, v10);
((void (__fastcall *)(KeyframeGameObject *, _QWORD))a1->setOpacity)(a1, v11);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
}
}
else
{
a1->m_bDontDraw = 0;
}
}