diff --git a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs index d1519d0404..87b201a8e8 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseGamefield.cs @@ -45,7 +45,7 @@ namespace osu.Desktop.VisualTests.Tests objects.Add(new HitCircle { StartTime = time, - Position = new Vector2(RNG.Next(0, 512), RNG.Next(0, 384)), + Position = new Vector2(RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.X), RNG.Next(0, (int)OsuPlayfield.BASE_SIZE.Y)), Scale = RNG.NextSingle(0.5f, 1.0f), }); diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 8e19419dbb..c196476545 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -14,6 +14,7 @@ using osu.Game.Modes.Osu.Objects; using osu.Game.Screens.Play; using OpenTK.Graphics; using osu.Desktop.VisualTests.Beatmaps; +using osu.Game.Modes.Osu.UI; namespace osu.Desktop.VisualTests.Tests { @@ -52,8 +53,8 @@ namespace osu.Desktop.VisualTests.Tests objects.Add(new HitCircle { StartTime = time, - Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : 512, - i % 4 < 2 ? 0 : 384), + Position = new Vector2(i % 4 == 0 || i % 4 == 2 ? 0 : OsuPlayfield.BASE_SIZE.X, + i % 4 < 2 ? 0 : OsuPlayfield.BASE_SIZE.Y), NewCombo = i % 4 == 0 }); diff --git a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapConverter.cs b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapConverter.cs index dd8dde5530..044c45b184 100644 --- a/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapConverter.cs +++ b/osu.Game.Modes.Osu/Beatmaps/OsuBeatmapConverter.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using osu.Game.Modes.Objects.Types; using System.Linq; using System; +using osu.Game.Modes.Osu.UI; using osu.Game.Modes.Beatmaps; namespace osu.Game.Modes.Osu.Beatmaps @@ -66,7 +67,7 @@ namespace osu.Game.Modes.Osu.Beatmaps Samples = original.Samples, EndTime = endTimeData.EndTime, - Position = positionData?.Position ?? new Vector2(512, 384) / 2, + Position = positionData?.Position ?? OsuPlayfield.BASE_SIZE / 2, }; } diff --git a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs index d0136f717c..d921481290 100644 --- a/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs +++ b/osu.Game.Modes.Osu/Objects/Drawables/DrawableSpinner.cs @@ -9,6 +9,7 @@ using osu.Game.Modes.Objects.Drawables; using osu.Game.Modes.Osu.Objects.Drawables.Pieces; using OpenTK; using OpenTK.Graphics; +using osu.Game.Modes.Osu.UI; namespace osu.Game.Modes.Osu.Objects.Drawables { @@ -29,7 +30,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables Position = s.Position; //take up full playfield. - Size = new Vector2(512); + Size = OsuPlayfield.BASE_SIZE; spinner = s; diff --git a/osu.Game.Modes.Osu/UI/OsuPlayfield.cs b/osu.Game.Modes.Osu/UI/OsuPlayfield.cs index 4164607b4d..47e2c1ed16 100644 --- a/osu.Game.Modes.Osu/UI/OsuPlayfield.cs +++ b/osu.Game.Modes.Osu/UI/OsuPlayfield.cs @@ -23,6 +23,8 @@ namespace osu.Game.Modes.Osu.UI public override bool ProvidingUserCursor => true; + public static readonly Vector2 BASE_SIZE = new Vector2(512, 384); + public override Vector2 Size { get @@ -34,7 +36,7 @@ namespace osu.Game.Modes.Osu.UI } } - public OsuPlayfield() : base(512) + public OsuPlayfield() : base(BASE_SIZE.X) { Anchor = Anchor.Centre; Origin = Anchor.Centre; @@ -94,4 +96,4 @@ namespace osu.Game.Modes.Osu.UI judgementLayer.Add(explosion); } } -} \ No newline at end of file +}