// // GJBaseGameLayer::restoreAllUIObjects from 0x87831c to 0x87849c (384 bytes) // // 2 xrefs: // > LevelEditorLayer::onStopPlaytest @ 0x662818 // > @ 0x41298 // // 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 GJBaseGameLayer::restoreAllUIObjects(GJBaseGameLayer *a1) { cocos2d::CCArray *m_uiObjects; // x0 std::unordered_map *p_m_uiObjectPositions; // x23 cocos2d::ccArray *data; // x2 char *arr; // x21 __int64 v6; // x1 char *v7; // x24 GameObject *v8; // x19 GameObject_vtbl *v9; // x2 void (__fastcall *setStartPos)(GameObject *__hidden, cocos2d::CCPoint); // x28 char *v11; // x0 GJBaseGameLayer_vtbl *v12; // x2 void (__fastcall *addToSection)(GJBaseGameLayer *__hidden, GameObject *); // x2 std::__detail::_Hash_node_base *M_nxt; // x0 std::__detail::_Hash_node_base *v15; // x19 int m_uniqueID; // [xsp+6Ch] [xbp+6Ch] BYREF cocos2d::CCPoint v17; // [xsp+70h] [xbp+70h] BYREF m_uiObjects = a1->m_uiObjects; p_m_uiObjectPositions = &a1->m_uiObjectPositions; if ( m_uiObjects ) { data = m_uiObjects->data; p_m_uiObjectPositions = &a1->m_uiObjectPositions; if ( data->num ) { arr = (char *)data->arr; v6 = 8LL * data->num - 8; v7 = &arr[v6]; if ( arr <= &arr[v6] ) { v8 = *(GameObject **)arr; if ( *(_QWORD *)arr ) { do { v9 = v8->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; m_uniqueID = v8->m_uniqueID; arr += 8; setStartPos = v9->setStartPos; v11 = std::__detail::_Map_base,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits,true>::operator[]( (__int64)&a1->m_uiObjectPositions, &m_uniqueID); cocos2d::CCPoint::CCPoint(&v17, (const cocos2d::CCPoint *)v11); ((void (__fastcall *)(GameObject *, cocos2d::CCPoint *))setStartPos)(v8, &v17); v8->deactivateObject(v8, 1); v12 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v8->m_outerSectionIndex = 0; addToSection = v12->addToSection; v8->m_isUIObject = 0; addToSection(a1, v8); cocos2d::CCDictionary::setObject(a1->m_objectsToDeactivate, v8, (unsigned int)v8->m_uniqueID); v8->m_unk3ee = 1; if ( v7 < arr ) break; v8 = *(GameObject **)arr; } while ( *(_QWORD *)arr ); m_uiObjects = a1->m_uiObjects; } } } } cocos2d::CCArray::removeAllObjects(m_uiObjects); M_nxt = a1->m_uiObjectPositions._M_h._M_before_begin._M_nxt; if ( M_nxt ) { do { v15 = M_nxt->_M_nxt; operator delete(M_nxt); M_nxt = v15; } while ( v15 ); } memset(a1->m_uiObjectPositions._M_h._M_buckets, 0, 8 * p_m_uiObjectPositions->_M_h._M_bucket_count); p_m_uiObjectPositions->_M_h._M_element_count = 0; p_m_uiObjectPositions->_M_h._M_before_begin._M_nxt = nullptr; a1->m_calcCollisionBlockObjects2.m_finish = a1->m_calcCollisionBlockObjects2.m_start; a1->m_calcCollisionBlockObjects2Size = 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source