Skip to content

Commit

Permalink
update osu version
Browse files Browse the repository at this point in the history
  • Loading branch information
Flutterish committed Sep 17, 2021
1 parent c508e75 commit 8f9535b
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 46 deletions.
7 changes: 4 additions & 3 deletions Hitokori/Difficulty/Skills/Reading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@

namespace osu.Game.Rulesets.Hitokori.Difficulty.Skills {
public class Reading : StrainSkill {
protected override double SkillMultiplier => 0.6;
protected override double StrainDecayBase => 0.6;
protected override double DecayWeight => 0.6;

private const double DIRECTION_CHANGE_BONUS = 1.05;

public Reading ( Mod[] mods ) : base( mods ) { }

protected override double StrainValueOf ( DifficultyHitObject current ) {
protected override double StrainValueAt ( DifficultyHitObject current ) {
HitokoriDifficultyHitObject hitokoriCurrent = (HitokoriDifficultyHitObject)current;

double strain = CalculateAngleStrain( hitokoriCurrent.HitAngle );
Expand All @@ -30,5 +29,7 @@ protected override double StrainValueOf ( DifficultyHitObject current ) {
private double CalculateAngleStrain ( double angle ) {
return Math.Abs( ( Math.Abs( angle ) - Math.PI ) / ( Math.PI * 3 / 2 ) );
}

protected override double CalculateInitialStrain ( double time ) => 0;
}
}
7 changes: 4 additions & 3 deletions Hitokori/Difficulty/Skills/Speed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

namespace osu.Game.Rulesets.Hitokori.Difficulty.Skills {
public class Speed : StrainSkill {
protected override double SkillMultiplier => 0.8;
protected override double StrainDecayBase => 0.6;
protected override double DecayWeight => 0.6;

/// <summary>
/// The BPM where strain stops increasing
Expand All @@ -20,11 +19,13 @@ public class Speed : StrainSkill {

public Speed ( Mod[] mods ) : base( mods ) { }

protected override double StrainValueOf ( DifficultyHitObject current ) {
protected override double StrainValueAt ( DifficultyHitObject current ) {
HitokoriDifficultyHitObject hitokoriCurrent = (HitokoriDifficultyHitObject)current;
double bpm = Math.Min( hitokoriCurrent.BPM, MAX_BPM );

return Math.Pow( bpm / BASE_BPM, 0.6 );
}

protected override double CalculateInitialStrain ( double time ) => 0;
}
}
5 changes: 2 additions & 3 deletions Hitokori/Mods/HitokoriModAuto.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
using System.Collections.Generic;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Hitokori.Beatmaps;
using osu.Game.Rulesets.Hitokori.Objects.Base;
using osu.Game.Rulesets.Hitokori.Replays;
using osu.Game.Rulesets.Hitokori.Utils;
using osu.Game.Rulesets.Mods;
using osu.Game.Scoring;
using osu.Game.Users;
using System.Collections.Generic;

namespace osu.Game.Rulesets.Hitokori.Mods {
public class HitokoriModAuto : ModAutoplay {
Expand Down
1 change: 0 additions & 1 deletion Hitokori/Objects/Drawables/AutoModBot/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Stores;
using osu.Game.Rulesets.Hitokori.Utils;

namespace osu.Game.Rulesets.Hitokori.Objects.Drawables.AutoModBot {
Expand Down
9 changes: 5 additions & 4 deletions Hitokori/Objects/Drawables/Tiles/DrawableHoldTile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Hitokori.Objects.Base;
using osu.Game.Rulesets.Hitokori.Objects.Drawables.AutoModBot;
using osu.Game.Rulesets.Hitokori.Objects.Drawables.Trails;
Expand Down Expand Up @@ -67,15 +68,15 @@ protected override void CheckForResult ( bool userTriggered, double timeOffset )
public double Duration { get => Tile.Duration; set => Tile.Duration = value; }

HitokoriAction? HoldButton;
public bool OnPressed ( HitokoriAction action ) { // BUG beatmaps that have a hold tile last end prematurely?
public bool OnPressed ( KeyBindingPressEvent<HitokoriAction> action ) { // BUG beatmaps that have a hold tile last end prematurely?
if ( Clock.ElapsedFrameTime < 0 ) return true;
if ( StartPoint.Judged ) return false;
BeginHold( action );
BeginHold( action.Action );
return true;
}

public void OnReleased ( HitokoriAction action ) {
Release( action );
public void OnReleased ( KeyBindingReleaseEvent<HitokoriAction> action ) {
Release( action.Action );
HoldButton = null;
}

Expand Down
5 changes: 3 additions & 2 deletions Hitokori/Objects/Drawables/Tiles/DrawableSpinTile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Hitokori.Objects.Base;
using osu.Game.Rulesets.Hitokori.Objects.Drawables.AutoModBot;
using osu.Game.Rulesets.Hitokori.Settings;
Expand Down Expand Up @@ -56,13 +57,13 @@ protected override void CheckForResult ( bool userTriggered, double timeOffset )
}
}

public bool OnPressed ( HitokoriAction action ) {
public bool OnPressed ( KeyBindingPressEvent<HitokoriAction> action ) {
var next = Points.FirstOrDefault( X => !X.Judged );
if ( next is null ) return false;
Playfield.Click( AutoClickType.Press );
UpdateResult( true );
return true;
}
public void OnReleased ( HitokoriAction action ) { }
public void OnReleased ( KeyBindingReleaseEvent<HitokoriAction> action ) { }
}
}
5 changes: 3 additions & 2 deletions Hitokori/Objects/Drawables/Tiles/DrawableTapTile.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Hitokori.Objects.Base;
using osu.Game.Rulesets.Hitokori.Objects.Drawables.AutoModBot;
using osu.Game.Rulesets.Hitokori.Settings;
Expand Down Expand Up @@ -31,13 +32,13 @@ protected override void CheckForResult ( bool userTriggered, double timeOffset )
PressPoint.TryToHitAtOffset( timeOffset );
}
}
public bool OnPressed ( HitokoriAction action ) {
public bool OnPressed ( KeyBindingPressEvent<HitokoriAction> action ) {
if ( PressPoint.Judged ) return false;
Playfield.Click( AutoClickType.Press );
UpdateResult( userTriggered: true );
return true;
}
public void OnReleased ( HitokoriAction action ) { }
public void OnReleased ( KeyBindingReleaseEvent<HitokoriAction> action ) { }

protected override void AddNestedHitObject ( DrawableHitObject hitObject ) {
AddInternal( PressPoint = hitObject as DrawableTilePoint );
Expand Down
5 changes: 0 additions & 5 deletions Hitokori/Settings/HitokoriSettingsManager.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Game.Configuration;
using osu.Game.Rulesets.Configuration;
using osuTK;
using osuTK.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;

namespace osu.Game.Rulesets.Hitokori.Settings {
public class HitokoriSettingsManager : RulesetConfigManager<HitokoriSetting> {
Expand Down
8 changes: 1 addition & 7 deletions Hitokori/TextureGeneration.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Textures;
using osuTK;
using osuTK.Graphics;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace osu.Game.Rulesets.Hitokori {
public static class TextureGeneration {
Expand Down
2 changes: 1 addition & 1 deletion Hitokori/UI/ColorPickerControl.HuePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected override void LoadComplete () {
Sample notchSample;
[BackgroundDependencyLoader]
private void load ( ISampleStore samples ) {
notchSample = samples.Get( "UI/sliderbar-notch" );
notchSample = samples.Get( "UI/notch-tick" );
}

protected override bool OnDragStart ( DragStartEvent e ) {
Expand Down
4 changes: 1 addition & 3 deletions Hitokori/UI/ColorPickerControl.SVPicker.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
Expand All @@ -8,7 +7,6 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input.Events;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
using System;
Expand Down Expand Up @@ -65,7 +63,7 @@ protected override void LoadComplete () {
Sample notchSample;
[BackgroundDependencyLoader]
private void load ( ISampleStore samples ) {
notchSample = samples.Get( "UI/sliderbar-notch" );
notchSample = samples.Get( "UI/notch-tick" );
}

protected override bool OnDragStart ( DragStartEvent e ) {
Expand Down
1 change: 0 additions & 1 deletion Hitokori/UI/ColorPickerControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using osu.Game.Rulesets.Hitokori.Utils;
using osuTK;
using osuTK.Graphics;
using Sentry;
using System.Linq;

namespace osu.Game.Rulesets.Hitokori.UI {
Expand Down
1 change: 0 additions & 1 deletion Hitokori/UI/HitokoriSettingsSubsection.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
Expand Down
7 changes: 0 additions & 7 deletions Hitokori/UI/OrbitalColorPicker.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Hitokori.Objects.Base;
using osu.Game.Rulesets.Hitokori.Objects.Drawables.Hitokori;
using osu.Game.Rulesets.Hitokori.Settings;
using osu.Game.Rulesets.Hitokori.Utils;
using osuTK;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace osu.Game.Rulesets.Hitokori.UI {
public class OrbitalColorPicker : ColorPickerControl {
Expand Down
2 changes: 1 addition & 1 deletion Hitokori/osu.Game.Rulesets.Hitokori.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2021.720.0" />
<PackageReference Include="ppy.osu.Game" Version="2021.916.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Tests/TestSceneOsuGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public class TestSceneOsuGame : OsuTestScene {
[BackgroundDependencyLoader]
private void load ( GameHost host, OsuGameBase gameBase ) {
OsuGame game = new OsuGame();
game.SetHost( host );

Children = new Drawable[] {
new Box {
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black,
},
game
};

AddGame( game );
}
}
}

0 comments on commit 8f9535b

Please sign in to comment.