//
// KeyframeGameObject::updateShadowObjects from 0x10038b03c to 0x10038b25c (544 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateKeyframeObjects @ 0x10035f1dc
// > EditorUI::createNewKeyframeAnim @ 0x1003f3620
//
// 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)
{
cocos2d::CCSprite *m_previewSprite; // x0
cocos2d::CCArray *Group; // x22
GameObject *GroupParent; // x21
bool v9; // zf
__int64 *v10; // x0
double v11; // d0
__int64 v12; // x0
float32x2_t v13; // [xsp+8h] [xbp-68h] BYREF
float32x2_t v14; // [xsp+10h] [xbp-60h] BYREF
float32x2_t v15; // [xsp+18h] [xbp-58h] BYREF
void *__p[2]; // [xsp+20h] [xbp-50h] BYREF
__int64 v17; // [xsp+30h] [xbp-40h]
void *v18[2]; // [xsp+38h] [xbp-38h] BYREF
__int64 v19; // [xsp+48h] [xbp-28h]
cocos2d::CCPoint GroupCenter; // 0:kr00_8.8
m_previewSprite = a1->m_previewSprite;
if ( m_previewSprite )
{
((void (__fastcall *)(cocos2d::CCSprite *))m_previewSprite->removeMeAndCleanup)(m_previewSprite);
a1->m_previewSprite = nullptr;
}
sub_10024A45C((__int64)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_10024A36C((__int64)Group) )
v9 = GroupParent == nullptr;
else
v9 = 1;
if ( !v9 )
{
EditorUI::copyObjects(v18, a3, Group, 0, 0);
if ( SHIBYTE(v19) < 0 )
{
sub_1000097D0(__p, v18[0], (unsigned __int64)v18[1]);
}
else
{
*(_OWORD *)__p = *(_OWORD *)v18;
v17 = v19;
}
a1->m_previewSprite = (cocos2d::CCSprite *)EditorUI::spriteFromObjectString(
a3,
__p,
0,
1,
0,
a1->m_shadowObjects,
Group,
GroupParent);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
((void (__fastcall *)(KeyframeGameObject *))a1->addChild)(a1);
((void (__fastcall *)(KeyframeGameObject *, void *))a1->setContentSize)(a1, &unk_10086E3B8);
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 *, cocos2d::CCPoint *))a1->m_previewSprite->setPosition)(
a1->m_previewSprite,
&stru_10086E3B0);
GroupCenter = EditorUI::getGroupCenter(a3, Group, 1);
v10 = (__int64 *)((__int64 (__fastcall *)(GameObject *, float, float))GroupParent->getPosition)(
GroupParent,
GroupCenter.x,
GroupCenter.y);
sub_1000229B8((__int64 *)&v14, v10);
sub_1000229F0(&v15, &v14, &v13);
v11 = sub_1000229D0(&a1->m_customBoxOffset, (double *)&v13);
a1->m_isObjectRectDirty = 1;
v12 = ((__int64 (__fastcall *)(KeyframeGameObject *, double))a1->getOpacity)(a1, v11);
((void (__fastcall *)(KeyframeGameObject *, __int64))a1->setOpacity)(a1, v12);
if ( SHIBYTE(v19) < 0 )
operator delete(v18[0]);
}
}
else
{
a1->m_bDontDraw = 0;
}
}