Enabled application restarts.
- Pressing Ctrl+Shift+F5 in the options menu restarts the game. Beatmaps and sounds are not reloaded. - Use GameContainer.setForceExit(false) to trigger a restart after exiting. Other changes: - Fixed general issues with track pausing/pause states. - Store all background images loaded in OsuFiles in a static hash table, instead of in individual objects. This allows easier access to the allocated memory. - Only delete OSZ files if they were unzipped. (They were previously deleted in all cases.) - Moved more images (mods, playfield, lighting) into GameImage. - Moved OsuHitObject initialization inside Utils. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -119,16 +119,19 @@ public class Splash extends BasicGameState {
|
||||
thread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
File beatmapDir = Options.getBeatmapDir();
|
||||
// application restart: everything already loaded
|
||||
if (OsuGroupList.get().size() < 1) {
|
||||
File beatmapDir = Options.getBeatmapDir();
|
||||
|
||||
// unpack all OSZ archives
|
||||
OszUnpacker.unpackAllFiles(Options.getOSZDir(), beatmapDir);
|
||||
// unpack all OSZ archives
|
||||
OszUnpacker.unpackAllFiles(Options.getOSZDir(), beatmapDir);
|
||||
|
||||
// parse song directory
|
||||
OsuParser.parseAllFiles(beatmapDir, width, height);
|
||||
|
||||
// parse song directory
|
||||
OsuParser.parseAllFiles(beatmapDir, width, height);
|
||||
|
||||
// load sounds
|
||||
SoundController.init();
|
||||
// load sounds
|
||||
SoundController.init();
|
||||
}
|
||||
|
||||
finished = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user