Esempio n. 1
0
        void MapObject(HircType type, AkSoundBankHierarchyObjectBase obj)
        {
            Dictionary <uint, AkSoundBankHierarchyObjectBase> dic;

            if (!mObjects.TryGetValue(type, out dic))
            {
                mObjects.Add(type, dic = new Dictionary <uint, AkSoundBankHierarchyObjectBase>());
            }

            dic.Add(obj.ID, obj);
            mIdToObject.Add(obj.ID, obj);
        }
Esempio n. 2
0
        void SerializeItem(IO.EndianStream s, AKBKSubHircSection section)
        {
            Contract.Assert(s.IsReading);

            using (s.EnterVirtualBufferWithBookmark(section.SectionSize))
            {
                var obj = AkSoundBankHierarchyObjectBase.New(section.Type);
                if (obj != null)
                {
                    s.Stream(obj);

                    MapObject(section.Type, obj);
                }
            }
        }