Skip to content

Commit 3e77ba2

Browse files
committed
Merge branch '0.7'
Conflicts: .hgignore src/tiled/mapeditor/MapEditor.java src/tiled/view/IsoMapView.java
2 parents 6535b2e + 38dc196 commit 3e77ba2

14 files changed

+2694
-2553
lines changed

.hgignore

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
syntax: glob
2-
*.class
3-
*.jar
4-
build/*
5-
intellij/*
1+
syntax: glob
2+
*.class
3+
*.jar
4+
build/*
5+
docs/*
6+
intellij/*
7+
docs/api/*
8+
releases/*.zip
69
\.orig\..*$
710
\.orig$
811
\.chg\..*$
912
\.rej$
1013
\.conflict\~$
11-
docs/api/*

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
0.7.2 - November 30th, 2008
2+
13
* Added support for associating an image with a map object
24
* Fixed not being able to move an object group
5+
* Fixed unable to select small map objects
6+
* Fixed references to external tilesets that are not in the same directory
7+
* Fixed some files missing from tiled-core.jar
8+
* Updated The Mana World plugin to detect the collision layer correctly
9+
* Updated minimum Java version to 1.5
310

411
0.7.1 - September 2nd, 2008
512

TODO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ROADMAP TO FUTURE RELEASES
22

3-
0.7.2
3+
0.7.3
44
* Check that tile palette panel doesn't keep listening after being replaced
55
* Update translations for dialog.saveas.confirm.mismatch
66
* Make continuous layout and tiles per row behaviour configurable

plugins/json/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<target name="dist" description="Generate the JSON writer plugin">
1111
<!-- Create the build directory structure used by compile -->
1212
<mkdir dir="${build}"/>
13-
<javac source="1.4" target="1.4" srcdir="${src}" destdir="${build}" classpath="${dist}/tiled.jar"/>
13+
<javac source="1.5" target="1.5" srcdir="${src}" destdir="${build}" classpath="${dist}/tiled.jar"/>
1414
<jar
1515
jarfile="${dist}/plugins/json.jar"
1616
manifest="MANIFEST.MF"

plugins/json/src/org/json/CookieList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static JSONObject toJSONObject(String string)
5151
*/
5252
public static String toString(JSONObject o) {
5353
boolean b = false;
54-
Iterator keys = o.keys();
54+
Iterator<String> keys = o.keys();
5555
String s;
5656
StringBuffer sb = new StringBuffer();
5757
while (keys.hasNext()) {

plugins/json/src/org/json/HTTP.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static JSONObject toJSONObject(String string) throws ParseException {
107107
* information.
108108
*/
109109
public static String toString(JSONObject o) throws NoSuchElementException {
110-
Iterator keys = o.keys();
110+
Iterator<String> keys = o.keys();
111111
String s;
112112
StringBuffer sb = new StringBuffer();
113113
if (o.has("Status-Code") && o.has("Reason-Phrase")) {

plugins/json/src/org/json/JSONArray.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ public class JSONArray {
4747
/**
4848
* The getArrayList where the JSONArray's properties are kept.
4949
*/
50-
private ArrayList myArrayList;
50+
private ArrayList<Object> myArrayList;
5151

5252

5353
/**
5454
* Construct an empty JSONArray.
5555
*/
5656
public JSONArray() {
57-
myArrayList = new ArrayList();
57+
myArrayList = new ArrayList<Object>();
5858
}
5959

6060

@@ -113,8 +113,8 @@ public JSONArray(String string) throws ParseException {
113113
* Construct a JSONArray from a Collection.
114114
* @param collection A Collection.
115115
*/
116-
public JSONArray(Collection collection) {
117-
myArrayList = new ArrayList(collection);
116+
public JSONArray(Collection<Object> collection) {
117+
myArrayList = new ArrayList<Object>(collection);
118118
}
119119

120120

@@ -139,7 +139,7 @@ public Object get(int index) throws NoSuchElementException {
139139
* Get the ArrayList which is holding the elements of the JSONArray.
140140
* @return The ArrayList.
141141
*/
142-
ArrayList getArrayList() {
142+
ArrayList<Object> getArrayList() {
143143
return myArrayList;
144144
}
145145

plugins/json/src/org/json/JSONObject.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public String toString() {
9292
/**
9393
* The hash map where the JSONObject's properties are kept.
9494
*/
95-
private HashMap myHashMap;
95+
private HashMap<String, Object> myHashMap;
9696

9797
/**
9898
* It is sometimes more convenient and less ambiguous to have a NULL
@@ -106,7 +106,7 @@ public String toString() {
106106
* Construct an empty JSONObject.
107107
*/
108108
public JSONObject() {
109-
myHashMap = new HashMap();
109+
myHashMap = new HashMap<String, Object>();
110110
}
111111

112112

@@ -175,8 +175,8 @@ public JSONObject(String string) throws ParseException {
175175
* @param map A map object that can be used to initialize the contents of
176176
* the JSONObject.
177177
*/
178-
public JSONObject(Map map) {
179-
myHashMap = new HashMap(map);
178+
public JSONObject(Map<String, Object> map) {
179+
myHashMap = new HashMap<String, Object>(map);
180180
}
181181

182182

@@ -278,7 +278,7 @@ public double getDouble(String key)
278278
* Get the HashMap the holds that contents of the JSONObject.
279279
* @return The getHashMap.
280280
*/
281-
HashMap getHashMap() {
281+
HashMap<String, Object> getHashMap() {
282282
return myHashMap;
283283
}
284284

@@ -373,7 +373,7 @@ public boolean isNull(String key) {
373373
*
374374
* @return An iterator of the keys.
375375
*/
376-
public Iterator keys() {
376+
public Iterator<String> keys() {
377377
return myHashMap.keySet().iterator();
378378
}
379379

@@ -396,7 +396,7 @@ public int length() {
396396
*/
397397
public JSONArray names() {
398398
JSONArray ja = new JSONArray();
399-
Iterator keys = keys();
399+
Iterator<String> keys = keys();
400400
while (keys.hasNext()) {
401401
ja.put(keys.next());
402402
}
@@ -805,7 +805,7 @@ public JSONArray toJSONArray(JSONArray names) {
805805
* with <code>}</code>&nbsp;<small>(right brace)</small>.
806806
*/
807807
public String toString() {
808-
Iterator keys = keys();
808+
Iterator<String> keys = keys();
809809
Object o = null;
810810
String s;
811811
StringBuffer sb = new StringBuffer();
@@ -864,7 +864,7 @@ public String toString(int indentFactor) {
864864
*/
865865
String toString(int indentFactor, int indent) {
866866
int i;
867-
Iterator keys = keys();
867+
Iterator<String> keys = keys();
868868
String pad = "";
869869
StringBuffer sb = new StringBuffer();
870870
indent += indentFactor;

plugins/json/src/org/json/XML.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public static String toString(Object o, String tagName) {
266266
JSONArray ja;
267267
JSONObject jo;
268268
String k;
269-
Iterator keys;
269+
Iterator<String> keys;
270270
int len;
271271
String s;
272272
Object v;

plugins/json/src/org/json/XMLTokener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public class XMLTokener extends JSONTokener
1616
/** The table of entity values. It initially contains Character values for
1717
* amp, apos, gt, lt, quot.
1818
*/
19-
private static final HashMap entity;
19+
private static final HashMap<String, Character> entity;
2020

2121
static {
22-
entity = new HashMap(8);
22+
entity = new HashMap<String, Character>(8);
2323
entity.put("amp", XML.AMP);
2424
entity.put("apos", XML.APOS);
2525
entity.put("gt", XML.GT);

src/tiled/io/xml/XMLMapTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ private Map unmarshal(InputStream in) throws Exception {
817817
builder.setEntityResolver(entityResolver);
818818
InputSource insrc = new InputSource(in);
819819
insrc.setSystemId(xmlPath);
820-
insrc.setEncoding("UTF8");
820+
insrc.setEncoding("UTF-8");
821821
doc = builder.parse(insrc);
822822
} catch (SAXException e) {
823823
e.printStackTrace();

src/tiled/io/xml/XMLMapWriter.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.awt.Image;
1717
import java.awt.Rectangle;
1818
import java.io.*;
19+
import java.nio.charset.Charset;
1920
import java.util.*;
2021
import java.util.prefs.Preferences;
2122
import java.util.zip.GZIPOutputStream;
@@ -58,7 +59,7 @@ public void writeMap(Map map, String filename) throws Exception {
5859
os = new GZIPOutputStream(os);
5960
}
6061

61-
Writer writer = new OutputStreamWriter(os);
62+
Writer writer = new OutputStreamWriter(os, Charset.forName("UTF-8"));
6263
XMLWriter xmlWriter = new XMLWriter(writer);
6364

6465
xmlWriter.startDocument();
@@ -81,7 +82,7 @@ public void writeMap(Map map, String filename) throws Exception {
8182
*/
8283
public void writeTileset(TileSet set, String filename) throws Exception {
8384
OutputStream os = new FileOutputStream(filename);
84-
Writer writer = new OutputStreamWriter(os);
85+
Writer writer = new OutputStreamWriter(os, Charset.forName("UTF-8"));
8586
XMLWriter xmlWriter = new XMLWriter(writer);
8687

8788
xmlWriter.startDocument();
@@ -93,7 +94,7 @@ public void writeTileset(TileSet set, String filename) throws Exception {
9394

9495

9596
public void writeMap(Map map, OutputStream out) throws Exception {
96-
Writer writer = new OutputStreamWriter(out);
97+
Writer writer = new OutputStreamWriter(out,Charset.forName("UTF-8"));
9798
XMLWriter xmlWriter = new XMLWriter(writer);
9899

99100
xmlWriter.startDocument();
@@ -104,7 +105,7 @@ public void writeMap(Map map, OutputStream out) throws Exception {
104105
}
105106

106107
public void writeTileset(TileSet set, OutputStream out) throws Exception {
107-
Writer writer = new OutputStreamWriter(out);
108+
Writer writer = new OutputStreamWriter(out, Charset.forName("UTF-8"));
108109
XMLWriter xmlWriter = new XMLWriter(writer);
109110

110111
xmlWriter.startDocument();
@@ -164,7 +165,7 @@ private static void writeProperties(Properties props, XMLWriter w) throws
164165
IOException
165166
{
166167
if (!props.isEmpty()) {
167-
final SortedSet propertyKeys = new TreeSet();
168+
final SortedSet<Object> propertyKeys = new TreeSet<Object>();
168169
propertyKeys.addAll(props.keySet());
169170
w.startElement("properties");
170171
for (Object propertyKey : propertyKeys) {
@@ -259,13 +260,12 @@ private void writeTileset(TileSet set, XMLWriter w, String wp)
259260
String name = set.getName();
260261

261262
w.startElement("tileset");
263+
w.writeAttribute("firstgid", set.getFirstGid());
262264

263265
if (name != null) {
264266
w.writeAttribute("name", name);
265267
}
266268

267-
w.writeAttribute("firstgid", set.getFirstGid());
268-
269269
if (tilebmpFile != null) {
270270
w.writeAttribute("tilewidth", set.getTileWidth());
271271
w.writeAttribute("tileheight", set.getTileHeight());
@@ -296,7 +296,7 @@ private void writeTileset(TileSet set, XMLWriter w, String wp)
296296
w.endElement();
297297

298298
// Write tile properties when necessary.
299-
Iterator tileIterator = set.iterator();
299+
Iterator<Object> tileIterator = set.iterator();
300300

301301
while (tileIterator.hasNext()) {
302302
Tile tile = (Tile) tileIterator.next();
@@ -345,7 +345,7 @@ private void writeTileset(TileSet set, XMLWriter w, String wp)
345345
}
346346

347347
// Check to see if there is a need to write tile elements
348-
Iterator tileIterator = set.iterator();
348+
Iterator<Object> tileIterator = set.iterator();
349349
boolean needWrite = !set.isOneForOne();
350350

351351
if (!tileSetImages) {

0 commit comments

Comments
 (0)