A loader for an Asset.
Inheritance: NotifyingObject
            internal EnemyStandardInfo(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                EnemyBehaviorID = (EnemyBehaviorId)reader.ReadInt32();
                HP = reader.ReadUInt16();
                AttackPower = reader.ReadUInt16();
                ChrType = (CharacterTyep)reader.ReadInt32();
                HitHeight = reader.ReadSingle();
                HitRadius = reader.ReadSingle();
                Weight = reader.ReadSingle();
                DynamicFriction = reader.ReadSingle();
                StaticFriction = reader.ReadSingle();
                UpperDefState = reader.ReadInt32();
                ActionDefState = reader.ReadInt32();
                RotY_per_Second = reader.ReadSingle();
                Reserve0 = reader.ReadBytes(20);
                RotY_per_Second_old = reader.ReadByte();
                EnableSideStep = reader.ReadByte();
                UseRagdollHit = reader.ReadByte();
                Reserve_last = reader.ReadBytes(5);
                Stamina = reader.ReadUInt16();
                StaminaRecover = reader.ReadUInt16();
                StaminaConsumption = reader.ReadUInt16();
                Deffenct_Phys = reader.ReadUInt16();
                Reserve_last2 = reader.ReadBytes(48);
            }
            internal CalculationCorrection(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                StageMaxVal0 = reader.ReadSingle();
                StageMaxVal1 = reader.ReadSingle();
                StageMaxVal2 = reader.ReadSingle();
                StageMaxVal3 = reader.ReadSingle();
                StageMaxVal4 = reader.ReadSingle();
                StageMaxGrowVal0 = reader.ReadSingle();
                StageMaxGrowVal1 = reader.ReadSingle();
                StageMaxGrowVal2 = reader.ReadSingle();
                StageMaxGrowVal3 = reader.ReadSingle();
                StageMaxGrowVal4 = reader.ReadSingle();
                AdjPt_maxGrowVal0 = reader.ReadSingle();
                AdjPt_maxGrowVal1 = reader.ReadSingle();
                AdjPt_maxGrowVal2 = reader.ReadSingle();
                AdjPt_maxGrowVal3 = reader.ReadSingle();
                AdjPt_maxGrowVal4 = reader.ReadSingle();
                Init_inclination_soul = reader.ReadSingle();
                Adjustment_value = reader.ReadSingle();
                Boundry_inclination_soul = reader.ReadSingle();
                Boundry_value = reader.ReadSingle();
                Pad = reader.ReadBytes(4);
            }
        internal ModelDetailLevel(ModelMesh mesh, int index, AssetLoader loader, int dataOffset, ArrayBackedList<byte> bufferData)
            : base(mesh, index, loader)
        {
            var reader = loader.Reader;

            Mesh = mesh;

            const int indexSize = 2;

            Threshold = reader.ReadInt32();

            Unknowns.ReadInt16s(reader, IsDS1 ? 1 : 2);
            if (IsDS1) reader.RequireZeroes(2);

            IndexCount = reader.ReadInt32();
            IndexDataOffset = reader.ReadInt32() + dataOffset;
            int indexDataSize = reader.ReadInt32();
            if (indexDataSize != IndexCount * indexSize)
                throw new InvalidDataException("Index data size doesn't match the expected value from the index count.");
            reader.RequireZeroes(4 * 3);

            BufferIndexOffset = bufferData.Count;
            long reset = reader.BaseStream.Position;
            reader.BaseStream.Position = IndexDataOffset;
            bufferData.AddRange(reader, IndexCount * indexSize);
            reader.BaseStream.Position = reset;
        }
