コード例 #1
0
        private static void readMotionRepresentnameContainer(BinaryReader br, ref MotionPack pack, ref Balthasar.IO.PackageLang pl)
        {
            string           value           = ModelReader.ReadString(br);
            IDanceMotionLeaf danceMotionLeaf = null;

            foreach (IDanceMotionLeaf current in pack.Motions)
            {
                if (current.Name.Equals(value))
                {
                    danceMotionLeaf = current;
                    break;
                }
            }
            int num = br.ReadInt32();

            for (int i = 0; i < num; i++)
            {
                int    langId = br.ReadInt32();
                string name   = ModelReader.ReadString(br);
                if (danceMotionLeaf != null)
                {
                    danceMotionLeaf.SetRepresentName((MchaLanguageID)langId, pl.GetString(langId, name));
                }
            }
        }
コード例 #2
0
        private static void readAnalyzeInformationContainer(BinaryReader br, ref MotionPack pack)
        {
            string           value           = ModelReader.ReadString(br);
            IDanceMotionLeaf danceMotionLeaf = null;

            foreach (IDanceMotionLeaf current in pack.Motions)
            {
                if (current.Name.Equals(value))
                {
                    danceMotionLeaf = current;
                    break;
                }
            }
            DanceMotionInformation danceMotionInformation = new DanceMotionInformation(br, danceMotionLeaf);

            if (danceMotionLeaf != null)
            {
                danceMotionLeaf.SetDanceMotionInformation(danceMotionInformation);
            }
        }
コード例 #3
0
        public static bool LoadHeader(ref MotionPack pack, BinaryReader br, ref Balthasar.IO.PackageLang pl)
        {
            float num = 1.1f;

            byte[] array = br.ReadBytes(5);
            pack.PackNames.Clear();
            pack.PackDescriptions.Clear();
            pack.Copyrights.Clear();
            pack.FormatVersion = br.ReadSingle();
            if (pack.FormatVersion > num)
            {
                //高版本允许加载
                //MoostaErrorManager.ShowErrorDialog(MoostaUIResourceManager.GetText("このバージョンのモーションパックには対応していません。"));
                //return false;
            }
            if (MotionPackReader.motionPackReadLock && array[0] == 77 && (double)pack.FormatVersion == 1.0)
            {
                //锁定版本允许加载允许加载
                //			MoostaErrorManager.ShowErrorDialog(MoostaUIResourceManager.GetText("このバージョンのモーションパックには対応していません。"));
                //			return false;
            }
            pack.PackVersion = br.ReadSingle();
            br.ReadInt32();
            int num2 = br.ReadInt32();

            for (int i = 0; i < num2; i++)
            {
                int    id   = br.ReadInt32();
                string name = ModelReader.ReadString(br);
                if (pl == null)
                {
                    pl = new Balthasar.IO.PackageLang(name);
                }
                pack.PackNames.Add(new ModelStringData(id, pl.GetString(id, name)));
            }
            int num3 = br.ReadInt32();

            for (int j = 0; j < num3; j++)
            {
                int    id2   = br.ReadInt32();
                string name2 = ModelReader.ReadString(br);
                pack.PackDescriptions.Add(new ModelStringData(id2, pl.GetString(id2, name2)));
            }
            int num4 = br.ReadInt32();

            for (int k = 0; k < num4; k++)
            {
                pack.Copyrights.Add(ModelReader.ReadString(br));
            }
            pack.IsRemovable = br.ReadBoolean();
            int num5 = br.ReadInt32();
            int num6 = br.ReadInt32();

            if (num5 * num6 > 0)
            {
                br.ReadBytes(num5 * num6 * 4);
            }
            pack.CompressMode = br.ReadByte();
            int num7 = br.ReadInt32();

            if (num7 > 0)
            {
                br.ReadBytes(num7);
            }
            return(true);
        }