1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 04:52:57 +08:00

Merge branch 'master' into fix-perfectcurve

This commit is contained in:
Dean Herbert 2018-03-02 21:49:33 +09:00 committed by GitHub
commit 06cf9cbd63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 1436 additions and 185 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,34 +1,5 @@
osu file format v14
[General]
AudioFilename: virtual
AudioLeadIn: 0
PreviewTime: -1
Countdown: 1
SampleSet: Soft
StackLeniency: 0.7
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1
[Editor]
DistanceSpacing: 1.5
BeatDivisor: 4
GridSize: 32
TimelineZoom: 1
[Metadata]
Title:Basic
TitleUnicode:Test Suite
Artist:peppy
ArtistUnicode:peppy
Creator:peppy
Version:[Basic]
Source:
Tags:
BeatmapID:826308
BeatmapSetID:-1
[Difficulty]
HPDrainRate:6
CircleSize:4
@ -37,21 +8,11 @@ ApproachRate:8.3
SliderMultiplier:1.6
SliderTickRate:1
[Events]
//Background and Video events
//Break Periods
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples
[TimingPoints]
500,500,4,2,1,50,1,0
13426,-100,4,3,1,45,0,0
14884,-100,4,2,1,50,0,0
[HitObjects]
96,192,500,6,0,L|416:192,2,320
256,192,3000,12,0,4000,0:0:0:0:

View File

@ -47,7 +47,7 @@ namespace osu.Game.Rulesets.Catch.Tests
}
}
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new CatchBeatmapConverter();
protected override IBeatmapConverter CreateConverter(Beatmap beatmap) => new CatchBeatmapConverter();
}
public struct ConvertValue : IEquatable<ConvertValue>

View File

@ -1 +1,103 @@
{"Mappings":[{"StartTime":500.0,"Objects":[{"StartTime":500.0,"EndTime":2500.0,"Column":0},{"StartTime":1500.0,"EndTime":2500.0,"Column":1}]},{"StartTime":3000.0,"Objects":[{"StartTime":3000.0,"EndTime":4000.0,"Column":2}]},{"StartTime":4500.0,"Objects":[{"StartTime":4500.0,"EndTime":5500.0,"Column":4}]},{"StartTime":6000.0,"Objects":[{"StartTime":6000.0,"EndTime":6500.0,"Column":2}]},{"StartTime":7000.0,"Objects":[{"StartTime":7000.0,"EndTime":8000.0,"Column":2}]},{"StartTime":8500.0,"Objects":[{"StartTime":8500.0,"EndTime":11000.0,"Column":0}]},{"StartTime":11500.0,"Objects":[{"StartTime":11500.0,"EndTime":12000.0,"Column":1}]},{"StartTime":12500.0,"Objects":[{"StartTime":12500.0,"EndTime":16500.0,"Column":4}]},{"StartTime":17000.0,"Objects":[{"StartTime":17000.0,"EndTime":18000.0,"Column":2}]},{"StartTime":18500.0,"Objects":[{"StartTime":18500.0,"EndTime":19450.0,"Column":0}]},{"StartTime":19875.0,"Objects":[{"StartTime":19875.0,"EndTime":23875.0,"Column":1},{"StartTime":19875.0,"EndTime":23875.0,"Column":0}]}]}
{
"Mappings": [{
"StartTime": 500,
"Objects": [{
"StartTime": 500,
"EndTime": 2500,
"Column": 0
},
{
"StartTime": 1500,
"EndTime": 2500,
"Column": 1
}
]
},
{
"StartTime": 3000,
"Objects": [{
"StartTime": 3000,
"EndTime": 4000,
"Column": 2
}]
},
{
"StartTime": 4500,
"Objects": [{
"StartTime": 4500,
"EndTime": 5500,
"Column": 4
}]
},
{
"StartTime": 6000,
"Objects": [{
"StartTime": 6000,
"EndTime": 6500,
"Column": 2
}]
},
{
"StartTime": 7000,
"Objects": [{
"StartTime": 7000,
"EndTime": 8000,
"Column": 2
}]
},
{
"StartTime": 8500,
"Objects": [{
"StartTime": 8500,
"EndTime": 11000,
"Column": 0
}]
},
{
"StartTime": 11500,
"Objects": [{
"StartTime": 11500,
"EndTime": 12000,
"Column": 1
}]
},
{
"StartTime": 12500,
"Objects": [{
"StartTime": 12500,
"EndTime": 16500,
"Column": 4
}]
},
{
"StartTime": 17000,
"Objects": [{
"StartTime": 17000,
"EndTime": 18000,
"Column": 2
}]
},
{
"StartTime": 18500,
"Objects": [{
"StartTime": 18500,
"EndTime": 19450,
"Column": 0
}]
},
{
"StartTime": 19875,
"Objects": [{
"StartTime": 19875,
"EndTime": 23875,
"Column": 1
},
{
"StartTime": 19875,
"EndTime": 23875,
"Column": 0
}
]
}
]
}

