Esempio n. 1
0
        private void GenerateVirtualTextures()
        {
            _shopGumpParts = new UOTexture[12];
            UOTexture t = FileManager.Gumps.GetTexture(0x0870);

            UOTexture[][] splits = new UOTexture[4][];

            splits[0] = GraphicHelper.SplitTexture16(t,
                                                     new int[3, 4]
            {
                { 0, 0, t.Width, 64 },
                { 0, 64, t.Width, 124 },
                { 0, 124, t.Width, t.Height - 124 }
            });
            t = FileManager.Gumps.GetTexture(0x0871);

            splits[1] = GraphicHelper.SplitTexture16(t,
                                                     new int[3, 4]
            {
                { 0, 0, t.Width, 64 },
                { 0, 64, t.Width, 94 },
                { 0, 94, t.Width, t.Height - 94 }
            });
            t = FileManager.Gumps.GetTexture(0x0872);

            splits[2] = GraphicHelper.SplitTexture16(t,
                                                     new int[3, 4]
            {
                { 0, 0, t.Width, 64 },
                { 0, 64, t.Width, 124 },
                { 0, 124, t.Width, t.Height - 124 }
            });
            t = FileManager.Gumps.GetTexture(0x0873);

            splits[3] = GraphicHelper.SplitTexture16(t,
                                                     new int[3, 4]
            {
                { 0, 0, t.Width, 64 },
                { 0, 64, t.Width, 94 },
                { 0, 94, t.Width, t.Height - 94 }
            });

            for (int i = 0, idx = 0; i < splits.Length; i++)
            {
                for (int ii = 0; ii < splits[i].Length; ii++)
                {
                    _shopGumpParts[idx++] = splits[i][ii];
                }
            }
        }