//
// SmartGameObject::updateSmartFrame from 0x3e6d58 to 0x3e6e12 (186 bytes)
//
// 5 xrefs:
// > EditorUI::createPrefab @ 0x3a4254
// > EditorUI::createSmartObjectsFromTemplate @ 0x3a52aa
// > SmartGameObject::customObjectSetup @ 0x3e6e56
// > SetupSmartBlockLayer::onClose @ 0x53d342
// > SetupSmartBlockLayer::onClose @ 0x53d368
//
// 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 SmartGameObject::updateSmartFrame(SmartGameObject *a1)
{
int m_objectID; // r2
char *v3; // r5
_BOOL4 v4; // r9
void (__fastcall *setDisplayFrame)(cocos2d::CCSprite *__hidden, cocos2d::CCSpriteFrame *); // r5
cocos2d::CCSpriteFrameCache *v6; // r0
cocos2d::CCSpriteFrame *v7; // r0
_BYTE v8[4]; // [sp+8h] [bp-Ch] BYREF
m_objectID = a1->m_objectID;
switch ( m_objectID )
{
case 2896:
if ( a1->m_referenceOnly )
v3 = "smartBlock02b_001.png";
else
v3 = "smartBlock02_001.png";
break;
case 2897:
if ( a1->m_referenceOnly )
v3 = "smartBlock03b_001.png";
else
v3 = "smartBlock03_001.png";
break;
case 2895:
if ( a1->m_referenceOnly )
v3 = "smartBlock01b_001.png";
else
v3 = "smartBlock01_001.png";
break;
default:
return;
}
sub_776584((int)v8, v3);
v4 = sub_3E0DA2((int)&a1->m_smartFrame, (int)v8);
sub_774008(v8);
if ( !v4 )
{
sub_7753D4((int)&a1->m_smartFrame, v3);
setDisplayFrame = a1->setDisplayFrame;
v6 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, (const char *)a1->m_smartFrame.m_data.m_data);
setDisplayFrame(a1, v7);
}
}