-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replay loading via drag-drop huzzah! #436
Conversation
# Conflicts: # osu.Game.Modes.Catch/CatchRuleset.cs # osu.Game.Modes.Mania/ManiaRuleset.cs # osu.Game.Modes.Taiko/TaikoRuleset.cs # osu.Game/Screens/Play/Player.cs
❌ Build osu master-214-dveikrts failed (commit 0f8b9e3a10 by @peppy) |
❌ Build osu master-214-xcykalgx failed (commit a6114de01e by @peppy) |
# Conflicts: # osu.Desktop.VisualTests/Tests/TestCasePlayer.cs
Doesn't work on complex sliders yet.
❌ Build osu master-221-mmnafqhx failed (commit 6cf87e3884 by @peppy) |
using SharpCompress.Compressors.LZMA; | ||
using SharpCompress.Readers; | ||
using KeyboardState = osu.Framework.Input.KeyboardState; | ||
using MouseState = osu.Framework.Input.MouseState; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
ImportBeatmapsAsync(filePaths); | ||
|
||
if (filePaths.All(f => Path.GetExtension(f) == @".osz")) | ||
Task.Run(() => BeatmapDatabase.Import(filePaths)); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
double hit50 = 150; | ||
double hit100 = 80; | ||
double hit300 = 30; | ||
//todo: these aren't constants. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -21,7 +21,7 @@ public class CirclePiece : Container | |||
|
|||
public CirclePiece() | |||
{ | |||
Size = new Vector2(128); | |||
Size = new Vector2((float)DrawableHitCircle.CIRCLE_RADIUS * 2); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
||
namespace osu.Game.Modes.Osu | ||
{ | ||
public class OsuAutoReplay : LegacyReplay |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Beatmaps/WorkingBeatmap.cs
Outdated
@@ -17,6 +18,14 @@ public abstract class WorkingBeatmap : IDisposable | |||
|
|||
public readonly BeatmapSetInfo BeatmapSetInfo; | |||
|
|||
/// <summary> | |||
/// A play mode that is preferred for this beatmap. This allows for conversion between game modes where feasible, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
foreach (var name in mapNames) | ||
using (var stream = new StreamReader(reader.GetStream(name))) | ||
using (var raw = archive.GetStream(name)) | ||
using (var ms = new MemoryStream()) //we need a memory stream so we can seek and shit |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
/// This is to ensure accurate playback of replay data. | ||
/// </summary> | ||
/// <param name="time">The time which we should use for finding the current frame.</param> | ||
/// <returns>The usable time value. If null, we shouldn't be running components reliant on this data.</returns> |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Modes/LegacyReplay.cs
Outdated
|
||
private bool nextFrame() | ||
{ | ||
int newFrame = MathHelper.Clamp(currentFrameIndex + (currentDirection > 0 ? 1 : -1), 0, replayContent.Count - 1); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Modes/LegacyReplay.cs
Outdated
int currentFrameIndex; | ||
|
||
public LegacyReplayFrame CurrentFrame => !hasFrames ? null : replayContent[currentFrameIndex]; | ||
public LegacyReplayFrame NextFrame => !hasFrames ? null : replayContent[MathHelper.Clamp(currentDirection > 0 ? currentFrameIndex + 1 : currentFrameIndex - 1, 0, replayContent.Count - 1)]; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Modes/LegacyReplay.cs
Outdated
if (!hasFrames) | ||
return null; | ||
|
||
if (AtLastFrame) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Beatmaps/WorkingBeatmap.cs
Outdated
@@ -26,6 +27,8 @@ public abstract class WorkingBeatmap : IDisposable | |||
|
|||
public PlayMode PlayMode => beatmap?.BeatmapInfo?.Mode > PlayMode.Osu ? beatmap.BeatmapInfo.Mode : PreferredPlayMode ?? PlayMode.Osu; | |||
|
|||
public readonly Bindable<Mod[]> Mods = new Bindable<Mod[]>(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
public const double HITTABLE_RANGE = 300; | ||
public const double HIT_WINDOW_50 = 150; | ||
public const double HIT_WINDOW_100 = 80; | ||
public const double HIT_WINDOW_300 = 30; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
osu.Game/Modes/LegacyReplay.cs
Outdated
|
||
public Vector2 Size => new Vector2(512, 384); | ||
|
||
private const double sixty_frame_time = 1000 / 60; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
❌ Build osu master-223-mviacpex failed (commit 7e98bcc6e6 by @peppy) |
# Conflicts: # osu.Desktop.VisualTests/Tests/TestCasePlayer.cs # osu.Desktop/OsuGameDesktop.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableHitCircle.cs # osu.Game.Modes.Osu/Objects/Drawables/DrawableSlider.cs # osu.Game/Database/BeatmapDatabase.cs # osu.Game/Graphics/Cursor/OsuCursorContainer.cs # osu.Game/IPC/BeatmapImporter.cs # osu.Game/Modes/Mod.cs # osu.Game/Modes/Objects/Drawables/DrawableHitObject.cs # osu.Game/Modes/UI/Playfield.cs # osu.Game/Screens/Play/Player.cs # osu.Game/Screens/Play/PlayerInputManager.cs
# Conflicts: # osu.Game/Modes/Mod.cs
This is not ready to merge. Do not merge this.