//
// LevelEditorLayer::updatePreviewAnim from 0x78d7c8 to 0x78d8c4 (252 bytes)
//
// 3 xrefs:
// > EditorPauseLayer::togglePreviewAnim @ 0x8b6b60
// > EditorUI::toggleViewOption @ 0xbfeb48
// > ??> @ 0x55e58
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:53:27 +0000
//
__int64 __fastcall LevelEditorLayer::updatePreviewAnim(cocos2d::CCArray **this)
{
GameManager *v2; // x0
__int64 result; // x0
unsigned int v4; // w19
_BYTE *v5; // x22
EnhancedGameObject *v6; // x0
EnhancedGameObject *v7; // x20
v2 = (GameManager *)GameManager::sharedState((GameManager *)this);
result = GameManager::getGameVariable(v2, "0118");
if ( *((unsigned __int8 *)this + 14013) != (unsigned __int8)result )
{
*((_BYTE *)this + 14013) = result;
v4 = 0;
v5 = (char *)this + 14013;
result = cocos2d::CCArray::count(*(this + 410));
if ( (_DWORD)result )
{
do
{
v6 = (EnhancedGameObject *)cocos2d::CCArray::objectAtIndex(*(this + 410), v4);
v7 = v6;
if ( *((_DWORD *)v6 + 312) == 2 )
AnimatedGameObject::updateObjectAnimation(v6);
if ( *v5 )
goto LABEL_6;
if ( (*(unsigned __int8 (__fastcall **)(EnhancedGameObject *))(*(_QWORD *)v7 + 1728LL))(v7) )
EnhancedGameObject::resetSyncedAnimation(v7);
if ( *v5 || !(*(unsigned __int8 (__fastcall **)(EnhancedGameObject *))(*(_QWORD *)v7 + 1736LL))(v7) )
{
LABEL_6:
++v4;
}
else
{
++v4;
EnhancedGameObject::updateRotateAction((float *)v7, 0.0);
}
result = cocos2d::CCArray::count(*(this + 410));
}
while ( v4 < (unsigned int)result );
}
}
return result;
}