// Path: src/main/java/com/github/monster860/fastdmm/dmirender/RenderInstance.java
// public class RenderInstance implements Comparable<RenderInstance> {
// 	public IconSubstate substate;
// 	public Color color;
// 	public float x;
// 	public float y;
// 	public int plane;
// 	public float layer;
// 	public int creationIndex;
// 	
// 	public RenderInstance(int creationIndex) {
// 		this.creationIndex = creationIndex;
// 	}
// 	
// 	@Override
// 	public int compareTo(RenderInstance o) {
// 		float cnA = plane;
// 		float cnB = o.plane;
// 		if(cnA == cnB) {
// 			cnA = layer;
// 			cnB = o.layer;
// 		}
// 		if(cnA == cnB) {
// 			cnA = creationIndex;
// 			cnB = o.creationIndex;
// 		}
// 		return cnA < cnB ? -1 : (cnA == cnB ? 0 : 1);
// 	}
// }
// 
// Path: src/main/java/com/github/monster860/fastdmm/dmmmap/Location.java
// public class Location {
// 
//     public int x;
//     public int y;
//     public int z;
// 
//     /**
//      * Constructs a new Location with the given coordinates
//      *
//      * @param x The x-coordinate of this new location
//      * @param y The y-coordinate of this new location
//      * @param z The z-coordinate of this new location
//      */
//     public Location(int x, int y, int z) {
//         this.x = x;
//         this.y = y;
//         this.z = z;
//     }
// 
//     /**
//      * Updates the Location with the given coordinates
//      *
//      * @param x The x-coordinates
//      * @param y The y-coordinates
//      * @param z The z-coordinates
//      */
//     public void set(int x, int y, int z) {
//         this.x = x;
//         this.y = y;
//         this.z = z;
//     }
// 
//     /**
//      * Takes a step into the given direction.
//      *
//      * @param dir The direction to step into.
//      * @return The new location.
//      */
//     public Location getStep(int dir) {
//         Location l = new Location(x, y, z);
//         if ((dir & 1) != 0)
//             l.y++;
//         if ((dir & 2) != 0)
//             l.y--;
//         if ((dir & 4) != 0)
//             l.x++;
//         if ((dir & 8) != 0)
//             l.x--;
//         return l;
//     }
//     
//     @Override
//     public boolean equals(Object other) {
//     	if(!(other instanceof Location))
//     		return false;
//     	if(other == this)
//     		return false;
//     	Location o = (Location)other;
//     	return x == o.x && y == o.y && z == o.z;
//     }
//     
//     @Override
//     public int hashCode() {
//     	return (x<<16) + (y<<8) + (z);
//     }
// }


