Ejemplo n.º 1
0
        public override void Read(IffFile iff, Stream stream)
        {
            using (var io = IoBuffer.FromStream(stream, ByteOrder.LITTLE_ENDIAN))
            {
                io.ReadUInt32();               //pad
                var version = io.ReadUInt32(); //zero

                var TTAT = io.ReadUInt32();

                var compressionCode = io.ReadByte();
                if (compressionCode != 1)
                {
                    throw new Exception("hey what!!");
                }

                var iop = new IffFieldEncode(io);

                var total = iop.ReadInt32();
                for (int i = 0; i < total; i++)
                {
                    var guid  = (uint)iop.ReadInt32();
                    var count = iop.ReadInt32();
                    var tatts = new short[count];
                    for (int j = 0; j < count; j++)
                    {
                        tatts[j] = iop.ReadInt16();
                    }
                    TypeAttributesByGUID[guid] = tatts;
                }
            }
        }
Ejemplo n.º 2
0
        public override void Read(IffFile iff, Stream stream)
        {
            using (var io = IoBuffer.FromStream(stream, ByteOrder.LITTLE_ENDIAN))
            {
                io.ReadUInt32(); //pad
                var version = io.ReadUInt32();

                var MjbO = io.ReadUInt32();

                var compressionCode = io.ReadByte();
                if (compressionCode != 1)
                {
                    throw new Exception("hey what!!");
                }

                Name = io.ReadNullTerminatedString();
                if (Name.Length % 2 == 1)
                {
                    io.ReadByte();
                }
                var iop = new IffFieldEncode(io);


                var numLevels = iop.ReadInt32();

                JobLevels = new JobLevel[numLevels];
                for (int i = 0; i < numLevels; i++)
                {
                    JobLevels[i] = new JobLevel(iop);
                }
            }
        }
Ejemplo n.º 3
0
        public JobLevel(IffFieldEncode iop)
        {
            for (int i = 0; i < MinRequired.Length; i++)
            {
                MinRequired[i] = iop.ReadInt32();
            }
            for (int i = 0; i < MotiveDelta.Length; i++)
            {
                MotiveDelta[i] = iop.ReadInt32();
            }
            Salary    = iop.ReadInt32();
            StartTime = iop.ReadInt32();
            EndTime   = iop.ReadInt32();
            CarType   = iop.ReadInt32();

            JobName           = iop.ReadString(false);
            MaleUniformMesh   = iop.ReadString(false);
            FemaleUniformMesh = iop.ReadString(false);
            UniformSkin       = iop.ReadString(false);
            unknown           = iop.ReadString(true);
        }