示例#4
0
            internal Skeleton(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                NeckTurnGain = reader.ReadSingle();
                OriginalGroundHeightMS = reader.ReadInt16();
                MinAnkleHeightMS = reader.ReadInt16();
                MaxAnkleHeightMS = reader.ReadInt16();
                CosineMaxKneeAngle = reader.ReadInt16();
                CosineMinKneeAngle = reader.ReadInt16();
                FootPlantedAnkleHeightMS = reader.ReadInt16();
                FootRaisedAnkleHeightMS = reader.ReadInt16();
                RaycastDistanceUp = reader.ReadInt16();
                RaycastDistanceDown = reader.ReadInt16();
                FootEndLS_X = reader.ReadInt16();
                FootEndLS_Y = reader.ReadInt16();
                FootEndLS_Z = reader.ReadInt16();
                OnOffGain = reader.ReadInt16();
                GroundAscendingGain = reader.ReadInt16();
                GroundDescendingGain = reader.ReadInt16();
                FootRaisedGain = reader.ReadInt16();
                FootPlantedGain = reader.ReadInt16();
                FootUnlockGain = reader.ReadInt16();
                KneeAxisType = (SkeletonKneeAxisDirection)reader.ReadByte();
                UseFootLocking = reader.ReadByte() != 0;
                FootPlacementOn = reader.ReadByte() != 0;
                TwistKneeAxisType = (SkeletonKneeAxisDirection)reader.ReadByte();
                NeckTurnPriority = reader.ReadSByte();
                NeckTurnMaxAngle = reader.ReadByte();
                Pad1 = reader.ReadBytes(2);
            }
示例#5
0
            internal Accessory(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                RefId = reader.ReadInt32();
                SfxVariationId = reader.ReadInt32();
                Weight = reader.ReadSingle();
                BehaviorId = reader.ReadInt32();
                BasicPrice = reader.ReadInt32();
                SellValue = reader.ReadInt32();
                SortId = reader.ReadInt32();
                QwcId = reader.ReadInt32();
                EquipModelId = reader.ReadUInt16();
                IconId = reader.ReadUInt16();
                ShopLv = reader.ReadInt16();
                TrophySGradeId = reader.ReadInt16();
                TrophySeqId = reader.ReadInt16();
                EquipModelCategory = (EquipModelCategory)reader.ReadByte();
                EquipModelGender = (EquipModelGender)reader.ReadByte();
                AccessoryCategory = (AccessoryCategory)reader.ReadByte();
                RefCategory = (BehaviorRefType)reader.ReadByte();
                SpEffectCategory = (BehaviorCategory)reader.ReadByte();
                Pad = reader.ReadBytes(1);
                VagrantItemLotId = reader.ReadInt32();
                VagrantBonusEneDropItemLotId = reader.ReadInt32();
                VagrantItemEneDropItemLotId = reader.ReadInt32();
                BitFields = reader.ReadBytes(1);
                Pad1 = reader.ReadBytes(3);
            }
示例#6
0
        internal Archive(AssetLoader loader)
            : base(loader)
        {
            BinaryReader reader = Reader = loader.Reader;

            loader.Position = loader.Length - 12;
            reader.Require(Magic);

            int namesSize = reader.ReadInt32(); // Number of bytes of the headerSize that are record names, sometimes (always?) plus a few bytes.
            int headersSize = reader.ReadInt32();
            reader.BaseStream.Position = loader.Length - headersSize;

            int count = reader.ReadInt32();
            for (int index = 0; index < count; index++) {
                int nameLength = reader.ReadInt32();
                string name = reader.ReadString(nameLength - 1, Encoding.ASCII);
                reader.Require((byte)0);
                int id = reader.ReadInt32();
                ArchiveRecordMode mode = (ArchiveRecordMode)reader.ReadInt32();
                int size = reader.ReadInt32();
                int sizeCompressed = reader.ReadInt32();
                uint offset = reader.ReadUInt32();

                if (mode != ArchiveRecordMode.Directory)
                    new ArchiveRecord(this, name, id, mode, size, sizeCompressed, offset);
            }
        }
