diff --git a/Hitokori/TextureGeneration.cs b/Hitokori/TextureGeneration.cs index b74378d..f338bdd 100644 --- a/Hitokori/TextureGeneration.cs +++ b/Hitokori/TextureGeneration.cs @@ -8,12 +8,15 @@ namespace osu.Game.Rulesets.Hitokori { public static class TextureGeneration { public static TextureUpload Generate ( int width, int height, Func generator ) { Image image = new Image( width, height ); - for ( int y = 0; y < height; y++ ) { - var span = image.GetPixelRowSpan( y ); - for ( int x = 0; x < width; x++ ) { - span[ x ] = generator( x, height - y - 1 ); + image.ProcessPixelRows( rows => { + for ( int y = 0; y < height; y++ ) { + var span = rows.GetRowSpan( y ); + for ( int x = 0; x < width; x++ ) { + span[x] = generator( x, height - y - 1 ); + } } - } + } ); + return new TextureUpload( image ); } diff --git a/Hitokori/osu.Game.Rulesets.Hitokori.csproj b/Hitokori/osu.Game.Rulesets.Hitokori.csproj index 4abb1a8..f7b4020 100644 --- a/Hitokori/osu.Game.Rulesets.Hitokori.csproj +++ b/Hitokori/osu.Game.Rulesets.Hitokori.csproj @@ -1,12 +1,12 @@ - net5.0 + net6.0 preview - + diff --git a/Tests/osu.Game.Rulesets.Hitokori.Tests.csproj b/Tests/osu.Game.Rulesets.Hitokori.Tests.csproj index d310f56..9b2538b 100644 --- a/Tests/osu.Game.Rulesets.Hitokori.Tests.csproj +++ b/Tests/osu.Game.Rulesets.Hitokori.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + @@ -20,7 +20,7 @@ WinExe - net5.0 + net6.0 osu.Game.Rulesets.Hitokori.Tests \ No newline at end of file