Only load image resources when needed.
- Stop loading all images on startup. - Game images are preloaded before the song starts. - Destroy skin images immediately after finishing a beatmap, potentially saving lots of memory. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -184,12 +184,8 @@ public class Utils {
|
||||
Log.error("Failed to load fonts.", e);
|
||||
}
|
||||
|
||||
// set default game images
|
||||
// initialize game images
|
||||
GameImage.init(width, height);
|
||||
for (GameImage img : GameImage.values()) {
|
||||
img.setDefaultImage();
|
||||
img.process();
|
||||
}
|
||||
|
||||
// initialize game mods
|
||||
for (GameMod mod : GameMod.values())
|
||||
|
||||
Reference in New Issue
Block a user