Beispiel #1
0
            public void Read(BinaryReader reader)
            {
                m_olJoints  = new List <TJoint>();
                m_olBitmaps = new List <Bitmap>();

                m_nDrawMode   = reader.ReadInt32();
                m_sTension    = reader.ReadSingle();
                m_nCurveWidth = reader.ReadInt32();
                m_nJointCount = reader.ReadInt32();
                int nCount = reader.ReadInt32();

                for (int i = 0; i < nCount; i++)
                {
                    TJoint joint = new TJoint();
                    joint.Read(reader);
                    m_olJoints.Add(joint);
                }

                m_nPoseCount = reader.ReadInt32();
                m_sAlpha     = 1.0f - (m_nPoseCount / 255.0f);

                m_nBitmapCount = reader.ReadInt32();
                for (int f = 0; f < m_nBitmapCount; f++)
                {
                    Bitmap bmp = FileFormat.LoadBitmap(reader);
                    m_olBitmaps.Add(bmp);
                }
            }
Beispiel #2
0
            public void Read(BinaryReader reader)
            {
                int    f;
                TJoint pChild;
                int    nCount;

                m_olChildren = new List <TJoint>();

                m_nDrawAs    = reader.ReadInt32();
                m_nDrawWidth = reader.ReadInt32();
                m_nLineWidth = reader.ReadInt32();
                m_bShowLine  = reader.ReadBoolean();
                byte[] color = new byte[] { reader.ReadByte(), reader.ReadByte(), reader.ReadByte(), reader.ReadByte() };
                m_nColor = Functions.Helpers.ODDCOLORtoCOLOR(color);
                byte[] inColor = new byte[] { reader.ReadByte(), reader.ReadByte(), reader.ReadByte(), reader.ReadByte() };
                m_nInColor        = Functions.Helpers.ODDCOLORtoCOLOR(inColor);
                m_bFill           = reader.ReadBoolean();
                m_nX              = reader.ReadInt32();
                m_nY              = reader.ReadInt32();
                m_nState          = reader.ReadInt32();
                m_nLength         = reader.ReadInt32();
                m_nIndex          = reader.ReadInt32();
                m_sAngleToParent  = reader.ReadSingle();
                m_nBitmap         = reader.ReadInt32();
                m_nBMPXoffs       = reader.ReadInt32();
                m_nBMPYoofs       = reader.ReadInt32();
                m_sBitmapRotation = reader.ReadSingle();
                m_nBitmapAlpha    = reader.ReadByte();
                nCount            = reader.ReadInt32();

                for (f = 0; f < nCount; f++)
                {
                    pChild           = new TJoint();
                    pChild.m_pParent = this;
                    pChild.Read(reader);
                    m_olChildren.Add(pChild);
                }
            }