Draws curves in a range from 0 to x (where x is a value between 0 and 1) while blending them in (if enabled in the options)
Cache a unit-cone once and re-use that with scaling and translation instead of generating it each time again.
This is more for readability than performance (since presumably feeding it mostly constants like before would be faster)
Only draws the cones in the curve once if possible
(only possible if consective calls to draw with the intervals x_1 before x_2 are made and [0, x_1] [0, x_2] with x_1 < x_2 holds true)
minor refactoring and cleanup
Omg my code is such a mess. I feel like I've committed a crime against humanity by just randomly putting that
random vbo id into the class called "Rendertarget". But there's really no good place for it now (that has a way to clean it up).
But if "Rendertarget" will ever be used by anything else but the sliders I'm gonna pull that out.
added blending in for return arrows and ticks
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>