diff --git a/SPD-classes/src/main/java/com/watabou/noosa/Camera.java b/SPD-classes/src/main/java/com/watabou/noosa/Camera.java index 2073fcc6c..7cd3b6ffb 100644 --- a/SPD-classes/src/main/java/com/watabou/noosa/Camera.java +++ b/SPD-classes/src/main/java/com/watabou/noosa/Camera.java @@ -91,7 +91,9 @@ public class Camera extends Gizmo { } public static synchronized void updateAll() { - for (Camera c : all) { + int length = all.size(); + for (int i=0; i < length; i++) { + Camera c = all.get( i ); if (c.exists && c.active) { c.update(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java index 0a2fec83b..1963d967b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java @@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline; import com.watabou.glwrap.Blending; -import com.watabou.glwrap.Texture; import com.watabou.input.Touchscreen; import com.watabou.noosa.BitmapText; import com.watabou.noosa.BitmapText.Font; @@ -112,8 +111,11 @@ public class PixelScene extends Scene { pixelFont.baseLine = 6; pixelFont.tracking = -1; + //Fonts disabled to save memory (~1mb of texture data just sitting there unused) + //uncomment if you wish to enable these again. + // 9x15 (18) - font1x = Font.colorMarked( + /*font1x = Font.colorMarked( BitmapCache.get( Assets.FONT1X), 22, 0x00000000, BitmapText.Font.LATIN_FULL ); font1x.baseLine = 17; font1x.tracking = -2; @@ -124,7 +126,7 @@ public class PixelScene extends Scene { BitmapCache.get( Assets.FONT2X), 44, 0x00000000, BitmapText.Font.LATIN_FULL ); font2x.baseLine = 38; font2x.tracking = -4; - font2x.texture.filter(Texture.LINEAR, Texture.NEAREST); + font2x.texture.filter(Texture.LINEAR, Texture.NEAREST);*/ } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index 7e3bf541b..bca43c03b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -169,6 +169,8 @@ public class StatusPane extends Component { btnMenu.setPos( width - btnMenu.width(), 1 ); } + + private static final int[] warningColors = new int[]{0x660000, 0xCC0000, 0x660000}; @Override public void update() { @@ -183,7 +185,7 @@ public class StatusPane extends Component { } else if ((health/max) < 0.3f) { warning += Game.elapsed * 5f *(0.4f - (health/max)); warning %= 1f; - avatar.tint(ColorMath.interpolate(warning, 0x660000, 0xCC0000, 0x660000), 0.5f ); + avatar.tint(ColorMath.interpolate(warning, warningColors), 0.5f ); } else { avatar.resetColor(); }