//
// LevelEditorLayer::tryUpdateSpeedObject from 0x1402d8900 to 0x1402d8a98 (408 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::addSpecial @ 0x1402d7f2e
// > LevelEditorLayer::removeSpecial @ 0x1402d8521
// > SetGroupIDLayer::onToggleGuide @ 0x1403faa63
// > ??> @ 0x1406d31c4
//
// 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
//
bool LevelEditorLayer::tryUpdateSpeedObject(LevelEditorLayer *a1, EffectGameObject *a2, bool a3)
{
bool v5; // bp
int m_objectID; // ecx
bool v7; // zf
bool v8; // bl
DrawGridLayer *m_drawGridLayer; // rsi
cocos2d::CCArray *m_guideObjects; // rcx
DrawGridLayer *v11; // rsi
bool v12; // al
v5 = !a2->m_shouldPreview || a3;
m_objectID = a2->m_objectID;
if ( m_objectID > 1934 )
{
if ( m_objectID == 1935 || m_objectID == 2900 || m_objectID == 2902 || m_objectID == 3022 )
goto LABEL_21;
v7 = m_objectID == 3027;
goto LABEL_19;
}
if ( m_objectID == 1934 )
{
LABEL_21:
v8 = 1;
goto LABEL_22;
}
if ( m_objectID > 203 )
{
if ( m_objectID != 1334 )
{
v7 = m_objectID == 1917;
goto LABEL_19;
}
goto LABEL_21;
}
if ( m_objectID == 203 || m_objectID == 200 || m_objectID == 201 )
goto LABEL_21;
v7 = m_objectID == 202;
LABEL_19:
if ( v7 )
goto LABEL_21;
v8 = 0;
LABEL_22:
if ( m_objectID == 660
|| m_objectID == 13
|| m_objectID == 47
|| m_objectID == 111
|| m_objectID == 1331
|| m_objectID == 1933 )
{
m_drawGridLayer = a1->m_drawGridLayer;
m_guideObjects = m_drawGridLayer->m_guideObjects;
if ( v5 )
{
cocos2d::CCArray::removeObject(m_guideObjects, a2, 1);
}
else if ( !cocos2d::CCArray::containsObject(m_guideObjects, a2) )
{
cocos2d::CCArray::addObject(m_drawGridLayer->m_guideObjects, a2);
}
}
if ( !v8 )
{
if ( !a2->canReverse(a2) || !a2->m_isReverse )
return v8;
v8 = 1;
}
v11 = a1->m_drawGridLayer;
v12 = cocos2d::CCArray::containsObject(v11->m_speedObjects, a2);
if ( v5 )
{
if ( v12 )
{
cocos2d::CCArray::removeObject(v11->m_speedObjects, a2, 1);
v11->m_updateSpeedObjects = 1;
}
}
else if ( !v12 )
{
cocos2d::CCArray::addObject(v11->m_speedObjects, a2);
v11->m_updateSpeedObjects = 1;
EffectGameObject::updateSpeedModType(a2);
}
return v8;
}