Skip to content

Commit

Permalink
Revert "Implement beat-synchronized animation in break overlay"
Browse files Browse the repository at this point in the history
This reverts commit 630b8a6.
  • Loading branch information
nekupaw committed Sep 13, 2024
1 parent 04eb212 commit 8d920ef
Show file tree
Hide file tree
Showing 405 changed files with 1,117 additions and 1,070 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System.Collections.Generic;
using System.Threading;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.EmptyScrolling.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.EmptyScrolling.Objects;

namespace osu.Game.Rulesets.EmptyScrolling.Beatmaps
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.EmptyScrolling.Beatmaps;
using osu.Game.Rulesets.EmptyScrolling.Mods;
using osu.Game.Rulesets.EmptyScrolling.UI;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;

namespace osu.Game.Rulesets.EmptyScrolling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using osu.Game.Beatmaps;
using osu.Game.Input.Handlers;
using osu.Game.Replays;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.EmptyScrolling.Objects;
using osu.Game.Rulesets.EmptyScrolling.Objects.Drawables;
using osu.Game.Rulesets.EmptyScrolling.Replays;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;

Expand Down
8 changes: 4 additions & 4 deletions osu.Desktop/LegacyIpc/LegacyIpcMessage.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using Newtonsoft.Json.Linq;
using osu.Framework.Platform;
using Newtonsoft.Json.Linq;

