Example #1
0
        public override ArcFile TryOpen(ArcView file)
        {
            if (file.MaxOffset <= 0x1500)
            {
                return(null);
            }
            uint first_offset = file.View.ReadUInt32(0x14FC);

            if (first_offset >= file.MaxOffset || first_offset < 0x1500)
            {
                return(null);
            }
            int count = (int)((first_offset - 0x14F0) / 0x10);

            if (!IsSaneCount(count))
            {
                return(null);
            }
            var dir = UcaTool.ReadIndex(file, 0x14F0, count, "audio");

            if (null == dir)
            {
                return(null);
            }
            return(new ArcFile(file, this, dir));
        }
Example #2
0
        public override ArcFile TryOpen(ArcView file)
        {
            if (file.View.ReadUInt32(0) != 0)
            {
                return(null);
            }
            int count = file.View.ReadInt32(4);

            if (!IsSaneCount(count) || count != file.View.ReadInt32(8))
            {
                return(null);
            }
            var dir = UcaTool.ReadIndex(file, 0x10, count, "image");

            if (null == dir)
            {
                return(null);
            }
            return(new ArcFile(file, this, dir));
        }
Example #3
0
        public override ArcFile TryOpen(ArcView file)
        {
            uint first_offset = file.View.ReadUInt32(0xC);

            if (first_offset >= file.MaxOffset || 0 != (first_offset & 0xF))
            {
                return(null);
            }
            int count = (int)(first_offset / 0x10);

            if (!IsSaneCount(count))
            {
                return(null);
            }

            var dir = UcaTool.ReadIndex(file, 0, count, "");

            if (null == dir)
            {
                return(null);
            }
            return(new ArcFile(file, this, dir));
        }