DEADSOFTWARE

Some refactor
[cavedroid.git] / core / src / ru / deadsoftware / cavecraft / game / GameSaver.java
index a4e314b465273705b1cc404d44918080ef0b7f26..c4e13a640a737ec58b8bf1a1a9bb6c425a42c2c5 100644 (file)
@@ -87,17 +87,17 @@ public class GameSaver {
         return gameProc;
     }
 
-    public static void save(GameProc gameProc) {
+    public static void save(GameProc gp) {
         FileHandle file = Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/");
         file.mkdirs();
         file = Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/game.sav");
         try {
             ObjectOutputStream out = new ObjectOutputStream(file.write(false));
             out.writeInt(VERSION);
-            out.writeObject(gameProc);
+            out.writeObject(gp);
             out.close();
-            saveMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/foremap.sav"), gameProc.world.getFullForeMap());
-            saveMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/backmap.sav"), gameProc.world.getFullBackMap());
+            saveMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/foremap.sav"), gp.world.getFullForeMap());
+            saveMap(Gdx.files.absolute(CaveGame.GAME_FOLDER + "/saves/backmap.sav"), gp.world.getFullBackMap());
         } catch (Exception e) {
             e.printStackTrace();
         }