Prepare data placeholder "worldData".

This commit is contained in:
Oskar Wiksten
2013-08-31 19:28:09 +02:00
parent 9c78b6a2ec
commit d29218c7c3
4 changed files with 28 additions and 2 deletions

View File

@@ -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"
>

View File

@@ -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].*");

View File

@@ -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);
}
}

View 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 {
}
}