View File

@ -1,34 +1,5 @@
osu file format v14
[General]
AudioFilename: virtual
AudioLeadIn: 0
PreviewTime: -1
Countdown: 1
SampleSet: Soft
StackLeniency: 0.7
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1
[Editor]
DistanceSpacing: 1.5
BeatDivisor: 4
GridSize: 32
TimelineZoom: 1
[Metadata]
Title:Basic
TitleUnicode:Test Suite
Artist:peppy
ArtistUnicode:peppy
Creator:peppy
Version:[Basic]
Source:
Tags:
BeatmapID:826308
BeatmapSetID:-1
[Difficulty]
HPDrainRate:6
CircleSize:4
@ -37,21 +8,11 @@ ApproachRate:8.3
SliderMultiplier:1.6
SliderTickRate:1
[Events]
//Background and Video events
//Break Periods
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples
[TimingPoints]
500,500,4,2,1,50,1,0
13426,-100,4,3,1,45,0,0
14884,-100,4,2,1,50,0,0
[HitObjects]
96,192,500,6,0,L|416:192,2,320
256,192,3000,12,0,4000,0:0:0:0:

View File

@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Mania.Tests
};
}
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new ManiaBeatmapConverter(isForCurrentRuleset, beatmap);
protected override IBeatmapConverter CreateConverter(Beatmap beatmap) => new ManiaBeatmapConverter(isForCurrentRuleset, beatmap);
}
public struct ConvertValue : IEquatable<ConvertValue>

View File

@ -2,6 +2,8 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.UI;
@ -22,8 +24,14 @@ namespace osu.Game.Rulesets.Osu.Mods
if (slider == null)
return;
slider.HeadCircle.Position = new Vector2(slider.HeadCircle.Position.X, OsuPlayfield.BASE_SIZE.Y - slider.HeadCircle.Position.Y);
slider.TailCircle.Position = new Vector2(slider.TailCircle.Position.X, OsuPlayfield.BASE_SIZE.Y - slider.TailCircle.Position.Y);
slider.NestedHitObjects.OfType<SliderTick>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
slider.NestedHitObjects.OfType<RepeatPoint>().ForEach(h => h.Position = new Vector2(h.Position.X, OsuPlayfield.BASE_SIZE.Y - h.Position.Y));
var newControlPoints = new List<Vector2>();
slider.ControlPoints.ForEach(c => newControlPoints.Add(new Vector2(c.X, OsuPlayfield.BASE_SIZE.Y - c.Y)));
slider.ControlPoints.ForEach(c => newControlPoints.Add(new Vector2(c.X, -c.Y)));
slider.ControlPoints = newControlPoints;
slider.Curve?.Calculate(); // Recalculate the slider curve

View File

