mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Prepare data placeholder "worldData".
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gpl.rpg.AndorsTrail"
|
||||
android:versionCode="39"
|
||||
android:versionCode="40"
|
||||
android:versionName="0.7.1dev"
|
||||
android:installLocation="auto"
|
||||
>
|
||||
|
||||
@@ -17,7 +17,7 @@ public final class AndorsTrailApplication extends Application {
|
||||
public static final boolean DEVELOPMENT_VALIDATEDATA = true;
|
||||
public static final boolean DEVELOPMENT_DEBUGMESSAGES = true;
|
||||
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || true;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 39;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? 999 : 40;
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.7.1dev";
|
||||
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ public final class ModelContainer {
|
||||
public final InterfaceData uiSelections;
|
||||
public final CombatLog combatLog = new CombatLog();
|
||||
public final GameStatistics statistics;
|
||||
public final WorldData worldData;
|
||||
public PredefinedMap currentMap;
|
||||
public LayeredTileMap currentTileMap;
|
||||
|
||||
@@ -23,6 +24,7 @@ public final class ModelContainer {
|
||||
player = new Player();
|
||||
uiSelections = new InterfaceData();
|
||||
statistics = new GameStatistics();
|
||||
worldData = new WorldData();
|
||||
}
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
@@ -36,6 +38,11 @@ public final class ModelContainer {
|
||||
}
|
||||
this.statistics = new GameStatistics(src, world, fileversion);
|
||||
this.currentTileMap = null;
|
||||
if (fileversion >= 40) {
|
||||
this.worldData = new WorldData(src, fileversion);
|
||||
} else {
|
||||
this.worldData = new WorldData();
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToParcel(DataOutputStream dest, int flags) throws IOException {
|
||||
@@ -43,5 +50,6 @@ public final class ModelContainer {
|
||||
dest.writeUTF(currentMap.name);
|
||||
uiSelections.writeToParcel(dest, flags);
|
||||
statistics.writeToParcel(dest, flags);
|
||||
worldData.writeToParcel(dest, flags);
|
||||
}
|
||||
}
|
||||
|
||||
18
AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/WorldData.java
Normal file
18
AndorsTrail/src/com/gpl/rpg/AndorsTrail/model/WorldData.java
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.gpl.rpg.AndorsTrail.model;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public final class WorldData {
|
||||
|
||||
public WorldData() {}
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
|
||||
public WorldData(DataInputStream src, int fileversion) throws IOException {
|
||||
}
|
||||
|
||||
public void writeToParcel(DataOutputStream dest, int flags) throws IOException {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user