Exemplo n.º 1
0
        public void DuplicateIcon(bool Recolour, CombatIcon combatIcon, Player player)
        {
            int bitPerPixel = normal.Bpp;

            System.Array.Copy(combatIcon.normal.ImageData, normal.ImageData, combatIcon.normal.ImageData.Length);
            System.Array.Copy(combatIcon.normal_f.ImageData, normal_f.ImageData, combatIcon.normal_f.ImageData.Length);
            System.Array.Copy(combatIcon.attack.ImageData, attack.ImageData, combatIcon.attack.ImageData.Length);
            System.Array.Copy(combatIcon.attack_f.ImageData, attack_f.ImageData, combatIcon.attack_f.ImageData.Length);

            if (Recolour)
            {
                byte[] newColors = new byte[16];
                byte[] oldColors = new byte[16];

                for (byte i = 0; i < 16; i++)
                {
                    oldColors[i] = i;
                    newColors[i] = i;
                }

                for (byte i = 0; i < 6; i++)
                {
                    newColors[gbl.default_icon_colours[i]]     = (byte)(player.icon_colours[i] & 0x0F);
                    newColors[gbl.default_icon_colours[i] + 8] = (byte)((player.icon_colours[i] & 0xF0) >> 4);
                }

                Recolor(false, newColors, oldColors);
            }
        }
Exemplo n.º 2
0
 public void MergeIcon(CombatIcon combatIcon) // used to blend head ad body icons.
 {
     normal.MergeIcons(combatIcon.normal);
     normal_f.MergeIcons(combatIcon.normal_f);
     attack.MergeIcons(combatIcon.attack);
     attack_f.MergeIcons(combatIcon.attack_f);
 }