@ -1 +1,124 @@
{"Mappings":[{"StartTime":500.0,"Objects":[{"StartTime":500.0,"EndTime":2500.0,"StartX":96.0,"StartY":192.0,"EndX":96.0,"EndY":192.0}]},{"StartTime":3000.0,"Objects":[{"StartTime":3000.0,"EndTime":4000.0,"StartX":256.0,"StartY":192.0,"EndX":256.0,"EndY":192.0}]},{"StartTime":4500.0,"Objects":[{"StartTime":4500.0,"EndTime":5500.0,"StartX":256.0,"StartY":192.0,"EndX":256.0,"EndY":192.0}]},{"StartTime":6000.0,"Objects":[{"StartTime":6000.0,"EndTime":6500.0,"StartX":256.0,"StartY":192.0,"EndX":256.0,"EndY":192.0}]},{"StartTime":7000.0,"Objects":[{"StartTime":7000.0,"EndTime":8000.0,"StartX":256.0,"StartY":128.0,"EndX":256.0,"EndY":128.0}]},{"StartTime":8500.0,"Objects":[{"StartTime":8500.0,"EndTime":10999.0,"StartX":32.0,"StartY":192.0,"EndX":508.166229,"EndY":153.299271}]},{"StartTime":11500.0,"Objects":[{"StartTime":11500.0,"EndTime":12000.0,"StartX":256.0,"StartY":192.0,"EndX":256.0,"EndY":192.0}]},{"StartTime":12500.0,"Objects":[{"StartTime":12500.0,"EndTime":16500.0,"StartX":512.0,"StartY":320.0,"EndX":291.1977,"EndY":40.799427}]},{"StartTime":17000.0,"Objects":[{"StartTime":17000.0,"EndTime":18000.0,"StartX":256.0,"StartY":256.0,"EndX":256.0,"EndY":256.0}]},{"StartTime":18500.0,"Objects":[{"StartTime":18500.0,"EndTime":19450.0,"StartX":256.0,"StartY":192.0,"EndX":256.0,"EndY":192.0}]},{"StartTime":19875.0,"Objects":[{"StartTime":19875.0,"EndTime":23874.0,"StartX":216.0,"StartY":231.0,"EndX":408.720825,"EndY":339.810455}]}]}
{
"Mappings": [{
"StartTime": 500,
"Objects": [{
"StartTime": 500,
"EndTime": 2500,
"StartX": 96,
"StartY": 192,
"EndX": 96,
"EndY": 192
}]
},
{
"StartTime": 3000,
"Objects": [{
"StartTime": 3000,
"EndTime": 4000,
"StartX": 256,
"StartY": 192,
"EndX": 256,
"EndY": 192
}]
},
{
"StartTime": 4500,
"Objects": [{
"StartTime": 4500,
"EndTime": 5500,
"StartX": 256,
"StartY": 192,
"EndX": 256,
"EndY": 192
}]
},
{
"StartTime": 6000,
"Objects": [{
"StartTime": 6000,
"EndTime": 6500,
"StartX": 256,
"StartY": 192,
"EndX": 256,
"EndY": 192
}]
},
{
"StartTime": 7000,
"Objects": [{
"StartTime": 7000,
"EndTime": 8000,
"StartX": 256,
"StartY": 128,
"EndX": 256,
"EndY": 128
}]
},
{
"StartTime": 8500,
"Objects": [{
"StartTime": 8500,
"EndTime": 10999,
"StartX": 32,
"StartY": 192,
"EndX": 508.166229,
"EndY": 153.299271
}]
},
{
"StartTime": 11500,
"Objects": [{
"StartTime": 11500,
"EndTime": 12000,
"StartX": 256,
"StartY": 192,
"EndX": 256,
"EndY": 192
}]
},
{
"StartTime": 12500,
"Objects": [{
"StartTime": 12500,
"EndTime": 16500,
"StartX": 512,
"StartY": 320,
"EndX": 291.1977,
"EndY": 40.799427
}]
},
{
"StartTime": 17000,
"Objects": [{
"StartTime": 17000,
"EndTime": 18000,
"StartX": 256,
"StartY": 256,
"EndX": 256,
"EndY": 256
}]
},
{
"StartTime": 18500,
"Objects": [{
"StartTime": 18500,
"EndTime": 19450,
"StartX": 256,
"StartY": 192,
"EndX": 256,
"EndY": 192
}]
},
{
"StartTime": 19875,
"Objects": [{
"StartTime": 19875,
"EndTime": 23874,
"StartX": 216,
"StartY": 231,
"EndX": 408.720825,
"EndY": 339.810455
}]
}
]
}

