public class SaveEngine
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SAVES_PATH |
Modifier and Type | Method and Description |
---|---|
static SavedGame |
load(java.lang.String saveName,
org.newdawn.slick.GameContainer gc)
Loads save with specified name from savegames catalog
|
static boolean |
loadModuleFrom(java.lang.String saveName)
Loads module and active chapter from save with specified name
|
static void |
save(Character player,
GameWorld world,
UserInterface ui,
java.lang.String saveName)
Collects save data from player and game world and UI then saves it to file in savegames catalog
|
public static void save(Character player, GameWorld world, UserInterface ui, java.lang.String saveName) throws javax.xml.parsers.ParserConfigurationException, javax.xml.transform.TransformerException
player
- Player character to saveworld
- Game world to saveui
- UI to savesaveName
- Name for save game filejavax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerException
public static SavedGame load(java.lang.String saveName, org.newdawn.slick.GameContainer gc) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException, java.awt.FontFormatException, org.newdawn.slick.SlickException
saveName
- Save game file namegc
- Slick game containerjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.awt.FontFormatException
org.newdawn.slick.SlickException
public static boolean loadModuleFrom(java.lang.String saveName) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
saveName
- Save file name without .ssg extensionjavax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException