1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 21:17:33 +08:00
Commit Graph

21963 Commits

Author SHA1 Message Date
Bartłomiej Dach
29fcab65f9 Remove superfluous csproj entries 2019-09-15 01:28:07 +02:00
Bartłomiej Dach
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
Bartłomiej Dach
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
Bartłomiej Dach
7b1ff38df7 Implement line-buffered reader
Add a line-buffered reader decorator operating on StreamReader
instances. The decorator has two main operations - PeekLine(), which
allows to see the next line in the stream without consuming it,
ReadLine(), which consumes and returns the next line in the stream, and
ReadToEnd() which reads all the remaining text in the stream (including
the unconsumed peeked line). Peeking line-per-line uses an internal
queue of lines that have been read ahead from the underlying stream.

The addition of the line-buffered reader is a workaround solution to
a problem with decoding. At current selecting a decoder works by
irreversibly reading the first line from the stream and looking for
a magic string that indicates the type of decoder to use.

It might however be possible for a file to be valid in format, just
missing a header. In such a case a lack of a line-buffered reader makes
it impossible to reparse the content of that first line. Introducing it
will however allow to peek the first line for magic first.

 - If magic is found in the first line, GetDecoder() will peek it and
   use it to return the correct Decoder instance. Note that in the case
   of JsonBeatmapDecoder the magic is the opening JSON object brace,
   and therefore must not be consumed.

 - If magic is not found, the fallback decoder will be able to consume
   it using ReadLine() in Decode().

This commit additionally contains basic unit tests for the reader.

