mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Merge remote-tracking branch 'Joehuu/master' into flashlight-dim
This commit is contained in:
commit
117f8bdd01
@ -1,5 +1,5 @@
|
|||||||
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
#addin "nuget:?package=CodeFileSanity&version=0.0.21"
|
||||||
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2018.3.4"
|
#addin "nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2019.1.1"
|
||||||
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
#tool "nuget:?package=NVika.MSBuild&version=1.0.1"
|
||||||
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
var nVikaToolPath = GetFiles("./tools/NVika.MSBuild.*/tools/NVika.exe").First();
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@ namespace osu.Desktop
|
|||||||
if (versionManager != null)
|
if (versionManager != null)
|
||||||
versionManager.State = Visibility.Visible;
|
versionManager.State = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (versionManager != null)
|
if (versionManager != null)
|
||||||
versionManager.State = Visibility.Hidden;
|
versionManager.State = Visibility.Hidden;
|
||||||
@ -87,6 +88,7 @@ namespace osu.Desktop
|
|||||||
public override void SetHost(GameHost host)
|
public override void SetHost(GameHost host)
|
||||||
{
|
{
|
||||||
base.SetHost(host);
|
base.SetHost(host);
|
||||||
|
|
||||||
if (host.Window is DesktopGameWindow desktopWindow)
|
if (host.Window is DesktopGameWindow desktopWindow)
|
||||||
{
|
{
|
||||||
desktopWindow.CursorState |= CursorState.Hidden;
|
desktopWindow.CursorState |= CursorState.Hidden;
|
||||||
|
@ -95,6 +95,7 @@ namespace osu.Desktop.Overlays
|
|||||||
|
|
||||||
var version = game.Version;
|
var version = game.Version;
|
||||||
var lastVersion = config.Get<string>(OsuSetting.Version);
|
var lastVersion = config.Get<string>(OsuSetting.Version);
|
||||||
|
|
||||||
if (game.IsDeployedBuild && version != lastVersion)
|
if (game.IsDeployedBuild && version != lastVersion)
|
||||||
{
|
{
|
||||||
config.Set(OsuSetting.Version, version);
|
config.Set(OsuSetting.Version, version);
|
||||||
|
@ -31,6 +31,7 @@ namespace osu.Desktop
|
|||||||
var importer = new ArchiveImportIPCChannel(host);
|
var importer = new ArchiveImportIPCChannel(host);
|
||||||
// Restore the cwd so relative paths given at the command line work correctly
|
// Restore the cwd so relative paths given at the command line work correctly
|
||||||
Directory.SetCurrentDirectory(cwd);
|
Directory.SetCurrentDirectory(cwd);
|
||||||
|
|
||||||
foreach (var file in args)
|
foreach (var file in args)
|
||||||
{
|
{
|
||||||
Console.WriteLine(@"Importing {0}", file);
|
Console.WriteLine(@"Importing {0}", file);
|
||||||
|
@ -78,6 +78,7 @@ namespace osu.Desktop.Updater
|
|||||||
case RuntimeInfo.Platform.Windows:
|
case RuntimeInfo.Platform.Windows:
|
||||||
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".exe"));
|
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".exe"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RuntimeInfo.Platform.MacOsx:
|
case RuntimeInfo.Platform.MacOsx:
|
||||||
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".app.zip"));
|
bestAsset = release.Assets?.Find(f => f.Name.EndsWith(".app.zip"));
|
||||||
break;
|
break;
|
||||||
|
@ -175,7 +175,7 @@ namespace osu.Desktop.Updater
|
|||||||
|
|
||||||
public SquirrelLogger()
|
public SquirrelLogger()
|
||||||
{
|
{
|
||||||
var file = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "SquirrelSetupUpdater.log");
|
var file = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location ?? Directory.GetCurrentDirectory()), "SquirrelSetupUpdater.log");
|
||||||
if (File.Exists(file)) File.Delete(file);
|
if (File.Exists(file)) File.Delete(file);
|
||||||
path = file;
|
path = file;
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,13 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
yield return new ConvertValue((CatchHitObject)nested);
|
yield return new ConvertValue((CatchHitObject)nested);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BananaShower shower:
|
case BananaShower shower:
|
||||||
foreach (var nested in shower.NestedHitObjects)
|
foreach (var nested in shower.NestedHitObjects)
|
||||||
yield return new ConvertValue((CatchHitObject)nested);
|
yield return new ConvertValue((CatchHitObject)nested);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
yield return new ConvertValue((CatchHitObject)hitObject);
|
yield return new ConvertValue((CatchHitObject)hitObject);
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
initialiseHyperDash((List<CatchHitObject>)Beatmap.HitObjects);
|
initialiseHyperDash((List<CatchHitObject>)Beatmap.HitObjects);
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
foreach (var obj in Beatmap.HitObjects.OfType<CatchHitObject>())
|
foreach (var obj in Beatmap.HitObjects.OfType<CatchHitObject>())
|
||||||
{
|
{
|
||||||
obj.IndexInBeatmap = index++;
|
obj.IndexInBeatmap = index++;
|
||||||
@ -58,6 +59,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JuiceStream juiceStream:
|
case JuiceStream juiceStream:
|
||||||
foreach (var nested in juiceStream.NestedHitObjects)
|
foreach (var nested in juiceStream.NestedHitObjects)
|
||||||
{
|
{
|
||||||
@ -103,6 +105,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
double timeToNext = nextObject.StartTime - currentObject.StartTime - 1000f / 60f / 4; // 1/4th of a frame of grace time, taken from osu-stable
|
double timeToNext = nextObject.StartTime - currentObject.StartTime - 1000f / 60f / 4; // 1/4th of a frame of grace time, taken from osu-stable
|
||||||
double distanceToNext = Math.Abs(nextObject.X - currentObject.X) - (lastDirection == thisDirection ? lastExcess : halfCatcherWidth);
|
double distanceToNext = Math.Abs(nextObject.X - currentObject.X) - (lastDirection == thisDirection ? lastExcess : halfCatcherWidth);
|
||||||
float distanceToHyper = (float)(timeToNext * CatcherArea.Catcher.BASE_SPEED - distanceToNext);
|
float distanceToHyper = (float)(timeToNext * CatcherArea.Catcher.BASE_SPEED - distanceToNext);
|
||||||
|
|
||||||
if (distanceToHyper < 0)
|
if (distanceToHyper < 0)
|
||||||
{
|
{
|
||||||
currentObject.HyperDashTarget = nextObject;
|
currentObject.HyperDashTarget = nextObject;
|
||||||
|
@ -87,6 +87,7 @@ namespace osu.Game.Rulesets.Catch
|
|||||||
new CatchModNoFail(),
|
new CatchModNoFail(),
|
||||||
new MultiMod(new CatchModHalfTime(), new CatchModDaycore())
|
new MultiMod(new CatchModHalfTime(), new CatchModDaycore())
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.DifficultyIncrease:
|
case ModType.DifficultyIncrease:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -96,17 +97,20 @@ namespace osu.Game.Rulesets.Catch
|
|||||||
new CatchModHidden(),
|
new CatchModHidden(),
|
||||||
new CatchModFlashlight(),
|
new CatchModFlashlight(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new CatchModAutoplay(), new ModCinema()),
|
new MultiMod(new CatchModAutoplay(), new ModCinema()),
|
||||||
new CatchModRelax(),
|
new CatchModRelax(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Fun:
|
case ModType.Fun:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new ModWindUp<CatchHitObject>(), new ModWindDown<CatchHitObject>())
|
new MultiMod(new ModWindUp<CatchHitObject>(), new ModWindDown<CatchHitObject>())
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return new Mod[] { };
|
return new Mod[] { };
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,7 @@ namespace osu.Game.Rulesets.Catch.Difficulty
|
|||||||
|
|
||||||
lastObject = hitObject;
|
lastObject = hitObject;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JuiceStream _:
|
case JuiceStream _:
|
||||||
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
|
foreach (var nested in hitObject.NestedHitObjects.OfType<CatchHitObject>().Where(o => !(o is TinyDroplet)))
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 1100;
|
return 1100;
|
||||||
}
|
}
|
||||||
@ -27,6 +28,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 0.008;
|
return 0.008;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 30;
|
return 30;
|
||||||
}
|
}
|
||||||
@ -24,6 +25,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return base.HealthIncreaseFor(result);
|
return base.HealthIncreaseFor(result);
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 0.007;
|
return 0.007;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 300;
|
return 300;
|
||||||
}
|
}
|
||||||
@ -28,6 +29,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return -0.02;
|
return -0.02;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 0.01;
|
return 0.01;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Catch.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 0.004;
|
return 0.004;
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
this.FadeOut(250).RotateTo(Rotation * 2, 250, Easing.Out).Expire();
|
this.FadeOut(250).RotateTo(Rotation * 2, 250, Easing.Out).Expire();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut().Expire();
|
this.FadeOut().Expire();
|
||||||
break;
|
break;
|
||||||
|
@ -106,6 +106,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return new Container();
|
return new Container();
|
||||||
|
|
||||||
case FruitVisualRepresentation.Raspberry:
|
case FruitVisualRepresentation.Raspberry:
|
||||||
return new Container
|
return new Container
|
||||||
{
|
{
|
||||||
@ -144,6 +145,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
case FruitVisualRepresentation.Pineapple:
|
case FruitVisualRepresentation.Pineapple:
|
||||||
return new Container
|
return new Container
|
||||||
{
|
{
|
||||||
@ -182,6 +184,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
case FruitVisualRepresentation.Pear:
|
case FruitVisualRepresentation.Pear:
|
||||||
return new Container
|
return new Container
|
||||||
{
|
{
|
||||||
@ -214,6 +217,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
case FruitVisualRepresentation.Grape:
|
case FruitVisualRepresentation.Grape:
|
||||||
return new Container
|
return new Container
|
||||||
{
|
{
|
||||||
@ -246,6 +250,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
case FruitVisualRepresentation.Banana:
|
case FruitVisualRepresentation.Banana:
|
||||||
return new Container
|
return new Container
|
||||||
{
|
{
|
||||||
@ -283,19 +288,25 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
default:
|
default:
|
||||||
case FruitVisualRepresentation.Pear:
|
case FruitVisualRepresentation.Pear:
|
||||||
return new Color4(17, 136, 170, 255);
|
return new Color4(17, 136, 170, 255);
|
||||||
|
|
||||||
case FruitVisualRepresentation.Grape:
|
case FruitVisualRepresentation.Grape:
|
||||||
return new Color4(204, 102, 0, 255);
|
return new Color4(204, 102, 0, 255);
|
||||||
|
|
||||||
case FruitVisualRepresentation.Raspberry:
|
case FruitVisualRepresentation.Raspberry:
|
||||||
return new Color4(121, 9, 13, 255);
|
return new Color4(121, 9, 13, 255);
|
||||||
|
|
||||||
case FruitVisualRepresentation.Pineapple:
|
case FruitVisualRepresentation.Pineapple:
|
||||||
return new Color4(102, 136, 0, 255);
|
return new Color4(102, 136, 0, 255);
|
||||||
|
|
||||||
case FruitVisualRepresentation.Banana:
|
case FruitVisualRepresentation.Banana:
|
||||||
switch (RNG.Next(0, 3))
|
switch (RNG.Next(0, 3))
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return new Color4(255, 240, 0, 255);
|
return new Color4(255, 240, 0, 255);
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
return new Color4(255, 192, 0, 255);
|
return new Color4(255, 192, 0, 255);
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
return new Color4(214, 221, 28, 255);
|
return new Color4(214, 221, 28, 255);
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH,
|
X = X + Path.PositionAt(e.PathProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderEventType.Head:
|
case SliderEventType.Head:
|
||||||
case SliderEventType.Tail:
|
case SliderEventType.Tail:
|
||||||
case SliderEventType.Repeat:
|
case SliderEventType.Repeat:
|
||||||
|
@ -32,6 +32,7 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return hpDrainRate;
|
return hpDrainRate;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 10.2 - hpDrainRate; // Award less HP as drain rate is increased
|
return 10.2 - hpDrainRate; // Award less HP as drain rate is increased
|
||||||
}
|
}
|
||||||
|
@ -292,6 +292,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
const float hyper_dash_transition_length = 180;
|
const float hyper_dash_transition_length = 180;
|
||||||
|
|
||||||
bool previouslyHyperDashing = HyperDashing;
|
bool previouslyHyperDashing = HyperDashing;
|
||||||
|
|
||||||
if (modifier <= 1 || X == targetPosition)
|
if (modifier <= 1 || X == targetPosition)
|
||||||
{
|
{
|
||||||
hyperDashModifier = 1;
|
hyperDashModifier = 1;
|
||||||
@ -325,9 +326,11 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
case CatchAction.MoveLeft:
|
case CatchAction.MoveLeft:
|
||||||
currentDirection--;
|
currentDirection--;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CatchAction.MoveRight:
|
case CatchAction.MoveRight:
|
||||||
currentDirection++;
|
currentDirection++;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CatchAction.Dash:
|
case CatchAction.Dash:
|
||||||
Dashing = true;
|
Dashing = true;
|
||||||
return true;
|
return true;
|
||||||
@ -343,9 +346,11 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
case CatchAction.MoveLeft:
|
case CatchAction.MoveLeft:
|
||||||
currentDirection++;
|
currentDirection++;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CatchAction.MoveRight:
|
case CatchAction.MoveRight:
|
||||||
currentDirection--;
|
currentDirection--;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case CatchAction.Dash:
|
case CatchAction.Dash:
|
||||||
Dashing = false;
|
Dashing = false;
|
||||||
return true;
|
return true;
|
||||||
|
@ -48,14 +48,19 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
{
|
{
|
||||||
case Banana banana:
|
case Banana banana:
|
||||||
return new DrawableBanana(banana);
|
return new DrawableBanana(banana);
|
||||||
|
|
||||||
case Fruit fruit:
|
case Fruit fruit:
|
||||||
return new DrawableFruit(fruit);
|
return new DrawableFruit(fruit);
|
||||||
|
|
||||||
case JuiceStream stream:
|
case JuiceStream stream:
|
||||||
return new DrawableJuiceStream(stream, CreateDrawableRepresentation);
|
return new DrawableJuiceStream(stream, CreateDrawableRepresentation);
|
||||||
|
|
||||||
case BananaShower shower:
|
case BananaShower shower:
|
||||||
return new DrawableBananaShower(shower, CreateDrawableRepresentation);
|
return new DrawableBananaShower(shower, CreateDrawableRepresentation);
|
||||||
|
|
||||||
case TinyDroplet tiny:
|
case TinyDroplet tiny:
|
||||||
return new DrawableTinyDroplet(tiny);
|
return new DrawableTinyDroplet(tiny);
|
||||||
|
|
||||||
case Droplet droplet:
|
case Droplet droplet:
|
||||||
return new DrawableDroplet(droplet);
|
return new DrawableDroplet(droplet);
|
||||||
}
|
}
|
||||||
|
@ -168,11 +168,13 @@ namespace osu.Game.Rulesets.Mania.Tests
|
|||||||
foreach (var nested in obj.NestedHitObjects)
|
foreach (var nested in obj.NestedHitObjects)
|
||||||
{
|
{
|
||||||
double finalPosition = (nested.HitObject.StartTime - obj.HitObject.StartTime) / endTime.Duration;
|
double finalPosition = (nested.HitObject.StartTime - obj.HitObject.StartTime) / endTime.Duration;
|
||||||
|
|
||||||
switch (direction)
|
switch (direction)
|
||||||
{
|
{
|
||||||
case ScrollingDirection.Up:
|
case ScrollingDirection.Up:
|
||||||
nested.Y = (float)(finalPosition * content.DrawHeight);
|
nested.Y = (float)(finalPosition * content.DrawHeight);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScrollingDirection.Down:
|
case ScrollingDirection.Down:
|
||||||
nested.Y = (float)(-finalPosition * content.DrawHeight);
|
nested.Y = (float)(-finalPosition * content.DrawHeight);
|
||||||
break;
|
break;
|
||||||
|
@ -48,6 +48,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps
|
|||||||
if (IsForCurrentRuleset)
|
if (IsForCurrentRuleset)
|
||||||
{
|
{
|
||||||
TargetColumns = (int)Math.Max(1, roundedCircleSize);
|
TargetColumns = (int)Math.Max(1, roundedCircleSize);
|
||||||
|
|
||||||
if (TargetColumns >= 10)
|
if (TargetColumns >= 10)
|
||||||
{
|
{
|
||||||
TargetColumns = TargetColumns / 2;
|
TargetColumns = TargetColumns / 2;
|
||||||
|
@ -179,6 +179,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
|
|
||||||
int usableColumns = TotalColumns - RandomStart - PreviousPattern.ColumnWithObjects;
|
int usableColumns = TotalColumns - RandomStart - PreviousPattern.ColumnWithObjects;
|
||||||
int nextColumn = GetRandomColumn();
|
int nextColumn = GetRandomColumn();
|
||||||
|
|
||||||
for (int i = 0; i < Math.Min(usableColumns, noteCount); i++)
|
for (int i = 0; i < Math.Min(usableColumns, noteCount); i++)
|
||||||
{
|
{
|
||||||
// Find available column
|
// Find available column
|
||||||
@ -217,6 +218,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
nextColumn = FindAvailableColumn(nextColumn, PreviousPattern);
|
nextColumn = FindAvailableColumn(nextColumn, PreviousPattern);
|
||||||
|
|
||||||
int lastColumn = nextColumn;
|
int lastColumn = nextColumn;
|
||||||
|
|
||||||
for (int i = 0; i < noteCount; i++)
|
for (int i = 0; i < noteCount; i++)
|
||||||
{
|
{
|
||||||
addToPattern(pattern, nextColumn, startTime, startTime);
|
addToPattern(pattern, nextColumn, startTime, startTime);
|
||||||
@ -299,6 +301,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
int interval = Random.Next(1, TotalColumns - (legacy ? 1 : 0));
|
int interval = Random.Next(1, TotalColumns - (legacy ? 1 : 0));
|
||||||
|
|
||||||
int nextColumn = GetColumn((HitObject as IHasXPosition)?.X ?? 0, true);
|
int nextColumn = GetColumn((HitObject as IHasXPosition)?.X ?? 0, true);
|
||||||
|
|
||||||
for (int i = 0; i <= spanCount; i++)
|
for (int i = 0; i <= spanCount; i++)
|
||||||
{
|
{
|
||||||
addToPattern(pattern, nextColumn, startTime, startTime);
|
addToPattern(pattern, nextColumn, startTime, startTime);
|
||||||
@ -341,16 +344,19 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
p3 = 0;
|
p3 = 0;
|
||||||
p4 = 0;
|
p4 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
p2 = Math.Min(p2, 0.1);
|
p2 = Math.Min(p2, 0.1);
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
p4 = 0;
|
p4 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
p2 = Math.Min(p2, 0.3);
|
p2 = Math.Min(p2, 0.3);
|
||||||
p3 = Math.Min(p3, 0.04);
|
p3 = Math.Min(p3, 0.04);
|
||||||
p4 = 0;
|
p4 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
p2 = Math.Min(p2, 0.34);
|
p2 = Math.Min(p2, 0.34);
|
||||||
p3 = Math.Min(p3, 0.1);
|
p3 = Math.Min(p3, 0.1);
|
||||||
@ -440,6 +446,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
bool ignoreHead = !sampleInfoListAt(startTime).Any(s => s.Name == SampleInfo.HIT_WHISTLE || s.Name == SampleInfo.HIT_FINISH || s.Name == SampleInfo.HIT_CLAP);
|
bool ignoreHead = !sampleInfoListAt(startTime).Any(s => s.Name == SampleInfo.HIT_WHISTLE || s.Name == SampleInfo.HIT_FINISH || s.Name == SampleInfo.HIT_CLAP);
|
||||||
|
|
||||||
var rowPattern = new Pattern();
|
var rowPattern = new Pattern();
|
||||||
|
|
||||||
for (int i = 0; i <= spanCount; i++)
|
for (int i = 0; i <= spanCount; i++)
|
||||||
{
|
{
|
||||||
if (!(ignoreHead && startTime == HitObject.StartTime))
|
if (!(ignoreHead && startTime == HitObject.StartTime))
|
||||||
|
@ -38,9 +38,11 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
case 8 when HitObject.Samples.Any(s => s.Name == SampleInfo.HIT_FINISH) && endTime - HitObject.StartTime < 1000:
|
case 8 when HitObject.Samples.Any(s => s.Name == SampleInfo.HIT_FINISH) && endTime - HitObject.StartTime < 1000:
|
||||||
addToPattern(pattern, 0, generateHold);
|
addToPattern(pattern, 0, generateHold);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
addToPattern(pattern, FindAvailableColumn(GetRandomColumn(), PreviousPattern), generateHold);
|
addToPattern(pattern, FindAvailableColumn(GetRandomColumn(), PreviousPattern), generateHold);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (TotalColumns > 0)
|
if (TotalColumns > 0)
|
||||||
addToPattern(pattern, GetRandomColumn(), generateHold);
|
addToPattern(pattern, GetRandomColumn(), generateHold);
|
||||||
|
@ -233,6 +233,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
noteCount = Math.Min(noteCount, TotalColumns - RandomStart - PreviousPattern.ColumnWithObjects);
|
noteCount = Math.Min(noteCount, TotalColumns - RandomStart - PreviousPattern.ColumnWithObjects);
|
||||||
|
|
||||||
int nextColumn = GetColumn((HitObject as IHasXPosition)?.X ?? 0, true);
|
int nextColumn = GetColumn((HitObject as IHasXPosition)?.X ?? 0, true);
|
||||||
|
|
||||||
for (int i = 0; i < noteCount; i++)
|
for (int i = 0; i < noteCount; i++)
|
||||||
{
|
{
|
||||||
nextColumn = allowStacking
|
nextColumn = allowStacking
|
||||||
@ -303,6 +304,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
|
|
||||||
int columnLimit = (TotalColumns % 2 == 0 ? TotalColumns : TotalColumns - 1) / 2;
|
int columnLimit = (TotalColumns % 2 == 0 ? TotalColumns : TotalColumns - 1) / 2;
|
||||||
int nextColumn = GetRandomColumn(upperBound: columnLimit);
|
int nextColumn = GetRandomColumn(upperBound: columnLimit);
|
||||||
|
|
||||||
for (int i = 0; i < noteCount; i++)
|
for (int i = 0; i < noteCount; i++)
|
||||||
{
|
{
|
||||||
nextColumn = FindAvailableColumn(nextColumn, upperBound: columnLimit, patterns: pattern);
|
nextColumn = FindAvailableColumn(nextColumn, upperBound: columnLimit, patterns: pattern);
|
||||||
@ -340,18 +342,21 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
p4 = 0;
|
p4 = 0;
|
||||||
p5 = 0;
|
p5 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
p2 = Math.Min(p2, 0.1);
|
p2 = Math.Min(p2, 0.1);
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
p4 = 0;
|
p4 = 0;
|
||||||
p5 = 0;
|
p5 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
p2 = Math.Min(p2, 0.23);
|
p2 = Math.Min(p2, 0.23);
|
||||||
p3 = Math.Min(p3, 0.04);
|
p3 = Math.Min(p3, 0.04);
|
||||||
p4 = 0;
|
p4 = 0;
|
||||||
p5 = 0;
|
p5 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
p3 = Math.Min(p3, 0.15);
|
p3 = Math.Min(p3, 0.15);
|
||||||
p4 = Math.Min(p4, 0.03);
|
p4 = Math.Min(p4, 0.03);
|
||||||
@ -384,20 +389,24 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
p2 = 0;
|
p2 = 0;
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
centreProbability = Math.Min(centreProbability, 0.03);
|
centreProbability = Math.Min(centreProbability, 0.03);
|
||||||
p2 = 0;
|
p2 = 0;
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
centreProbability = 0;
|
centreProbability = 0;
|
||||||
p2 = Math.Min(p2 * 2, 0.2);
|
p2 = Math.Min(p2 * 2, 0.2);
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
centreProbability = Math.Min(centreProbability, 0.03);
|
centreProbability = Math.Min(centreProbability, 0.03);
|
||||||
p3 = 0;
|
p3 = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
centreProbability = 0;
|
centreProbability = 0;
|
||||||
p2 = Math.Min(p2 * 2, 0.5);
|
p2 = Math.Min(p2 * 2, 0.5);
|
||||||
|
@ -158,6 +158,7 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
|
|
||||||
// Ensure that we have at least one free column, so that an endless loop is avoided
|
// Ensure that we have at least one free column, so that an endless loop is avoided
|
||||||
bool hasValidColumns = false;
|
bool hasValidColumns = false;
|
||||||
|
|
||||||
for (int i = lowerBound.Value; i < upperBound.Value; i++)
|
for (int i = lowerBound.Value; i < upperBound.Value; i++)
|
||||||
{
|
{
|
||||||
hasValidColumns = isValid(i);
|
hasValidColumns = isValid(i);
|
||||||
|
@ -66,6 +66,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
|||||||
{
|
{
|
||||||
case DrawableNote note:
|
case DrawableNote note:
|
||||||
return new NoteSelectionBlueprint(note);
|
return new NoteSelectionBlueprint(note);
|
||||||
|
|
||||||
case DrawableHoldNote holdNote:
|
case DrawableHoldNote holdNote:
|
||||||
return new HoldNoteSelectionBlueprint(holdNote);
|
return new HoldNoteSelectionBlueprint(holdNote);
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0.040;
|
return 0.040;
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,16 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Meh:
|
case HitResult.Meh:
|
||||||
return 50;
|
return 50;
|
||||||
|
|
||||||
case HitResult.Ok:
|
case HitResult.Ok:
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
return 200;
|
return 200;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 300;
|
return 300;
|
||||||
@ -32,16 +36,22 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return -0.125;
|
return -0.125;
|
||||||
|
|
||||||
case HitResult.Meh:
|
case HitResult.Meh:
|
||||||
return 0.005;
|
return 0.005;
|
||||||
|
|
||||||
case HitResult.Ok:
|
case HitResult.Ok:
|
||||||
return 0.010;
|
return 0.010;
|
||||||
|
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
return 0.035;
|
return 0.035;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 0.055;
|
return 0.055;
|
||||||
|
|
||||||
case HitResult.Perfect:
|
case HitResult.Perfect:
|
||||||
return 0.065;
|
return 0.065;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
new ManiaModNoFail(),
|
new ManiaModNoFail(),
|
||||||
new MultiMod(new ManiaModHalfTime(), new ManiaModDaycore()),
|
new MultiMod(new ManiaModHalfTime(), new ManiaModDaycore()),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.DifficultyIncrease:
|
case ModType.DifficultyIncrease:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -126,6 +127,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
new MultiMod(new ManiaModFadeIn(), new ManiaModHidden()),
|
new MultiMod(new ManiaModFadeIn(), new ManiaModHidden()),
|
||||||
new ManiaModFlashlight(),
|
new ManiaModFlashlight(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Conversion:
|
case ModType.Conversion:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -142,16 +144,19 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
new ManiaModDualStages(),
|
new ManiaModDualStages(),
|
||||||
new ManiaModMirror(),
|
new ManiaModMirror(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new ManiaModAutoplay(), new ModCinema()),
|
new MultiMod(new ManiaModAutoplay(), new ModCinema()),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Fun:
|
case ModType.Fun:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new ModWindUp<ManiaHitObject>(), new ModWindDown<ManiaHitObject>())
|
new MultiMod(new ModWindUp<ManiaHitObject>(), new ModWindDown<ManiaHitObject>())
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return new Mod[] { };
|
return new Mod[] { };
|
||||||
}
|
}
|
||||||
@ -214,6 +219,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
SpecialAction = ManiaAction.Special1,
|
SpecialAction = ManiaAction.Special1,
|
||||||
NormalActionStart = ManiaAction.Key1,
|
NormalActionStart = ManiaAction.Key1,
|
||||||
}.GenerateKeyBindingsFor(variant, out _);
|
}.GenerateKeyBindingsFor(variant, out _);
|
||||||
|
|
||||||
case PlayfieldType.Dual:
|
case PlayfieldType.Dual:
|
||||||
int keys = getDualStageKeyCount(variant);
|
int keys = getDualStageKeyCount(variant);
|
||||||
|
|
||||||
@ -271,6 +277,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return $"{variant}K";
|
return $"{variant}K";
|
||||||
|
|
||||||
case PlayfieldType.Dual:
|
case PlayfieldType.Dual:
|
||||||
{
|
{
|
||||||
var keys = getDualStageKeyCount(variant);
|
var keys = getDualStageKeyCount(variant);
|
||||||
|
@ -65,6 +65,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
|||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
this.FadeOut(150, Easing.In).Expire();
|
this.FadeOut(150, Easing.In).Expire();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut(150, Easing.OutQuint).Expire();
|
this.FadeOut(150, Easing.OutQuint).Expire();
|
||||||
break;
|
break;
|
||||||
|
@ -145,6 +145,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
|||||||
const float animation_length = 50;
|
const float animation_length = 50;
|
||||||
|
|
||||||
Foreground.ClearTransforms(false, nameof(Foreground.Colour));
|
Foreground.ClearTransforms(false, nameof(Foreground.Colour));
|
||||||
|
|
||||||
if (hitting)
|
if (hitting)
|
||||||
{
|
{
|
||||||
// wait for the next sync point
|
// wait for the next sync point
|
||||||
|
@ -28,6 +28,7 @@ namespace osu.Game.Rulesets.Mania.Replays
|
|||||||
var normalAction = ManiaAction.Key1;
|
var normalAction = ManiaAction.Key1;
|
||||||
var specialAction = ManiaAction.Special1;
|
var specialAction = ManiaAction.Special1;
|
||||||
int totalCounter = 0;
|
int totalCounter = 0;
|
||||||
|
|
||||||
foreach (var stage in Beatmap.Stages)
|
foreach (var stage in Beatmap.Stages)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < stage.Columns; i++)
|
for (int i = 0; i < stage.Columns; i++)
|
||||||
@ -51,6 +52,7 @@ namespace osu.Game.Rulesets.Mania.Replays
|
|||||||
var pointGroups = generateActionPoints().GroupBy(a => a.Time).OrderBy(g => g.First().Time);
|
var pointGroups = generateActionPoints().GroupBy(a => a.Time).OrderBy(g => g.First().Time);
|
||||||
|
|
||||||
var actions = new List<ManiaAction>();
|
var actions = new List<ManiaAction>();
|
||||||
|
|
||||||
foreach (var group in pointGroups)
|
foreach (var group in pointGroups)
|
||||||
{
|
{
|
||||||
foreach (var point in group)
|
foreach (var point in group)
|
||||||
@ -60,6 +62,7 @@ namespace osu.Game.Rulesets.Mania.Replays
|
|||||||
case HitPoint _:
|
case HitPoint _:
|
||||||
actions.Add(columnActions[point.Column]);
|
actions.Add(columnActions[point.Column]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ReleasePoint _:
|
case ReleasePoint _:
|
||||||
actions.Remove(columnActions[point.Column]);
|
actions.Remove(columnActions[point.Column]);
|
||||||
break;
|
break;
|
||||||
|
@ -39,6 +39,7 @@ namespace osu.Game.Rulesets.Mania.Replays
|
|||||||
|
|
||||||
int activeColumns = (int)(legacyFrame.MouseX ?? 0);
|
int activeColumns = (int)(legacyFrame.MouseX ?? 0);
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
|
|
||||||
while (activeColumns > 0)
|
while (activeColumns > 0)
|
||||||
{
|
{
|
||||||
var isSpecial = stage.IsSpecialColumn(counter);
|
var isSpecial = stage.IsSpecialColumn(counter);
|
||||||
|
@ -57,6 +57,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time - point.BeatLength : lastObjectTime + point.BeatLength * (int)point.TimeSignature;
|
double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time - point.BeatLength : lastObjectTime + point.BeatLength * (int)point.TimeSignature;
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
for (double t = timingPoints[i].Time; Precision.DefinitelyBigger(endTime, t); t += point.BeatLength, index++)
|
for (double t = timingPoints[i].Time; Precision.DefinitelyBigger(endTime, t); t += point.BeatLength, index++)
|
||||||
{
|
{
|
||||||
barLines.Add(new BarLine
|
barLines.Add(new BarLine
|
||||||
@ -105,8 +106,10 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
{
|
{
|
||||||
case HoldNote holdNote:
|
case HoldNote holdNote:
|
||||||
return new DrawableHoldNote(holdNote);
|
return new DrawableHoldNote(holdNote);
|
||||||
|
|
||||||
case Note note:
|
case Note note:
|
||||||
return new DrawableNote(note);
|
return new DrawableNote(note);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
var normalColumnAction = ManiaAction.Key1;
|
var normalColumnAction = ManiaAction.Key1;
|
||||||
var specialColumnAction = ManiaAction.Special1;
|
var specialColumnAction = ManiaAction.Special1;
|
||||||
int firstColumnIndex = 0;
|
int firstColumnIndex = 0;
|
||||||
|
|
||||||
for (int i = 0; i < stageDefinitions.Count; i++)
|
for (int i = 0; i < stageDefinitions.Count; i++)
|
||||||
{
|
{
|
||||||
var newStage = new ManiaStage(firstColumnIndex, stageDefinitions[i], ref normalColumnAction, ref specialColumnAction);
|
var newStage = new ManiaStage(firstColumnIndex, stageDefinitions[i], ref normalColumnAction, ref specialColumnAction);
|
||||||
@ -92,6 +93,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
private ManiaStage getStageByColumn(int column)
|
private ManiaStage getStageByColumn(int column)
|
||||||
{
|
{
|
||||||
int sum = 0;
|
int sum = 0;
|
||||||
|
|
||||||
foreach (var stage in stages)
|
foreach (var stage in stages)
|
||||||
{
|
{
|
||||||
sum = sum + stage.Columns.Count;
|
sum = sum + stage.Columns.Count;
|
||||||
|
@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
yield return createConvertValue(nested);
|
yield return createConvertValue(nested);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
yield return createConvertValue(hitObject);
|
yield return createConvertValue(hitObject);
|
||||||
|
|
||||||
|
@ -44,12 +44,14 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
|||||||
if (endIndex < 0) throw new ArgumentOutOfRangeException(nameof(endIndex), $"{nameof(endIndex)} cannot be less than 0.");
|
if (endIndex < 0) throw new ArgumentOutOfRangeException(nameof(endIndex), $"{nameof(endIndex)} cannot be less than 0.");
|
||||||
|
|
||||||
int extendedEndIndex = endIndex;
|
int extendedEndIndex = endIndex;
|
||||||
|
|
||||||
if (endIndex < beatmap.HitObjects.Count - 1)
|
if (endIndex < beatmap.HitObjects.Count - 1)
|
||||||
{
|
{
|
||||||
// Extend the end index to include objects they are stacked on
|
// Extend the end index to include objects they are stacked on
|
||||||
for (int i = endIndex; i >= startIndex; i--)
|
for (int i = endIndex; i >= startIndex; i--)
|
||||||
{
|
{
|
||||||
int stackBaseIndex = i;
|
int stackBaseIndex = i;
|
||||||
|
|
||||||
for (int n = stackBaseIndex + 1; n < beatmap.HitObjects.Count; n++)
|
for (int n = stackBaseIndex + 1; n < beatmap.HitObjects.Count; n++)
|
||||||
{
|
{
|
||||||
OsuHitObject stackBaseObject = beatmap.HitObjects[stackBaseIndex];
|
OsuHitObject stackBaseObject = beatmap.HitObjects[stackBaseIndex];
|
||||||
@ -87,6 +89,7 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
|||||||
|
|
||||||
//Reverse pass for stack calculation.
|
//Reverse pass for stack calculation.
|
||||||
int extendedStartIndex = startIndex;
|
int extendedStartIndex = startIndex;
|
||||||
|
|
||||||
for (int i = extendedEndIndex; i > startIndex; i--)
|
for (int i = extendedEndIndex; i > startIndex; i--)
|
||||||
{
|
{
|
||||||
int n = i;
|
int n = i;
|
||||||
@ -138,6 +141,7 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
|||||||
if (objectN is Slider && Vector2Extensions.Distance(objectN.EndPosition, objectI.Position) < stack_distance)
|
if (objectN is Slider && Vector2Extensions.Distance(objectN.EndPosition, objectI.Position) < stack_distance)
|
||||||
{
|
{
|
||||||
int offset = objectI.StackHeight - objectN.StackHeight + 1;
|
int offset = objectI.StackHeight - objectN.StackHeight + 1;
|
||||||
|
|
||||||
for (int j = n + 1; j <= i; j++)
|
for (int j = n + 1; j <= i; j++)
|
||||||
{
|
{
|
||||||
//For each object which was declared under this slider, we will offset it to appear *below* the slider end (rather than above).
|
//For each object which was declared under this slider, we will offset it to appear *below* the slider end (rather than above).
|
||||||
|
@ -109,6 +109,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
aimValue *= Math.Min(Math.Pow(scoreMaxCombo, 0.8f) / Math.Pow(beatmapMaxCombo, 0.8f), 1.0f);
|
aimValue *= Math.Min(Math.Pow(scoreMaxCombo, 0.8f) / Math.Pow(beatmapMaxCombo, 0.8f), 1.0f);
|
||||||
|
|
||||||
double approachRateFactor = 1.0f;
|
double approachRateFactor = 1.0f;
|
||||||
|
|
||||||
if (Attributes.ApproachRate > 10.33f)
|
if (Attributes.ApproachRate > 10.33f)
|
||||||
approachRateFactor += 0.3f * (Attributes.ApproachRate - 10.33f);
|
approachRateFactor += 0.3f * (Attributes.ApproachRate - 10.33f);
|
||||||
else if (Attributes.ApproachRate < 8.0f)
|
else if (Attributes.ApproachRate < 8.0f)
|
||||||
|
@ -56,6 +56,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
|||||||
{
|
{
|
||||||
// We will scale distances by this factor, so we can assume a uniform CircleSize among beatmaps.
|
// We will scale distances by this factor, so we can assume a uniform CircleSize among beatmaps.
|
||||||
float scalingFactor = normalized_radius / (float)BaseObject.Radius;
|
float scalingFactor = normalized_radius / (float)BaseObject.Radius;
|
||||||
|
|
||||||
if (BaseObject.Radius < 30)
|
if (BaseObject.Radius < 30)
|
||||||
{
|
{
|
||||||
float smallCircleBonus = Math.Min(30 - (float)BaseObject.Radius, 5) / 50;
|
float smallCircleBonus = Math.Min(30 - (float)BaseObject.Radius, 5) / 50;
|
||||||
|
@ -42,9 +42,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
speedBonus = 1 + Math.Pow((min_speed_bonus - deltaTime) / speed_balancing_factor, 2);
|
speedBonus = 1 + Math.Pow((min_speed_bonus - deltaTime) / speed_balancing_factor, 2);
|
||||||
|
|
||||||
double angleBonus = 1.0;
|
double angleBonus = 1.0;
|
||||||
|
|
||||||
if (osuCurrent.Angle != null && osuCurrent.Angle.Value < angle_bonus_begin)
|
if (osuCurrent.Angle != null && osuCurrent.Angle.Value < angle_bonus_begin)
|
||||||
{
|
{
|
||||||
angleBonus = 1 + Math.Pow(Math.Sin(1.5 * (angle_bonus_begin - osuCurrent.Angle.Value)), 2) / 3.57;
|
angleBonus = 1 + Math.Pow(Math.Sin(1.5 * (angle_bonus_begin - osuCurrent.Angle.Value)), 2) / 3.57;
|
||||||
|
|
||||||
if (osuCurrent.Angle.Value < pi_over_2)
|
if (osuCurrent.Angle.Value < pi_over_2)
|
||||||
{
|
{
|
||||||
angleBonus = 1.28;
|
angleBonus = 1.28;
|
||||||
|
@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
case SliderPosition.Start:
|
case SliderPosition.Start:
|
||||||
Position = slider.StackedPosition + slider.Path.PositionAt(0);
|
Position = slider.StackedPosition + slider.Path.PositionAt(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderPosition.End:
|
case SliderPosition.End:
|
||||||
Position = slider.StackedPosition + slider.Path.PositionAt(1);
|
Position = slider.StackedPosition + slider.Path.PositionAt(1);
|
||||||
break;
|
break;
|
||||||
|
@ -62,6 +62,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
case PlacementState.Initial:
|
case PlacementState.Initial:
|
||||||
HitObject.Position = e.MousePosition;
|
HitObject.Position = e.MousePosition;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case PlacementState.Body:
|
case PlacementState.Body:
|
||||||
cursor = e.MousePosition - HitObject.Position;
|
cursor = e.MousePosition - HitObject.Position;
|
||||||
return true;
|
return true;
|
||||||
@ -77,6 +78,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
case PlacementState.Initial:
|
case PlacementState.Initial:
|
||||||
beginCurve();
|
beginCurve();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PlacementState.Body:
|
case PlacementState.Body:
|
||||||
switch (e.Button)
|
switch (e.Button)
|
||||||
{
|
{
|
||||||
|
@ -42,8 +42,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
case DrawableHitCircle circle:
|
case DrawableHitCircle circle:
|
||||||
return new HitCircleSelectionBlueprint(circle);
|
return new HitCircleSelectionBlueprint(circle);
|
||||||
|
|
||||||
case DrawableSlider slider:
|
case DrawableSlider slider:
|
||||||
return new SliderSelectionBlueprint(slider);
|
return new SliderSelectionBlueprint(slider);
|
||||||
|
|
||||||
case DrawableSpinner spinner:
|
case DrawableSpinner spinner:
|
||||||
return new SpinnerSelectionBlueprint(spinner);
|
return new SpinnerSelectionBlueprint(spinner);
|
||||||
}
|
}
|
||||||
|
@ -16,10 +16,13 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case HitResult.Meh:
|
case HitResult.Meh:
|
||||||
return 50;
|
return 50;
|
||||||
|
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 300;
|
return 300;
|
||||||
}
|
}
|
||||||
@ -31,10 +34,12 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return -0.02;
|
return -0.02;
|
||||||
|
|
||||||
case HitResult.Meh:
|
case HitResult.Meh:
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 0.01;
|
return 0.01;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
{
|
{
|
||||||
case DrawableSpinner _:
|
case DrawableSpinner _:
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
drawable.ApplyCustomUpdateState += ApplyCustomState;
|
drawable.ApplyCustomUpdateState += ApplyCustomState;
|
||||||
break;
|
break;
|
||||||
@ -51,6 +52,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
case DrawableSliderTail _:
|
case DrawableSliderTail _:
|
||||||
// special cases we should *not* be scaling.
|
// special cases we should *not* be scaling.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSlider _:
|
case DrawableSlider _:
|
||||||
case DrawableHitCircle _:
|
case DrawableHitCircle _:
|
||||||
{
|
{
|
||||||
|
@ -59,11 +59,13 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
circle.FadeOut(fadeOutDuration);
|
circle.FadeOut(fadeOutDuration);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSlider slider:
|
case DrawableSlider slider:
|
||||||
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
|
using (slider.BeginAbsoluteSequence(fadeOutStartTime, true))
|
||||||
slider.Body.FadeOut(longFadeDuration, Easing.Out);
|
slider.Body.FadeOut(longFadeDuration, Easing.Out);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSliderTick sliderTick:
|
case DrawableSliderTick sliderTick:
|
||||||
// slider ticks fade out over up to one second
|
// slider ticks fade out over up to one second
|
||||||
var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000);
|
var tickFadeOutDuration = Math.Min(sliderTick.HitObject.TimePreempt - DrawableSliderTick.ANIM_DURATION, 1000);
|
||||||
@ -72,6 +74,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
sliderTick.FadeOut(tickFadeOutDuration);
|
sliderTick.FadeOut(tickFadeOutDuration);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableSpinner spinner:
|
case DrawableSpinner spinner:
|
||||||
// hide elements we don't care about.
|
// hide elements we don't care about.
|
||||||
spinner.Disc.Hide();
|
spinner.Disc.Hide();
|
||||||
|
@ -67,6 +67,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
OsuHitObject prevHitObject = null;
|
OsuHitObject prevHitObject = null;
|
||||||
|
|
||||||
foreach (var currHitObject in hitObjects)
|
foreach (var currHitObject in hitObjects)
|
||||||
{
|
{
|
||||||
if (prevHitObject != null && !currHitObject.NewCombo && !(prevHitObject is Spinner) && !(currHitObject is Spinner))
|
if (prevHitObject != null && !currHitObject.NewCombo && !(prevHitObject is Spinner) && !(currHitObject is Spinner))
|
||||||
|
@ -124,6 +124,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
|
|
||||||
var result = HitObject.HitWindows.ResultFor(timeOffset);
|
var result = HitObject.HitWindows.ResultFor(timeOffset);
|
||||||
|
|
||||||
if (result == HitResult.None)
|
if (result == HitResult.None)
|
||||||
{
|
{
|
||||||
Shake(Math.Abs(timeOffset) - HitObject.HitWindows.HalfWindowFor(HitResult.Miss));
|
Shake(Math.Abs(timeOffset) - HitObject.HitWindows.HalfWindowFor(HitResult.Miss));
|
||||||
@ -158,11 +159,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
// override lifetime end as FadeIn may have been changed externally, causing out expiration to be too early.
|
// override lifetime end as FadeIn may have been changed externally, causing out expiration to be too early.
|
||||||
LifetimeEnd = HitObject.StartTime + HitObject.HitWindows.HalfWindowFor(HitResult.Miss);
|
LifetimeEnd = HitObject.StartTime + HitObject.HitWindows.HalfWindowFor(HitResult.Miss);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
ApproachCircle.FadeOut(50);
|
ApproachCircle.FadeOut(50);
|
||||||
this.FadeOut(100);
|
this.FadeOut(100);
|
||||||
Expire();
|
Expire();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
ApproachCircle.FadeOut(50);
|
ApproachCircle.FadeOut(50);
|
||||||
|
|
||||||
|
@ -64,9 +64,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
this.Delay(HitObject.TimePreempt).FadeOut();
|
this.Delay(HitObject.TimePreempt).FadeOut();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
this.FadeOut(animDuration);
|
this.FadeOut(animDuration);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut(animDuration, Easing.OutQuint)
|
this.FadeOut(animDuration, Easing.OutQuint)
|
||||||
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
||||||
|
@ -67,10 +67,12 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
this.Delay(HitObject.TimePreempt).FadeOut();
|
this.Delay(HitObject.TimePreempt).FadeOut();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
this.FadeOut(ANIM_DURATION);
|
this.FadeOut(ANIM_DURATION);
|
||||||
this.FadeColour(Color4.Red, ANIM_DURATION / 2);
|
this.FadeColour(Color4.Red, ANIM_DURATION / 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut(ANIM_DURATION, Easing.OutQuint);
|
this.FadeOut(ANIM_DURATION, Easing.OutQuint);
|
||||||
this.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out);
|
this.ScaleTo(Scale * 1.5f, ANIM_DURATION, Easing.Out);
|
||||||
|
@ -222,9 +222,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
Expire(true);
|
Expire(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
sequence.ScaleTo(Scale * 1.2f, 320, Easing.Out);
|
sequence.ScaleTo(Scale * 1.2f, 320, Easing.Out);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
sequence.ScaleTo(Scale * 0.8f, 320, Easing.In);
|
sequence.ScaleTo(Scale * 0.8f, 320, Easing.In);
|
||||||
break;
|
break;
|
||||||
|
@ -183,6 +183,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
Samples = sampleList
|
Samples = sampleList
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderEventType.Head:
|
case SliderEventType.Head:
|
||||||
AddNested(HeadCircle = new SliderCircle
|
AddNested(HeadCircle = new SliderCircle
|
||||||
{
|
{
|
||||||
@ -194,6 +195,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
ComboIndex = ComboIndex,
|
ComboIndex = ComboIndex,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderEventType.LegacyLastTick:
|
case SliderEventType.LegacyLastTick:
|
||||||
// we need to use the LegacyLastTick here for compatibility reasons (difficulty).
|
// we need to use the LegacyLastTick here for compatibility reasons (difficulty).
|
||||||
// it is *okay* to use this because the TailCircle is not used for any meaningful purpose in gameplay.
|
// it is *okay* to use this because the TailCircle is not used for any meaningful purpose in gameplay.
|
||||||
@ -206,6 +208,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
ComboIndex = ComboIndex,
|
ComboIndex = ComboIndex,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SliderEventType.Repeat:
|
case SliderEventType.Repeat:
|
||||||
AddNested(new RepeatPoint
|
AddNested(new RepeatPoint
|
||||||
{
|
{
|
||||||
|
@ -104,6 +104,7 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new MultiMod(new OsuModHalfTime(), new OsuModDaycore()),
|
new MultiMod(new OsuModHalfTime(), new OsuModDaycore()),
|
||||||
new OsuModSpunOut(),
|
new OsuModSpunOut(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.DifficultyIncrease:
|
case ModType.DifficultyIncrease:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -113,11 +114,13 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new OsuModHidden(),
|
new OsuModHidden(),
|
||||||
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
|
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Conversion:
|
case ModType.Conversion:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new OsuModTarget(),
|
new OsuModTarget(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -125,6 +128,7 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new OsuModRelax(),
|
new OsuModRelax(),
|
||||||
new OsuModAutopilot(),
|
new OsuModAutopilot(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Fun:
|
case ModType.Fun:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -133,6 +137,7 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new OsuModGrow(),
|
new OsuModGrow(),
|
||||||
new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()),
|
new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()),
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return new Mod[] { };
|
return new Mod[] { };
|
||||||
}
|
}
|
||||||
|
@ -199,6 +199,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
|
|
||||||
// Wait until Auto could "see and react" to the next note.
|
// Wait until Auto could "see and react" to the next note.
|
||||||
double waitTime = h.StartTime - Math.Max(0.0, h.TimePreempt - reactionTime);
|
double waitTime = h.StartTime - Math.Max(0.0, h.TimePreempt - reactionTime);
|
||||||
|
|
||||||
if (waitTime > lastFrame.Time)
|
if (waitTime > lastFrame.Time)
|
||||||
{
|
{
|
||||||
lastFrame = new OsuReplayFrame(waitTime, lastFrame.Position) { Actions = lastFrame.Actions };
|
lastFrame = new OsuReplayFrame(waitTime, lastFrame.Position) { Actions = lastFrame.Actions };
|
||||||
@ -314,6 +315,7 @@ namespace osu.Game.Rulesets.Osu.Replays
|
|||||||
|
|
||||||
endFrame.Position = endPosition;
|
endFrame.Position = endPosition;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Slider slider:
|
case Slider slider:
|
||||||
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
|
for (double j = FrameDelay; j < slider.Duration; j += FrameDelay)
|
||||||
{
|
{
|
||||||
|
@ -195,6 +195,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
shader.GetUniform<float>("g_FadeClock").UpdateValue(ref time);
|
shader.GetUniform<float>("g_FadeClock").UpdateValue(ref time);
|
||||||
|
|
||||||
int updateStart = -1, updateEnd = 0;
|
int updateStart = -1, updateEnd = 0;
|
||||||
|
|
||||||
for (int i = 0; i < parts.Length; ++i)
|
for (int i = 0; i < parts.Length; ++i)
|
||||||
{
|
{
|
||||||
if (parts[i].WasUpdated)
|
if (parts[i].WasUpdated)
|
||||||
|
@ -46,8 +46,10 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
{
|
{
|
||||||
case HitCircle circle:
|
case HitCircle circle:
|
||||||
return new DrawableHitCircle(circle);
|
return new DrawableHitCircle(circle);
|
||||||
|
|
||||||
case Slider slider:
|
case Slider slider:
|
||||||
return new DrawableSlider(slider);
|
return new DrawableSlider(slider);
|
||||||
|
|
||||||
case Spinner spinner:
|
case Spinner spinner:
|
||||||
return new DrawableSpinner(spinner);
|
return new DrawableSpinner(spinner);
|
||||||
}
|
}
|
||||||
|
@ -101,15 +101,19 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
case 1:
|
case 1:
|
||||||
addCentreHit(false);
|
addCentreHit(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
addCentreHit(true);
|
addCentreHit(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
addDrumRoll(false);
|
addDrumRoll(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
addDrumRoll(true);
|
addDrumRoll(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
addSwell();
|
addSwell();
|
||||||
delay = scroll_time - 100;
|
delay = scroll_time - 100;
|
||||||
@ -122,6 +126,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
default:
|
default:
|
||||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, rng.Next(25, 400)), 500);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_HEIGHT), 500);
|
playfieldContainer.Delay(delay).ResizeTo(new Vector2(1, TaikoPlayfield.DEFAULT_HEIGHT), 500);
|
||||||
break;
|
break;
|
||||||
|
@ -120,6 +120,7 @@ namespace osu.Game.Rulesets.Taiko.Beatmaps
|
|||||||
List<List<SampleInfo>> allSamples = curveData != null ? curveData.NodeSamples : new List<List<SampleInfo>>(new[] { samples });
|
List<List<SampleInfo>> allSamples = curveData != null ? curveData.NodeSamples : new List<List<SampleInfo>>(new[] { samples });
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (double j = obj.StartTime; j <= obj.StartTime + taikoDuration + tickSpacing / 8; j += tickSpacing)
|
for (double j = obj.StartTime; j <= obj.StartTime + taikoDuration + tickSpacing / 8; j += tickSpacing)
|
||||||
{
|
{
|
||||||
List<SampleInfo> currentSamples = allSamples[i];
|
List<SampleInfo> currentSamples = allSamples[i];
|
||||||
|
@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return base.HealthIncreaseFor(result);
|
return base.HealthIncreaseFor(result);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 200;
|
return 200;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 0.15;
|
return 0.15;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,10 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
return 100;
|
return 100;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 300;
|
return 300;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -29,10 +31,13 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return -1.0;
|
return -1.0;
|
||||||
|
|
||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
return 1.1;
|
return 1.1;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
return 3.0;
|
return 3.0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ namespace osu.Game.Rulesets.Taiko.Judgements
|
|||||||
{
|
{
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return -0.65;
|
return -0.65;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
circlePiece?.FlashBox.FinishTransforms();
|
circlePiece?.FlashBox.FinishTransforms();
|
||||||
|
|
||||||
var offset = !AllJudged ? 0 : Time.Current - HitObject.StartTime;
|
var offset = !AllJudged ? 0 : Time.Current - HitObject.StartTime;
|
||||||
|
|
||||||
using (BeginDelayedSequence(HitObject.StartTime - Time.Current + offset, true))
|
using (BeginDelayedSequence(HitObject.StartTime - Time.Current + offset, true))
|
||||||
{
|
{
|
||||||
switch (State.Value)
|
switch (State.Value)
|
||||||
@ -108,15 +109,18 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
UnproxyContent();
|
UnproxyContent();
|
||||||
this.Delay(HitObject.HitWindows.HalfWindowFor(HitResult.Miss)).Expire();
|
this.Delay(HitObject.HitWindows.HalfWindowFor(HitResult.Miss)).Expire();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
this.FadeOut(100)
|
this.FadeOut(100)
|
||||||
.Expire();
|
.Expire();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
// If we're far enough away from the left stage, we should bring outselves in front of it
|
// If we're far enough away from the left stage, we should bring outselves in front of it
|
||||||
ProxyContent();
|
ProxyContent();
|
||||||
|
|
||||||
var flash = circlePiece?.FlashBox;
|
var flash = circlePiece?.FlashBox;
|
||||||
|
|
||||||
if (flash != null)
|
if (flash != null)
|
||||||
{
|
{
|
||||||
flash.FadeTo(0.9f);
|
flash.FadeTo(0.9f);
|
||||||
|
@ -192,6 +192,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
using (BeginAbsoluteSequence(HitObject.StartTime - preempt, true))
|
using (BeginAbsoluteSequence(HitObject.StartTime - preempt, true))
|
||||||
targetRing.ScaleTo(target_ring_scale, preempt * 4, Easing.OutQuint);
|
targetRing.ScaleTo(target_ring_scale, preempt * 4, Easing.OutQuint);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut(out_transition_time, Easing.Out);
|
this.FadeOut(out_transition_time, Easing.Out);
|
||||||
|
@ -111,6 +111,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
MainPiece.KiaiMode = HitObject.Kiai;
|
MainPiece.KiaiMode = HitObject.Kiai;
|
||||||
|
|
||||||
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
|
var strongObject = HitObject.NestedHitObjects.OfType<StrongHitObject>().FirstOrDefault();
|
||||||
|
|
||||||
if (strongObject != null)
|
if (strongObject != null)
|
||||||
{
|
{
|
||||||
var strongHit = CreateStrongHit(strongObject);
|
var strongHit = CreateStrongHit(strongObject);
|
||||||
|
@ -70,6 +70,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
for (double t = StartTime; t < EndTime + tickSpacing / 2; t += tickSpacing)
|
for (double t = StartTime; t < EndTime + tickSpacing / 2; t += tickSpacing)
|
||||||
{
|
{
|
||||||
AddNested(new DrumRollTick
|
AddNested(new DrumRollTick
|
||||||
|
@ -25,6 +25,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
|||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ namespace osu.Game.Rulesets.Taiko.Replays
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
int req = swell.RequiredHits;
|
int req = swell.RequiredHits;
|
||||||
double hitRate = Math.Min(swell_hit_speed, swell.Duration / req);
|
double hitRate = Math.Min(swell_hit_speed, swell.Duration / req);
|
||||||
|
|
||||||
for (double j = h.StartTime; j < endTime; j += hitRate)
|
for (double j = h.StartTime; j < endTime; j += hitRate)
|
||||||
{
|
{
|
||||||
TaikoAction action;
|
TaikoAction action;
|
||||||
@ -62,12 +63,15 @@ namespace osu.Game.Rulesets.Taiko.Replays
|
|||||||
case 0:
|
case 0:
|
||||||
action = TaikoAction.LeftCentre;
|
action = TaikoAction.LeftCentre;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
action = TaikoAction.LeftRim;
|
action = TaikoAction.LeftRim;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
action = TaikoAction.RightCentre;
|
action = TaikoAction.RightCentre;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
action = TaikoAction.RightRim;
|
action = TaikoAction.RightRim;
|
||||||
break;
|
break;
|
||||||
|
@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
new TaikoModNoFail(),
|
new TaikoModNoFail(),
|
||||||
new MultiMod(new TaikoModHalfTime(), new TaikoModDaycore()),
|
new MultiMod(new TaikoModHalfTime(), new TaikoModDaycore()),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.DifficultyIncrease:
|
case ModType.DifficultyIncrease:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
@ -95,17 +96,20 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
new TaikoModHidden(),
|
new TaikoModHidden(),
|
||||||
new TaikoModFlashlight(),
|
new TaikoModFlashlight(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new TaikoModAutoplay(), new ModCinema()),
|
new MultiMod(new TaikoModAutoplay(), new ModCinema()),
|
||||||
new TaikoModRelax(),
|
new TaikoModRelax(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Fun:
|
case ModType.Fun:
|
||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new MultiMod(new ModWindUp<TaikoHitObject>(), new ModWindDown<TaikoHitObject>())
|
new MultiMod(new ModWindUp<TaikoHitObject>(), new ModWindDown<TaikoHitObject>())
|
||||||
};
|
};
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return new Mod[] { };
|
return new Mod[] { };
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
case HitResult.Good:
|
case HitResult.Good:
|
||||||
JudgementBody.Colour = colours.GreenLight;
|
JudgementBody.Colour = colours.GreenLight;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HitResult.Great:
|
case HitResult.Great:
|
||||||
JudgementBody.Colour = colours.BlueLight;
|
JudgementBody.Colour = colours.BlueLight;
|
||||||
break;
|
break;
|
||||||
|
@ -54,9 +54,11 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
int currentIndex = 0;
|
int currentIndex = 0;
|
||||||
int currentBeat = 0;
|
int currentBeat = 0;
|
||||||
double time = timingPoints[currentIndex].Time;
|
double time = timingPoints[currentIndex].Time;
|
||||||
|
|
||||||
while (time <= lastHitTime)
|
while (time <= lastHitTime)
|
||||||
{
|
{
|
||||||
int nextIndex = currentIndex + 1;
|
int nextIndex = currentIndex + 1;
|
||||||
|
|
||||||
if (nextIndex < timingPoints.Count && time > timingPoints[nextIndex].Time)
|
if (nextIndex < timingPoints.Count && time > timingPoints[nextIndex].Time)
|
||||||
{
|
{
|
||||||
currentIndex = nextIndex;
|
currentIndex = nextIndex;
|
||||||
@ -95,10 +97,13 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
{
|
{
|
||||||
case CentreHit centreHit:
|
case CentreHit centreHit:
|
||||||
return new DrawableCentreHit(centreHit);
|
return new DrawableCentreHit(centreHit);
|
||||||
|
|
||||||
case RimHit rimHit:
|
case RimHit rimHit:
|
||||||
return new DrawableRimHit(rimHit);
|
return new DrawableRimHit(rimHit);
|
||||||
|
|
||||||
case DrumRoll drumRoll:
|
case DrumRoll drumRoll:
|
||||||
return new DrawableDrumRoll(drumRoll);
|
return new DrawableDrumRoll(drumRoll);
|
||||||
|
|
||||||
case Swell swell:
|
case Swell swell:
|
||||||
return new DrawableSwell(swell);
|
return new DrawableSwell(swell);
|
||||||
}
|
}
|
||||||
|
@ -212,6 +212,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
case DrawableBarLine barline:
|
case DrawableBarLine barline:
|
||||||
barlineContainer.Add(barline.CreateProxy());
|
barlineContainer.Add(barline.CreateProxy());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DrawableTaikoHitObject taikoObject:
|
case DrawableTaikoHitObject taikoObject:
|
||||||
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
|
topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
|
||||||
break;
|
break;
|
||||||
@ -232,6 +233,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
if (result.IsHit)
|
if (result.IsHit)
|
||||||
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
|
hitExplosionContainer.Children.FirstOrDefault(e => e.JudgedObject == ((DrawableStrongNestedHit)judgedObject).MainObject)?.VisualiseSecondHit();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
judgementContainer.Add(new DrawableTaikoJudgement(result, judgedObject)
|
||||||
{
|
{
|
||||||
|
@ -49,6 +49,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapGeneral()
|
public void TestDecodeBeatmapGeneral()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -72,6 +73,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapEditor()
|
public void TestDecodeBeatmapEditor()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder();
|
var decoder = new LegacyBeatmapDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -97,6 +99,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapMetadata()
|
public void TestDecodeBeatmapMetadata()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder();
|
var decoder = new LegacyBeatmapDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -121,6 +124,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapDifficulty()
|
public void TestDecodeBeatmapDifficulty()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder();
|
var decoder = new LegacyBeatmapDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -139,6 +143,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapEvents()
|
public void TestDecodeBeatmapEvents()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -157,6 +162,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapTimingPoints()
|
public void TestDecodeBeatmapTimingPoints()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -192,6 +198,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapColours()
|
public void TestDecodeBeatmapColours()
|
||||||
{
|
{
|
||||||
var decoder = new LegacySkinDecoder();
|
var decoder = new LegacySkinDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -217,6 +224,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapComboOffsetsOsu()
|
public void TestDecodeBeatmapComboOffsetsOsu()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder();
|
var decoder = new LegacyBeatmapDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -239,6 +247,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapComboOffsetsCatch()
|
public void TestDecodeBeatmapComboOffsetsCatch()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder();
|
var decoder = new LegacyBeatmapDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
using (var resStream = TestResources.OpenResource("hitobject-combo-offset.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -261,6 +270,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeBeatmapHitObjects()
|
public void TestDecodeBeatmapHitObjects()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
using (var resStream = TestResources.OpenResource("Soleily - Renatus (Gamu) [Insane].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -288,6 +298,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeControlPointCustomSampleBank()
|
public void TestDecodeControlPointCustomSampleBank()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("controlpoint-custom-samplebank.osu"))
|
using (var resStream = TestResources.OpenResource("controlpoint-custom-samplebank.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -309,6 +320,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeHitObjectCustomSampleBank()
|
public void TestDecodeHitObjectCustomSampleBank()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("hitobject-custom-samplebank.osu"))
|
using (var resStream = TestResources.OpenResource("hitobject-custom-samplebank.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -326,6 +338,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeHitObjectFileSamples()
|
public void TestDecodeHitObjectFileSamples()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("hitobject-file-samples.osu"))
|
using (var resStream = TestResources.OpenResource("hitobject-file-samples.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -345,6 +358,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeSliderSamples()
|
public void TestDecodeSliderSamples()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("slider-samples.osu"))
|
using (var resStream = TestResources.OpenResource("slider-samples.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -388,6 +402,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeHitObjectNullAdditionBank()
|
public void TestDecodeHitObjectNullAdditionBank()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
var decoder = new LegacyBeatmapDecoder { ApplyOffsets = false };
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("hitobject-no-addition-bank.osu"))
|
using (var resStream = TestResources.OpenResource("hitobject-no-addition-bank.osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeStoryboardEvents()
|
public void TestDecodeStoryboardEvents()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyStoryboardDecoder();
|
var decoder = new LegacyStoryboardDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu"))
|
using (var resStream = TestResources.OpenResource("Himeringo - Yotsuya-san ni Yoroshiku (RLC) [Winber1's Extreme].osu"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
@ -91,6 +92,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
public void TestDecodeVariableWithSuffix()
|
public void TestDecodeVariableWithSuffix()
|
||||||
{
|
{
|
||||||
var decoder = new LegacyStoryboardDecoder();
|
var decoder = new LegacyStoryboardDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource("variable-with-suffix.osb"))
|
using (var resStream = TestResources.OpenResource("variable-with-suffix.osb"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
|
@ -151,6 +151,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
|||||||
using (var sr = new StreamReader(stream))
|
using (var sr = new StreamReader(stream))
|
||||||
{
|
{
|
||||||
var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr);
|
var legacyDecoded = new LegacyBeatmapDecoder { ApplyOffsets = false }.Decode(sr);
|
||||||
|
|
||||||
using (var ms = new MemoryStream())
|
using (var ms = new MemoryStream())
|
||||||
using (var sw = new StreamWriter(ms))
|
using (var sw = new StreamWriter(ms))
|
||||||
using (var sr2 = new StreamReader(ms))
|
using (var sr2 = new StreamReader(ms))
|
||||||
|
@ -75,6 +75,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
|||||||
using (var osz = TestResources.GetTestBeatmapStream())
|
using (var osz = TestResources.GetTestBeatmapStream())
|
||||||
{
|
{
|
||||||
var reader = new ZipArchiveReader(osz);
|
var reader = new ZipArchiveReader(osz);
|
||||||
|
|
||||||
using (var stream = new StreamReader(
|
using (var stream = new StreamReader(
|
||||||
reader.GetStream("Soleily - Renatus (Deif) [Platter].osu")))
|
reader.GetStream("Soleily - Renatus (Deif) [Platter].osu")))
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@ namespace osu.Game.Tests.Skins
|
|||||||
public void TestDecodeSkinColours(bool hasColours)
|
public void TestDecodeSkinColours(bool hasColours)
|
||||||
{
|
{
|
||||||
var decoder = new LegacySkinDecoder();
|
var decoder = new LegacySkinDecoder();
|
||||||
|
|
||||||
using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini"))
|
using (var resStream = TestResources.OpenResource(hasColours ? "skin.ini" : "skin-empty.ini"))
|
||||||
using (var stream = new StreamReader(resStream))
|
using (var stream = new StreamReader(resStream))
|
||||||
{
|
{
|
||||||
|
@ -196,9 +196,10 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
public bool PauseOverlayVisible => PauseOverlay.State == Visibility.Visible;
|
public bool PauseOverlayVisible => PauseOverlay.State == Visibility.Visible;
|
||||||
|
|
||||||
public PausePlayer()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
PauseOnFocusLost = false;
|
base.LoadComplete();
|
||||||
|
HUDOverlay.HoldToQuit.PauseOnFocusLost = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,12 +129,15 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
case ScrollingDirection.Up:
|
case ScrollingDirection.Up:
|
||||||
obj.Anchor = Anchor.TopCentre;
|
obj.Anchor = Anchor.TopCentre;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScrollingDirection.Down:
|
case ScrollingDirection.Down:
|
||||||
obj.Anchor = Anchor.BottomCentre;
|
obj.Anchor = Anchor.BottomCentre;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScrollingDirection.Left:
|
case ScrollingDirection.Left:
|
||||||
obj.Anchor = Anchor.CentreLeft;
|
obj.Anchor = Anchor.CentreLeft;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScrollingDirection.Right:
|
case ScrollingDirection.Right:
|
||||||
obj.Anchor = Anchor.CentreRight;
|
obj.Anchor = Anchor.CentreRight;
|
||||||
break;
|
break;
|
||||||
@ -189,6 +192,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = 2;
|
Height = 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ScrollingDirection.Left:
|
case ScrollingDirection.Left:
|
||||||
case ScrollingDirection.Right:
|
case ScrollingDirection.Right:
|
||||||
RelativeSizeAxes = Axes.Y;
|
RelativeSizeAxes = Axes.Y;
|
||||||
|
@ -508,6 +508,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
},
|
},
|
||||||
Beatmaps = new List<BeatmapInfo>(),
|
Beatmaps = new List<BeatmapInfo>(),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int b = 1; b < 101; b++)
|
for (int b = 1; b < 101; b++)
|
||||||
{
|
{
|
||||||
toReturn.Beatmaps.Add(new BeatmapInfo
|
toReturn.Beatmaps.Add(new BeatmapInfo
|
||||||
|
@ -83,15 +83,19 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
case OsuRuleset _:
|
case OsuRuleset _:
|
||||||
testInfoLabels(5);
|
testInfoLabels(5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TaikoRuleset _:
|
case TaikoRuleset _:
|
||||||
testInfoLabels(5);
|
testInfoLabels(5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CatchRuleset _:
|
case CatchRuleset _:
|
||||||
testInfoLabels(5);
|
testInfoLabels(5);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ManiaRuleset _:
|
case ManiaRuleset _:
|
||||||
testInfoLabels(4);
|
testInfoLabels(4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
testInfoLabels(2);
|
testInfoLabels(2);
|
||||||
break;
|
break;
|
||||||
|
16
osu.Game.Tests/Visual/TestCaseCharLookup.cs
Normal file
16
osu.Game.Tests/Visual/TestCaseCharLookup.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
public class TestCaseCharLookup : OsuTestCase
|
||||||
|
{
|
||||||
|
public TestCaseCharLookup()
|
||||||
|
{
|
||||||
|
AddStep("null", () => { });
|
||||||
|
AddStep("display acharacter", () => Add(new OsuSpriteText { Text = "振込申請" }));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -86,12 +86,15 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
case 0:
|
case 0:
|
||||||
sendHelloNotification();
|
sendHelloNotification();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
sendAmazingNotification();
|
sendAmazingNotification();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
sendUploadProgress();
|
sendUploadProgress();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
sendDownloadProgress();
|
sendDownloadProgress();
|
||||||
break;
|
break;
|
||||||
|
@ -117,6 +117,7 @@ namespace osu.Game.Beatmaps
|
|||||||
if (beatmapSet.OnlineBeatmapSetID != null)
|
if (beatmapSet.OnlineBeatmapSetID != null)
|
||||||
{
|
{
|
||||||
var existingOnlineId = beatmaps.ConsumableItems.FirstOrDefault(b => b.OnlineBeatmapSetID == beatmapSet.OnlineBeatmapSetID);
|
var existingOnlineId = beatmaps.ConsumableItems.FirstOrDefault(b => b.OnlineBeatmapSetID == beatmapSet.OnlineBeatmapSetID);
|
||||||
|
|
||||||
if (existingOnlineId != null)
|
if (existingOnlineId != null)
|
||||||
{
|
{
|
||||||
Delete(existingOnlineId);
|
Delete(existingOnlineId);
|
||||||
@ -325,6 +326,7 @@ namespace osu.Game.Beatmaps
|
|||||||
{
|
{
|
||||||
// let's make sure there are actually .osu files to import.
|
// let's make sure there are actually .osu files to import.
|
||||||
string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu"));
|
string mapName = reader.Filenames.FirstOrDefault(f => f.EndsWith(".osu"));
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(mapName))
|
if (string.IsNullOrEmpty(mapName))
|
||||||
{
|
{
|
||||||
Logger.Log($"No beatmap files found in the beatmap archive ({reader.Name}).", LoggingTarget.Database);
|
Logger.Log($"No beatmap files found in the beatmap archive ({reader.Name}).", LoggingTarget.Database);
|
||||||
|
@ -101,6 +101,7 @@ namespace osu.Game.Beatmaps
|
|||||||
protected override Storyboard GetStoryboard()
|
protected override Storyboard GetStoryboard()
|
||||||
{
|
{
|
||||||
Storyboard storyboard;
|
Storyboard storyboard;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var stream = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo.Path))))
|
using (var stream = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo.Path))))
|
||||||
@ -131,6 +132,7 @@ namespace osu.Game.Beatmaps
|
|||||||
protected override Skin GetSkin()
|
protected override Skin GetSkin()
|
||||||
{
|
{
|
||||||
Skin skin;
|
Skin skin;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
skin = new LegacyBeatmapSkin(BeatmapInfo, store, audioManager);
|
skin = new LegacyBeatmapSkin(BeatmapInfo, store, audioManager);
|
||||||
|
@ -32,9 +32,11 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
case BeatmapSetCoverType.Cover:
|
case BeatmapSetCoverType.Cover:
|
||||||
resource = set.OnlineInfo.Covers.Cover;
|
resource = set.OnlineInfo.Covers.Cover;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BeatmapSetCoverType.Card:
|
case BeatmapSetCoverType.Card:
|
||||||
resource = set.OnlineInfo.Covers.Card;
|
resource = set.OnlineInfo.Covers.Card;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BeatmapSetCoverType.List:
|
case BeatmapSetCoverType.List:
|
||||||
resource = set.OnlineInfo.Covers.List;
|
resource = set.OnlineInfo.Covers.List;
|
||||||
break;
|
break;
|
||||||
|
@ -63,15 +63,20 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
{
|
{
|
||||||
case DifficultyRating.Easy:
|
case DifficultyRating.Easy:
|
||||||
return palette.Green;
|
return palette.Green;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case DifficultyRating.Normal:
|
case DifficultyRating.Normal:
|
||||||
return palette.Blue;
|
return palette.Blue;
|
||||||
|
|
||||||
case DifficultyRating.Hard:
|
case DifficultyRating.Hard:
|
||||||
return palette.Yellow;
|
return palette.Yellow;
|
||||||
|
|
||||||
case DifficultyRating.Insane:
|
case DifficultyRating.Insane:
|
||||||
return palette.Pink;
|
return palette.Pink;
|
||||||
|
|
||||||
case DifficultyRating.Expert:
|
case DifficultyRating.Expert:
|
||||||
return palette.Purple;
|
return palette.Purple;
|
||||||
|
|
||||||
case DifficultyRating.ExpertPlus:
|
case DifficultyRating.ExpertPlus:
|
||||||
return palette.Gray0;
|
return palette.Gray0;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
throw new IOException(@"Unknown decoder type");
|
throw new IOException(@"Unknown decoder type");
|
||||||
|
|
||||||
string line;
|
string line;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
line = stream.ReadLine()?.Trim();
|
line = stream.ReadLine()?.Trim();
|
||||||
|
@ -70,21 +70,27 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
case Section.General:
|
case Section.General:
|
||||||
handleGeneral(strippedLine);
|
handleGeneral(strippedLine);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Editor:
|
case Section.Editor:
|
||||||
handleEditor(strippedLine);
|
handleEditor(strippedLine);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Metadata:
|
case Section.Metadata:
|
||||||
handleMetadata(line);
|
handleMetadata(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Difficulty:
|
case Section.Difficulty:
|
||||||
handleDifficulty(strippedLine);
|
handleDifficulty(strippedLine);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvent(strippedLine);
|
handleEvent(strippedLine);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.TimingPoints:
|
case Section.TimingPoints:
|
||||||
handleTimingPoint(strippedLine);
|
handleTimingPoint(strippedLine);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.HitObjects:
|
case Section.HitObjects:
|
||||||
handleHitObject(strippedLine);
|
handleHitObject(strippedLine);
|
||||||
return;
|
return;
|
||||||
@ -98,29 +104,37 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var pair = SplitKeyVal(line);
|
var pair = SplitKeyVal(line);
|
||||||
|
|
||||||
var metadata = beatmap.BeatmapInfo.Metadata;
|
var metadata = beatmap.BeatmapInfo.Metadata;
|
||||||
|
|
||||||
switch (pair.Key)
|
switch (pair.Key)
|
||||||
{
|
{
|
||||||
case @"AudioFilename":
|
case @"AudioFilename":
|
||||||
metadata.AudioFile = FileSafety.PathStandardise(pair.Value);
|
metadata.AudioFile = FileSafety.PathStandardise(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"AudioLeadIn":
|
case @"AudioLeadIn":
|
||||||
beatmap.BeatmapInfo.AudioLeadIn = Parsing.ParseInt(pair.Value);
|
beatmap.BeatmapInfo.AudioLeadIn = Parsing.ParseInt(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"PreviewTime":
|
case @"PreviewTime":
|
||||||
metadata.PreviewTime = getOffsetTime(Parsing.ParseInt(pair.Value));
|
metadata.PreviewTime = getOffsetTime(Parsing.ParseInt(pair.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Countdown":
|
case @"Countdown":
|
||||||
beatmap.BeatmapInfo.Countdown = Parsing.ParseInt(pair.Value) == 1;
|
beatmap.BeatmapInfo.Countdown = Parsing.ParseInt(pair.Value) == 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"SampleSet":
|
case @"SampleSet":
|
||||||
defaultSampleBank = (LegacySampleBank)Enum.Parse(typeof(LegacySampleBank), pair.Value);
|
defaultSampleBank = (LegacySampleBank)Enum.Parse(typeof(LegacySampleBank), pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"SampleVolume":
|
case @"SampleVolume":
|
||||||
defaultSampleVolume = Parsing.ParseInt(pair.Value);
|
defaultSampleVolume = Parsing.ParseInt(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"StackLeniency":
|
case @"StackLeniency":
|
||||||
beatmap.BeatmapInfo.StackLeniency = Parsing.ParseFloat(pair.Value);
|
beatmap.BeatmapInfo.StackLeniency = Parsing.ParseFloat(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Mode":
|
case @"Mode":
|
||||||
beatmap.BeatmapInfo.RulesetID = Parsing.ParseInt(pair.Value);
|
beatmap.BeatmapInfo.RulesetID = Parsing.ParseInt(pair.Value);
|
||||||
|
|
||||||
@ -129,24 +143,30 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
case 0:
|
case 0:
|
||||||
parser = new Rulesets.Objects.Legacy.Osu.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
parser = new Rulesets.Objects.Legacy.Osu.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
parser = new Rulesets.Objects.Legacy.Taiko.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
parser = new Rulesets.Objects.Legacy.Taiko.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
parser = new Rulesets.Objects.Legacy.Catch.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
parser = new Rulesets.Objects.Legacy.Catch.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
parser = new Rulesets.Objects.Legacy.Mania.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
parser = new Rulesets.Objects.Legacy.Mania.ConvertHitObjectParser(getOffsetTime(), FormatVersion);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"LetterboxInBreaks":
|
case @"LetterboxInBreaks":
|
||||||
beatmap.BeatmapInfo.LetterboxInBreaks = Parsing.ParseInt(pair.Value) == 1;
|
beatmap.BeatmapInfo.LetterboxInBreaks = Parsing.ParseInt(pair.Value) == 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"SpecialStyle":
|
case @"SpecialStyle":
|
||||||
beatmap.BeatmapInfo.SpecialStyle = Parsing.ParseInt(pair.Value) == 1;
|
beatmap.BeatmapInfo.SpecialStyle = Parsing.ParseInt(pair.Value) == 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"WidescreenStoryboard":
|
case @"WidescreenStoryboard":
|
||||||
beatmap.BeatmapInfo.WidescreenStoryboard = Parsing.ParseInt(pair.Value) == 1;
|
beatmap.BeatmapInfo.WidescreenStoryboard = Parsing.ParseInt(pair.Value) == 1;
|
||||||
break;
|
break;
|
||||||
@ -162,15 +182,19 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
case @"Bookmarks":
|
case @"Bookmarks":
|
||||||
beatmap.BeatmapInfo.StoredBookmarks = pair.Value;
|
beatmap.BeatmapInfo.StoredBookmarks = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"DistanceSpacing":
|
case @"DistanceSpacing":
|
||||||
beatmap.BeatmapInfo.DistanceSpacing = Math.Max(0, Parsing.ParseDouble(pair.Value));
|
beatmap.BeatmapInfo.DistanceSpacing = Math.Max(0, Parsing.ParseDouble(pair.Value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"BeatDivisor":
|
case @"BeatDivisor":
|
||||||
beatmap.BeatmapInfo.BeatDivisor = Parsing.ParseInt(pair.Value);
|
beatmap.BeatmapInfo.BeatDivisor = Parsing.ParseInt(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"GridSize":
|
case @"GridSize":
|
||||||
beatmap.BeatmapInfo.GridSize = Parsing.ParseInt(pair.Value);
|
beatmap.BeatmapInfo.GridSize = Parsing.ParseInt(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"TimelineZoom":
|
case @"TimelineZoom":
|
||||||
beatmap.BeatmapInfo.TimelineZoom = Math.Max(0, Parsing.ParseDouble(pair.Value));
|
beatmap.BeatmapInfo.TimelineZoom = Math.Max(0, Parsing.ParseDouble(pair.Value));
|
||||||
break;
|
break;
|
||||||
@ -182,35 +206,45 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var pair = SplitKeyVal(line);
|
var pair = SplitKeyVal(line);
|
||||||
|
|
||||||
var metadata = beatmap.BeatmapInfo.Metadata;
|
var metadata = beatmap.BeatmapInfo.Metadata;
|
||||||
|
|
||||||
switch (pair.Key)
|
switch (pair.Key)
|
||||||
{
|
{
|
||||||
case @"Title":
|
case @"Title":
|
||||||
metadata.Title = pair.Value;
|
metadata.Title = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"TitleUnicode":
|
case @"TitleUnicode":
|
||||||
metadata.TitleUnicode = pair.Value;
|
metadata.TitleUnicode = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Artist":
|
case @"Artist":
|
||||||
metadata.Artist = pair.Value;
|
metadata.Artist = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"ArtistUnicode":
|
case @"ArtistUnicode":
|
||||||
metadata.ArtistUnicode = pair.Value;
|
metadata.ArtistUnicode = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Creator":
|
case @"Creator":
|
||||||
metadata.AuthorString = pair.Value;
|
metadata.AuthorString = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Version":
|
case @"Version":
|
||||||
beatmap.BeatmapInfo.Version = pair.Value;
|
beatmap.BeatmapInfo.Version = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Source":
|
case @"Source":
|
||||||
beatmap.BeatmapInfo.Metadata.Source = pair.Value;
|
beatmap.BeatmapInfo.Metadata.Source = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"Tags":
|
case @"Tags":
|
||||||
beatmap.BeatmapInfo.Metadata.Tags = pair.Value;
|
beatmap.BeatmapInfo.Metadata.Tags = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"BeatmapID":
|
case @"BeatmapID":
|
||||||
beatmap.BeatmapInfo.OnlineBeatmapID = Parsing.ParseInt(pair.Value);
|
beatmap.BeatmapInfo.OnlineBeatmapID = Parsing.ParseInt(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"BeatmapSetID":
|
case @"BeatmapSetID":
|
||||||
beatmap.BeatmapInfo.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = Parsing.ParseInt(pair.Value) };
|
beatmap.BeatmapInfo.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = Parsing.ParseInt(pair.Value) };
|
||||||
break;
|
break;
|
||||||
@ -222,23 +256,29 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var pair = SplitKeyVal(line);
|
var pair = SplitKeyVal(line);
|
||||||
|
|
||||||
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
|
var difficulty = beatmap.BeatmapInfo.BaseDifficulty;
|
||||||
|
|
||||||
switch (pair.Key)
|
switch (pair.Key)
|
||||||
{
|
{
|
||||||
case @"HPDrainRate":
|
case @"HPDrainRate":
|
||||||
difficulty.DrainRate = Parsing.ParseFloat(pair.Value);
|
difficulty.DrainRate = Parsing.ParseFloat(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"CircleSize":
|
case @"CircleSize":
|
||||||
difficulty.CircleSize = Parsing.ParseFloat(pair.Value);
|
difficulty.CircleSize = Parsing.ParseFloat(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"OverallDifficulty":
|
case @"OverallDifficulty":
|
||||||
difficulty.OverallDifficulty = Parsing.ParseFloat(pair.Value);
|
difficulty.OverallDifficulty = Parsing.ParseFloat(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"ApproachRate":
|
case @"ApproachRate":
|
||||||
difficulty.ApproachRate = Parsing.ParseFloat(pair.Value);
|
difficulty.ApproachRate = Parsing.ParseFloat(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"SliderMultiplier":
|
case @"SliderMultiplier":
|
||||||
difficulty.SliderMultiplier = Parsing.ParseDouble(pair.Value);
|
difficulty.SliderMultiplier = Parsing.ParseDouble(pair.Value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case @"SliderTickRate":
|
case @"SliderTickRate":
|
||||||
difficulty.SliderTickRate = Parsing.ParseDouble(pair.Value);
|
difficulty.SliderTickRate = Parsing.ParseDouble(pair.Value);
|
||||||
break;
|
break;
|
||||||
@ -259,6 +299,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
string filename = split[2].Trim('"');
|
string filename = split[2].Trim('"');
|
||||||
beatmap.BeatmapInfo.Metadata.BackgroundFile = FileSafety.PathStandardise(filename);
|
beatmap.BeatmapInfo.Metadata.BackgroundFile = FileSafety.PathStandardise(filename);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EventType.Break:
|
case EventType.Break:
|
||||||
double start = getOffsetTime(Parsing.ParseDouble(split[1]));
|
double start = getOffsetTime(Parsing.ParseDouble(split[1]));
|
||||||
|
|
||||||
@ -308,6 +349,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
bool kiaiMode = false;
|
bool kiaiMode = false;
|
||||||
bool omitFirstBarSignature = false;
|
bool omitFirstBarSignature = false;
|
||||||
|
|
||||||
if (split.Length >= 8)
|
if (split.Length >= 8)
|
||||||
{
|
{
|
||||||
EffectFlags effectFlags = (EffectFlags)Parsing.ParseInt(split[7]);
|
EffectFlags effectFlags = (EffectFlags)Parsing.ParseInt(split[7]);
|
||||||
|
@ -26,6 +26,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
Section section = Section.None;
|
Section section = Section.None;
|
||||||
|
|
||||||
string line;
|
string line;
|
||||||
|
|
||||||
while ((line = stream.ReadLine()) != null)
|
while ((line = stream.ReadLine()) != null)
|
||||||
{
|
{
|
||||||
if (ShouldSkipLine(line))
|
if (ShouldSkipLine(line))
|
||||||
|
@ -54,6 +54,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
case Section.Events:
|
case Section.Events:
|
||||||
handleEvents(line);
|
handleEvents(line);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case Section.Variables:
|
case Section.Variables:
|
||||||
handleVariables(line);
|
handleVariables(line);
|
||||||
return;
|
return;
|
||||||
@ -65,6 +66,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
private void handleEvents(string line)
|
private void handleEvents(string line)
|
||||||
{
|
{
|
||||||
var depth = 0;
|
var depth = 0;
|
||||||
|
|
||||||
while (line.StartsWith(" ", StringComparison.Ordinal) || line.StartsWith("_", StringComparison.Ordinal))
|
while (line.StartsWith(" ", StringComparison.Ordinal) || line.StartsWith("_", StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
++depth;
|
++depth;
|
||||||
@ -94,8 +96,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var y = float.Parse(split[5], NumberFormatInfo.InvariantInfo);
|
var y = float.Parse(split[5], NumberFormatInfo.InvariantInfo);
|
||||||
storyboardSprite = new StoryboardSprite(path, origin, new Vector2(x, y));
|
storyboardSprite = new StoryboardSprite(path, origin, new Vector2(x, y));
|
||||||
storyboard.GetLayer(layer).Add(storyboardSprite);
|
storyboard.GetLayer(layer).Add(storyboardSprite);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case EventType.Animation:
|
case EventType.Animation:
|
||||||
{
|
{
|
||||||
var layer = parseLayer(split[1]);
|
var layer = parseLayer(split[1]);
|
||||||
@ -108,8 +111,9 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var loopType = split.Length > 8 ? (AnimationLoopType)Enum.Parse(typeof(AnimationLoopType), split[8]) : AnimationLoopType.LoopForever;
|
var loopType = split.Length > 8 ? (AnimationLoopType)Enum.Parse(typeof(AnimationLoopType), split[8]) : AnimationLoopType.LoopForever;
|
||||||
storyboardSprite = new StoryboardAnimation(path, origin, new Vector2(x, y), frameCount, frameDelay, loopType);
|
storyboardSprite = new StoryboardAnimation(path, origin, new Vector2(x, y), frameCount, frameDelay, loopType);
|
||||||
storyboard.GetLayer(layer).Add(storyboardSprite);
|
storyboard.GetLayer(layer).Add(storyboardSprite);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case EventType.Sample:
|
case EventType.Sample:
|
||||||
{
|
{
|
||||||
var time = double.Parse(split[1], CultureInfo.InvariantCulture);
|
var time = double.Parse(split[1], CultureInfo.InvariantCulture);
|
||||||
@ -117,8 +121,8 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
var path = cleanFilename(split[3]);
|
var path = cleanFilename(split[3]);
|
||||||
var volume = split.Length > 4 ? float.Parse(split[4], CultureInfo.InvariantCulture) : 100;
|
var volume = split.Length > 4 ? float.Parse(split[4], CultureInfo.InvariantCulture) : 100;
|
||||||
storyboard.GetLayer(layer).Add(new StoryboardSample(path, time, volume));
|
storyboard.GetLayer(layer).Add(new StoryboardSample(path, time, volume));
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -127,6 +131,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup = storyboardSprite?.TimelineGroup;
|
timelineGroup = storyboardSprite?.TimelineGroup;
|
||||||
|
|
||||||
var commandType = split[0];
|
var commandType = split[0];
|
||||||
|
|
||||||
switch (commandType)
|
switch (commandType)
|
||||||
{
|
{
|
||||||
case "T":
|
case "T":
|
||||||
@ -138,6 +143,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup = storyboardSprite?.AddTrigger(triggerName, startTime, endTime, groupNumber);
|
timelineGroup = storyboardSprite?.AddTrigger(triggerName, startTime, endTime, groupNumber);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "L":
|
case "L":
|
||||||
{
|
{
|
||||||
var startTime = double.Parse(split[1], CultureInfo.InvariantCulture);
|
var startTime = double.Parse(split[1], CultureInfo.InvariantCulture);
|
||||||
@ -145,6 +151,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup = storyboardSprite?.AddLoop(startTime, loopCount);
|
timelineGroup = storyboardSprite?.AddLoop(startTime, loopCount);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(split[3]))
|
if (string.IsNullOrEmpty(split[3]))
|
||||||
@ -163,6 +170,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Alpha.Add(easing, startTime, endTime, startValue, endValue);
|
timelineGroup?.Alpha.Add(easing, startTime, endTime, startValue, endValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "S":
|
case "S":
|
||||||
{
|
{
|
||||||
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -170,6 +178,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startValue), new Vector2(endValue));
|
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startValue), new Vector2(endValue));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "V":
|
case "V":
|
||||||
{
|
{
|
||||||
var startX = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startX = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -179,6 +188,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startX, startY), new Vector2(endX, endY));
|
timelineGroup?.Scale.Add(easing, startTime, endTime, new Vector2(startX, startY), new Vector2(endX, endY));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "R":
|
case "R":
|
||||||
{
|
{
|
||||||
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -186,6 +196,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Rotation.Add(easing, startTime, endTime, MathHelper.RadiansToDegrees(startValue), MathHelper.RadiansToDegrees(endValue));
|
timelineGroup?.Rotation.Add(easing, startTime, endTime, MathHelper.RadiansToDegrees(startValue), MathHelper.RadiansToDegrees(endValue));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "M":
|
case "M":
|
||||||
{
|
{
|
||||||
var startX = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startX = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -196,6 +207,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Y.Add(easing, startTime, endTime, startY, endY);
|
timelineGroup?.Y.Add(easing, startTime, endTime, startY, endY);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "MX":
|
case "MX":
|
||||||
{
|
{
|
||||||
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -203,6 +215,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.X.Add(easing, startTime, endTime, startValue, endValue);
|
timelineGroup?.X.Add(easing, startTime, endTime, startValue, endValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "MY":
|
case "MY":
|
||||||
{
|
{
|
||||||
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startValue = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -210,6 +223,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
timelineGroup?.Y.Add(easing, startTime, endTime, startValue, endValue);
|
timelineGroup?.Y.Add(easing, startTime, endTime, startValue, endValue);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "C":
|
case "C":
|
||||||
{
|
{
|
||||||
var startRed = float.Parse(split[4], CultureInfo.InvariantCulture);
|
var startRed = float.Parse(split[4], CultureInfo.InvariantCulture);
|
||||||
@ -223,23 +237,28 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
new Color4(endRed / 255f, endGreen / 255f, endBlue / 255f, 1));
|
new Color4(endRed / 255f, endGreen / 255f, endBlue / 255f, 1));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "P":
|
case "P":
|
||||||
{
|
{
|
||||||
var type = split[4];
|
var type = split[4];
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "A":
|
case "A":
|
||||||
timelineGroup?.BlendingMode.Add(easing, startTime, endTime, BlendingMode.Additive, startTime == endTime ? BlendingMode.Additive : BlendingMode.Inherit);
|
timelineGroup?.BlendingMode.Add(easing, startTime, endTime, BlendingMode.Additive, startTime == endTime ? BlendingMode.Additive : BlendingMode.Inherit);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "H":
|
case "H":
|
||||||
timelineGroup?.FlipH.Add(easing, startTime, endTime, true, startTime == endTime);
|
timelineGroup?.FlipH.Add(easing, startTime, endTime, true, startTime == endTime);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "V":
|
case "V":
|
||||||
timelineGroup?.FlipV.Add(easing, startTime, endTime, true, startTime == endTime);
|
timelineGroup?.FlipV.Add(easing, startTime, endTime, true, startTime == endTime);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new InvalidDataException($@"Unknown command type: {commandType}");
|
throw new InvalidDataException($@"Unknown command type: {commandType}");
|
||||||
}
|
}
|
||||||
@ -254,26 +273,36 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
private Anchor parseOrigin(string value)
|
private Anchor parseOrigin(string value)
|
||||||
{
|
{
|
||||||
var origin = (LegacyOrigins)Enum.Parse(typeof(LegacyOrigins), value);
|
var origin = (LegacyOrigins)Enum.Parse(typeof(LegacyOrigins), value);
|
||||||
|
|
||||||
switch (origin)
|
switch (origin)
|
||||||
{
|
{
|
||||||
case LegacyOrigins.TopLeft:
|
case LegacyOrigins.TopLeft:
|
||||||
return Anchor.TopLeft;
|
return Anchor.TopLeft;
|
||||||
|
|
||||||
case LegacyOrigins.TopCentre:
|
case LegacyOrigins.TopCentre:
|
||||||
return Anchor.TopCentre;
|
return Anchor.TopCentre;
|
||||||
|
|
||||||
case LegacyOrigins.TopRight:
|
case LegacyOrigins.TopRight:
|
||||||
return Anchor.TopRight;
|
return Anchor.TopRight;
|
||||||
|
|
||||||
case LegacyOrigins.CentreLeft:
|
case LegacyOrigins.CentreLeft:
|
||||||
return Anchor.CentreLeft;
|
return Anchor.CentreLeft;
|
||||||
|
|
||||||
case LegacyOrigins.Centre:
|
case LegacyOrigins.Centre:
|
||||||
return Anchor.Centre;
|
return Anchor.Centre;
|
||||||
|
|
||||||
case LegacyOrigins.CentreRight:
|
case LegacyOrigins.CentreRight:
|
||||||
return Anchor.CentreRight;
|
return Anchor.CentreRight;
|
||||||
|
|
||||||
case LegacyOrigins.BottomLeft:
|
case LegacyOrigins.BottomLeft:
|
||||||
return Anchor.BottomLeft;
|
return Anchor.BottomLeft;
|
||||||
|
|
||||||
case LegacyOrigins.BottomCentre:
|
case LegacyOrigins.BottomCentre:
|
||||||
return Anchor.BottomCentre;
|
return Anchor.BottomCentre;
|
||||||
|
|
||||||
case LegacyOrigins.BottomRight:
|
case LegacyOrigins.BottomRight:
|
||||||
return Anchor.BottomRight;
|
return Anchor.BottomRight;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return Anchor.TopLeft;
|
return Anchor.TopLeft;
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,11 @@ namespace osu.Game.Beatmaps
|
|||||||
case null:
|
case null:
|
||||||
Length = excess_length;
|
Length = excess_length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IHasEndTime endTime:
|
case IHasEndTime endTime:
|
||||||
Length = endTime.EndTime + excess_length;
|
Length = endTime.EndTime + excess_length;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
Length = lastObject.StartTime + excess_length;
|
Length = lastObject.StartTime + excess_length;
|
||||||
break;
|
break;
|
||||||
|
@ -44,6 +44,7 @@ namespace osu.Game.Configuration
|
|||||||
base.AddBindable(lookup, bindable);
|
base.AddBindable(lookup, bindable);
|
||||||
|
|
||||||
var setting = databasedSettings.Find(s => (int)s.Key == (int)(object)lookup);
|
var setting = databasedSettings.Find(s => (int)s.Key == (int)(object)lookup);
|
||||||
|
|
||||||
if (setting != null)
|
if (setting != null)
|
||||||
{
|
{
|
||||||
bindable.Parse(setting.Value);
|
bindable.Parse(setting.Value);
|
||||||
|
@ -84,6 +84,7 @@ namespace osu.Game.Database
|
|||||||
private void flushEvents(bool perform)
|
private void flushEvents(bool perform)
|
||||||
{
|
{
|
||||||
Action[] events;
|
Action[] events;
|
||||||
|
|
||||||
lock (queuedEvents)
|
lock (queuedEvents)
|
||||||
{
|
{
|
||||||
events = queuedEvents.ToArray();
|
events = queuedEvents.ToArray();
|
||||||
@ -147,6 +148,7 @@ namespace osu.Game.Database
|
|||||||
List<TModel> imported = new List<TModel>();
|
List<TModel> imported = new List<TModel>();
|
||||||
|
|
||||||
int current = 0;
|
int current = 0;
|
||||||
|
|
||||||
foreach (string path in paths)
|
foreach (string path in paths)
|
||||||
{
|
{
|
||||||
if (notification.State == ProgressNotificationState.Cancelled)
|
if (notification.State == ProgressNotificationState.Cancelled)
|
||||||
|
@ -60,6 +60,7 @@ namespace osu.Game.Database
|
|||||||
this.connectionString = connectionString;
|
this.connectionString = connectionString;
|
||||||
|
|
||||||
var connection = Database.GetDbConnection();
|
var connection = Database.GetDbConnection();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
connection.Open();
|
connection.Open();
|
||||||
@ -170,9 +171,11 @@ namespace osu.Game.Database
|
|||||||
default:
|
default:
|
||||||
frameworkLogLevel = Framework.Logging.LogLevel.Debug;
|
frameworkLogLevel = Framework.Logging.LogLevel.Debug;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LogLevel.Warning:
|
case LogLevel.Warning:
|
||||||
frameworkLogLevel = Framework.Logging.LogLevel.Important;
|
frameworkLogLevel = Framework.Logging.LogLevel.Important;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LogLevel.Error:
|
case LogLevel.Error:
|
||||||
case LogLevel.Critical:
|
case LogLevel.Critical:
|
||||||
frameworkLogLevel = Framework.Logging.LogLevel.Error;
|
frameworkLogLevel = Framework.Logging.LogLevel.Error;
|
||||||
|
@ -35,6 +35,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
if (InternalChildren.Count > 0 && InternalChild.DrawSize.X > 0)
|
if (InternalChildren.Count > 0 && InternalChild.DrawSize.X > 0)
|
||||||
{
|
{
|
||||||
// We're modifying scale here for a few reasons
|
// We're modifying scale here for a few reasons
|
||||||
|
@ -52,6 +52,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
}
|
}
|
||||||
|
|
||||||
int previousLinkEnd = 0;
|
int previousLinkEnd = 0;
|
||||||
|
|
||||||
foreach (var link in links)
|
foreach (var link in links)
|
||||||
{
|
{
|
||||||
AddText(text.Substring(previousLinkEnd, link.Index - previousLinkEnd));
|
AddText(text.Substring(previousLinkEnd, link.Index - previousLinkEnd));
|
||||||
@ -94,10 +95,12 @@ namespace osu.Game.Graphics.Containers
|
|||||||
if (linkArgument != null && int.TryParse(linkArgument.Contains('?') ? linkArgument.Split('?')[0] : linkArgument, out int beatmapId))
|
if (linkArgument != null && int.TryParse(linkArgument.Contains('?') ? linkArgument.Split('?')[0] : linkArgument, out int beatmapId))
|
||||||
game?.ShowBeatmap(beatmapId);
|
game?.ShowBeatmap(beatmapId);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.OpenBeatmapSet:
|
case LinkAction.OpenBeatmapSet:
|
||||||
if (int.TryParse(linkArgument, out int setId))
|
if (int.TryParse(linkArgument, out int setId))
|
||||||
game?.ShowBeatmapSet(setId);
|
game?.ShowBeatmapSet(setId);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.OpenChannel:
|
case LinkAction.OpenChannel:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -109,18 +112,22 @@ namespace osu.Game.Graphics.Containers
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.OpenEditorTimestamp:
|
case LinkAction.OpenEditorTimestamp:
|
||||||
case LinkAction.JoinMultiplayerMatch:
|
case LinkAction.JoinMultiplayerMatch:
|
||||||
case LinkAction.Spectate:
|
case LinkAction.Spectate:
|
||||||
showNotImplementedError?.Invoke();
|
showNotImplementedError?.Invoke();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.External:
|
case LinkAction.External:
|
||||||
game?.OpenUrlExternally(url);
|
game?.OpenUrlExternally(url);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LinkAction.OpenUserProfile:
|
case LinkAction.OpenUserProfile:
|
||||||
if (long.TryParse(linkArgument, out long userId))
|
if (long.TryParse(linkArgument, out long userId))
|
||||||
game?.ShowUser(userId);
|
game?.ShowUser(userId);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
case GlobalAction.Back:
|
case GlobalAction.Back:
|
||||||
State = Visibility.Hidden;
|
State = Visibility.Hidden;
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case GlobalAction.Select:
|
case GlobalAction.Select:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -107,6 +108,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
State = Visibility.Hidden;
|
State = Visibility.Hidden;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Visibility.Hidden:
|
case Visibility.Hidden:
|
||||||
if (PlaySamplesOnStateChange) samplePopOut?.Play();
|
if (PlaySamplesOnStateChange) samplePopOut?.Play();
|
||||||
if (BlockScreenWideMouse) osuGame?.RemoveBlockingOverlay(this);
|
if (BlockScreenWideMouse) osuGame?.RemoveBlockingOverlay(this);
|
||||||
|
@ -161,6 +161,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
float headerH = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0);
|
float headerH = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0);
|
||||||
float footerH = Footer?.LayoutSize.Y ?? 0;
|
float footerH = Footer?.LayoutSize.Y ?? 0;
|
||||||
|
|
||||||
if (headerH != headerHeight || footerH != footerHeight)
|
if (headerH != headerHeight || footerH != footerHeight)
|
||||||
{
|
{
|
||||||
headerHeight = headerH;
|
headerHeight = headerH;
|
||||||
@ -192,6 +193,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
foreach (var section in Children)
|
foreach (var section in Children)
|
||||||
{
|
{
|
||||||
float diff = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll - scrollOffset);
|
float diff = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll - scrollOffset);
|
||||||
|
|
||||||
if (diff < minDiff)
|
if (diff < minDiff)
|
||||||
{
|
{
|
||||||
minDiff = diff;
|
minDiff = diff;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user