diff --git a/src/sig/DrawLoop.java b/src/sig/DrawLoop.java index 9f005fd..b3ad9e3 100644 --- a/src/sig/DrawLoop.java +++ b/src/sig/DrawLoop.java @@ -16,7 +16,7 @@ public class DrawLoop { for (int y=0;y=PaletteColor.values().length||nextCol<0) { throw new ArrayIndexOutOfBoundsException("Chosen color %"+nextCol+" is not in range (Min:0, Max: "+(PaletteColor.values().length-1)+")"); } else { currentCol=PaletteColor.values()[nextCol]; } - finalS=finalS.replaceFirst(Pattern.quote("\u001a"+nextCol+" "),""); + int oldLength = finalS.length(); + finalS=finalS.replaceFirst(Pattern.quote(Character.valueOf((char)26)+Byte.toString(nextCol)+" "),""); + i--; } else if (finalS.charAt(i)=='\n') { xOffset+=(charCount+1)*f.getGlyphWidth(); diff --git a/src/sig/engine/PaletteColor.java b/src/sig/engine/PaletteColor.java index 6e85826..46a1e32 100644 --- a/src/sig/engine/PaletteColor.java +++ b/src/sig/engine/PaletteColor.java @@ -37,7 +37,7 @@ public enum PaletteColor { @Override public String toString() { - return "\u001a"+ordinal()+" "; + return Character.valueOf((char)26)+Integer.toString(ordinal())+" "; } diff --git a/src/sig/objects/EditorRenderer.java b/src/sig/objects/EditorRenderer.java index febe66d..809b6c1 100644 --- a/src/sig/objects/EditorRenderer.java +++ b/src/sig/objects/EditorRenderer.java @@ -152,8 +152,8 @@ public class EditorRenderer extends LevelRenderer{ double tileY = y*Tile.TILE_HEIGHT-this.getY(); DrawTransparentTile(tileX,tileY,selectedTile,Alpha.ALPHA160); Draw_Text(tileX+2,tileY-Font.PROFONT_12.getGlyphHeight()-2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12); - Draw_Text(tileX+2,tileY+2,new StringBuilder("View: ").append(PaletteColor.EMERALD).append(RabiClone.CURRENT_MAP.getView(x,y).ordinal()),Font.PROFONT_12); - Draw_Text(tileX+2,tileY+Font.PROFONT_12.getGlyphHeight()+2,new StringBuilder("Type: ").append(PaletteColor.MIDNIGHT_BLUE).append(RabiClone.CURRENT_MAP.getType(x,y).ordinal()),Font.PROFONT_12); + Draw_Text(tileX+2,tileY+2,new StringBuilder("View:").append(PaletteColor.EMERALD).append(RabiClone.CURRENT_MAP.getView(x,y).ordinal()),Font.PROFONT_12); + Draw_Text(tileX+2,tileY+Font.PROFONT_12.getGlyphHeight()+2,new StringBuilder("Type:").append(PaletteColor.MIDNIGHT_BLUE).append(RabiClone.CURRENT_MAP.getType(x,y).ordinal()),Font.PROFONT_12); Draw_Text_Ext(tileX+2,tileY+Tile.TILE_HEIGHT+2,new StringBuilder(RabiClone.CURRENT_MAP.getTile(x,y).toString()),Font.PROFONT_12,Alpha.ALPHA0,PaletteColor.CRIMSON); } }