Esempio n. 1
0
        public static Bitmap GetStatic(int index, int hue, bool onlyHueGrayPixels, out bool patched, bool checkmaxid)
        {
            try
            {
                var orig = GetStatic(index, out patched);

                if (orig == null)
                {
                    return(null);
                }

                var image = new Bitmap(orig);

                HueData.ApplyTo(image, hue, onlyHueGrayPixels);

                return(image);
            }
            catch (Exception e)
            {
                patched = false;

                if (Core.Debug)
                {
                    Console.WriteLine($"[Ultima]: ArtData.GetStatic({nameof(index)}:{index}, {nameof(hue)}:{hue}, {nameof(onlyHueGrayPixels)}:{onlyHueGrayPixels}, ...)\n{e}");
                }

                return(null);
            }
        }
Esempio n. 2
0
        public static Bitmap GetGump(int index, int hue, bool onlyHueGrayPixels)
        {
            try
            {
                var orig = GetGump(index);

                if (orig == null)
                {
                    return(null);
                }

                var image = new Bitmap(orig);

                HueData.ApplyTo(image, hue, onlyHueGrayPixels);

                return(image);
            }
            catch (Exception e)
            {
                if (Core.Debug)
                {
                    Console.WriteLine($"[Ultima]: GumpData.GetGump({nameof(index)}:{index}, {nameof(hue)}:{hue}, {nameof(onlyHueGrayPixels)}:{onlyHueGrayPixels})\n{e}");
                }

                return(null);
            }
        }
Esempio n. 3
0
        public static Bitmap GetStatic(int index, int hue, bool onlyHueGrayPixels, out bool patched, bool checkmaxid)
        {
            Bitmap image = new Bitmap(GetStatic(index, out patched));

            HueData.ApplyTo(image, hue, onlyHueGrayPixels);

            return(image);
        }
Esempio n. 4
0
        public static Bitmap GetGump(int index, int hue, bool onlyHueGrayPixels, out bool patched)
        {
            Bitmap image = new Bitmap(GetGump(index, out patched));

            HueData.ApplyTo(image, hue, onlyHueGrayPixels);

            return image;
        }
Esempio n. 5
0
 public void ApplyTo(Bitmap bmp, bool onlyHueGrayPixels)
 {
     HueData.ApplyTo(bmp, Colors, onlyHueGrayPixels);
 }