Source Release: standardized some things between open source and closed source.

This commit is contained in:
Evan Debenham 2015-03-02 19:36:09 -05:00
parent aa303d798b
commit 5325268220
13 changed files with 25 additions and 26 deletions

View File

@ -34,7 +34,7 @@ public class Assets {
public static final String XP_BAR = "exp_bar.png"; public static final String XP_BAR = "exp_bar.png";
public static final String TOOLBAR = "toolbar.png"; public static final String TOOLBAR = "toolbar.png";
public static final String SHADOW = "shadow.png"; public static final String SHADOW = "shadow.png";
public static final String WARRIOR = "warrior.png"; public static final String WARRIOR = "warrior.png";
public static final String MAGE = "mage.png"; public static final String MAGE = "mage.png";
public static final String ROGUE = "rogue.png"; public static final String ROGUE = "rogue.png";

View File

@ -186,5 +186,5 @@ public class Bones {
return null; return null;
} }
} }
} }
} }

View File

@ -100,7 +100,7 @@ public enum Rankings {
save(); save();
} }
private int score( boolean win ) { private int score( boolean win ) {
return (Statistics.goldCollected + Dungeon.hero.lvl * (win ? 26 : Dungeon.depth ) * 100) * (win ? 2 : 1); return (Statistics.goldCollected + Dungeon.hero.lvl * (win ? 26 : Dungeon.depth ) * 100) * (win ? 2 : 1);
} }
@ -161,7 +161,7 @@ public enum Rankings {
} }
} }
public static class Record implements Bundlable { public static class Record implements Bundlable {
private static final String REASON = "reason"; private static final String REASON = "reason";
@ -183,7 +183,7 @@ public enum Rankings {
public int score; public int score;
public String gameFile; public String gameFile;
@Override @Override
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {

View File

@ -146,7 +146,7 @@ public class ShatteredPixelDungeon extends Game {
PixelScene.noFade = true; PixelScene.noFade = true;
switchScene( c ); switchScene( c );
} }
/* /*
* ---> Prefernces * ---> Prefernces
*/ */
@ -261,7 +261,7 @@ public class ShatteredPixelDungeon extends Game {
public static boolean brightness() { public static boolean brightness() {
return Preferences.INSTANCE.getBoolean( Preferences.KEY_BRIGHTNESS, false ); return Preferences.INSTANCE.getBoolean( Preferences.KEY_BRIGHTNESS, false );
} }
public static void lastClass( int value ) { public static void lastClass( int value ) {
Preferences.INSTANCE.put( Preferences.KEY_LAST_CLASS, value ); Preferences.INSTANCE.put( Preferences.KEY_LAST_CLASS, value );
} }

View File

@ -215,7 +215,7 @@ public class Hero extends Char {
bundle.put( LEVEL, lvl ); bundle.put( LEVEL, lvl );
bundle.put( EXPERIENCE, exp ); bundle.put( EXPERIENCE, exp );
belongings.storeInBundle( bundle ); belongings.storeInBundle( bundle );
} }

View File

@ -171,7 +171,7 @@ public abstract class Level implements Bundlable {
private static final String MOBS = "mobs"; private static final String MOBS = "mobs";
private static final String BLOBS = "blobs"; private static final String BLOBS = "blobs";
private static final String FEELING = "feeling"; private static final String FEELING = "feeling";
public void create() { public void create() {
resizingNeeded = false; resizingNeeded = false;
@ -337,7 +337,7 @@ public abstract class Level implements Bundlable {
feeling = bundle.getEnum( FEELING, Feeling.class ); feeling = bundle.getEnum( FEELING, Feeling.class );
if (feeling == Feeling.DARK) if (feeling == Feeling.DARK)
viewDistance = (int)Math.ceil(viewDistance/3f); viewDistance = (int)Math.ceil(viewDistance/3f);
buildFlagMaps(); buildFlagMaps();
cleanWalls(); cleanWalls();
} }

View File

@ -201,7 +201,6 @@ public class StartScene extends PixelScene {
unlock = new Group(); unlock = new Group();
add( unlock ); add( unlock );
if (!(huntressUnlocked = Badges.isUnlocked( Badges.Badge.BOSS_SLAIN_3 ))) { if (!(huntressUnlocked = Badges.isUnlocked( Badges.Badge.BOSS_SLAIN_3 ))) {

View File

@ -47,15 +47,15 @@ public class ItemSpriteSheet {
public static final int BONES = ROW1+4; public static final int BONES = ROW1+4;
public static final int REMAINS = ROW1+5; public static final int REMAINS = ROW1+5;
public static final int TOMB = ROW1+6; public static final int TOMB = ROW1+6;
public static final int GRAVE = ROW1+7; public static final int GRAVE = ROW1+7;
public static final int CHEST = ROW1+8; public static final int CHEST = ROW1+8;
public static final int LOCKED_CHEST = ROW1+9; public static final int LOCKED_CHEST = ROW1+9;
public static final int CRYSTAL_CHEST = ROW1+10; public static final int CRYSTAL_CHEST = ROW1+10;
// Placeholders // Placeholders
public static final int WEAPON = ROW1+11; public static final int WEAPON = ROW1+11;
public static final int ARMOR = ROW1+12; public static final int ARMOR = ROW1+12;
public static final int RING = ROW1+13; public static final int RING = ROW1+13;
public static final int SMTH = ROW1+14; public static final int SMTH = ROW1+14;
//Row Two: Miscellaneous single use items //Row Two: Miscellaneous single use items
public static final int GOLD = ROW2+0; public static final int GOLD = ROW2+0;

View File

@ -27,7 +27,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
public class ExitButton extends Button { public class ExitButton extends Button {
private Image image; protected Image image;
public ExitButton() { public ExitButton() {
super(); super();

View File

@ -53,7 +53,7 @@ public enum Icons {
CHALLENGE_OFF, CHALLENGE_OFF,
CHALLENGE_ON, CHALLENGE_ON,
RESUME; RESUME;
public Image get() { public Image get() {
return get( this ); return get( this );
} }

View File

@ -123,7 +123,7 @@ public class WndGame extends Window {
hide(); hide();
} }
} ); } );
resize( WIDTH, pos ); resize( WIDTH, pos );
} }

View File

@ -45,7 +45,7 @@ public class WndItem extends Window {
titlebar.label( Utils.capitalize( item.toString() ) ); titlebar.label( Utils.capitalize( item.toString() ) );
titlebar.setRect( 0, 0, WIDTH, 0 ); titlebar.setRect( 0, 0, WIDTH, 0 );
add( titlebar ); add( titlebar );
if (item.levelKnown && item.level > 0) { if (item.levelKnown && item.level > 0) {
titlebar.color( ItemSlot.UPGRADED ); titlebar.color( ItemSlot.UPGRADED );
} else if (item.levelKnown && item.level < 0) { } else if (item.levelKnown && item.level < 0) {

View File

@ -78,7 +78,7 @@ public class WndRanking extends WndTabbed {
} }
}; };
thread.start(); thread.start();
busy = Icons.BUSY.get(); busy = Icons.BUSY.get();
busy.origin.set( busy.width / 2, busy.height / 2 ); busy.origin.set( busy.width / 2, busy.height / 2 );
busy.angularSpeed = 720; busy.angularSpeed = 720;
@ -102,7 +102,7 @@ public class WndRanking extends WndTabbed {
} }
} }
} }
private void createControls() { private void createControls() {
String[] labels = String[] labels =