Quick fix: lighting images weren't being reloaded properly.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
873d913424
commit
131c8a5637
|
@ -207,11 +207,6 @@ public class GameScore {
|
||||||
*/
|
*/
|
||||||
private Image[] gradesLarge, gradesSmall;
|
private Image[] gradesLarge, gradesSmall;
|
||||||
|
|
||||||
/**
|
|
||||||
* Lighting effects, displayed behind hit object results (optional).
|
|
||||||
*/
|
|
||||||
private Image lighting, lighting1;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container dimensions.
|
* Container dimensions.
|
||||||
*/
|
*/
|
||||||
|
@ -284,33 +279,6 @@ public class GameScore {
|
||||||
}
|
}
|
||||||
comboBurstImages = comboBurst.toArray(new Image[comboBurst.size()]);
|
comboBurstImages = comboBurst.toArray(new Image[comboBurst.size()]);
|
||||||
|
|
||||||
// lighting image
|
|
||||||
if (lighting != null && !lighting.isDestroyed()) {
|
|
||||||
lighting.destroy();
|
|
||||||
lighting = null;
|
|
||||||
}
|
|
||||||
if (lighting1 != null && !lighting1.isDestroyed()) {
|
|
||||||
lighting1.destroy();
|
|
||||||
lighting1 = null;
|
|
||||||
}
|
|
||||||
File lightingFile = new File(dir, "lighting.png");
|
|
||||||
File lighting1File = new File(dir, "lighting1.png");
|
|
||||||
if (lightingFile.isFile()) { // beatmap provides images
|
|
||||||
try {
|
|
||||||
lighting = new Image(lightingFile.getAbsolutePath());
|
|
||||||
lighting1 = new Image(lighting1File.getAbsolutePath());
|
|
||||||
} catch (Exception e) {
|
|
||||||
// optional
|
|
||||||
}
|
|
||||||
} else { // load default image
|
|
||||||
try {
|
|
||||||
lighting = GameImage.LIGHTING.getImage();
|
|
||||||
lighting1 = GameImage.LIGHTING1.getImage();
|
|
||||||
} catch (Exception e) {
|
|
||||||
// optional
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// default symbol images
|
// default symbol images
|
||||||
defaultSymbols = new Image[10];
|
defaultSymbols = new Image[10];
|
||||||
defaultSymbols[0] = GameImage.DEFAULT_0.getImage();
|
defaultSymbols[0] = GameImage.DEFAULT_0.getImage();
|
||||||
|
@ -652,19 +620,15 @@ public class GameScore {
|
||||||
hitResults[hitResult.result].drawCentered(hitResult.x, hitResult.y);
|
hitResults[hitResult.result].drawCentered(hitResult.x, hitResult.y);
|
||||||
|
|
||||||
// hit lighting
|
// hit lighting
|
||||||
if (Options.isHitLightingEnabled() && lighting != null &&
|
if (Options.isHitLightingEnabled() && hitResult.result != HIT_MISS &&
|
||||||
hitResult.result != HIT_MISS && hitResult.result != HIT_SLIDER30 && hitResult.result != HIT_SLIDER10) {
|
hitResult.result != HIT_SLIDER30 && hitResult.result != HIT_SLIDER10) {
|
||||||
float scale = 1f + ((trackPosition - hitResult.time) / (float) fadeDelay);
|
float scale = 1f + ((trackPosition - hitResult.time) / (float) fadeDelay);
|
||||||
Image scaledLighting = lighting.getScaledCopy(scale);
|
Image scaledLighting = GameImage.LIGHTING.getImage().getScaledCopy(scale);
|
||||||
|
Image scaledLighting1 = GameImage.LIGHTING1.getImage().getScaledCopy(scale);
|
||||||
scaledLighting.draw(hitResult.x - (scaledLighting.getWidth() / 2f),
|
scaledLighting.draw(hitResult.x - (scaledLighting.getWidth() / 2f),
|
||||||
hitResult.y - (scaledLighting.getHeight() / 2f),
|
hitResult.y - (scaledLighting.getHeight() / 2f), hitResult.color);
|
||||||
hitResult.color);
|
|
||||||
if (lighting1 != null) {
|
|
||||||
Image scaledLighting1 = lighting1.getScaledCopy(scale);
|
|
||||||
scaledLighting1.draw(hitResult.x - (scaledLighting1.getWidth() / 2f),
|
scaledLighting1.draw(hitResult.x - (scaledLighting1.getWidth() / 2f),
|
||||||
hitResult.y - (scaledLighting1.getHeight() / 2f),
|
hitResult.y - (scaledLighting1.getHeight() / 2f), hitResult.color);
|
||||||
hitResult.color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
iter.remove();
|
iter.remove();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user