//
// LevelEditorLayer::addToUndoList from 0x460324 to 0x46036e (74 bytes)
//
// 14 xrefs:
// > LevelEditorLayer::removeObject @ 0x4643fa
// > LevelEditorLayer::removeAllObjectsOfType @ 0x4644e6
// > LevelEditorLayer::createObjectsFromString @ 0x46e9f4
// > LevelEditorLayer::createObject @ 0x46ebf6
// > LevelEditorLayer::handleAction @ 0x46f2d0
// > EditorUI::createUndoObject @ 0x48229c
// > EditorUI::createUndoSelectObject @ 0x4822c4
// > EditorUI::createSmartObjectsFromTemplate @ 0x4880cc
// > EditorUI::createSmartObjectsFromTemplate @ 0x48810c
// > EditorUI::onDelete @ 0x48c662
// > EditorUI::onDeleteSelected @ 0x48c8de
// > EditorUI::ccTouchEnded @ 0x6f0bd2
// > EditorUI::pasteObjects @ 0x6f2eb0
// > EditorUI::moveObjectCall @ 0x70ed90
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:48:52 +0000
//
int __fastcall LevelEditorLayer::addToUndoList(cocos2d::CCArray **this, UndoObject *a2, int a3)
{
unsigned int v5; // r7
if ( !a3 )
cocos2d::CCArray::removeAllObjects(*(this + 2966));
if ( *((_BYTE *)this + 11699) )
v5 = 1000;
else
v5 = 200;
if ( cocos2d::CCArray::count(*(this + 2965)) >= v5 )
cocos2d::CCArray::removeObjectAtIndex(*(this + 2965), 0, 1);
return cocos2d::CCArray::addObject(*(this + 2965), a2);
}