public override bool OnInitialize()
        {
            base.OnInitialize();

            _name = "Emitter";

            _desc        = *Descriptor;
            _drawSetting = _desc._drawSetting;
            typeOption2  = _drawSetting.typeOption2;

            return(TevStageCount > 0);
        }
        public override bool OnInitialize()
        {
            base.OnInitialize();

            _name = "Emitter";

            _desc        = *Descriptor;
            _drawSetting = *(EmitterDrawSetting7 *)&Descriptor->_drawSetting;
            typeOption2  = new Bin8(_drawSetting.typeOption2);

            return(TevStageCount > 0);
        }
Пример #3
0
 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
 {
     return(Bin8.FromString(value?.ToString() ?? ""));
 }
        public override bool OnInitialize()
        {
            _hdr    = *Header;
            _name   = KindType;
            _random = new Random(RandomSeed);

            Bin8       enabled        = Header->kindEnable;
            List <int> enabledIndices = new List <int>();

            for (int i = 0; i < 8; i++)
            {
                if (enabled[i])
                {
                    enabledIndices.Add(i);
                }
            }

            int size = 0;

            switch (CurveFlag)
            {
            case AnimCurveType.ParticleByte:
                size = 1;
                break;

            case AnimCurveType.ParticleFloat:
                size = 4;
                break;

            case AnimCurveType.ParticleRotate:
                size = 1;
                break;

            case AnimCurveType.ParticleTexture:

                break;

            case AnimCurveType.Child:
                break;

            case AnimCurveType.EmitterFloat:
                break;

            case AnimCurveType.Field:
                break;

            case AnimCurveType.PostField:
                break;
            }

            //Dictionary<int, KeyValuePair<int, float>> values;

            //VoidPtr offset = (VoidPtr)Header + 0x20;
            //if (KeyTableSize > 4)
            //{
            //    AnimCurveTableHeader* hdr = (AnimCurveTableHeader*)offset;
            //    AnimCurveKeyHeader* key = hdr->First;
            //    for (int i = 0; i < hdr->_count; i++, key = key->Next(enabledIndices.Count, size))
            //    {
            //        key->GetFrameIndex(enabledIndices.Count, size);
            //    }
            //}
            //offset += KeyTableSize;
            //if (RangeTableSize > 4)
            //{
            //    AnimCurveTableHeader* hdr = (AnimCurveTableHeader*)offset;

            //}
            //offset += RangeTableSize;
            //if (RandomTableSize > 4)
            //{
            //    AnimCurveTableHeader* hdr = (AnimCurveTableHeader*)offset;

            //}
            //offset += RandomTableSize;
            //if (NameTableSize > 4)
            //{
            //    AnimCurveTableHeader* hdr = (AnimCurveTableHeader*)offset;

            //    _names = new List<string>();
            //    bushort* addr = (bushort*)((VoidPtr)hdr + 4 + hdr->_count * 4);
            //    for (int i = 0; i < hdr->_count; i++, addr = (bushort*)((VoidPtr)addr + 2 + *addr))
            //        _names.Add(new String((sbyte*)addr + 2));
            //}
            //offset += NameTableSize;
            //if (InfoTableSize > 4)
            //{
            //    AnimCurveTableHeader* hdr = (AnimCurveTableHeader*)offset;
            //    //switch ((v9AnimCurveTargetField)_hdr.kindType)
            //    //{

            //    //}
            //}

#if DEBUG
            if (CurveFlag == AnimCurveType.EmitterFloat || CurveFlag == AnimCurveType.PostField)
            {
                MessageBox.Show(TreePath);
            }
#endif

            switch (CurveFlag)
            {
            case AnimCurveType.ParticleByte:
                break;

            case AnimCurveType.ParticleFloat:
                break;

            case AnimCurveType.ParticleRotate:
                break;

            case AnimCurveType.ParticleTexture:
                break;

            case AnimCurveType.Child:
                break;
            }

            return(false);
        }