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_CLEAR ("spinner-clear", "png"),
|
||||
SPINNER_OSU ("spinner-osu", "png"),
|
||||
SPINNER_RPM ("spinner-rpm", "png", false, true) {
|
||||
SPINNER_RPM ("spinner-rpm", "png") {
|
||||
@Override
|
||||
protected Image process_sub(Image img, int w, int h) {
|
||||
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 '|')
|
||||
*/
|
||||
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 '|')
|
||||
*/
|
||||
GameImage(String filename, String filenameFormat, String type) {
|
||||
this(filename, type, true, true);
|
||||
this(filename, type, true, false);
|
||||
this.filenameFormat = filenameFormat;
|
||||
}
|
||||
|
||||
|
|
|
@ -839,9 +839,11 @@ public class Game extends BasicGameState {
|
|||
// set images
|
||||
File parent = osu.getFile().getParentFile();
|
||||
for (GameImage img : GameImage.values()) {
|
||||
if (img.isSkinnable())
|
||||
if (img.isSkinnable()) {
|
||||
img.setDefaultImage();
|
||||
img.setSkinImage(parent);
|
||||
}
|
||||
}
|
||||
|
||||
// skip button
|
||||
if (GameImage.SKIP.getImages() != null) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user