Pixel Dungeon: Enable 1.7.1c (59); don't update to 1.7.2a (61).

This commit is contained in:
Boris Kraut 2014-10-18 10:00:49 +02:00
parent 36bbc482db
commit 59fe98b809
3 changed files with 76 additions and 2 deletions

View file

@ -14,10 +14,20 @@ Traditional roguelike game with pixel-art graphics and simple interface.
Repo Type:git
Repo:https://github.com/watabou/pixel-dungeon
#force close on emulator, but works on bare metal
Build:1.7.1c,59
commit=33c27cdb587878f771e999103ba186f190f9446c
srclibs=PDClasses@4902d172b0fccede3acce833efe9b4d5d77b9c33
patch=types-171c.patch
prebuild=cp -R $$PDClasses$$/com/watabou/* src/com/watabou/ && \
echo -e 'java.source=1.7\njava.target=1.7\njava.encoding=ISO-8859-1' >> ant.properties
target=android-18
Build:1.7.2a,61
disable=inconvertible types errors - https://github.com/watabou/pixel-dungeon/pull/1
disable=doesn't compile
commit=3ce26c2541dcf9d1f01642289acb4495586b50b0
srclibs=PDClasses@9ee29184de9a569c2435929f4f0d435d4edd6f48
patch=types-172a.patch
prebuild=cp -R $$PDClasses$$/com/watabou/* src/com/watabou/ && \
echo -e 'java.source=1.7\njava.target=1.7\njava.encoding=ISO-8859-1' >> ant.properties
target=android-18
@ -26,4 +36,3 @@ Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.7.2a
Current Version Code:61

View file

@ -0,0 +1,39 @@
From cc0431581cf8b290357675b1c5964640c8850285 Mon Sep 17 00:00:00 2001
From: Lertsenem <lertsenem@yahoo.fr>
Date: Wed, 30 Jul 2014 00:12:43 +0200
Subject: [PATCH] Cast error in RegularLevel and Heap
The (Collection<? extends Item>) bundle.getCollection(ITEM) cast fails
at compile time because Item extends (well, implements) Bundlable, not
the opposite.
---
src/com/watabou/pixeldungeon/items/Heap.java | 2 +-
src/com/watabou/pixeldungeon/levels/RegularLevel.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/com/watabou/pixeldungeon/items/Heap.java b/src/com/watabou/pixeldungeon/items/Heap.java
index 59325bc..6f4fa6d 100644
--- a/src/com/watabou/pixeldungeon/items/Heap.java
+++ b/src/com/watabou/pixeldungeon/items/Heap.java
@@ -324,7 +324,7 @@ public void destroy() {
public void restoreFromBundle( Bundle bundle ) {
pos = bundle.getInt( POS );
type = Type.valueOf( bundle.getString( TYPE ) );
- items = new LinkedList<Item>( (Collection<? extends Item>) bundle.getCollection( ITEMS ) );
+ items = new LinkedList<Item>( (Collection<Item>) ((Collection<?>) bundle.getCollection( ITEMS )) );
}
@Override
diff --git a/src/com/watabou/pixeldungeon/levels/RegularLevel.java b/src/com/watabou/pixeldungeon/levels/RegularLevel.java
index 450dd8a..e7badb9 100644
--- a/src/com/watabou/pixeldungeon/levels/RegularLevel.java
+++ b/src/com/watabou/pixeldungeon/levels/RegularLevel.java
@@ -682,7 +682,7 @@ public void storeInBundle( Bundle bundle ) {
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
- rooms = new HashSet<Room>( (Collection<? extends Room>) bundle.getCollection( "rooms" ) );
+ rooms = new HashSet<Room>( (Collection<Room>) ((Collection<?>) bundle.getCollection( "rooms" )) );
for (Room r : rooms) {
if (r.type == Type.WEAK_FLOOR) {
weakFloorCreated = true;

View file

@ -0,0 +1,26 @@
diff --git a/src/com/watabou/pixeldungeon/items/Heap.java b/src/com/watabou/pixeldungeon/items/Heap.java
index 04feb32..3917572 100644
--- a/src/com/watabou/pixeldungeon/items/Heap.java
+++ b/src/com/watabou/pixeldungeon/items/Heap.java
@@ -325,7 +325,7 @@ public void destroy() {
public void restoreFromBundle( Bundle bundle ) {
pos = bundle.getInt( POS );
type = Type.valueOf( bundle.getString( TYPE ) );
- items = new LinkedList<Item>( (Collection<? extends Item>) bundle.getCollection( ITEMS ) );
+ items = new LinkedList<Item>( (Collection<Item>) ((Collection<?>) bundle.getCollection( ITEMS )) );
}
@Override
diff --git a/src/com/watabou/pixeldungeon/levels/RegularLevel.java b/src/com/watabou/pixeldungeon/levels/RegularLevel.java
index f2ed1f1..a61809b 100644
--- a/src/com/watabou/pixeldungeon/levels/RegularLevel.java
+++ b/src/com/watabou/pixeldungeon/levels/RegularLevel.java
@@ -684,7 +684,7 @@ public void storeInBundle( Bundle bundle ) {
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
- rooms = new HashSet<Room>( (Collection<? extends Room>) bundle.getCollection( "rooms" ) );
+ rooms = new HashSet<Room>( (Collection<Room>) ((Collection<?>) bundle.getCollection( "rooms" )) );
for (Room r : rooms) {
if (r.type == Type.WEAK_FLOOR) {
weakFloorCreated = true;