Commit Graph

72 Commits

Author SHA1 Message Date
cf2d885099 Fix control points being flushed too late 2019-10-30 18:02:18 +09:00
514c9f1eef Merge branch 'master' into bindable-control-points 2019-10-30 16:20:54 +09:00
1a4817879e Fix precision changes in legacy control point types 2019-10-28 19:10:39 +09:00
8baf569f59 Remove necessity of AutoGenerated flag 2019-10-25 19:58:42 +09:00
e987db37ec Add grouping of ControlPoints 2019-10-25 19:52:02 +09:00
86588778b1 Implement fallback decoder registration
After the preparatory introduction of LineBufferedReader, it is now
possible to introduce registration of fallback decoders that won't drop
input supplied in the first line of the file.

A fallback decoder is used when the magic in the first line of the file
does not match any of the other known decoders. In such a case,
the fallback decoder is constructed and provided a LineBufferedReader
instance. The process of matching magic only peeks the first non-empty
line, so it is available for re-reading in Decode() using ReadLine().

There can be only one fallback decoder per type; a second attempt of
registering a fallback will result in an exception to avoid bugs.

To address the issue of parsing failing on badly or non-headered files,
set the legacy decoders for Beatmaps and Storyboards as the fallbacks.

Due to non-trivial logic, several new, passing unit tests with possible
edge cases also included.
2019-09-15 01:28:07 +02:00
11eda44d34 Migrate decoding to line-buffered reader
Migrate all usages of StreamReader in the context of decoding beatmaps,
storyboards or skins to the new LineBufferedReader.
2019-09-15 01:28:07 +02:00
6e5cb8a318 implement video parsing 2019-08-30 23:19:34 +03:00
ac2060f1cf Throw exceptions and let LegacyDecoder handle them 2019-08-08 14:44:04 +09:00
7bcec31ea3 mention that the event was the type 2019-08-07 17:08:41 +09:00
669c2462ec Don't consider the type 2019-08-07 16:25:38 +09:00
66b02c0283 log type as well 2019-08-06 12:27:10 +09:00
cd6fe91882 Log error for invalid events 2019-08-06 10:05:21 +09:00
7e38aabe75 Remove equivalence check from controlpoint parsing 2019-05-21 14:27:41 +09:00
92f6f4d21a Apply same fix to other methods which were missed 2019-05-13 19:04:12 +09:00
66ebdbbe4c Fix control points with same timestamp potentially being parsed incorrectly 2019-05-08 18:13:07 +09:00
612db31c38 Apply newline additions 2019-04-01 12:16:32 +09:00
8f00f2290a Log issues 2019-03-13 14:56:41 +09:00
241e336c21 Fix break parsing 2019-03-13 14:22:16 +09:00
f4c505709a Use parsing methods in more places
Limiting scope to beatmap decoding for this pass. Can expand to skin/storyboard in the future.
2019-03-13 13:56:31 +09:00
93b774104a Fix NaN handling 2019-03-13 11:30:33 +09:00
cc09ecbfcf Increase validation performed on .osu files to avoid hard crashes 2019-03-12 20:31:15 +09:00
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
a2b8904b1e Merge branch 'master' into database-standardize-paths 2018-10-18 16:21:45 +09:00
bb07630743 Merge branch 'master' into database-standardize-paths 2018-10-12 14:08:25 +02:00
bd99a87298 Use ordinal comparison in LegacyBeatmapDecoder 2018-10-11 17:48:47 +09:00
b35f88b8ba Standardize AudioFile and BackgroundImage paths 2018-10-09 17:49:18 +02:00
b7499fa956 Allow TimingControlPoint to be overridden 2018-10-09 11:34:38 +09:00
551581e5cd Skip invalid hitobject types, log error instead 2018-08-22 15:59:58 +09:00
ce77473910 Simplify usage of ConvertHitObjectParser 2018-08-15 10:24:56 +09:00
b8824a41b5 Fix certain control points not being replaced 2018-08-14 11:44:53 +09:00
da8fc0ee5d ToLower -> ToLowerInvariant 2018-07-25 07:37:05 +02:00
84c13174d9 Merge branch 'master' into use-has-flags 2018-07-17 03:50:40 +09:00
fc77e01ba9 Fix formatting, make StripComments protected
Don't strip comments when calling ParseLine
2018-07-16 16:35:55 +02:00
98cddc0c04 Fix some legacy cases 2018-07-16 16:26:37 +09:00
dbc538abbe Use Enum.HasFlag
With .NET core 2.0+ this is as efficient as the ugly code we've been using.
2018-07-16 16:18:46 +09:00
429306aa87 Fix casing, use ordinal string comparison when stripping comments 2018-07-16 01:54:20 +02:00
6c861a1638 Strip comments from everything except metadata 2018-07-16 01:04:41 +02:00
44aecdc3a0 Rename method to EquivalentTo 2018-07-05 15:00:02 +09:00
b664d3ef81 Fix time being a part of controlpoint change comparisons 2018-07-02 13:34:25 +09:00
3a9a82c80c Add back legacy custom sample banks 2018-06-28 18:29:12 +09:00
2882981f9c Implement and use equality comparers for ControlPoint 2018-06-28 18:28:59 +09:00
955a78e76d Remove OnlineBeatmapSetID from BeatmapInfo
It should now be retrieved via the linked BeatmapSetInfo
2018-06-08 15:26:27 +09:00
8220e0c79a Remove OnlineBeatmapSetID from BeatmapMetadata 2018-06-08 12:46:34 +09:00
8ae2a3696f Apply platform universal offset at player level 2018-05-28 03:31:46 +09:00
0f817d18d4 Add explanatory comment 2018-05-16 13:59:51 +09:00
cf44357bdb Use a stable sort for hitobjects 2018-05-16 13:30:48 +09:00
06c6f55995 Apply offset to end times on legacy converter 2018-04-30 00:43:32 -07:00
32a74f95a5 Normalize all the line endings 2018-04-13 18:26:38 +09:00
fd9480cfb6 Handle timingpoint FormatException 2018-04-02 20:08:40 +09:00