Ejemplo n.º 1
0
 public void MakeSolid(ARGBPixel color)
 {
     _numEntries = 0;
     _flags     |= CLR0EntryFlags.IsSolid;
     _solidColor = color;
     SignalPropertyChange();
 }
Ejemplo n.º 2
0
        protected override bool OnInitialize()
        {
            _flags     = Header->Flags;
            _colorMask = (ARGBPixel)Header->_colorMask;

            _colors.Clear();
            if ((_flags & CLR0EntryFlags.IsSolid) != 0)
            {
                _numEntries = 0;
                _solidColor = (ARGBPixel)Header->SolidColor;
            }
            else
            {
                _numEntries = ((CLR0Node)_parent)._numFrames + 1;
                ABGRPixel *data = Header->Data;
                for (int i = 0; i < _numEntries; i++)
                {
                    _colors.Add((ARGBPixel)(*data++));
                }
            }

            if ((_name == null) && (Header->_stringOffset != 0))
            {
                _name = Header->ResourceString;
            }

            return(false);
        }
Ejemplo n.º 3
0
 public CLR0Entry(CLR0EntryFlags flags, ABGRPixel mask, ABGRPixel color)
 {
     _stringOffset = 0;
     _flags        = (uint)flags;
     _colorMask    = mask;
     _data._data   = *(int *)&color;
 }
Ejemplo n.º 4
0
        public bint           _data;      //Could be offset or color! Offset from itself

        public CLR0Entry(CLR0EntryFlags flags, ABGRPixel mask, int offset)
        {
            _stringOffset = 0;
            _flags        = (uint)flags;
            _colorMask    = mask;
            _data         = offset;
        }
Ejemplo n.º 5
0
        public override bool OnInitialize()
        {
            if ((_name == null) && (Header->_stringOffset != 0))
            {
                _name = Header->ResourceString;
            }

            _flags   = Header->Flags;
            _entries = new List <int>();

            for (int i = 0; i < 11; i++)
            {
                if ((((uint)_flags >> i * 2) & 1) != 0)
                {
                    _entries.Add(i);
                }
            }

            return(_entries.Count > 0);
        }
Ejemplo n.º 6
0
        public override bool OnInitialize()
        {
            if ((_name == null) && (Header->_stringOffset != 0))
                _name = Header->ResourceString;

            _flags = Header->Flags;
            _entries = new List<int>();

            for (int i = 0; i < 11; i++)
                if ((((uint)_flags >> i * 2) & 1) != 0)
                    _entries.Add(i);

            return _entries.Count > 0;
        }
Ejemplo n.º 7
0
 public CLR0Material(CLR0EntryFlags flags, RGBAPixel mask, RGBAPixel color)
 {
     _stringOffset = 0;
     _flags        = (uint)flags;
 }
Ejemplo n.º 8
0
 public CLR0Material(CLR0EntryFlags flags, ABGRPixel mask, int offset)
 {
     _stringOffset = 0;
     _flags        = (uint)flags;
 }