示例#1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SoundResourceManager" /> class.
 /// </summary>
 /// <param name="gestalt">The cache file's sound resource gestalt.</param>
 /// <param name="layoutTable">The cache file's resource layout table.</param>
 /// <param name="tags">The cache file's tag table.</param>
 /// <param name="metaArea">The cache file's meta area.</param>
 /// <param name="allocator">The cache file's tag data allocator.</param>
 /// <param name="buildInfo">The cache file's build information.</param>
 public SoundResourceManager(SoundResourceGestalt gestalt, TagTable tags, FileSegmentGroup metaArea,
                             MetaAllocator allocator, EngineDescription buildInfo, IPointerExpander expander)
 {
     _gestalt   = gestalt;
     _tags      = tags;
     _metaArea  = metaArea;
     _allocator = allocator;
     _buildInfo = buildInfo;
     _expander  = expander;
 }
示例#2
0
        private void LoadSoundResourceManager(IReader reader)
        {
            ITag ughTag        = _tags.GetGlobalTag(CharConstant.FromString("ugh!"));
            bool haveUghLayout = _buildInfo.Layouts.HasLayout("sound resource gestalt");
            bool canLoadUgh    = ughTag != null && ughTag.MetaLocation != null && haveUghLayout;

            if (ughTag != null && ughTag.MetaLocation != null && haveUghLayout)
            {
                SoundResourceGestalt gestalt = null;
                if (canLoadUgh)
                {
                    gestalt = new SoundResourceGestalt(reader, ughTag, MetaArea, Allocator, _buildInfo, _expander);
                }

                _soundGestalt = new SoundResourceManager(gestalt, _tags, MetaArea, Allocator, _buildInfo, _expander);
            }
        }
示例#3
0
        private void LoadSoundResourceManager(IReader reader)
        {
            ITag ughTag        = _tags.FindTagByGroup("ugh!");
            bool haveUghLayout = _buildInfo.Layouts.HasLayout("sound resource gestalt");
            bool canLoadUgh    = (ughTag != null && ughTag.MetaLocation != null && haveUghLayout);

            if (ughTag != null && ughTag.MetaLocation != null && haveUghLayout)
            {
                SoundResourceGestalt gestalt = null;
                if (canLoadUgh)
                {
                    gestalt = new SoundResourceGestalt(reader, ughTag, MetaArea, Allocator, _buildInfo, _expander);
                }

                _soundGestalt = new SoundResourceManager(gestalt, _tags, MetaArea, Allocator, _buildInfo, _expander);
            }
        }