Preload game images directly before a game. (undo 95775d8
)
Not noticing any bad effects from this anymore. The application should load faster again. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
7fb326d870
commit
6cd6938ea5
|
@ -135,7 +135,7 @@ public enum GameImage {
|
||||||
SPINNER_SPIN ("spinner-spin", "png"),
|
SPINNER_SPIN ("spinner-spin", "png"),
|
||||||
SPINNER_CLEAR ("spinner-clear", "png"),
|
SPINNER_CLEAR ("spinner-clear", "png"),
|
||||||
SPINNER_OSU ("spinner-osu", "png"),
|
SPINNER_OSU ("spinner-osu", "png"),
|
||||||
SPINNER_RPM ("spinner-rpm", "png", false, true) {
|
SPINNER_RPM ("spinner-rpm", "png") {
|
||||||
@Override
|
@Override
|
||||||
protected Image process_sub(Image img, int w, int h) {
|
protected Image process_sub(Image img, int w, int h) {
|
||||||
return img.getScaledCopy((SCORE_0.getImage().getHeight() * 1.05f) / img.getHeight());
|
return img.getScaledCopy((SCORE_0.getImage().getHeight() * 1.05f) / img.getHeight());
|
||||||
|
@ -581,7 +581,7 @@ public enum GameImage {
|
||||||
* @param type the file types (separated by '|')
|
* @param type the file types (separated by '|')
|
||||||
*/
|
*/
|
||||||
GameImage(String filename, String type) {
|
GameImage(String filename, String type) {
|
||||||
this(filename, type, true, true);
|
this(filename, type, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -591,7 +591,7 @@ public enum GameImage {
|
||||||
* @param type the file types (separated by '|')
|
* @param type the file types (separated by '|')
|
||||||
*/
|
*/
|
||||||
GameImage(String filename, String filenameFormat, String type) {
|
GameImage(String filename, String filenameFormat, String type) {
|
||||||
this(filename, type, true, true);
|
this(filename, type, true, false);
|
||||||
this.filenameFormat = filenameFormat;
|
this.filenameFormat = filenameFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -839,8 +839,10 @@ public class Game extends BasicGameState {
|
||||||
// set images
|
// set images
|
||||||
File parent = osu.getFile().getParentFile();
|
File parent = osu.getFile().getParentFile();
|
||||||
for (GameImage img : GameImage.values()) {
|
for (GameImage img : GameImage.values()) {
|
||||||
if (img.isSkinnable())
|
if (img.isSkinnable()) {
|
||||||
|
img.setDefaultImage();
|
||||||
img.setSkinImage(parent);
|
img.setSkinImage(parent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip button
|
// skip button
|
||||||
|
|
Loading…
Reference in New Issue
Block a user