Suggested-by: Aergwyn <aergwyn@t-online.de>
2019-09-15 01:26:15 +02:00
Dean Herbert
bc2a1c91a1
Merge pull request #6106 from EVAST9919/fix-header-dropdown
Fix RankingsHeader dropdown can be clickable when not visible
2019-09-14 13:45:06 +09:00
Andrei Zavatski
2783ae62ef Remove useless container 2019-09-14 06:34:57 +03:00
Andrei Zavatski
8ad782a82d Fix RankingsHeader dropdown can be clickable when not visible 2019-09-14 06:16:25 +03:00
Dean Herbert
ac6fffd834
Recreate beatmap video on each consumption (#6098)
Recreate beatmap video on each consumption
2019-09-14 00:23:38 +09:00
Dean Herbert
65aa7b2016 Recreate beatmap video on each consumption
Should not be shared over multiple usages
2019-09-14 00:07:06 +09:00
Dean Herbert
1b8d5decfa
Add beatmap video support (#5908)
Add beatmap video support

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-09-13 23:31:34 +09:00
Dan Balasescu
1583cead83
Merge pull request #6097 from peppy/catch-replay-key-trigger-correction
Change osu!catch key trigger to occur on frame before positional change
2019-09-13 23:26:07 +09:00
Dean Herbert
2cd3657b5e
Merge branch 'master' into beatmap-video 2019-09-13 23:08:57 +09:00
Dean Herbert
624e5644a4 Change osu!catch key trigger to occur on frame before positional change 2019-09-13 23:06:35 +09:00
Dan Balasescu
e536d97255
Merge pull request #6032 from peppy/fix-catch-rewind
Fix osu!catch rewind handling
2019-09-13 23:00:33 +09:00
Dean Herbert
82561aa44a Fix catcher additive sprite rewinding and remove unnecessary update code 2019-09-13 22:44:40 +09:00
Dean Herbert
efadbefc3b Merge remote-tracking branch 'upstream/master' into fix-catch-rewind 2019-09-13 22:23:28 +09:00
Dean Herbert
9e53c091a3
Merge pull request #6095 from peppy/fix-test-dummy-api
Fix incorrect DI usage of IAPIProvider in many tests
2019-09-13 22:22:07 +09:00
Dean Herbert
2379b665e3 Use InvalidOperationException 2019-09-13 22:15:11 +09:00
Dean Herbert
d385c35955
Apply suggestions from code review
Co-Authored-By: Salman Ahmed <slmanarendo1950@gmail.com>
2019-09-13 21:55:45 +09:00
Dean Herbert
744085fa54 Fix exploding fruit not getting correct lifetime 2019-09-13 20:25:08 +09:00
Andrei Zavatski
9e742839ac Use correct database migration 2019-09-13 13:57:55 +03:00
Dean Herbert
8ba12fc91f Merge remote-tracking branch 'upstream/master' into fix-catch-rewind 2019-09-13 19:49:36 +09:00
Andrei Zavatski
fb9b25b786 Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video 2019-09-13 13:48:14 +03:00
Andrei Zavatski
c13950fbbf Remove custom db additions 2019-09-13 13:43:21 +03:00
Dan Balasescu
2e86185ccc
Merge pull request #6086 from peppy/improve-catch-replay-frames
Improve how osu!catch stores and replays key actions
2019-09-13 19:43:16 +09:00
Andrei Zavatski
437e121056 Merge remote-tracking branch 'refs/remotes/ppy/master' into beatmap-video 2019-09-13 13:39:58 +03:00
Dean Herbert
a6420def99 Make hyperdash test automatic 2019-09-13 19:29:49 +09:00
Dan Balasescu
125b3fda6c
Merge branch 'master' into improve-catch-replay-frames 2019-09-13 19:23:15 +09:00
Dean Herbert
1b9ef6a8e7
Merge branch 'master' into fix-catch-rewind 2019-09-13 19:10:11 +09:00
Dean Herbert
e1ed5dfa7d
Reset DrawableHitObject lifetimes on state change (#6028)
Reset DrawableHitObject lifetimes on state change

Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
2019-09-13 19:10:02 +09:00
smoogipoo
5c2c055614 Set lifetime on initial state update 2019-09-13 18:49:21 +09:00
Dean Herbert
ceee132345
Implement RankingsHeader component for rankings overlay (#6082)
Implement RankingsHeader component for rankings overlay

Co-authored-by: Dean Herbert <pe@ppy.sh>
2019-09-13 18:23:31 +09:00
Dean Herbert
614e68cdf9 Remove redundant BindTarget usage 2019-09-13 18:11:17 +09:00
Dean Herbert
031f0ee1e7 Consume ValueChanged and inline some pointless constants 2019-09-13 18:09:15 +09:00
Dean Herbert
1e4f3507ed Fix layout not matching web 2019-09-13 18:07:52 +09:00
Dean Herbert
2c3f391b9e
Merge branch 'master' into rankings-header 2019-09-13 17:53:53 +09:00
Dean Herbert
e68f0d7ba8
Bump ppy.osu.Game.Resources from 2019.904.0 to 2019.913.0 (#6096)
Bump ppy.osu.Game.Resources from 2019.904.0 to 2019.913.0

Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-09-13 17:49:18 +09:00
Dean Herbert
a7c59098ce Fix missing assignment 2019-09-13 17:38:04 +09:00
dependabot-preview[bot]
d681f43e29
Bump ppy.osu.Game.Resources from 2019.904.0 to 2019.913.0
Bumps [ppy.osu.Game.Resources](https://github.com/ppy/osu-resources) from 2019.904.0 to 2019.913.0.
- [Release notes](https://github.com/ppy/osu-resources/releases)
- [Commits](https://github.com/ppy/osu-resources/compare/2019.904.0...2019.913.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-13 08:38:02 +00:00
Dean Herbert
0cc21c9c74 Fix changelog overlay potentially adding children after disposal 2019-09-13 17:21:47 +09:00
Dean Herbert
7cb79dd760 Fix incorrect DI usage of IAPIProvider in many tests 2019-09-13 17:15:33 +09:00
Andrei Zavatski
9a9654dbd1 Fix the Test Scene 2019-09-13 10:59:09 +03:00
Andrei Zavatski
6867b3c232 Update resources 2019-09-13 10:56:21 +03:00
Andrei Zavatski
c9ae4336f9 Fix RankingsScope test 2019-09-13 10:50:26 +03:00
Andrei Zavatski
51f17ccb1b Remove test duplicate 2019-09-13 10:48:02 +03:00
Andrei Zavatski
cb98b07e33 Merge master with conflicts resolved 2019-09-13 10:45:01 +03:00
Dean Herbert
0231984127
Merge pull request #6076 from EVAST9919/rankings-title
Implement HeaderTitle component for rankings overlay
2019-09-13 16:39:16 +09:00
Dean Herbert
ffd205f470 Merge remote-tracking branch 'upstream/master' into pr/EVAST9919/6076 2019-09-13 16:25:30 +09:00
Dean Herbert
78e7be919f Remove unnecessary container 2019-09-13 16:25:25 +09:00
Dean Herbert
c4f9be5913
Merge pull request #6093 from smoogipoo:fix-player-restart
Fix player not correctly restarting after an unpause
2019-09-13 16:09:41 +09:00