Commit Graph

25 Commits

Author SHA1 Message Date
Jeffrey Han
7536056a59 Initial replay writing support.
- Added Replay.save() method to save replays to a file.
- Separated Replay loading from the constructor into a load() method.
- Added OsuWriter class to write replays.
- Parse replay seeds (what do they do?).
- Added Updater.getBuildDate() method to retrieve the current build date (for the replay 'version' field).
- Added osu! mode constants in OsuFile.
- Added methods to retrieve raw ReplayFrame coordinates.
- Added replay fields/methods to GameData and Game state.
- Added jponge/lzma-java dependency for LZMA compression, since it isn't implemented in Apache commons-compress...

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-10 18:10:51 -04:00
Jeffrey Han
f6412f06e8 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>
2015-03-09 18:32:43 -04:00
Jeffrey Han
400f9395e7 Updating version to 0.7.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-08 17:53:24 -04:00
Jeffrey Han
dc26f6c131 TextField updates, and bug fixes from some recent commits.
- Added modified copy of slick.gui.TextField: added CTRL+BACKSPACE for word deletion, and disabled left/right arrows to move cursor and CTRL+Z to undo.
- Fixed musicEnded() incorrectly setting the "trackEnded" upon swapping tracks.  This has caused some nasty loops since #38.
- Fixed a null pointer exception in OsuDB from 0b03912.
- Fixed the song menu search bar transition being incorrectly reset when hitting backspace on a 0-length query.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-08 16:34:28 -04:00
Jeffrey Han
078b765143 Added an automatic updater for new releases.
opsu! will now check for updates upon launching, and will prompt the user to download and run a newer version, if available.
- The remote version file is just the filled "version" file, currently located in the gh-pages branch.
- The new version is downloaded to the working directory, and launched with ProcessBuilder.

