Added a missing "songScrolling.released()" call upon entering the song menu as the pressed state wasn't being cleared (causing an issue with the scroll wheel upon re-entering the state).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
- 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>
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>
jinput natives are no longer loaded or packaged in the jar.
Excluded the lwjgl dependency within the slick2d package since it depends on an older version (2.9.1) of lwjgl.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fix the XDG directory flag that got removed with JarSplice. To enable XDG directories, set the 'Use-XDG' property in either build file to 'true'.
- Always re-build jars in the Gradle script (disable "up to date" for the task).
- Delete JarSplicePlus.jar since it's no longer being used.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Previously, enabling old-style cursors would try to load files "cursor2" and "cursortrail2". Now the actual files are loaded, and the -2 images are only used when no game skin image is provided.
Added a hasGameSkinImage() method in GameImage to check if the "default" image is skinned (by a game skin).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Renamed some methods and modified comments to avoid this confusion, as game skins were implemented much later than beatmap skins.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Any CREATE and DELETE that occur in the song menu state will now show a notification and modify the behavior of the 'F5' key. Changes that occur in other states will force a reload upon entering the song menu.
This is part of osu!, but as it's not incredibly helpful, I've left it disabled by default. It can be enabled in the options menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Also fixed an issue where songMenu.resetGameDataOnLoad() sometimes wasn't being called when it should be (e.g. after playing a beatmap, if you move to a different screen, your score won't appear in the song menu right away). It's now being called more often than necessary, but that should be fine.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Show retry button only when appropriate (e.g. not when viewing replays or when playing with "Auto" enabled).
- Watching a (fake) "replay" with "Auto" enabled will actually just call the "retry" code now.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Moved Utils.loadGlyphs() into this class, and rewrote it to take a single generic string (instead of beatmap title/artist strings, specifically).
- Also moved font initialization into this class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- In "Hidden" mod, don't draw expanding animation for circles. (related to #121)
- With "Show Perfect Hits" disabled, still show the hit animations instead of having the objects just disappear. (also mentioned in #121)
- Removed the two easing functions in Utils (and replaced references with calls to AnimationEquations).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Replaced ugly 'bang' image with 'fa-arrow-circle-o-down' and 'fa-restart' icons from Font Awesome v4.4.0 (https://github.com/FortAwesome/Font-Awesome).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Submitting new queries will now actually cancel the old query and immediately use the result of the new query. The old behavior was very inconsistent about this.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
URL: http://osu.uu.gl/
Note that there's no API available, so this just parses the HTML for beatmap data. It's pretty slow compared to the other servers.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
URL: http://osu.yas-online.net/
Note that fetching the direct download URL for a beatmap requires an extra query, which is not currently done asynchronously (but it really should be).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Check if other Desktop actions are supported (follow-up to #114).
- The cursor-middle image is no longer scaled (when clicking).
- Changed the options menu background image (created with Trianglify at http://qrohlf.com/trianglify/), and made it fit the entire page.
- Slightly increased minimum splash screen time.
- Switched more animations to use AnimatedValue.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
These are Robert Penner's easing functions (http://robertpenner.com/easing/), refactored by CharlotteGore to only take a t parameter (https://github.com/CharlotteGore/functional-easing). Licensed under BSD (the former) and MIT (the latter).
Related changes:
- Added "AnimatedValue" utility class for updating values used in animations.
- MenuButton now uses AnimatedValue to handle its animations (still linear by default).
- Added in-out-back easings on logo, mods, and various other elements; added out-bounce easings on button menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This doesn't actually make a difference in functionality.
The issue is that the flashlight mod uses Slicks FBO functions which
use the EXT version and Intel drivers generate the same FBO IDs twice
if the EXT and ARB versions are mixed.
- Added on/off option for replay seeking in the "custom" menu.
- Mute sounds while seeking.
- Draw a bar on the left of the screen during replays for seeking (instead of just clicking near the top of the screen).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Move failed imports to a "failed" subdirectory so that errors aren't generated each time the program is launched.
- Importing now overwrites files.
- Add "ReplayImportDirectory" option to config file.
- Fixed a bug with scores not being properly added.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Many code style changes.
- Don't increment combo if missing the last slider circle.
- Added player name in ranking screen.
- Don't show null/default player names.
- Only import replays with .osr extension.
- Display loading status for importing replays.
- Moved MD5InputStreamWrapper to package "opsu.io".
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>