v0.4.1: massively improved the efficiency of rankings storage

This commit is contained in:
Evan Debenham
2016-06-28 01:38:29 -04:00
parent 97f354c342
commit 68ea4dd6c1
9 changed files with 161 additions and 38 deletions
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Rankings;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@@ -54,8 +55,8 @@ public class WndRanking extends WndTabbed {
private String error = null;
private Image busy;
public WndRanking( final String gameFile ) {
public WndRanking( final Rankings.Record rec ) {
super();
resize( WIDTH, HEIGHT );
@@ -65,8 +66,8 @@ public class WndRanking extends WndTabbed {
public void run() {
try {
Badges.loadGlobal();
Dungeon.loadGame( gameFile );
} catch (Exception e ) {
Rankings.INSTANCE.loadGameData( rec );
} catch ( Exception e ) {
error = Messages.get(WndRanking.class, "error");
}
}