示例#7
0
            internal Throw(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                AtkChrId = reader.ReadInt32();
                DefChrId = reader.ReadInt32();
                Dist = reader.ReadSingle();
                DiffAngMin = reader.ReadSingle();
                DiffAngMax = reader.ReadSingle();
                UpperYRange = reader.ReadSingle();
                LowerYRange = reader.ReadSingle();
                DiffAngMyToDef = reader.ReadSingle();
                ThrowTypeId = reader.ReadInt32();
                AtkAnimId = reader.ReadInt32();
                DefAnimId = reader.ReadInt32();
                EscHp = reader.ReadUInt16();
                SelfEscCycleTime = reader.ReadUInt16();
                SphereCastRadiusRateTop = reader.ReadUInt16();
                SphereCastRadiusRateLow = reader.ReadUInt16();
                PadType = (ThrowPadType)reader.ReadByte();
                AtkEnableState = (ThrowEnableState)reader.ReadByte();
                AtkSorbDmyId = reader.ReadByte();
                DefSorbDmyId = reader.ReadByte();
                ThrowType = (ThrowType)reader.ReadByte();
                SelfEscCycleCnt = reader.ReadByte();
                DmyHasChrDirType = (ThrowDmyCharacterDirectionType)reader.ReadByte();
                BitFields = reader.ReadBytes(1);
                Pad1 = reader.ReadBytes(4);
            }
示例#8
0
        internal Effect(AssetLoader loader)
            : base(loader)
        {
            var reader = loader.Reader;

            loader.ExpectMagic(Magic);
            loader.Expect(0x10000);
            loader.Expect(ContentStart);

            int offsetOffset = reader.ReadInt32();
            int pointerCount = reader.ReadInt32();
            HashSet<int> pointers = new HashSet<int>();
            int functionCount = reader.ReadInt32();
            HashSet<int> functions = new HashSet<int>();

            loader.Position = offsetOffset;
            for (int index = 0; index < pointerCount; index++)
                pointers.Add(reader.ReadInt32());
            for (int index = 0; index < functionCount; index++)
                functions.Add(reader.ReadInt32());

            loader.Position = ContentStart;
            int tokenCount = (offsetOffset - ContentStart) / 4;
            Tokens = new Codex<EffectToken>(tokenCount);
            for (int index = 0; index < tokenCount; index++)
                Tokens.Add(new EffectToken(reader, pointers, functions));
            for (int index = 0; index < tokenCount; index++)
                Tokens[index].Link(Tokens);

            Instructions = new Codex<EffectInstruction>();
            for (int index = 0; index < tokenCount; )
                Instructions.Add(new EffectInstruction(Tokens, ref index));
        }
            internal WeaponReinforcement(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                PhysicsAtkRate = reader.ReadSingle();
                MagicAtkRate = reader.ReadSingle();
                FireAtkRate = reader.ReadSingle();
                ThunderAtkRate = reader.ReadSingle();
                StaminaAtkRate = reader.ReadSingle();
                SaWeaponAtkRate = reader.ReadSingle();
                SaDurabilityRate = reader.ReadSingle();
                CorrectStrengthRate = reader.ReadSingle();
                CorrectAgilityRate = reader.ReadSingle();
                CorrectMagicRate = reader.ReadSingle();
                CorrectFaithRate = reader.ReadSingle();
                PhysicsGuardCutRate = reader.ReadSingle();
                MagicGuardCutRate = reader.ReadSingle();
                FireGuardCutRate = reader.ReadSingle();
                ThunderGuardCutRate = reader.ReadSingle();
                PoisonGuardResistRate = reader.ReadSingle();
                DiseaseGuardResistRate = reader.ReadSingle();
                BloodGuardResistRate = reader.ReadSingle();
                CurseGuardResistRate = reader.ReadSingle();
                StaminaGuardDefRate = reader.ReadSingle();
                SpEffectId1 = reader.ReadByte();
                SpEffectId2 = reader.ReadByte();
                SpEffectId3 = reader.ReadByte();
                ResidentSpEffectId1 = reader.ReadByte();
                ResidentSpEffectId2 = reader.ReadByte();
                ResidentSpEffectId3 = reader.ReadByte();
                MaterialSetId = reader.ReadByte();
                Pad = reader.ReadBytes(9);
            }
