1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 04:13:11 +08:00

Update SmokeSegment in line with framework vertex changes

This commit is contained in:
Dean Herbert 2023-08-17 18:12:04 +09:00
parent e2cb0d7afb
commit 0858bef66e

View File

@ -257,7 +257,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
texture.Bind(); texture.Bind();
for (int i = 0; i < points.Count; i++) for (int i = 0; i < points.Count; i++)
drawPointQuad(points[i], textureRect, i + firstVisiblePointIndex); drawPointQuad(renderer, points[i], textureRect, i + firstVisiblePointIndex);
UnbindTextureShader(renderer); UnbindTextureShader(renderer);
renderer.PopLocalMatrix(); renderer.PopLocalMatrix();
@ -325,7 +325,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
private float getRotation(int index) => max_rotation * (StatelessRNG.NextSingle(rotationSeed, index) * 2 - 1); private float getRotation(int index) => max_rotation * (StatelessRNG.NextSingle(rotationSeed, index) * 2 - 1);
private void drawPointQuad(SmokePoint point, RectangleF textureRect, int index) private void drawPointQuad(IRenderer renderer, SmokePoint point, RectangleF textureRect, int index)
{ {
Debug.Assert(quadBatch != null); Debug.Assert(quadBatch != null);
@ -347,25 +347,25 @@ namespace osu.Game.Rulesets.Osu.Skinning
var localBotLeft = point.Position + ortho - dir; var localBotLeft = point.Position + ortho - dir;
var localBotRight = point.Position + ortho + dir; var localBotRight = point.Position + ortho + dir;
quadBatch.Add(new TexturedVertex2D quadBatch.Add(new TexturedVertex2D(renderer)
{ {
Position = localTopLeft, Position = localTopLeft,
TexturePosition = textureRect.TopLeft, TexturePosition = textureRect.TopLeft,
Colour = Color4Extensions.Multiply(ColourAtPosition(localTopLeft), colour), Colour = Color4Extensions.Multiply(ColourAtPosition(localTopLeft), colour),
}); });
quadBatch.Add(new TexturedVertex2D quadBatch.Add(new TexturedVertex2D(renderer)
{ {
Position = localTopRight, Position = localTopRight,
TexturePosition = textureRect.TopRight, TexturePosition = textureRect.TopRight,
Colour = Color4Extensions.Multiply(ColourAtPosition(localTopRight), colour), Colour = Color4Extensions.Multiply(ColourAtPosition(localTopRight), colour),
}); });
quadBatch.Add(new TexturedVertex2D quadBatch.Add(new TexturedVertex2D(renderer)
{ {
Position = localBotRight, Position = localBotRight,
TexturePosition = textureRect.BottomRight, TexturePosition = textureRect.BottomRight,
Colour = Color4Extensions.Multiply(ColourAtPosition(localBotRight), colour), Colour = Color4Extensions.Multiply(ColourAtPosition(localBotRight), colour),
}); });
quadBatch.Add(new TexturedVertex2D quadBatch.Add(new TexturedVertex2D(renderer)
{ {
Position = localBotLeft, Position = localBotLeft,
TexturePosition = textureRect.BottomLeft, TexturePosition = textureRect.BottomLeft,