Commit Graph

560 Commits

Author SHA1 Message Date
Jeffrey Han
e1becb3962 Merge pull request #131 from fluddokt/KinecticScrolling
Kinetic scrolling
2015-09-15 22:53:10 -04:00
fd
d69e5fa5e7 Kinetic Scrolling Fixes 2015-09-15 21:39:35 -04:00
fd
133241f630 Merge remote-tracking branch 'org/master' into KinecticScrolling
Conflicts:
	src/itdelatrisu/opsu/ScoreData.java
	src/itdelatrisu/opsu/downloads/DownloadNode.java
	src/itdelatrisu/opsu/states/DownloadsMenu.java
	src/itdelatrisu/opsu/states/SongMenu.java
2015-09-14 20:09:52 -04:00
fd
0562c66531 Kinectic Scrolling
for SongNodes, Scores, Download Results, Download Info
2015-09-14 19:19:49 -04:00
Jeffrey Han
1fe45f7bb4 Merged DISABLE_CURSOR option from fluddokt/opsu. 2015-09-11 11:43:19 -04:00
Jeffrey Han
6506967c12 Added some missing @param and @throws Javadoc comments.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-09 23:51:16 -04:00
Jeffrey Han
831c297ece Made DropdownMenu extend Slick's AbstractComponent class.
Clicks and animation updates are now handled internally within the DropdownMenu class, which should simplify usage a bit.  Override menuClicked() and itemSelected() instead for event handling.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-09 18:57:01 -04:00
Jeffrey Han
7f1193bb77 Slight changes to DropdownMenu behavior.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-09 13:25:48 -04:00
Jeffrey Han
643a7c4589 Added a dropdown menu class, similar to the one in osu!.
Using 'fa-chevron-down' and 'fa-chevron-right' icons from Font Awesome v4.4.0 (https://github.com/FortAwesome/Font-Awesome).

The dropdown menu is currently used only in the downloads menu to select servers.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-08 23:46:30 -04:00
Jeffrey Han
6c369f6329 Minor code cleaning.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-08 12:26:28 -04:00
Jeffrey Han
be3adb3dc5 Animate score buttons in the song menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-06 01:44:29 -04:00
Jeffrey Han
5ff35d355b Animate the music icon in the song menu. (follow-up to c5cc43a)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-05 19:46:52 -04:00
Jeffrey Han
c5cc43acfc Fade in song info in the song menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-05 14:40:34 -05:00
Jeffrey Han
01fb9c50c9 Replace xy float[] arrays with Vec2f (mostly in game objects).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-05 12:53:42 -05:00
Jeffrey Han
1b8f85942f Use java.awt.Point in Cursor class instead of separate x/y lists.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-05 12:46:01 -05:00
Jeffrey Han
97dbb36e43 Switch to startUse/drawEmbedded/endUse for cursortrail and star stream.
This should be much more efficient when repeatedly rendering the same texture, as in these two cases.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-05 09:32:26 -05:00
Jeffrey Han
ffe4d5d415 Merging davedes' dev branch fixes/updates to Slick's Image class.
https://bitbucket.org/kevglass/slick/history-node/aa6e7b6dce00/trunk/Slick/src/org/newdawn/slick/Image.java?at=development

Commits merged:
- edd48ff: Simple center x/y fixes.
- d847f81: Fixed a filter constant.
- 37b8710: Added flushPixelData to destroy().
- 97da01a: Added rotate in use.
- 06bef32: Overload drawEmbedded().
- 3f82ac1: Fixed rotate bug for drawEmbedded().
2015-09-05 09:07:03 -05:00
Jeffrey Han
80042807c5 Draw an animated star stream in the song menu.
Star image was modified from XinCrin's "Fantasy's Skin".

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-04 22:36:25 -05:00
Jeffrey Han
cd3d53336d A couple of API improvements.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-03 22:16:52 -05:00
Jeffrey Han
14948846f5 Added star difficulty to conditional search filters.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-03 21:00:02 -05:00
Jeffrey Han
3214916d60 Load beatmap background images in a new thread.
This eliminates the game-wide lag (100-200ms on my computer) when switching song nodes. Attempted to mask the loading time with a fade-in effect.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-03 19:24:07 -05:00
Jeffrey Han
e767800702 Fixed broken "Easy" mod.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-03 00:14:25 -05:00
Jeffrey Han
a2eaf35664 Draw star rating stars in the song menu inside each song node.
Star image was taken from XinCrin's "Fantasy's Skin".

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 23:10:31 -05:00
Jeffrey Han
c785a1261c Ported osu!tp's beatmap difficulty algorithm to compute star ratings.
https://github.com/Tom94/AiModtpDifficultyCalculator
This might not be completely accurate as I wasn't able to get the original program to run, but it's probably close (note that hit object stacking isn't applied, though).

Since the computation is fairly expensive, they're currently done when selecting a beatmap set in the song menu (for all beatmaps in the set at once).  The rating is displayed next to the beatmap difficulty settings (HP,CS,AR,OD) in the header.  Also, since all the hit objects need to be loaded to perform the computation, the objects are later discarded (but not immediately) by a LRU cache to limit memory usage.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 19:44:04 -05:00
Jeffrey Han
8cb796bd18 Fixed updater ignoring XDG flag (again).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 19:23:23 -05:00
Jeffrey Han
5817217eb5 Stop logging warnings for missing background images.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 17:38:28 -05:00
Jeffrey Han
396071dfbc When deleting beatmaps, remove their MD5 hashes from the lookup table.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 14:37:16 -05:00
Jeffrey Han
d5154b567e Replaced "BeatmapImageCache" with a generic LRU cache class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 13:29:52 -05:00
Jeffrey Han
c516d93d1e Check for parallel vectors before constructing a CircumscribedCircle.
If the check fails, use a LinearBezier instead. (e.g. in map 45471).

Moved slider time and curve calculations into HitObject so that they can be reused.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 10:51:52 -05:00
Jeffrey Han
d360b73bf5 Specify whether Curve uses scaled or unscaled coordinates.
Unscaled coordinates will be used in a future commit (hopefully).

Added a normalize() method to Vec2f.

Throw RuntimeExceptions for any Curve initialization errors; the game would crash anyway, and this way the objects can be substituted for DummyObjects for a graceful failure.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 01:47:15 -05:00
Jeffrey Han
6c956e927f Beatmap parser fixes.
- Fixed hit object 'addition' field parsing. (Still not sure what the fields do, but the types should be correct now...)
- Fixed a careless error causing a potential null pointer exception. (blame: 0b33fed)
- Show an error if parseHitObjects() parses a different amount of objects than expected.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-02 01:41:47 -05:00
Jeffrey Han
fdd70a81c4 Removed leftover/unused 'color' parameter in Curve constructor.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-01 21:57:37 -05:00
Jeffrey Han
e3d8a11c39 Updating to 0.11.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-09-01 16:12:41 -05:00
Jeffrey Han
df3e662865 Marked a couple more members as 'final'. (continuation of 441bb95)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-31 22:54:35 -05:00
Jeffrey Han
769ad963e7 Moved OszUnpacker into package 'opsu.beatmap'.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-31 22:25:28 -05:00
Jeffrey Han
c70fcb296f Add git hash (from refs/remotes/origin/master) to error reports.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-31 17:54:32 -05:00
Jeffrey Han
e535a88840 Stop firing BeatmapWatchService events for intended file modifications.
Specifically, during OSZ unpacking and for file deletion through the song menu.  Triggering the beatmap reload event in these scenarios would be redundant.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 23:21:58 -05:00
Jeffrey Han
aed5163a83 Check completed download size against Content-Length header.
If the number of bytes received is less than the reported content length (e.g. a network timeout), mark the download with the "error" status instead of "complete".  Content-Length should be reliable if reported at all, so this should be a valid approach.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 23:18:46 -05:00
Jeffrey Han
bd8e35cb81 Added MengSky download server.
URL: http://osu.mengsky.net/

Also parsing raw HTML for this one because there's no API.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 22:20:52 -05:00
Jeffrey Han
8d21fe3fc9 Fixed a small issue in the MnetworkServer HTML parsing.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 20:25:35 -05:00
Jeffrey Han
8892973d98 Now using official formulas for circle diameter and timing offsets.
The previous formulas were extremely close, so you shouldn't notice any gameplay differences at all.

Circle diameter:
- Previously: 104 - (CS * 8)
- Now: 108.848 - (CS * 8.9646)

Timing offsets: added 1.5ms to 300, 100, and 50 hit result offsets.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 19:01:40 -05:00
Jeffrey Han
9d19dacab4 Removed some unneeded methods.
- Removed "isImplemented" field from GameMod as all of the base mods have been implemented.
- Removed Utils.getBoundedValue() methods in preference for Utils.clamp().

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 17:56:05 -05:00
Jeffrey Han
31d0c237df Create Natives dir in XDG_CACHE_HOME, not the working dir. (fixes #129)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-30 14:31:01 -05:00
Jeffrey Han
9fc00fc3c3 Follow-up to #128: add XDG info to readme, rename the Maven property.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-29 09:51:10 -05:00
Jeffrey Han
331865c437 Merge pull request #128 from Lucki/patch-1
Make the XDG-option available from command line with Gradle
2015-08-29 09:28:28 -05:00
Lucki
fad44356e6 Make the XDG-option available from command line
I've found no way to access it without this workaround: https://discuss.gradle.org/t/can-i-override-the-group-property-from-the-command-line/5294
It's now possible to build with `gradle jar -PXDG=true`.
2015-08-29 13:05:24 +02:00
Jeffrey Han
c2839759b3 Follow-up to 2d83c3a: forgot to include a description of .opsu.log.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-29 00:46:39 -05:00
Jeffrey Han
2d83c3a348 Added "Directory Structure" section to the readme, with other changes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-29 00:32:08 -05:00
Jeffrey Han
6d284cdd80 Organize imports.
Some of these got re-ordered when I updated Eclipse -- resetting to the original sort order.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-28 21:29:21 -05:00
Jeffrey Han
34c7942f4b Fixed "Hidden" mod timing issues. (fixes #121)
This introduces more accurate timing formulas associated with the "Hidden" mod (previously, in #115, these values were hardcoded).  The values seem somewhat close to the values in osu!, but were not extensively tested.

Also set an upper bound on the fade in time for hit objects proportional to the approach time, or else the timing values in the "Hidden" mod would be too inconsistent.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-28 21:12:47 -05:00