//
// KeyframeGameObject::updateShadowObjects from 0x3eb7e8 to 0x3eb974 (396 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateKeyframeObjects @ 0x36950a
// > EditorUI::createNewKeyframeAnim @ 0x3a35e2
//
// 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 KeyframeGameObject::updateShadowObjects(KeyframeGameObject *a1, GJBaseGameLayer *a2, EditorUI *a3)
{
cocos2d::CCSprite *m_previewSprite; // r0
int m_targetGroupID; // r1
cocos2d::CCArray *Group; // r8
GameObject *GroupParent; // r9
cocos2d::CCSprite *v10; // r0
float width; // r3
cocos2d::CCSprite *v12; // r0
float height; // r3
cocos2d::CCSprite *v14; // r0
const cocos2d::CCPoint *v15; // r0
int v16; // r2
bool v17; // r3
void (__fastcall *setOpacity)(KeyframeGameObject *__hidden, unsigned __int8); // r6
int v19; // r0
char v20; // [sp+10h] [bp-24h] BYREF
cocos2d::CCPoint v21; // [sp+14h] [bp-20h] BYREF
cocos2d::CCPoint v22; // [sp+1Ch] [bp-18h] BYREF
_DWORD v23[2]; // [sp+24h] [bp-10h] BYREF
m_previewSprite = a1->m_previewSprite;
if ( m_previewSprite )
{
m_previewSprite->removeMeAndCleanup(m_previewSprite);
a1->m_previewSprite = nullptr;
}
cocos2d::CCArray::removeAllObjects(a1->m_shadowObjects);
if ( a1->m_previewArt )
{
m_targetGroupID = a1->m_targetGroupID;
a1->m_bDontDraw = 1;
Group = GJBaseGameLayer::getGroup(a2, m_targetGroupID);
GroupParent = GJBaseGameLayer::getGroupParent(a2, a1->m_targetGroupID);
if ( cocos2d::CCArray::count(Group) )
{
if ( GroupParent )
{
EditorUI::copyObjects((EditorUI *)&v20, (cocos2d::CCArray *)a3, (int)Group, 0, 0);
sub_775C20(v23);
a1->m_previewSprite = EditorUI::spriteFromObjectString(
a3,
v23,
0.0,
1,
0,
(bool)a1->m_shadowObjects,
Group,
(int)GroupParent);
sub_774008(v23);
a1->addChild(a1, a1->m_previewSprite);
a1->setContentSize(a1, &stru_AC6050);
v10 = a1->m_previewSprite;
a1->m_updateCustomContentSize = 1;
width = v10->getContentSize(v10)->width;
v12 = a1->m_previewSprite;
a1->m_width = width;
height = v12->getContentSize(v12)->height;
v14 = a1->m_previewSprite;
a1->m_height = height;
v14->setPosition(v14, &stru_AC6038);
EditorUI::getGroupCenter(&v21, a3, Group, 1);
v15 = GroupParent->getPosition(GroupParent);
cocos2d::CCPoint::CCPoint(&v22, v15);
cocos2d::CCPoint::operator-(v23, &v21, &v22);
cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_customBoxOffset, COERCE_FLOAT(v23), v16, v17);
a1->m_isObjectRectDirty = 1;
setOpacity = a1->setOpacity;
v19 = ((int (__fastcall *)(KeyframeGameObject *))a1->getOpacity)(a1);
setOpacity(a1, v19);
sub_774008(&v20);
}
}
}
else
{
a1->m_bDontDraw = 0;
}
}