View File

@ -1,34 +1,5 @@
osu file format v14
[General]
AudioFilename: virtual
AudioLeadIn: 0
PreviewTime: -1
Countdown: 1
SampleSet: Soft
StackLeniency: 0.7
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1
[Editor]
DistanceSpacing: 1.5
BeatDivisor: 4
GridSize: 32
TimelineZoom: 1
[Metadata]
Title:Basic
TitleUnicode:Test Suite
Artist:peppy
ArtistUnicode:peppy
Creator:peppy
Version:[Basic]
Source:
Tags:
BeatmapID:826308
BeatmapSetID:-1
[Difficulty]
HPDrainRate:6
CircleSize:4
@ -37,21 +8,11 @@ ApproachRate:8.3
SliderMultiplier:1.6
SliderTickRate:1
[Events]
//Background and Video events
//Break Periods
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples
[TimingPoints]
500,500,4,2,1,50,1,0
13426,-100,4,3,1,45,0,0
14884,-100,4,2,1,50,0,0
[HitObjects]
96,192,500,6,0,L|416:192,2,320
256,192,3000,12,0,4000,0:0:0:0:

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Osu.Tests
};
}
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new OsuBeatmapConverter();
protected override IBeatmapConverter CreateConverter(Beatmap beatmap) => new OsuBeatmapConverter();
}
public struct ConvertValue : IEquatable<ConvertValue>

View File

