Example #1
0
 public void addMapItem(int[,] data, int mapid, string name)
 {
     MapItemData item = new MapItemData(data.GetLength(0), data.GetLength(1), mapid);
     for (int i = 0; i < item.height; i++)
     {
         for (int k = 0; k < item.width; k++)
         {
             item.subItems[k, i] = data[k, i];
         }
     }
     for (int j = 0; j < item.height; j++)
     {
         for (int m = 0; m < item.width; m++)
         {
             int index = item.subItems[m, j];
             for (int n = 0; n < 0x10; n++)
             {
                 for (int num7 = 0; num7 < 0x10; num7++)
                 {
                     item.ItemImage.SetPixel((m * 0x10) + num7, (j * 0x10) + n, this.allmapdata[mapid].map_item_image[index].GetPixel(num7, n));
                 }
             }
         }
     }
     item.name = name;
     this.clipmapitems.Add(item);
 }
Example #2
0
 private void modifymappart(int imageX, int imageY, MapItemData data)
 {
     for (int i = 0; i < Math.Min(data.width, this.map.MapWidth - imageX); i++)
     {
         for (int j = 0; j < Math.Min(data.height, this.map.MapHeight - imageY); j++)
         {
             this.map.maptitles[(((imageY + j) * this.map.MapWidth) + imageX) + i] = (byte)data.subItems[i, j];
         }
     }
 }