v0.3.1: improved brightness controls, no longer cause color distortion. Also slightly tweaked fog coloration.

This commit is contained in:
Evan Debenham
2015-06-28 18:44:00 -04:00
committed by Evan Debenham
parent 788937fbc1
commit d51a8b6182
2 changed files with 13 additions and 12 deletions
@@ -33,7 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
public class FogOfWar extends Image {
private static final int VISIBLE = 0x00000000;
private static final int VISITED = 0xcc111111;
private static final int VISITED = 0xcc000000;
private static final int MAPPED = 0xcc442211;
private static final int INVISIBLE = 0xFF000000;
@@ -199,6 +199,7 @@ public class GameScene extends PixelScene {
add( emitters );
add( effects );
add( emoicons );
gases = new Group();
add( gases );
@@ -220,14 +221,11 @@ public class GameScene extends PixelScene {
statuses = new Group();
add( statuses );
add( emoicons );
hero = new HeroSprite();
hero.place( Dungeon.hero.pos );
hero.updateArmor();
mobs.add( hero );
add( new HealthIndicator() );
add( cellSelector = new CellSelector( tiles ) );
@@ -438,11 +436,14 @@ public class GameScene extends PixelScene {
}
public void brightness( int value ) {
water.rm = water.gm = water.bm =
tiles.rm = tiles.gm = tiles.bm =
1.0f + (value/4f);
fog.am = 1f + (value/2f);
fog.aa = 0f - (value/2f);
float shift;
if (value >= 0)
shift = value/2f;
else
shift = value/3f;
fog.am = 1f + shift;
fog.aa = 0f - shift;
}
private void addHeapSprite( Heap heap ) {