示例#10
0
        internal PictureCel(Picture picture, int celIndex, AssetLoader loader)
            : base(loader)
        {
            Name = "Cel " + celIndex;
            BinaryReader reader = loader.Reader;

            reader.BaseStream.Position = 0x0E + celIndex * 0x2A;
            Vector2i dimensions = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16());
            Displacement = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16());
            MaskIndex = reader.ReadByte();
            loader.ExpectZeroes(1, 3);
            Unknowns.ReadInt32s(reader, 2, "Data offsets?");
            loader.ExpectZeroes(4, 1);
            int dataOffset = reader.ReadInt32();
            loader.ExpectZeroes(4, 2);
            Priority = reader.ReadUInt16();
            Offset = new Vector2i(reader.ReadUInt16(), reader.ReadUInt16()) * 2;
            if (Offset.Y > 0)
                Offset = new Vector2i(Offset.X, Offset.Y * 6 / 5);

            reader.BaseStream.Position = dataOffset;
            int[] indices = reader.ReadBytesAsInt32(dimensions.Product);

            Setup(picture.Palette.PaletteAsset, dimensions.X, dimensions.Y, indices);
        }
示例#11
0
 internal PaletteArchive(AssetLoader loader)
     : base(loader)
 {
     for (int index = 0; index < 8; index++) {
             PaletteAsset asset = PaletteAsset.ReadRgb(Manager, "Palette " + index, loader.Reader, 256, 63);
             AddChild(asset);
         }
 }
示例#12
0
 internal Palette(AssetManager manager, AssetLoader loader)
     : base(manager, loader.Name)
 {
     using (var reader = loader.Reader) {
         while (!loader.AtEnd)
             ColorsMutable.Add(Color.FromArgb(reader.ReadByte(), reader.ReadByte(), reader.ReadByte()));
     }
 }
示例#13
0
            internal MenuColor(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                R = reader.ReadByte();
                G = reader.ReadByte();
                B = reader.ReadByte();
                A = reader.ReadByte();
            }
示例#14
0
        public override LoadMatchStrength LoadMatch(AssetLoader loader)
        {
            string filename = Path.GetFileName(loader.Name);

            if (string.Equals(filename, Constants.PaletteStatic, StringComparison.InvariantCultureIgnoreCase))
                return LoadMatchStrength.Medium;
            if (loader.Context is LibraryRecord && string.Equals(Path.GetFileName(loader.Context.Parent.Name), Constants.PaletteLibrary, StringComparison.InvariantCultureIgnoreCase))
                return LoadMatchStrength.Medium;
            return LoadMatchStrength.None;
        }
示例#15
0
            internal LevelOfDetail(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                Lv01_BorderDist = reader.ReadSingle();
                Lv01_PlayDist = reader.ReadSingle();
                Lv12_BorderDist = reader.ReadSingle();
                Lv12_PlayDist = reader.ReadSingle();
            }
示例#16
0
 public override LoadMatchStrength LoadMatch(AssetLoader loader)
 {
     if (loader.Length != 8 * 768)
         return LoadMatchStrength.None;
     byte[] data = loader.Reader.ReadBytes(8 * 768);
     foreach (byte value in data)
         if (value > 63)
             return LoadMatchStrength.None;
     return LoadMatchStrength.Weak;
 }
示例#17
0
            internal HitMaterial(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                AiVolumeRate = reader.ReadSingle();
                SpEffectIdOnHit0 = reader.ReadInt32();
                SpEffectIdOnHit1 = reader.ReadInt32();
                BitFields = reader.ReadBytes(1);
                Pad0 = reader.ReadBytes(3);
            }
        internal ModelVertexAttribute(ModelVertexDeclaration declaration, AssetLoader loader, int index)
            : base(declaration, index, loader)
        {
            var reader = loader.Reader;

            Declaration = declaration;
            reader.RequireZeroes(4);
            Offset = reader.ReadInt32();
            Format = (ModelVertexFormat)reader.ReadInt32();
            Usage = (ModelVertexUsage)reader.ReadInt32();
            UsageIndex = reader.ReadInt32();
        }
示例#19
0
        internal StringPackage(AssetLoader loader)
            : base(loader)
        {
            BinaryReader reader = loader.Reader;
            Node[] nodes = ReadNodes(reader);
            Block[] blocks = new Block[reader.ReadUInt16()];

            for (int index = 0; index < blocks.Length; index++)
                blocks[index] = new Block(reader);
            for (int index = 0; index < blocks.Length; index++)
                new StringBlock(this, blocks[index].Id, reader, blocks[index].Offset, nodes);
        }
