Example #1
0
 public static void Copy(StatusAttribute source, StatusAttribute destination)
 {
     source.Cancels.CopyTo(destination.Cancels);
     source.CantStackOn.CopyTo(destination.CantStackOn);
     destination.Blank1       = source.Blank1;
     destination.Blank2       = source.Blank2;
     destination.Order        = source.Order;
     destination.CT           = source.CT;
     destination.FreezeCT     = source.FreezeCT;
     destination.KO           = source.KO;
     destination.CanReact     = source.CanReact;
     destination.Blank2       = source.Blank2;
     destination.IgnoreAttack = source.IgnoreAttack;
     destination.Unknown1     = source.Unknown1;
     destination.Unknown2     = source.Unknown2;
     destination.Unknown3     = source.Unknown3;
     destination.Unknown4     = source.Unknown4;
     destination.Unknown5     = source.Unknown5;
     destination.Unknown6     = source.Unknown6;
     destination.Unknown7     = source.Unknown7;
     destination.Unknown8     = source.Unknown8;
     destination.Unknown9     = source.Unknown9;
     destination.Unknown10    = source.Unknown10;
     destination.Unknown11    = source.Unknown11;
 }
Example #2
0
        public AllStatusAttributes(IList <byte> bytes)
        {
            StatusAttributes = new StatusAttribute[40];
            byte[] defaultBytes = FFTPatch.Context == Context.US_PSP ? PSPResources.StatusAttributesBin : PSXResources.StatusAttributesBin;

            string[] names = FFTPatch.Context == Context.US_PSP ? PSPResources.Statuses : PSXResources.Statuses;
            for (int i = 0; i < 40; i++)
            {
                StatusAttributes[i] =
                    new StatusAttribute(names[i], (byte)i, bytes.Sub(16 * i, 16 * i + 15),
                                        new StatusAttribute(names[i], (byte)i, defaultBytes.Sub(16 * i, 16 * i + 15)));
            }
        }
        public AllStatusAttributes(IList <byte> bytes, IList <byte> defaultBytes, Context context)
        {
            StatusAttributes = new StatusAttribute[40];
            defaultBytes     = defaultBytes ?? (context == Context.US_PSP ? PSPResources.Binaries.StatusAttributes : PSXResources.Binaries.StatusAttributes);

            IList <string> names = context == Context.US_PSP ? PSPResources.Lists.StatusNames : PSXResources.Lists.StatusNames;

            for (int i = 0; i < 40; i++)
            {
                StatusAttributes[i] =
                    new StatusAttribute(names[i], (byte)i, bytes.Sub(16 * i, 16 * i + 15),
                                        new StatusAttribute(names[i], (byte)i, defaultBytes.Sub(16 * i, 16 * i + 15)));
            }
        }
Example #4
0
        public StatusAttribute(string name, byte value, IList <byte> bytes, StatusAttribute defaults)
        {
            Default = defaults;
            Name    = name;
            Value   = value;

            Blank1 = bytes[0];
            Blank2 = bytes[1];
            Order  = bytes[2];
            CT     = bytes[3];

            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[4], ref FreezeCT, ref Unknown1, ref Unknown2, ref Unknown3, ref Unknown4, ref Unknown5, ref Unknown6, ref KO);
            PatcherLib.Utilities.Utilities.CopyByteToBooleans(bytes[5], ref CanReact, ref Blank, ref IgnoreAttack, ref Unknown7, ref Unknown8, ref Unknown9, ref Unknown10, ref Unknown11);
            CanReact    = !CanReact;
            Cancels     = new Statuses(bytes.Sub(6, 10), defaults == null ? null : defaults.Cancels);
            CantStackOn = new Statuses(bytes.Sub(11, 15), defaults == null ? null : defaults.CantStackOn);
        }
Example #5
0
        public AllStatusAttributes( IList<byte> bytes )
        {
            StatusAttributes = new StatusAttribute[40];
            byte[] defaultBytes = FFTPatch.Context == Context.US_PSP ? PSPResources.StatusAttributesBin : PSXResources.StatusAttributesBin;

            string[] names = FFTPatch.Context == Context.US_PSP ? PSPResources.Statuses : PSXResources.Statuses;
            for( int i = 0; i < 40; i++ )
            {
                StatusAttributes[i] =
                    new StatusAttribute( names[i], (byte)i, bytes.Sub( 16 * i, 16 * i + 15 ),
                        new StatusAttribute( names[i], (byte)i, defaultBytes.Sub( 16 * i, 16 * i + 15 ) ) );
            }
        }
Example #6
0
 public void CopyTo( StatusAttribute destination )
 {
     Copy( this, destination );
 }
Example #7
0
 public static void Copy( StatusAttribute source, StatusAttribute destination )
 {
     source.Cancels.CopyTo( destination.Cancels );
     source.CantStackOn.CopyTo( destination.CantStackOn );
     destination.Blank1 = source.Blank1;
     destination.Blank2 = source.Blank2;
     destination.Order = source.Order;
     destination.CT = source.CT;
     destination.FreezeCT = source.FreezeCT;
     destination.KO = source.KO;
     destination.CanReact = source.CanReact;
     destination.Blank2 = source.Blank2;
     destination.IgnoreAttack = source.IgnoreAttack;
     destination.Unknown1 = source.Unknown1;
     destination.Unknown2 = source.Unknown2;
     destination.Unknown3 = source.Unknown3;
     destination.Unknown4 = source.Unknown4;
     destination.Unknown5 = source.Unknown5;
     destination.Unknown6 = source.Unknown6;
     destination.Unknown7 = source.Unknown7;
     destination.Unknown8 = source.Unknown8;
     destination.Unknown9 = source.Unknown9;
     destination.Unknown10 = source.Unknown10;
     destination.Unknown11 = source.Unknown11;
 }
Example #8
0
        public StatusAttribute( string name, byte value, IList<byte> bytes, StatusAttribute defaults )
        {
            Default = defaults;
            Name = name;
            Value = value;

            Blank1 = bytes[0];
            Blank2 = bytes[1];
            Order = bytes[2];
            CT = bytes[3];

            PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[4], ref FreezeCT, ref Unknown1, ref Unknown2, ref Unknown3, ref Unknown4, ref Unknown5, ref Unknown6, ref KO );
            PatcherLib.Utilities.Utilities.CopyByteToBooleans( bytes[5], ref CanReact, ref Blank, ref IgnoreAttack, ref Unknown7, ref Unknown8, ref Unknown9, ref Unknown10, ref Unknown11 );
            CanReact = !CanReact;
            Cancels = new Statuses( bytes.Sub( 6, 10 ), defaults == null ? null : defaults.Cancels );
            CantStackOn = new Statuses( bytes.Sub( 11, 15 ), defaults == null ? null : defaults.CantStackOn );
        }
Example #9
0
 public void CopyTo(StatusAttribute destination)
 {
     Copy(this, destination);
 }
 private void copyAll(object sender, EventArgs args)
 {
     copiedEntry = listBox.SelectedItem as StatusAttribute;
 }