namespace osu.Desktop.LegacyIpc
{
Expand All @@ -12,13 +12,13 @@ namespace osu.Desktop.LegacyIpc
/// In order to deserialise types at either end, types must be serialised as their <see cref="System.Type.AssemblyQualifiedName"/>,
/// however this cannot be done since osu!stable and osu!lazer live in two different assemblies.
/// <br />
/// To get around this, this class exists which serialises a payload (<see cref="Data"/>) as an <see cref="object"/> type,
/// To get around this, this class exists which serialises a payload (<see cref="LegacyIpcMessage.Data"/>) as an <see cref="System.Object"/> type,
/// which can be deserialised at either end because it is part of the core library (mscorlib / System.Private.CorLib).
/// The payload contains the data to be sent over the IPC channel.
/// <br />
/// At either end, Json.NET deserialises the payload into a <see cref="JObject"/> which is manually converted back into the expected <see cref="Data"/> type,
/// At either end, Json.NET deserialises the payload into a <see cref="JObject"/> which is manually converted back into the expected <see cref="LegacyIpcMessage.Data"/> type,
/// which then further contains another <see cref="JObject"/> representing the data sent over the IPC channel whose type can likewise be lazily matched through
/// <see cref="Data.MessageType"/>.
/// <see cref="LegacyIpcMessage.Data.MessageType"/>.
/// </para>
/// </summary>
/// <remarks>
Expand Down
21 changes: 14 additions & 7 deletions osu.Desktop/NVAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,13 @@ public static bool IsUsingOptimusDedicatedGpu
if (!IsLaptop)
return false;

if (!getProfile(out nint profileHandle, out _, out bool _))
IntPtr profileHandle;
if (!getProfile(out profileHandle, out _, out bool _))
return false;

// Get the optimus setting
if (!getSetting(NvSettingID.SHIM_RENDERING_MODE_ID, profileHandle, out var setting))
NvSetting setting;
if (!getSetting(NvSettingID.SHIM_RENDERING_MODE_ID, profileHandle, out setting))
return false;

return (setting.U32CurrentValue & (uint)NvShimSetting.SHIM_RENDERING_MODE_ENABLE) > 0;
Expand Down Expand Up @@ -162,11 +164,13 @@ public static NvThreadControlSetting ThreadedOptimisations
if (!Available)
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;

if (!getProfile(out nint profileHandle, out _, out bool _))
IntPtr profileHandle;
if (!getProfile(out profileHandle, out _, out bool _))
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;

// Get the threaded optimisations setting
if (!getSetting(NvSettingID.OGL_THREAD_CONTROL_ID, profileHandle, out var setting))
NvSetting setting;
if (!getSetting(NvSettingID.OGL_THREAD_CONTROL_ID, profileHandle, out setting))
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;

return (NvThreadControlSetting)setting.U32CurrentValue;
Expand Down Expand Up @@ -288,7 +292,10 @@ private static bool getSetting(NvSettingID settingId, IntPtr profileHandle, out

private static bool setSetting(NvSettingID settingId, uint settingValue)
{
if (!getProfile(out nint profileHandle, out var application, out bool isApplicationSpecific))
NvApplication application;
IntPtr profileHandle;
bool isApplicationSpecific;
if (!getProfile(out profileHandle, out application, out isApplicationSpecific))
return false;

if (!isApplicationSpecific)
Expand Down Expand Up @@ -368,8 +375,8 @@ static NVAPI()
return;
}

getDelegate(0x0150E828, out
InitializeDelegate initialize);
InitializeDelegate initialize;
getDelegate(0x0150E828, out initialize);

if (initialize?.Invoke() == NvStatus.OK)
{
Expand Down
10 changes: 5 additions & 5 deletions osu.Desktop/OsuGameDesktop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
using Microsoft.Win32;
using osu.Desktop.Performance;
using osu.Desktop.Security;
using osu.Framework.Platform;
using osu.Game;
using osu.Desktop.Updater;
using osu.Desktop.Windows;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game;
using osu.Game.Updater;
using osu.Desktop.Windows;
using osu.Framework.Allocation;
using osu.Game.IO;
using osu.Game.IPC;
using osu.Game.Online.Multiplayer;
using osu.Game.Performance;
using osu.Game.Updater;
using osu.Game.Utils;

namespace osu.Desktop
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.UI;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Framework.Utils;
Expand All @@ -18,7 +19,6 @@
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
using osu.Game.Tests.Visual;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static IEnumerable<PalpableCatchHitObject> GetPalpableObjects(IEnumerable
{
return hitObjects.SelectMany(selectPalpableObjects).OrderBy(h => h.StartTime);

static IEnumerable<PalpableCatchHitObject> selectPalpableObjects(HitObject h)
IEnumerable<PalpableCatchHitObject> selectPalpableObjects(HitObject h)
{
if (h is PalpableCatchHitObject palpable)
yield return palpable;
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Objects;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;

namespace osu.Game.Rulesets.Catch.Beatmaps
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ public class CheckCatchAbnormalDifficultySettings : CheckAbnormalDifficultySetti
public override IEnumerable<Issue> Run(BeatmapVerifierContext context)
{
var diff = context.Beatmap.Difficulty;
Issue? issue;

if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out var issue))
if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out issue))
yield return issue;

if (OutOfRange("Approach rate", diff.ApproachRate, out issue))
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// See the LICENCE file in the repository root for full licence text.

using System;
using osu.Game.Rulesets.Mods;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Objects;
using osuTK;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System;
using osu.Framework.Bindables;
using osu.Framework.Localisation;
using osu.Game.Rulesets.Mods;
using osu.Framework.Utils;
using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void UpdateCombo(int combo, Color4? hitObjectColour = null)

lastDisplayedCombo = combo;

if (Clock is IGameplayClock { IsRewinding: true })
if ((Clock as IGameplayClock)?.IsRewinding == true)
{
// needs more work to make rewind somehow look good.
// basically we want the previous increment to play... or turning off RemoveCompletedTransforms (not feasible from a performance angle).
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Catch/UI/CatcherArea.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected override void UpdateAfterChildren()

comboDisplay.X = Catcher.X;

if (Clock is IGameplayClock { IsRewinding: true })
if ((Clock as IGameplayClock)?.IsRewinding == true)
{
// This is probably a wrong value, but currently the true value is not recorded.
// Setting `true` will prevent generation of false-positive after-images (with more false-negatives).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Objects;
using osu.Game.Tests.Beatmaps;
using osu.Game.Rulesets.Mania.Edit.Checks;
using System.Linq;

namespace osu.Game.Rulesets.Mania.Tests.Editor.Checks
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks;
using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Objects;
using osu.Game.Tests.Beatmaps;

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using NUnit.Framework;
using osu.Game.Rulesets.Mania.Beatmaps;
using NUnit.Framework;

namespace osu.Game.Rulesets.Mania.Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Mods;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Tests.Visual;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Mania.Beatmaps;

namespace osu.Game.Rulesets.Mania.Tests.Mods
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@

using System.Linq;
using NUnit.Framework;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Framework.Timing;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Tests.Visual;
using osu.Framework.Timing;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Configuration;
using osu.Game.Rulesets.Mania.Objects;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Tests.Visual;

namespace osu.Game.Rulesets.Mania.Tests
{
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Game.Rulesets.Mania.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Mania.Beatmaps.Patterns;
using osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring.Legacy;
using osu.Game.Utils;
using osuTK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// See the LICENCE file in the repository root for full licence text.

using System.Collections.Generic;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using System.Linq;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Utils;

namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osuTK;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Utils;
using osuTK;

namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{
Expand Down
Loading

0 comments on commit 8d920ef

Please sign in to comment.