Skip to content
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

Merged
merged 39 commits into from
Mar 7, 2017
Merged

Replay loading via drag-drop huzzah! #436

merged 39 commits into from
Mar 7, 2017

Conversation

peppy
Copy link
Member

@peppy peppy commented Mar 4, 2017

This is not ready to merge. Do not merge this.

@AppVeyorBot
Copy link

@peppy peppy added the wip label Mar 4, 2017
@AppVeyorBot
Copy link

# Conflicts:
#	osu.Desktop.VisualTests/Tests/TestCasePlayer.cs
Doesn't work on complex sliders yet.
@AppVeyorBot
Copy link

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.

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.

This comment was marked as off-topic.

This comment was marked as off-topic.

double hit50 = 150;
double hit100 = 80;
double hit300 = 30;
//todo: these aren't constants.

This comment was marked as off-topic.

@@ -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.


namespace osu.Game.Modes.Osu
{
public class OsuAutoReplay : LegacyReplay

This comment was marked as off-topic.

@@ -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.

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 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.


private bool nextFrame()
{
int newFrame = MathHelper.Clamp(currentFrameIndex + (currentDirection > 0 ? 1 : -1), 0, replayContent.Count - 1);

This comment was marked as off-topic.

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.

if (!hasFrames)
return null;

if (AtLastFrame)

This comment was marked as off-topic.

@@ -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.

@peppy peppy removed the wip label Mar 6, 2017
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.


public Vector2 Size => new Vector2(512, 384);

private const double sixty_frame_time = 1000 / 60;

This comment was marked as off-topic.

@AppVeyorBot
Copy link

# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants