Merging Source v1.7.2: effects changes
This commit is contained in:
@@ -208,6 +208,9 @@ public class BadgeBanner extends Image {
|
|||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
p.offset( 5, 5 );
|
p.offset( 5, 5 );
|
||||||
|
break;
|
||||||
|
case 39:
|
||||||
|
p.offset( 5, 4 );
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
case 41:
|
case 41:
|
||||||
|
|||||||
@@ -22,25 +22,29 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||||||
|
|
||||||
public class BannerSprites {
|
public class BannerSprites {
|
||||||
|
|
||||||
public enum Type {
|
public enum Type {
|
||||||
PIXEL_DUNGEON,
|
PIXEL_DUNGEON,
|
||||||
BOSS_SLAIN,
|
BOSS_SLAIN,
|
||||||
GAME_OVER
|
GAME_OVER,
|
||||||
};
|
SELECT_YOUR_HERO
|
||||||
|
};
|
||||||
public static Image get( Type type ) {
|
|
||||||
Image icon = new Image( Assets.BANNERS );
|
public static Image get( Type type ) {
|
||||||
switch (type) {
|
Image icon = new Image( Assets.BANNERS );
|
||||||
case PIXEL_DUNGEON:
|
switch (type) {
|
||||||
icon.frame( icon.texture.uvRect( 0, 0, 128, 70 ) );
|
case PIXEL_DUNGEON:
|
||||||
break;
|
icon.frame( icon.texture.uvRect( 0, 0, 128, 70 ) );
|
||||||
case BOSS_SLAIN:
|
break;
|
||||||
icon.frame( icon.texture.uvRect( 0, 70, 128, 105 ) );
|
case BOSS_SLAIN:
|
||||||
break;
|
icon.frame( icon.texture.uvRect( 0, 70, 128, 105 ) );
|
||||||
case GAME_OVER:
|
break;
|
||||||
icon.frame( icon.texture.uvRect( 0, 105, 128, 140 ) );
|
case GAME_OVER:
|
||||||
break;
|
icon.frame( icon.texture.uvRect( 0, 105, 128, 140 ) );
|
||||||
}
|
break;
|
||||||
return icon;
|
case SELECT_YOUR_HERO:
|
||||||
}
|
icon.frame( icon.texture.uvRect( 0, 140, 128, 161 ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return icon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ public class Flare extends Visual {
|
|||||||
public Flare( int nRays, float radius ) {
|
public Flare( int nRays, float radius ) {
|
||||||
|
|
||||||
super( 0, 0, 0, 0 );
|
super( 0, 0, 0, 0 );
|
||||||
|
|
||||||
|
// FIXME
|
||||||
// Texture is incorrectly created every time we need
|
// Texture is incorrectly created every time we need
|
||||||
// to show the effect, it must be refactored
|
// to show the effect, it must be refactored
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class Speck extends Image {
|
|||||||
public static final int DUST = 109;
|
public static final int DUST = 109;
|
||||||
public static final int STENCH = 110;
|
public static final int STENCH = 110;
|
||||||
public static final int FORGE = 111;
|
public static final int FORGE = 111;
|
||||||
|
public static final int CONFUSION = 112;
|
||||||
|
|
||||||
private static final int SIZE = 7;
|
private static final int SIZE = 7;
|
||||||
|
|
||||||
@@ -100,8 +101,9 @@ public class Speck extends Image {
|
|||||||
case JET:
|
case JET:
|
||||||
case TOXIC:
|
case TOXIC:
|
||||||
case PARALYSIS:
|
case PARALYSIS:
|
||||||
case DUST:
|
|
||||||
case STENCH:
|
case STENCH:
|
||||||
|
case CONFUSION:
|
||||||
|
case DUST:
|
||||||
frame( film.get( STEAM ) );
|
frame( film.get( STEAM ) );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -274,13 +276,6 @@ public class Speck extends Image {
|
|||||||
angle = Random.Float( 360 );
|
angle = Random.Float( 360 );
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float( 1f, 3f );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DUST:
|
|
||||||
hardlight( 0xFFFF66 );
|
|
||||||
angle = Random.Float( 360 );
|
|
||||||
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 16, 48 ) );
|
|
||||||
lifespan = 0.5f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STENCH:
|
case STENCH:
|
||||||
hardlight( 0x003300 );
|
hardlight( 0x003300 );
|
||||||
@@ -288,8 +283,22 @@ public class Speck extends Image {
|
|||||||
angle = Random.Float( 360 );
|
angle = Random.Float( 360 );
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float( 1f, 3f );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COIN:
|
case CONFUSION:
|
||||||
|
hardlight( Random.Int( 0x1000000 ) | 0x000080 );
|
||||||
|
angularSpeed = Random.Float( -20, +20 );
|
||||||
|
angle = Random.Float( 360 );
|
||||||
|
lifespan = Random.Float( 1f, 3f );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DUST:
|
||||||
|
hardlight( 0xFFFF66 );
|
||||||
|
angle = Random.Float( 360 );
|
||||||
|
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 16, 48 ) );
|
||||||
|
lifespan = 0.5f;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case COIN:
|
||||||
speed.polar( -PointF.PI * Random.Float( 0.3f, 0.7f ), Random.Float( 48, 96 ) );
|
speed.polar( -PointF.PI * Random.Float( 0.3f, 0.7f ), Random.Float( 48, 96 ) );
|
||||||
acc.y = 256;
|
acc.y = 256;
|
||||||
lifespan = -speed.y / acc.y * 2;
|
lifespan = -speed.y / acc.y * 2;
|
||||||
@@ -389,6 +398,7 @@ public class Speck extends Image {
|
|||||||
case STEAM:
|
case STEAM:
|
||||||
case TOXIC:
|
case TOXIC:
|
||||||
case PARALYSIS:
|
case PARALYSIS:
|
||||||
|
case CONFUSION:
|
||||||
case DUST:
|
case DUST:
|
||||||
am = p < 0.5f ? p : 1 - p;
|
am = p < 0.5f ? p : 1 - p;
|
||||||
scale.set( 1 + p * 2 );
|
scale.set( 1 + p * 2 );
|
||||||
@@ -412,22 +422,30 @@ public class Speck extends Image {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type ) {
|
public static Emitter.Factory factory( final int type ) {
|
||||||
|
return factory( type, false );
|
||||||
Emitter.Factory factory = factories.get( type );
|
}
|
||||||
|
|
||||||
if (factory == null) {
|
public static Emitter.Factory factory( final int type, final boolean lightMode ) {
|
||||||
factory = new Emitter.Factory() {
|
|
||||||
@Override
|
Emitter.Factory factory = factories.get( type );
|
||||||
public void emit ( Emitter emitter, int index, float x, float y ) {
|
|
||||||
Speck p = (Speck)emitter.recycle( Speck.class );
|
if (factory == null) {
|
||||||
p.reset( index, x, y, type );
|
factory = new Emitter.Factory() {
|
||||||
}
|
@Override
|
||||||
};
|
public void emit ( Emitter emitter, int index, float x, float y ) {
|
||||||
factories.put( type, factory );
|
Speck p = (Speck)emitter.recycle( Speck.class );
|
||||||
}
|
p.reset( index, x, y, type );
|
||||||
|
}
|
||||||
return factory;
|
@Override
|
||||||
}
|
public boolean lightMode() {
|
||||||
|
return lightMode;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
factories.put( type, factory );
|
||||||
|
}
|
||||||
|
|
||||||
|
return factory;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user