Related changes:
- Added "file" property (containing the download URL) to "version" file.
- Added maven-artifact dependency for version comparisons.
- Added methods in Downloads class to retrieve the constructor parameters.
- Moved method for showing exit confirmation dialogs into UI.
- Moved method for reading from URLs into Utils.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 04:17:19 -05:00
Jeffrey Han
9138b70a24 Minor GameContainer changes.
Added copy of GameContainer.java:
- updateAndRender() no longer calls Log.error(), and re-throws the original exception as a SlickException.  This prevents errors from being logged twice, and now the relevant one is shown in the error popup (instead of a useless "failure" message).
- getBuildVersion() no longer calls Log.error(), and removed slick build information from "version" file.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-06 19:16:43 -05:00
Jeffrey Han
3df08e5357 Write build information to "version" file and auto-fill error forms.
- Maven version and build date are now written to "res/version".
- The GitHub Issues form is auto-filled with error information if available. (reference: fluddokt/opsu@53fe3d9)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-06 15:55:15 -05:00
Jeffrey Han
51620772c0 Updating version to 0.6.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-21 22:30:47 -05:00
Jeffrey Han
36574cc073 Switched jlayer to com.googlecode.soundlibs.
Changed some default options.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-21 22:27:16 -05:00
Jeffrey Han
d268008d7a Merge pull request #22 from fluddokt/AudioTest
Mp3 wav through mp3spi
May have fixed loading some other unique audio.
2015-02-20 23:45:23 -05:00
Jeffrey Han
25a7a826f1 More graphical updates, some code cleanup, and minor fixes.
- The MenuButton class now fully supports hover effects (scale, fade, rotate) for Animations.
- Used a fixed location for the selection buttons in the song menu (previously based on the "back" button width, which varies widely in different skins).
- Added hover effects for "retry" and "exit" buttons in the ranking screen.
- Changed animation speed of back/skip buttons.
- Fixed a bug where main menu showed the incorrect number of songs loaded during searches.
- Removed unneeded draw() methods in Utils for color filters (since 69f5aa5).
- Moved Utils.drawCentered(Image, ...) into the Image class.
- Added overwritten Image class to Maven excludes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-19 00:33:32 -05:00
fd
678a2ad681 Mp3 wav through mp3spi
May have fixed loading some other unique audio.
2015-02-18 00:35:35 -05:00
Jeffrey Han
c2ce4f4a64 Downgraded sqlite-jdbc from 3.8.7 to 3.8.6. (Fixes #19)
https://bitbucket.org/xerial/sqlite-jdbc/issue/152/387-version-linux-issue
Thanks to @Zeg9 and @fluddokt.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-14 16:42:33 -05:00
Jeffrey Han
ed2d3058ba Merge pull request #16 from SuperNascher/master
Implemented XDG base directory support for Unix-like operating systems.  This is disabled by default.  To use these directories, uncomment the line in pom.xml that sets the "XDG" system property when packaging opsu!.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-13 15:03:17 -05:00
Jeffrey Han
f6eec5cd6c Follow-up to #15.
- Removed the temporary directory (Options.TMP_DIR), which is no longer needed.
- Excluded original Slick2D classes that were overridden in pom.xml.
- Formatting changes and documentation.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-12 03:52:19 -05:00
Jeffrey Han
b69ff68d7c Added methods to delete songs and song groups.
- OsuGroupList.get().deleteSongGroup() will delete a song group from the list.
- OsuGroupList.get().deleteSong() will delete an individual song from the list (must be expanded), and will delete the song group if there are no remaining songs in the group.
- If possible, deleted beatmap files are moved to system trash (using JNA); otherwise, they are deleted immediately.  This is done through Utils.deleteToTrash().

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-12 02:27:33 -05:00
Burkhard Hampl
4fb5f3bb3f Fixed pom.xml 2015-02-07 23:43:31 +01:00
Jeffrey Han
c87cc96c07 Updating version to 0.5.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-02 01:42:15 -05:00
Jeffrey Han
70c70fd812 Implemented an internal beatmap downloader (using Bloodcat).
The downloads menu can be accessed through the button on the right side of the main menu.  The downloader supports searching and concurrent downloads (NOTE: this is limited by the download server!).  Double-click any search result to begin downloading it to the SongPacks directory; cancel the download by hitting the red 'x' in the upper-right corner.  A confirmation will appear if trying to quit opsu! while downloads are running.

New classes:
- Download: represents an individual download from a remote address to a local path, and provides status and progress information; downloads files using Java NIO.
- DownloadNode: holds a Download object as well as additional beatmap fields, and handles drawing.
- DownloadList: manages the current list of downloads.
- DownloadsMenu: game state controller.
- DownloadServer: interface for a beatmap download server.
- BloodcatServer: implements DownloadServer using Bloodcat.
- ReadableByteChannelWrapper: wrapper for ReadableByteChannel that tracks progress.

Added images:
- "downloads" image by @kouyang.
- "search-background" image from "Minimalist Miku" skin (listed in credits).
- "delete" icon by Visual Pharm (https://www.iconfinder.com/icons/27842/) under CC BY-ND 3.0.

Other changes:
- Added up/down/left/right Expand directions to MenuButton class.
- Removed width/height parameters from OsuParser (leftovers).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-01 02:10:17 -05:00
Jeffrey Han
0bd72e731a Save game scores to an SQLite database. [Incomplete!]
Implemented basic features (mostly stable).  The remaining features are mostly graphical.
- Added package org.xerial.sqlite-jdbc.  All scores are saved to .opsu_scores.db on table `scores` after a game completes.
- Added "Scores" class to handle all game score data (including database connections).  The "Score" subclass encapsulates all database fields.
- Added "score viewing" constructor to GameData, for use only in the ranking screen.
- Draw the grade of the highest score next to expanded song buttons in the song menu.
- Added "bit" and "abbrev" fields to GameMod, used in storing/displaying scores.
- Hide the retry/exit buttons in the ranking screen when viewing a score.

Other changes:
- Removed "objectCount" field in GameData (no longer necessary).
- Removed "getID()" method in GameMod (no longer used).
- Moved most drawing in GameRanking state to GameData.
- Removed File parameter of "GameData.loadImages()" (leftover, no longer used).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-28 03:47:24 -05:00
Jeffrey Han
ee617c0710 Updating version to 0.4.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-21 02:37:02 -05:00
Jeffrey Han
62b7ecd648 Fixed a small bug with hovering over song buttons.
The left/right arrow keys no longer reset hover data if the start node hasn't changed.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-13 23:00:09 -05:00
Jeffrey Han
71f614c90a Automated the fat jar creation process.
- Added a modified version of JarSplice in the tools/ directory, which can run using system properties as well as the GUI.  The project is located here: https://github.com/itdelatrisu/JarSplicePlus
- To create a fat jar, execute the Maven goal "install -Djar".  The output file will be in the target/ directory and suffixed "-runnable".

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-12 21:05:58 -05:00
Jeffrey Han
cc84d4a3e4 Subtle fade in effect for circles and sliders. (#9)
Also resize the "skip" button on hover. (follow-up 33f5df0)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-24 02:45:43 -05:00
Till
40e08fd498 eclipse/ant -> maven
eclipse files have been removed from repository. jar and native
dependencies have been removed from repository.

use maven goals "compile exec:exec" to run the project.
use maven goals "package shade:shade" to create a single jar file, which
contains java, but not native dependencies. this jar
file can then be used with jarsplice to create a fat jar. natives will
be extracted to /target/natives.
2014-09-11 11:22:32 +02:00