import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Set;
import com.github.monster860.fastdmm.dmirender.RenderInstance;
import com.github.monster860.fastdmm.dmmmap.Location;
			ri.x = l1.x;
			ri.y = l1.y;
			ri.substate = editor.interface_dmi.getIconState("14").getSubstate(2);
			ri.color = c;
			
			rendInstanceSet.add(ri);
			
			ri = new RenderInstance(currCreationIndex++);
			ri.plane = 101;
			ri.x = l2.x;
			ri.y = l2.y;
			ri.substate = editor.interface_dmi.getIconState("13").getSubstate(2);
			ri.color = c;
			
			rendInstanceSet.add(ri);
			
			for(int y = l1.y + 1; y <= l2.y - 1; y++) {
				ri = new RenderInstance(currCreationIndex++);
				ri.plane = 101;
				ri.x = l1.x;
				ri.y = y;
				ri.substate = editor.interface_dmi.getIconState("12").getSubstate(2);
				ri.color = c;
				
				rendInstanceSet.add(ri);
			}
		} else if(l1.y == l2.y) {
			RenderInstance ri = new RenderInstance(currCreationIndex++);
			ri.plane = 101;
			ri.x = l1.x;
// Path: src/main/java/com/github/monster860/fastdmm/dmirender/RenderInstance.java
// public class RenderInstance implements Comparable<RenderInstance> {
// 	public IconSubstate substate;
// 	public Color color;
// 	public float x;
// 	public float y;
// 	public int plane;
// 	public float layer;
// 	public int creationIndex;
// 	
// 	public RenderInstance(int creationIndex) {
// 		this.creationIndex = creationIndex;
// 	}
// 	
// 	@Override
// 	public int compareTo(RenderInstance o) {
// 		float cnA = plane;
// 		float cnB = o.plane;
// 		if(cnA == cnB) {
// 			cnA = layer;
// 			cnB = o.layer;
// 		}
// 		if(cnA == cnB) {
// 			cnA = creationIndex;
// 			cnB = o.creationIndex;
// 		}
// 		return cnA < cnB ? -1 : (cnA == cnB ? 0 : 1);
// 	}
// }
// 
// Path: src/main/java/com/github/monster860/fastdmm/dmmmap/Location.java
// public class Location {
// 
//     public int x;
//     public int y;
//     public int z;
// 
//     /**
//      * Constructs a new Location with the given coordinates
//      *
//      * @param x The x-coordinate of this new location
//      * @param y The y-coordinate of this new location
//      * @param z The z-coordinate of this new location
//      */
//     public Location(int x, int y, int z) {
//         this.x = x;
//         this.y = y;
//         this.z = z;
//     }
// 
//     /**
//      * Updates the Location with the given coordinates
//      *
//      * @param x The x-coordinates
//      * @param y The y-coordinates
//      * @param z The z-coordinates
//      */
//     public void set(int x, int y, int z) {
//         this.x = x;
//         this.y = y;
//         this.z = z;
//     }
// 
//     /**
//      * Takes a step into the given direction.
//      *
//      * @param dir The direction to step into.
//      * @return The new location.
//      */
//     public Location getStep(int dir) {
//         Location l = new Location(x, y, z);
//         if ((dir & 1) != 0)
//             l.y++;
//         if ((dir & 2) != 0)
//             l.y--;
//         if ((dir & 4) != 0)
//             l.x++;
//         if ((dir & 8) != 0)
//             l.x--;
//         return l;
//     }
//     
//     @Override
//     public boolean equals(Object other) {
//     	if(!(other instanceof Location))
//     		return false;
//     	if(other == this)
//     		return false;
//     	Location o = (Location)other;
//     	return x == o.x && y == o.y && z == o.z;
//     }
//     
//     @Override
//     public int hashCode() {
//     	return (x<<16) + (y<<8) + (z);
//     }
// }


// Path: src/main/java/com/github/monster860/fastdmm/Util.java
import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Set;
import com.github.monster860.fastdmm.dmirender.RenderInstance;
import com.github.monster860.fastdmm.dmmmap.Location;

			ri.x = l1.x;
			ri.y = l1.y;
			ri.substate = editor.interface_dmi.getIconState("14").getSubstate(2);
			ri.color = c;
			
			rendInstanceSet.add(ri);
			
			ri = new RenderInstance(currCreationIndex++);
			ri.plane = 101;
			ri.x = l2.x;
			ri.y = l2.y;
			ri.substate = editor.interface_dmi.getIconState("13").getSubstate(2);
			ri.color = c;
			
			rendInstanceSet.add(ri);
			
			for(int y = l1.y + 1; y <= l2.y - 1; y++) {
				ri = new RenderInstance(currCreationIndex++);
				ri.plane = 101;
				ri.x = l1.x;
				ri.y = y;
				ri.substate = editor.interface_dmi.getIconState("12").getSubstate(2);
				ri.color = c;
				
				rendInstanceSet.add(ri);
			}
		} else if(l1.y == l2.y) {
			RenderInstance ri = new RenderInstance(currCreationIndex++);
			ri.plane = 101;
			ri.x = l1.x;
			ri.y = l1.y;