예제 #1
0
        public void WriteAnimationParams(BinaryWriter writer, OMFEditor editor, short motion_version)
        {
            editor.WriteSuperString(writer, Name);
            writer.Write(Flags);
            writer.Write(BoneOrPart);
            writer.Write(MotionID);
            writer.Write(Speed);
            writer.Write(Power);
            writer.Write(Accrue);
            writer.Write(Falloff);

            if (motion_version != 4)
            {
                return;
            }

            writer.Write(MarksCount);

            if (MarksCount != 0 && m_marks != null)
            {
                foreach (MotionMark mark in m_marks)
                {
                    mark.WriteMotionMark(writer, editor);
                }
            }
        }
예제 #2
0
        public void WriteBoneCont(BinaryWriter writer, OMFEditor editor)
        {
            writer.Write(SectionId);
            writer.Write(SectionSize);
            writer.Write(OGF_V);
            writer.Write(Count);

            foreach (BoneParts bone in parts)
            {
                editor.WriteSuperString(writer, bone.Name);
                writer.Write(bone.Count);

                foreach (BoneVector sbone in bone.bones)
                {
                    editor.WriteSuperString(writer, sbone.Name);
                    writer.Write(sbone.ID);
                }
            }
        }
예제 #3
0
        public void WriteAnimationContainer(BinaryWriter writer, OMFEditor editor)
        {
            writer.Write(SectionId);
            writer.Write(SectionSize);

            writer.Write(SectionId2);
            writer.Write(SectionSize2);

            writer.Write(AnimsCount);

            foreach (AnimVector anim in Anims)
            {
                writer.Write(anim.SectionId);
                writer.Write(anim.SectionSize);
                editor.WriteSuperString(writer, anim.Name);
                writer.Write(anim.data);
            }
        }