Major track length-related updates.

- Parse and store the end time for every beatmap (i.e. end time of last hit object).
- Added a 'length' sorting tab.
- Added 'length' search condition.
- Removed 'getTrackLength()' and 'getTrackLengthString()' methods, as they are no longer needed.
- Added a loader spritesheet animation to render during MP3 conversions (in place of track length rendering upon completion).

Other changes:
- Added a yellow progress circle during lead-in time.
- Fixed sorting tab positioning.
- Slightly increased button animation speed in "Main Menu Exit" state.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-07-17 21:16:15 -04:00
parent 4ecd50f488
commit b0c0b44ef1
12 changed files with 91 additions and 83 deletions

View File

@@ -114,11 +114,6 @@ public class Game extends BasicGameState {
*/
private int[] hitResultOffset;
/**
* Time, in milliseconds, between the first and last hit object.
*/
private int mapLength;
/**
* Current break index in breaks ArrayList.
*/
@@ -274,7 +269,7 @@ public class Game extends BasicGameState {
g.fillRect(0, height * 0.875f, width, height * 0.125f);
}
score.drawGameElements(g, mapLength, true, objectIndex == 0);
score.drawGameElements(g, true, objectIndex == 0);
if (breakLength >= 8000 &&
trackPosition - breakTime > 2000 &&
@@ -317,7 +312,7 @@ public class Game extends BasicGameState {
}
// game elements
score.drawGameElements(g, mapLength, false, objectIndex == 0);
score.drawGameElements(g, false, objectIndex == 0);
// skip beginning
if (objectIndex == 0 &&
@@ -624,7 +619,7 @@ public class Game extends BasicGameState {
// load checkpoint
if (input.isKeyDown(Input.KEY_RCONTROL) || input.isKeyDown(Input.KEY_LCONTROL)) {
int checkpoint = Options.getCheckpoint();
if (checkpoint == 0 || checkpoint > MusicController.getTrackLength())
if (checkpoint == 0 || checkpoint > osu.endTime)
break; // invalid checkpoint
try {
restart = RESTART_MANUAL;
@@ -728,15 +723,6 @@ public class Game extends BasicGameState {
if (restart == RESTART_NEW) {
loadImages();
setMapModifiers();
// calculate map length (TODO: end on slider?)
OsuHitObject lastObject = osu.objects[osu.objects.length - 1];
int endTime;
if ((lastObject.type & OsuHitObject.TYPE_SPINNER) > 0)
endTime = lastObject.endTime;
else
endTime = lastObject.time;
mapLength = endTime - osu.objects[0].time;
}
// initialize object maps