示例#1
0
 public Table1Entry(byte[] filebytes, int offset, MsaAnimation parent)
 {
     unk1    = Utility.ReadUInt32BigEndian(filebytes, offset);
     unk2    = Utility.ReadUInt32BigEndian(filebytes, offset + 4);
     unk3    = Utility.ReadUInt32BigEndian(filebytes, offset + 8);
     frmData = new FrameData(filebytes, parent.dataSectionOffset + unk3);
 }
示例#2
0
        public MsaAnimation msaAnim; //if needed

        public void Load()
        {
            using (BinaryReader reader = new BinaryReader(File.Open(global.activePackage.filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite)))
            {
                reader.BaseStream.Position = fileoffset;

                filebytes = reader.ReadBytes((int)filesize);

                if (uncompressedsize > 0) //if it's a compressed file
                {
                    filebytes             = Compression.Decompress_QFS(filebytes);
                    has_been_decompressed = true;
                }


                switch ((global.TypeID)typeID)
                {
                case global.TypeID.HKX_MSK:      //MySims Kingdom HKX
                    hkx = new hkxFile(this);
                    break;

                case global.TypeID.COLLISION_MSA:      //MySims Agents mesh collision
                    msaCol = new MsaCollision(this);
                    File.WriteAllLines(filename + ".obj", msaCol.obj);
                    break;

                case global.TypeID.LLMF_MSK:                         //LLMF level bin MSK   "LevelData"
                case global.TypeID.LLMF_MSA:                         //LLMF level bin MSA
                    llmf = new LLMF(this);
                    llmf.GenerateReport();
                    break;

                case global.TypeID.RMDL_MSK:              //RMDL MSK
                case global.TypeID.RMDL_MSA:              //RMDL MSA
                    rmdl = new RevoModel(this);
                    break;

                case global.TypeID.MTST_MSK:
                case global.TypeID.MTST_MSA:
                    mtst = new MaterialSet(this);
                    break;

                case global.TypeID.MATD_MSK:              //MATD MSK            "MaterialData"
                case global.TypeID.MATD_MSA:              //MATD MSA
                    matd = new MaterialData(this);
                    break;

                case global.TypeID.TPL_MSK:
                case global.TypeID.TPL_MSA:
                    tpl = new TPLtexture(this);
                    break;

                case global.TypeID.ANIMCLIP_MSA:
                    msaAnim = new MsaAnimation(this);
                    break;
                }
            }
        }