Fixed issue with apostrophes in the script data and changed script color allocation a little bit.

This commit is contained in:
Brendan Robert 2014-07-06 16:49:13 -05:00
parent 0950b9357e
commit 5b6f50553b
2 changed files with 3 additions and 2 deletions

View File

@ -107,6 +107,7 @@ public class MythosEditor {
JAXBElement<Block> root = new JAXBElement<>(qName, Block.class, script.getBlock());
context.createMarshaller().marshal(root, buffer);
String xml = buffer.toString();
xml = xml.replaceAll("'", "&apos;");
xml = xml.replace("?>", "?><xml>");
xml += "</xml>";
System.out.println("xml: " + xml);

View File

@ -41,7 +41,7 @@ public class TileMap extends ArrayList<ArrayList<Tile>> implements Serializable
loadFromMap(m);
}
public static final double SATURATION = 0.75;
public static final double SATURATION = 0.70;
public static final double VALUE = 1.0;
public static double HUE = 180;
private final java.util.Map<Integer, List<Script>> locationScripts = new HashMap<>();
@ -85,7 +85,7 @@ public class TileMap extends ArrayList<ArrayList<Tile>> implements Serializable
private void registerLocationScript(int x, int y, Script s) {
if (!scriptColors.containsKey(s)) {
scriptColors.put(s, Color.hsb(HUE, SATURATION, VALUE));
HUE = (HUE + 35) % 360;
HUE = (HUE + 27) % 360;
}
int loc = getMortonNumber(x, y);
List<Script> list = locationScripts.get(loc);