Commit Graph

518 Commits

Author SHA1 Message Date
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
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
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
Jeffrey Han
c4f54ecc05 Hitting the "f" key during a replay changes the playback speed.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-28 19:41:02 -05:00
Jeffrey Han
f773a8ecf8 Remove jinput dependency since controllers aren't used.
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>
2015-08-28 11:07:03 -05:00
Jeffrey Han
0b33fed2d4 Minor follow-up to #127.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-27 20:48:08 -05:00
Jeffrey Han
3a9f6be5ae Merge pull request #127 from LemonLake/cursoranim
Added cursor animation
2015-08-27 17:48:50 -05:00
Jeffrey Han
b54886a379 Follow-up to #126.
- 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>
2015-08-27 14:14:04 -05:00
Lemmmy
b1e8c3a72e Added cursor animation 2015-08-27 17:32:40 +01:00
Lemmmy
dea0104c4d Added the Gradle build system and added a new native loader 2015-08-27 15:50:36 +01:00
Szunti
017150233b Rewrote shaders for GLSL 110 (openGL2.0). 2015-08-24 22:18:11 +02:00
Jeffrey Han
5efb61d3bb Fixed bug where skinned old-style cursors were ignored. (part of #120)
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>
2015-08-23 21:16:28 -05:00
Jeffrey Han
b83d6be5fd Clarified GameImage "skinnable" field as "beatmap-skinnable".
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>
2015-08-23 20:41:09 -05:00
Jeffrey Han
949b2c215c Added a WatchService to watch the beatmap directory tree for changes.
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>
2015-08-21 10:25:52 -05:00
Jeffrey Han
ae5016f3ab Validate audio files before trying to load them. (part of #120)
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>
2015-08-20 22:58:45 -05:00
Jeffrey Han
130f9bf445 Game ranking screen fixes.
- 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>
2015-08-20 22:06:27 -05:00
Jeffrey Han
ae149a61f6 HP is now drained while holding sliders. (fixes #103)
Slider ticks now give HP, and the HP for SLIDER30 results is doubled.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-20 21:24:58 -05:00
Jeffrey Han
441bb95a09 Added lots of 'final' modifiers to class fields where applicable.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-20 21:11:55 -05:00
Jeffrey Han
0a7aef7347 Moved all Utils.FONT_* into new class opsu.ui.Fonts.*.
- 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>
2015-08-20 20:40:07 -05:00
Jeffrey Han
7b5b96752c Moved some duplicate colors into the Colors class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-20 20:14:24 -05:00
Jeffrey Han
91f07855a7 Moved all Utils.COLOR_* into new class opsu.ui.Colors.*.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-20 20:02:23 -05:00
Jeffrey Han
5f5c0cdbc4 Fix program crashing if unable to connect to BeatmapDB. (fixes #111)
In this case, load all beatmaps from disk instead of trying to read from the cache.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-20 18:54:18 -05:00
Jeffrey Han
6e7de654b0 Hit animation bug fixes.
- 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>
2015-08-20 18:40:10 -05:00
Jeffrey Han
8efcc1f2ee Attempted fix for a null pointer exception in #123.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-15 10:06:19 -05:00
Jeffrey Han
96f882bd99 Fixed two incorrect shortcut keys for selecting game mods.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-14 18:15:19 -05:00
Peter Tissen
f0b87c99ab Lower GLSL version requirement
I didn't really use any of the newer features anyway.
This should accomodate open source drivers that use older versions of MESA.
2015-08-13 11:28:04 +02:00
Jeffrey Han
93615736af Minor port-related fixes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-12 22:00:58 -05:00
Jeffrey Han
7dc5f973de Show a more informative error message for BindException. (fixes #119)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-12 21:46:10 -05:00
Jeffrey Han
f22498ae7d Updater UI improvements.
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>
2015-08-12 19:06:58 -05:00
Jeffrey Han
52e973caf8 Added animation loop capabilities to MenuButton.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-12 19:03:50 -05:00
Jeffrey Han
a4898d01a7 Fix hard rock coordinate modifier in replays. (fixes #118)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-10 17:14:02 -05:00
Jeffrey Han
e68bcf8abc Fix PreparedStatement bug in ScoreDB with null string fields.
This was causing deleteScoreStmt to always fail.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-10 16:18:14 -05:00
MatteoS
35524a22ad Fix #116 2015-08-09 17:41:29 +02:00
Jeffrey Han
fee85c6a73 Improvements in search query switching in the downloads menu.
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>
2015-08-08 21:57:43 -05:00
Jeffrey Han
8173b9b4c2 Added Mnetwork download mirror.
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>
2015-08-08 20:34:49 -05:00
Jeffrey Han
0909377d14 Follow-up to #115: some fixes and whitespace changes.
- Hide the spinner approach circle instead of the spinner circle.
- Show the slider ball.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-08 19:15:49 -05:00
Jeffrey Han
262fa9d4c4 Merge pull request #115 from mad-s/master
'Hidden' gamemod
2015-08-08 18:40:37 -05:00
MatteoS
a13ea9308d Corrections for 'hidden' mod 2015-08-09 01:20:45 +02:00
Jeffrey Han
dbb5eebf5c Added YaS Online download mirror.
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>
2015-08-08 17:12:07 -05:00
Jeffrey Han
b9adf59d53 Allow HTTP <--> HTTPS redirects (max 3) in Download class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-08 17:08:36 -05:00
mad-s
d82b8188e8 Hit indicators *do* show up in hidden mode.
I failed...
2015-08-08 23:17:25 +02:00
MatteoS
34356d9c08 Implement 'hidden' game mod 2015-08-08 21:12:02 +02:00
Jeffrey Han
b98c646106 Removed osu!Mirror download server, which is now officially offline.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-08 13:33:38 -05:00
Jeffrey Han
40ab94794f Bug fixes and tweaks.
- 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>
2015-08-08 12:04:15 -05:00
MatteoS
b537b83736 Game doesn't crash when being unable to go to the github repo page 2015-08-08 16:29:08 +02:00
MatteoS
940e9baa41 Correct detection of GLSL version for curve rendering 2015-08-08 14:43:56 +02:00
Jeffrey Han
c0b3da37c2 Changed more messy animations to use AnimatedValue.
Also finally refactored the main menu logo controller code...

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-08-06 00:53:30 -05:00
Jeffrey Han
c91146b024 Added easing functions for all-around better animations.
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>
2015-08-05 22:28:14 -05:00
Jeffrey Han
5dac21a545 Cursor trail now considers actual FPS (not target FPS). (fixes #109)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-07-16 18:14:46 -05:00
Jeffrey Han
4e2074e41b Show errors if any directories could not be created. (fixes #97)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-07-11 10:51:52 -05:00
Jeffrey Han
05c7ac0a02 Minor follow-up to #108.
Set minimum OpenGL version for mmsliders to 3.0 (from 3.2) and removed an unused variable.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-07-09 11:59:53 -05:00
Peter Tissen
7941a70238 use EXT version of FBOs instead of the ARB version
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.
2015-07-09 18:37:39 +02:00
Peter Tissen
420f1fb02c Backup and restore the viewport size when rendering sliders. Needed because Slick tends to allocate offscreen buffers for itself only with power of two textures, so it will use another viewport when rendering to its own offscreen buffers. 2015-07-08 16:23:59 +02:00
Jeffrey Han
26ab61910e Added option to disable automatic checking for updates.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-07-07 19:03:54 -05:00
Jeffrey Han
2167698740 Follow-up to #99: replay seeking improvements.
- 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>
2015-07-02 22:16:14 -05:00
Jeffrey Han
495a7e7f8b Follow-up to d860a30: replay importing fixes.
- 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>
2015-06-29 20:18:28 -05:00
Jeffrey Han
d860a30aed Follow-up to #99.
- 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>
2015-06-29 19:22:38 -05:00
Jeffrey Han
7d08a7d391 Merge pull request #99 from fluddokt/ReplayTest
Replay importing, spinner fixes (fixes #67), replay seeking, in-place MD5 calculation, pitch change time sync (fixes #86).
2015-06-28 21:14:10 -05:00
Jeffrey Han
52cb5d24f0 Minor code style changes from #102.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-28 02:38:50 -05:00
Peter Tissen
6bbcbb1fc7 delete shaders after linking. They're not needed anymore and are a potential resource leak. 2015-06-25 00:31:21 +02:00
Peter Tissen
600e34d1fe add comments and adjust formatting 2015-06-25 00:21:15 +02:00
Peter Tissen
1993452669 Correctly clean up the created OpenGL objects created for the slider rendering.
This is necessary because the OpenGL context being closed does apparently not close
the process and the game can be restarted with another resolution without shutting
down the process completely.
2015-06-24 23:55:05 +02:00
fd
55628038fe Restores drainRate
Single file read md5

pitch change synctime
2015-06-22 01:14:36 -04:00
Jeffrey Han
392df79596 Properly check if new slider rendering is supported. (#98)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-21 21:32:00 -05:00
fd
df07c62609 Merge remote-tracking branch 'org/master' into ReplayTest
Conflicts:
	src/itdelatrisu/opsu/GameData.java
	src/itdelatrisu/opsu/states/Game.java
2015-06-21 21:36:44 -04:00
fd
3675a25c44 Spinner Test 3
Clean up
2015-06-21 19:45:38 -04:00
Jeffrey Han
0112a03bd3 Added "Cursor Size" option.
Also moved "New Cursor" option into the "Input" category.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-14 12:30:33 -05:00
Jeffrey Han
81d9421d74 Score formula update - still very wrong, but slightly closer. (see #43)
Added the "difficulty multiplier" as given by the osu! wiki.  Please note that this will invalidate all of your saved scores.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-14 11:59:12 -05:00
fd
038a5d5779 WIPTest Merge Fixes 2015-06-14 12:29:15 -04:00
fd
fd3f7fdabe Merge remote-tracking branch 'org/master' into ReplayTest
Conflicts:
	src/itdelatrisu/opsu/GameData.java
	src/itdelatrisu/opsu/Options.java
	src/itdelatrisu/opsu/OsuFile.java
	src/itdelatrisu/opsu/OsuGroupList.java
	src/itdelatrisu/opsu/OsuHitObject.java
	src/itdelatrisu/opsu/OsuParser.java
	src/itdelatrisu/opsu/UI.java
	src/itdelatrisu/opsu/db/OsuDB.java
	src/itdelatrisu/opsu/objects/Circle.java
	src/itdelatrisu/opsu/objects/HitObject.java
	src/itdelatrisu/opsu/objects/Slider.java
	src/itdelatrisu/opsu/objects/Spinner.java
	src/itdelatrisu/opsu/states/Game.java
	src/itdelatrisu/opsu/states/Splash.java
2015-06-13 20:28:30 -04:00
fd
40e67cedc9 Spinner Test2
Improves Score accuracy
(still mostly wrong)

inital replay seek
2015-06-13 18:35:30 -04:00
Jeffrey Han
77661ffd82 Merge branch 'javadoc8' of https://github.com/Bigpet/opsu into Bigpet-javadoc8 2015-06-13 02:04:16 -05:00
Jeffrey Han
f9d8df5157 Follow-up to 90295ee: slightly simplified implementation.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-12 18:25:19 -05:00
Jeffrey Han
967e2b4a57 Follow-up to 90295ee: re-ordered GameOptions.
The options now appear in the same order as before in the configuration file.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-12 15:12:21 -05:00
Jeffrey Han
90295eefb8 GameOption overhaul - moved more scattered bits into the enum.
- Added overridden methods read() and write() for reading from and writing to the options file within the GameOption enum, so that only 1 section needs to be changed when adding new options (instead of 3).
- Added 'displayName' field to the GameOption enum, instead of repeating it in the parseOptions() and saveOptions() methods.
- Added internal options (directories, port, theme song) into the GameOption enum for consistency.
- Removed GameOption.NULL.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-12 15:04:20 -05:00
Jeffrey Han
101425a562 Catch UnknownHostException and write a friendlier warning.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-12 14:52:31 -05:00
Jeffrey Han
44da08d7a1 Fixed a null pointer exception. (blame: 92f4a51)
This occurred when inserting beatmaps with null "bg" field into the database.

Also moved LOAD_HD_IMAGES option from "Custom" tab to "Display".

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-11 13:42:57 -04:00
Jeffrey Han
92f4a5176d Switch to a LRU cache for beatmap background images.
Created a separate BeatmapImageCache class to handle cache operations.  The cache now uses File objects as keys, rather than Beatmap objects (which was buggy).

Also renamed "OsuHitObjectResult" helper class to "HitObjectResult".

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-09 03:10:44 -04:00
Jeffrey Han
74f7ac18b9 Fixed an infinite loop on beatmaps starting at time 0. (blame: 18e57fd)
There's probably a better fix, though...

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-08 18:13:49 -04:00
Jeffrey Han
e712d57a2c Cleaned up implementation of beatmap combo colors.
Added getComboColors() method to Beatmap class, and the 'combo' field is now null if no combo is provided.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-08 17:23:45 -04:00
Jeffrey Han
b1b1664e11 Follow-up to #91.
Pass the border color into CurveRenderState instead of determining it there; store the color as a static field in Curve (since it shouldn't change per-beatmap).

Also removed the leftover FrameBufferCache warning from #64.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-08 16:42:54 -04:00
Peter Tissen
890a69c1a9 recolor the slider border from the skin or beatmap settings 2015-06-08 22:12:56 +02:00
Jeffrey Han
447a0f371a Added missing "SliderBorder" field to BeatmapParser.
Use beatmap.getSliderBorderColor() to get the slider border color for a beatmap.

Also adds the field to the beatmap cache, and fixes a bug where format changes would cause an exception when preparing statements in the new format.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-08 15:57:17 -04:00
Jeffrey Han
b6f208a47d Follow-up to #64.
- Removed NEW_SLIDER option, and use the skin "SliderStyle" instead.  Uses the new style by default, unless STYLE_PEPPYSLIDER is specified.
- Check if OpenGL 3.0 is supported before trying to draw new style sliders.
- Fixed compilation warnings; removed unneeded fields and imports.
- Filled in some missing Javadocs.
- Style changes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-06-08 15:02:28 -04:00