示例#20
0
            internal PointLight(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                DwindleBegin = reader.ReadSingle();
                DwindleEnd = reader.ReadSingle();
                ColR = reader.ReadInt16();
                ColG = reader.ReadInt16();
                ColB = reader.ReadInt16();
                ColA = reader.ReadInt16();
            }
示例#21
0
            internal Light(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                DegRotX_0 = reader.ReadInt16();
                DegRotY_0 = reader.ReadInt16();
                ColR_0 = reader.ReadInt16();
                ColG_0 = reader.ReadInt16();
                ColB_0 = reader.ReadInt16();
                ColA_0 = reader.ReadInt16();
                DegRotX_1 = reader.ReadInt16();
                DegRotY_1 = reader.ReadInt16();
                ColR_1 = reader.ReadInt16();
                ColG_1 = reader.ReadInt16();
                ColB_1 = reader.ReadInt16();
                ColA_1 = reader.ReadInt16();
                DegRotX_2 = reader.ReadInt16();
                DegRotY_2 = reader.ReadInt16();
                ColR_2 = reader.ReadInt16();
                ColG_2 = reader.ReadInt16();
                ColB_2 = reader.ReadInt16();
                ColA_2 = reader.ReadInt16();
                ColR_u = reader.ReadInt16();
                ColG_u = reader.ReadInt16();
                ColB_u = reader.ReadInt16();
                ColA_u = reader.ReadInt16();
                ColR_d = reader.ReadInt16();
                ColG_d = reader.ReadInt16();
                ColB_d = reader.ReadInt16();
                ColA_d = reader.ReadInt16();
                DegRotX_s = reader.ReadInt16();
                DegRotY_s = reader.ReadInt16();
                ColR_s = reader.ReadInt16();
                ColG_s = reader.ReadInt16();
                ColB_s = reader.ReadInt16();
                ColA_s = reader.ReadInt16();
                EnvDif_colR = reader.ReadInt16();
                EnvDif_colG = reader.ReadInt16();
                EnvDif_colB = reader.ReadInt16();
                EnvDif_colA = reader.ReadInt16();
                EnvSpc_colR = reader.ReadInt16();
                EnvSpc_colG = reader.ReadInt16();
                EnvSpc_colB = reader.ReadInt16();
                EnvSpc_colA = reader.ReadInt16();
                EnvDif = reader.ReadInt16();
                EnvSpc_0 = reader.ReadInt16();
                EnvSpc_1 = reader.ReadInt16();
                EnvSpc_2 = reader.ReadInt16();
                EnvSpc_3 = reader.ReadInt16();
                Pad = reader.ReadBytes(2);
            }
示例#22
0
            internal LockCamera(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                CamDistTarget = reader.ReadSingle();
                RotRangeMinX = reader.ReadSingle();
                LockRotXShiftRatio = reader.ReadSingle();
                ChrOrgOffset_Y = reader.ReadSingle();
                ChrLockRangeMaxRadius = reader.ReadSingle();
                CamFovY = reader.ReadSingle();
                Pad = reader.ReadBytes(8);
            }
示例#23
0
            internal LensFlareEx(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                LightDegRotX = reader.ReadInt16();
                LightDegRotY = reader.ReadInt16();
                ColR = reader.ReadInt16();
                ColG = reader.ReadInt16();
                ColB = reader.ReadInt16();
                ColA = reader.ReadInt16();
                LightDist = reader.ReadSingle();
            }
示例#24
0
        /// <summary>Read the text resource.</summary>
        /// <param name="loader"></param>
        internal Text(AssetLoader loader)
            : base(loader)
        {
            BinaryReader reader = loader.Reader;
            long end = reader.BaseStream.Length;

            while (reader.BaseStream.Position < end) {
                string value = reader.ReadStringz(Encoding.ASCII);

                StringsMutable.Add(value);
                StringsWithId.Add(new KeyValuePair<int, string>(StringsMutable.Count - 1, value));
            }
        }
        internal ModelBoneUnknown(FolderAsset bonesFolder, int index, AssetLoader loader)
            : base(bonesFolder, index, loader)
        {
            var reader = loader.Reader;

            Unknowns.ReadSingles(reader, 3);
            reader.Require(IsDS1 ? 0xFFFFFFFFu : 0xFF000000u);
            Unknowns.ReadSingles(reader, 3);
            Unknowns.ReadInt16s(reader, 2);
            Unknowns.ReadSingles(reader, 3);
            Unknowns.ReadInt16s(reader, 2);
            reader.RequireZeroes(4 * 4);
        }
