Skip to content

Commit

Permalink
Revert unintentionally pushed change to the file extension.
Browse files Browse the repository at this point in the history
Add a version to the GameFile xml.
  • Loading branch information
Gurkenlabs committed Feb 27, 2018
1 parent 1ff57a7 commit f0a4875
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/de/gurkenlabs/litiengine/GameFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
Expand All @@ -36,10 +37,14 @@
@XmlRootElement(name = "game")
public class GameFile implements Serializable {
private static final Logger log = Logger.getLogger(GameFile.class.getName());
public static final String FILE_EXTENSION = "ltx";
public static final String FILE_EXTENSION = "env";
public static final float CURRENT_VERSION = 1.0f;

private static final long serialVersionUID = -2101786184799276518L;

@XmlAttribute(name = "version")
private float version;

@XmlElementWrapper(name = "maps")
@XmlElement(name = "map")
private List<Map> maps;
Expand Down Expand Up @@ -199,5 +204,9 @@ void beforeMarshal(Marshaller m) {
}

this.tilesets = distinctTilesets;

if (this.version == 0) {
this.version = CURRENT_VERSION;
}
}
}

0 comments on commit f0a4875

Please sign in to comment.