Initial replay parsing support.

- Basic implementation of viewing replays in the Game state.
- Added OsuReader class for reading certain osu! file types. (author: Markus Jarderot)
- Added Replay, ReplayFrame, and LifeFrame classes to capture replay data. (author: smoogipooo)
- Added 'keyPressed' parameter to HitObject.update().
- Added cursor-drawing methods in UI that take the mouse coordinates and pressed state as parameters.
- Added GameMod methods to retrieve/load the active mods state as a bitmask.
- Added Apache commons-compress dependency for handling LZMA decompression.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-09 18:32:43 -04:00
parent ef67387674
commit f6412f06e8
17 changed files with 761 additions and 36 deletions

View File

@@ -194,7 +194,7 @@ public class Spinner implements HitObject {
public boolean mousePressed(int x, int y) { return false; } // not used
@Override
public boolean update(boolean overlap, int delta, int mouseX, int mouseY) {
public boolean update(boolean overlap, int delta, int mouseX, int mouseY, boolean keyPressed) {
int trackPosition = MusicController.getPosition();
// end of spinner
@@ -204,7 +204,7 @@ public class Spinner implements HitObject {
}
// game button is released
if (isSpinning && !(Utils.isGameKeyPressed() || GameMod.RELAX.isActive()))
if (isSpinning && !(keyPressed || GameMod.RELAX.isActive()))
isSpinning = false;
// spin automatically
@@ -224,7 +224,7 @@ public class Spinner implements HitObject {
angle = (float) Math.atan2(mouseY - (height / 2), mouseX - (width / 2));
// set initial angle to current mouse position to skip first click
if (!isSpinning && (Utils.isGameKeyPressed() || GameMod.RELAX.isActive())) {
if (!isSpinning && (keyPressed || GameMod.RELAX.isActive())) {
lastAngle = angle;
isSpinning = true;
return false;