示例#26
0
            internal ToneCorrection(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                BrightnessR = reader.ReadSingle();
                BrightnessG = reader.ReadSingle();
                BrightnessB = reader.ReadSingle();
                ContrastR = reader.ReadSingle();
                ContrastG = reader.ReadSingle();
                ContrastB = reader.ReadSingle();
                Saturation = reader.ReadSingle();
                Hue = reader.ReadSingle();
            }
示例#27
0
            internal ObjectInfo(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                Hp = reader.ReadInt16();
                Defense = reader.ReadUInt16();
                ExtRefTexId = reader.ReadInt16();
                MaterialId = reader.ReadInt16();
                AnimBreakIdMax = reader.ReadByte();
                BitFields = reader.ReadBytes(2);
                DefaultLodParamId = reader.ReadSByte();
                BreakSfxId = reader.ReadInt32();
            }
示例#28
0
        internal Library(AssetManager manager, AssetLoader loader)
            : base(manager, loader.Name)
        {
            var reader = Reader = loader.Reader;

            loader.ExpectMagic(Magic);
            var count = reader.ReadUInt16();
            int offset = 8 + count * 4;
            for (int index = 0; index < count; index++) {
                int size = reader.ReadInt32();
                new LibraryRecord(this, index, offset, size);
                offset += size;
            }
        }
示例#29
0
            internal QwcChange(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                PcAttrB = reader.ReadInt16();
                PcAttrW = reader.ReadInt16();
                PcAttrL = reader.ReadInt16();
                PcAttrR = reader.ReadInt16();
                AreaAttrB = reader.ReadInt16();
                AreaAttrW = reader.ReadInt16();
                AreaAttrL = reader.ReadInt16();
                AreaAttrR = reader.ReadInt16();
            }
示例#30
0
            internal Talk(ParameterTable table, int index, AssetLoader loader, int next)
                : base(table, index, loader)
            {
                BinaryReader reader = loader.Reader;

                MsgId = reader.ReadInt32();
                VoiceId = reader.ReadInt32();
                MotionId = reader.ReadInt32();
                ReturnPos = reader.ReadInt32();
                ReactionId = reader.ReadInt32();
                EventId = reader.ReadInt32();
                IsMotionLoop = reader.ReadByte();
                Pad0 = reader.ReadBytes(7);
            }
示例#31
0
 /// <summary>Initialises the object.</summary>
 /// <param name="info"></param>
 public UnexpectedEndOfFile(AssetLoader info) : base(info, null, null)
 {
 }
示例#32
0
 /// <summary>Initialises the error.</summary>
 /// <param name="loader"></param>
 /// <param name="expected"></param>
 public UnexpectedPosition(AssetLoader loader, long expected)
     : base(loader, null, null)
 {
     Expected = expected;
     Received = loader.Position;
 }
示例#33
0
 /// <summary>Initialise the load error.</summary>
 /// <param name="loader"></param>
 /// <param name="offset"></param>
 /// <param name="message"></param>
 public AssetLoadError(AssetLoader loader, long?offset, string message)
 {
     Loader       = loader;
     Offset       = offset.HasValue ? offset.Value : loader.Position;
     this.message = message;
 }
示例#34
0
 /// <summary>Initialise the error.</summary>
 /// <param name="info"></param>
 /// <param name="offset"></param>
 /// <param name="expected"></param>
 /// <param name="received"></param>
 public InvalidData(AssetLoader info, long offset, string expected, string received)
     : base(info, offset, null)
 {
     Expected = expected;
     Received = received;
 }
示例#35
0
 /// <summary>Initialise the archive asset.</summary>
 /// <param name="loader"></param>
 public ArchiveAsset(AssetLoader loader)
     : base(loader)
 {
 }