@ -1 +1,209 @@
{"Mappings":[{"StartTime":500.0,"Objects":[{"StartTime":500.0,"EndTime":2499.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":true,"IsSwell":false,"IsStrong":false}]},{"StartTime":3000.0,"Objects":[{"StartTime":3000.0,"EndTime":4000.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":false,"IsSwell":true,"IsStrong":false}]},{"StartTime":4500.0,"Objects":[{"StartTime":4500.0,"EndTime":5500.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":false,"IsSwell":true,"IsStrong":false}]},{"StartTime":6000.0,"Objects":[{"StartTime":6000.0,"EndTime":6500.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":false,"IsSwell":true,"IsStrong":false}]},{"StartTime":7000.0,"Objects":[{"StartTime":7000.0,"EndTime":7000.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":7249.0,"EndTime":7249.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":7499.0,"EndTime":7499.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":7749.0,"EndTime":7749.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":7999.0,"EndTime":7999.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false}]},{"StartTime":8500.0,"Objects":[{"StartTime":8500.0,"EndTime":10999.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":true,"IsSwell":false,"IsStrong":false}]},{"StartTime":11500.0,"Objects":[{"StartTime":11500.0,"EndTime":12000.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":false,"IsSwell":true,"IsStrong":false}]},{"StartTime":12500.0,"Objects":[{"StartTime":12500.0,"EndTime":16499.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":true,"IsSwell":false,"IsStrong":false}]},{"StartTime":17000.0,"Objects":[{"StartTime":17000.0,"EndTime":17000.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":17249.0,"EndTime":17249.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":17499.0,"EndTime":17499.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":17749.0,"EndTime":17749.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false},{"StartTime":17999.0,"EndTime":17999.0,"IsRim":false,"IsCentre":true,"IsDrumRoll":false,"IsSwell":false,"IsStrong":false}]},{"StartTime":18500.0,"Objects":[{"StartTime":18500.0,"EndTime":19450.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":false,"IsSwell":true,"IsStrong":false}]},{"StartTime":19875.0,"Objects":[{"StartTime":19875.0,"EndTime":23874.0,"IsRim":false,"IsCentre":false,"IsDrumRoll":true,"IsSwell":false,"IsStrong":false}]}]}
{
"Mappings": [{
"StartTime": 500,
"Objects": [{
"StartTime": 500,
"EndTime": 2499,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": true,
"IsSwell": false,
"IsStrong": false
}]
},
{
"StartTime": 3000,
"Objects": [{
"StartTime": 3000,
"EndTime": 4000,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": false,
"IsSwell": true,
"IsStrong": false
}]
},
{
"StartTime": 4500,
"Objects": [{
"StartTime": 4500,
"EndTime": 5500,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": false,
"IsSwell": true,
"IsStrong": false
}]
},
{
"StartTime": 6000,
"Objects": [{
"StartTime": 6000,
"EndTime": 6500,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": false,
"IsSwell": true,
"IsStrong": false
}]
},
{
"StartTime": 7000,
"Objects": [{
"StartTime": 7000,
"EndTime": 7000,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 7249,
"EndTime": 7249,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 7499,
"EndTime": 7499,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 7749,
"EndTime": 7749,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 7999,
"EndTime": 7999,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
}
]
},
{
"StartTime": 8500,
"Objects": [{
"StartTime": 8500,
"EndTime": 10999,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": true,
"IsSwell": false,
"IsStrong": false
}]
},
{
"StartTime": 11500,
"Objects": [{
"StartTime": 11500,
"EndTime": 12000,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": false,
"IsSwell": true,
"IsStrong": false
}]
},
{
"StartTime": 12500,
"Objects": [{
"StartTime": 12500,
"EndTime": 16499,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": true,
"IsSwell": false,
"IsStrong": false
}]
},
{
"StartTime": 17000,
"Objects": [{
"StartTime": 17000,
"EndTime": 17000,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 17249,
"EndTime": 17249,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 17499,
"EndTime": 17499,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 17749,
"EndTime": 17749,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
},
{
"StartTime": 17999,
"EndTime": 17999,
"IsRim": false,
"IsCentre": true,
"IsDrumRoll": false,
"IsSwell": false,
"IsStrong": false
}
]
},
{
"StartTime": 18500,
"Objects": [{
"StartTime": 18500,
"EndTime": 19450,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": false,
"IsSwell": true,
"IsStrong": false
}]
},
{
"StartTime": 19875,
"Objects": [{
"StartTime": 19875,
"EndTime": 23874,
"IsRim": false,
"IsCentre": false,
"IsDrumRoll": true,
"IsSwell": false,
"IsStrong": false
}]
}
]
}

View File

@ -1,34 +1,5 @@
osu file format v14
[General]
AudioFilename: virtual
AudioLeadIn: 0
PreviewTime: -1
Countdown: 1
SampleSet: Soft
StackLeniency: 0.7
Mode: 0
LetterboxInBreaks: 0
WidescreenStoryboard: 1
[Editor]
DistanceSpacing: 1.5
BeatDivisor: 4
GridSize: 32
TimelineZoom: 1
[Metadata]
Title:Basic
TitleUnicode:Test Suite
Artist:peppy
ArtistUnicode:peppy
Creator:peppy
Version:[Basic]
Source:
Tags:
BeatmapID:826308
BeatmapSetID:-1
[Difficulty]
HPDrainRate:6
CircleSize:4
@ -37,21 +8,11 @@ ApproachRate:8.3
SliderMultiplier:1.6
SliderTickRate:1
[Events]
//Background and Video events
//Break Periods
//Storyboard Layer 0 (Background)
//Storyboard Layer 1 (Fail)
//Storyboard Layer 2 (Pass)
//Storyboard Layer 3 (Foreground)
//Storyboard Sound Samples
[TimingPoints]
500,500,4,2,1,50,1,0
13426,-100,4,3,1,45,0,0
14884,-100,4,2,1,50,0,0
[HitObjects]
96,192,500,6,0,L|416:192,2,320
256,192,3000,12,0,4000,0:0:0:0:

View File

@ -42,7 +42,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
};
}
protected override ITestableBeatmapConverter CreateConverter(Beatmap beatmap) => new TaikoBeatmapConverter(isForCurrentRuleset);
protected override IBeatmapConverter CreateConverter(Beatmap beatmap) => new TaikoBeatmapConverter(isForCurrentRuleset);
}
public struct ConvertValue : IEquatable<ConvertValue>

View File

@ -8,31 +8,15 @@ using osu.Game.Rulesets.Objects;
namespace osu.Game.Beatmaps
{
public interface ITestableBeatmapConverter
{
/// <summary>
/// Invoked when a <see cref="HitObject"/> has been converted.
/// The first argument contains the <see cref="HitObject"/> that was converted.
/// The second argument contains the <see cref="HitObject"/>s that were output from the conversion process.
/// </summary>
event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
/// <summary>
/// Converts a Beatmap using this Beatmap Converter.
/// </summary>
/// <param name="original">The un-converted Beatmap.</param>
void Convert(Beatmap beatmap);
}
/// <summary>
/// Converts a Beatmap for another mode.
/// </summary>
/// <typeparam name="T">The type of HitObject stored in the Beatmap.</typeparam>
public abstract class BeatmapConverter<T> : ITestableBeatmapConverter
public abstract class BeatmapConverter<T> : IBeatmapConverter
where T : HitObject
{
private event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
event Action<HitObject, IEnumerable<HitObject>> ITestableBeatmapConverter.ObjectConverted
event Action<HitObject, IEnumerable<HitObject>> IBeatmapConverter.ObjectConverted
{
add => ObjectConverted += value;
remove => ObjectConverted -= value;
@ -56,7 +40,7 @@ namespace osu.Game.Beatmaps
return ConvertBeatmap(new Beatmap(original));
}
void ITestableBeatmapConverter.Convert(Beatmap original) => Convert(original);
void IBeatmapConverter.Convert(Beatmap original) => Convert(original);
/// <summary>
/// Performs the conversion of a Beatmap using this Beatmap Converter.

View File

@ -0,0 +1,25 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using osu.Game.Rulesets.Objects;
namespace osu.Game.Beatmaps
{
public interface IBeatmapConverter
{
/// <summary>
/// Invoked when a <see cref="HitObject"/> has been converted.
/// The first argument contains the <see cref="HitObject"/> that was converted.
/// The second argument contains the <see cref="HitObject"/>s that were output from the conversion process.
/// </summary>
event Action<HitObject, IEnumerable<HitObject>> ObjectConverted;
/// <summary>
/// Converts a Beatmap using this Beatmap Converter.
/// </summary>
/// <param name="original">The un-converted Beatmap.</param>
void Convert(Beatmap beatmap);
}
}

View File

@ -122,7 +122,7 @@ namespace osu.Game.Tests.Beatmaps
}
protected abstract IEnumerable<TConvertValue> CreateConvertValue(HitObject hitObject);
protected abstract ITestableBeatmapConverter CreateConverter(Beatmap beatmap);
protected abstract IBeatmapConverter CreateConverter(Beatmap beatmap);
private class ConvertMapping
{

View File

@ -270,6 +270,7 @@
<Compile Include="Beatmaps\Formats\JsonBeatmapDecoder.cs" />
<Compile Include="Beatmaps\Formats\LegacyDecoder.cs" />
<Compile Include="Beatmaps\Formats\LegacyStoryboardDecoder.cs" />
<Compile Include="Beatmaps\IBeatmapConverter.cs" />
<Compile Include="Configuration\DatabasedSetting.cs" />
<Compile Include="Configuration\SettingsStore.cs" />
<Compile Include="Configuration\DatabasedConfigManager.cs" />