trying to sync up with Zoids port

This commit is contained in:
Goatgarien
2022-09-09 03:35:27 -07:00
parent 9997e57d3b
commit bf6be18d69
34 changed files with 3989 additions and 228 deletions
+37
View File
@@ -0,0 +1,37 @@
name: build-validation
on:
push:
pull_request:
branches: [ main ]
paths:
- '**.cs'
- '**.csproj'
env:
DOTNET_VERSION: '6.x'
jobs:
build:
name: build-windows
runs-on: [ windows-latest ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Publish artifacts
uses: actions/upload-artifact@v1
with:
name: build
path: BAKKA-Sharp\bin\Release\net6.0-windows\
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
+30 -65
View File
@@ -1,80 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{76336598-B2BE-4F67-B3D6-821F6A0E302F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<RootNamespace>BAKKA_Editor</RootNamespace>
<AssemblyName>BAKKA-Editor</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<Version>$(VersionPrefix)1.0.0-rc8</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0-rc8</FileVersion>
<Company>Goatgarien</Company>
<Copyright>2022</Copyright>
<StartupObject>BAKKA_Editor.Program</StartupObject>
<ApplicationIcon />
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<PackageReference Include="Tomlyn" Version="0.15.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<Reference Include="irrKlang.NET4">
<HintPath>..\lib\irrKlang.NET4.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+293
View File
@@ -0,0 +1,293 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal class Chart
{
public List<Note> Notes { get; set; }
public List<Gimmick> Gimmicks { get; set; }
/// <summary>
/// Offset in seconds.
/// </summary>
public double Offset { get; set; }
/// <summary>
/// Movie offset in seconds
/// </summary>
public double MovieOffset { get; set; }
String SongFileName { get; set; }
List<Gimmick> TimeEvents { get; set; }
public bool HasInitEvents
{
get
{
return TimeEvents != null &&
TimeEvents.Count > 0 &&
Gimmicks.Count(x => x.Measure == 0 && x.GimmickType == GimmickType.BpmChange) >= 1 &&
Gimmicks.Count(x => x.Measure == 0 && x.GimmickType == GimmickType.TimeSignatureChange) >= 1;
}
}
public bool IsSaved { get; set; }
public Chart()
{
Notes = new();
Gimmicks = new();
Offset = 0;
MovieOffset = 0;
SongFileName = "";
IsSaved = true;
}
public bool ParseFile(string filename)
{
var file = File.ReadAllLines(filename);
int index = 0;
do
{
var line = file[index];
var path = Utils.GetTag(line, "#MUSIC_FILE_PATH ");
if (path != null)
SongFileName = path;
var offset = Utils.GetTag(line, "#OFFSET");
if (offset != null)
Offset = Convert.ToDouble(offset);
offset = Utils.GetTag(line, "#MOVIEOFFSET");
if (offset != null)
MovieOffset = Convert.ToDouble(offset);
if (line.Contains("#BODY"))
{
index++;
break;
}
} while(++index < file.Length);
int lineNum;
Gimmick gimmickTemp;
Note noteTemp;
Dictionary<int, Note> notesByLine = new();
Dictionary<int, int> refByLine = new();
for (int i = index; i < file.Length; i++)
{
var parsed = file[i].Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
NoteBase temp = new();
temp.BeatInfo = new BeatInfo(Convert.ToInt32(parsed[0]), Convert.ToInt32(parsed[1]));
temp.GimmickType = (GimmickType)Convert.ToInt32(parsed[2]);
switch (temp.GimmickType)
{
case GimmickType.NoGimmick:
noteTemp = new Note(temp.BeatInfo);
noteTemp.NoteType = (NoteType)Convert.ToInt32(parsed[3]);
lineNum = Convert.ToInt32(parsed[4]);
noteTemp.Position = Convert.ToInt32(parsed[5]);
noteTemp.Size = Convert.ToInt32(parsed[6]);
noteTemp.HoldChange = Convert.ToBoolean(Convert.ToInt32(parsed[7]));
if (noteTemp.NoteType == NoteType.MaskAdd || noteTemp.NoteType == NoteType.MaskRemove)
{
noteTemp.MaskFill = (MaskType)Convert.ToInt32(parsed[8]);
}
else if (noteTemp.NoteType == NoteType.HoldStartNoBonus ||
noteTemp.NoteType == NoteType.HoldJoint ||
noteTemp.NoteType == NoteType.HoldStartBonusFlair)
{
refByLine[lineNum] = Convert.ToInt32(parsed[8]);
}
Notes.Add(noteTemp);
notesByLine[lineNum] = Notes.Last();
break;
case GimmickType.BpmChange:
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
gimmickTemp.BPM = Convert.ToDouble(parsed[3]);
Gimmicks.Add(gimmickTemp);
break;
case GimmickType.TimeSignatureChange:
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
gimmickTemp.TimeSig = new TimeSignature() { Upper = Convert.ToInt32(parsed[3]), Lower = Convert.ToInt32(parsed[4]) };
Gimmicks.Add(gimmickTemp);
break;
case GimmickType.HiSpeedChange:
gimmickTemp = new Gimmick(temp.BeatInfo, temp.GimmickType);
gimmickTemp.HiSpeed = Convert.ToDouble(parsed[3]);
Gimmicks.Add(gimmickTemp);
break;
case GimmickType.ReverseStart:
case GimmickType.ReverseMiddle:
case GimmickType.ReverseEnd:
case GimmickType.StopStart:
case GimmickType.StopEnd:
default:
Gimmicks.Add(new Gimmick(temp.BeatInfo, temp.GimmickType));
break;
}
}
// Generate hold references
for (int i = 0; i < Notes.Count; i++)
{
if (refByLine.ContainsKey(i))
{
Notes[i].NextNote = notesByLine[refByLine[i]];
Notes[i].NextNote.PrevNote = Notes[i];
}
}
RecalcTime();
IsSaved = true;
return true;
}
public bool WriteFile(string filename, bool setSave = true)
{
using (StreamWriter sw = new StreamWriter(new FileStream(filename, FileMode.Create), new UTF8Encoding(false)))
{
// LF line ending
sw.NewLine = "\n";
sw.WriteLine("#MUSIC_SCORE_ID 0");
sw.WriteLine("#MUSIC_SCORE_VERSION 0");
sw.WriteLine("#GAME_VERSION ");
sw.WriteLine($"#MUSIC_FILE_PATH {SongFileName}");
sw.WriteLine($"#OFFSET {Offset:F6}");
sw.WriteLine($"#MOVIEOFFSET {MovieOffset:F6}");
sw.WriteLine("#BODY");
foreach (var gimmick in Gimmicks)
{
sw.Write($"{gimmick.BeatInfo.Measure,4:F0}{gimmick.BeatInfo.Beat,5:F0}{((int)gimmick.GimmickType),5:F0}");
switch (gimmick.GimmickType)
{
case GimmickType.BpmChange:
sw.WriteLine($" {gimmick.BPM:F6}");
break;
case GimmickType.TimeSignatureChange:
sw.WriteLine($"{gimmick.TimeSig.Upper,5:F0}{gimmick.TimeSig.Lower,5:F0}");
break;
case GimmickType.HiSpeedChange:
sw.WriteLine($" {gimmick.HiSpeed:F6}");
break;
default:
sw.WriteLine("");
break;
}
}
foreach (var note in Notes)
{
sw.Write($"{note.BeatInfo.Measure,4:F0}{note.BeatInfo.Beat,5:F0}{((int)note.GimmickType),5:F0}{(int)note.NoteType,5:F0}");
sw.Write($"{Notes.IndexOf(note),5:F0}{note.Position,5:F0}{note.Size,5:F0}{Convert.ToInt32(note.HoldChange),5:F0}");
if (note.IsMask)
sw.Write($"{(int)note.MaskFill,5:F0}");
if (note.NextNote != null)
sw.Write($"{Notes.IndexOf(note.NextNote),5:F0}");
sw.WriteLine("");
}
}
IsSaved = setSave;
return true;
}
public void RecalcTime()
{
Gimmicks = Gimmicks.OrderBy(x => x.Measure).ToList();
var timeSig = Gimmicks.FirstOrDefault(x => x.GimmickType == GimmickType.TimeSignatureChange && x.Measure == 0.0f);
var bpm = Gimmicks.FirstOrDefault(x => x.GimmickType == GimmickType.BpmChange && x.Measure == 0.0f);
if (timeSig == null || bpm == null)
return; // Cannot calculate times without either starting value
TimeEvents = new();
for (int i = 0; i < Gimmicks.Count; i++)
{
var evt = TimeEvents.FirstOrDefault(x => x.BeatInfo.MeasureDecimal == Gimmicks[i].BeatInfo.MeasureDecimal);
if (Gimmicks[i].GimmickType == GimmickType.BpmChange)
{
if (evt == null)
{
TimeEvents.Add(new Gimmick()
{
BeatInfo = new BeatInfo(Gimmicks[i].BeatInfo),
BPM = Gimmicks[i].BPM,
TimeSig = new TimeSignature(timeSig.TimeSig)
});
}
else
{
evt.BPM = Gimmicks[i].BPM;
}
bpm = Gimmicks[i];
}
if (Gimmicks[i].GimmickType == GimmickType.TimeSignatureChange)
{
if (evt == null)
{
TimeEvents.Add(new Gimmick()
{
BeatInfo = new BeatInfo(Gimmicks[i].BeatInfo),
BPM = bpm.BPM,
TimeSig = new TimeSignature(Gimmicks[i].TimeSig)
});
}
else
{
evt.TimeSig = new TimeSignature(Gimmicks[i].TimeSig);
}
timeSig = Gimmicks[i];
}
}
// Run through all time events and generate valid start times
TimeEvents[0].StartTime = Offset * 1000.0;
for (int i = 1; i < TimeEvents.Count; i++)
{
TimeEvents[i].StartTime = ((TimeEvents[i].Measure - TimeEvents[i - 1].Measure) * 4 * TimeEvents[i - 1].TimeSig.Ratio * 60000.0 / TimeEvents[i].BPM) + TimeEvents[i - 1].StartTime;
}
}
/// <summary>
/// Translate clock time to beats
/// </summary>
/// <param name="time">Current timestamp in ms</param>
/// <returns></returns>
public BeatInfo GetBeat(float time)
{
if (TimeEvents == null || TimeEvents.Count == 0)
return new BeatInfo(-1, 0);
var evt = TimeEvents.Where(x => time >= x.StartTime).LastOrDefault();
if (evt == null)
evt = TimeEvents[0];
return new BeatInfo((float)(evt.BPM * (time - evt.StartTime) / (60000.0f * evt.TimeSig.Ratio * 4)) + evt.Measure);
}
/// <summary>
/// Translate measures into clock time
/// </summary>
/// <param name="beat"></param>
/// <returns></returns>
public int GetTime(BeatInfo beat)
{
if (TimeEvents == null || TimeEvents.Count == 0)
return 0;
var evt = TimeEvents.Where(x => beat.MeasureDecimal >= x.Measure).LastOrDefault();
if (evt == null)
evt = TimeEvents[0];
return (int)((60000.0 * 4.0 * evt.TimeSig.Ratio / evt.BPM) * (beat.MeasureDecimal - evt.Measure) + evt.StartTime);
}
}
}
+110
View File
@@ -0,0 +1,110 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal class CircleView
{
public SizeF PanelSize { get; private set; }
public RectangleF DrawRect { get; private set; }
public PointF TopCorner { get; private set; }
public PointF CenterPoint { get; private set; }
public float Radius { get; private set; }
public float CurrentMeasure { get; set; }
/// <summary>
/// Number of measures in the future that are visible
/// </summary>
public float TotalMeasureShowNotes { get; set; } = 0.5f;
// Pens and Brushes
public Pen BasePen { get; set; }
public Pen BeatPen { get; set; }
public Pen TickMinorPen { get; set; }
public Pen TickMediumPen { get; set; }
public Pen TickMajorPen { get; set; }
public SolidBrush HoldBrush { get; set; } = new SolidBrush(Color.FromArgb(170, Color.Yellow));
public SolidBrush MaskBrush { get; set; } = new SolidBrush(Color.DimGray);
public Pen HighlightPen { get; set; }
public Pen FlairPen { get; set; }
private int CursorTransparency = 110;
private int SelectTransparency = 110;
private int FlairTransparency = 75;
public CircleView(SizeF size)
{
Update(size);
}
public void Update(SizeF size)
{
PanelSize = size;
float basePenWidth = PanelSize.Width * 4.0f / 600.0f;
TopCorner = new PointF(basePenWidth * 4, basePenWidth * 4);
DrawRect = new RectangleF(
TopCorner.X,
TopCorner.Y,
PanelSize.Width - basePenWidth * 8,
PanelSize.Height - basePenWidth * 8);
Radius = DrawRect.Width / 2.0f;
CenterPoint = new PointF(TopCorner.X + Radius, TopCorner.Y + Radius);
// Pens
BasePen = new Pen(Color.Black, basePenWidth);
BeatPen = new Pen(Color.White, PanelSize.Width * 1.0f / 600.0f);
TickMinorPen = new Pen(Color.Black, PanelSize.Width * 2.0f / 600.0f);
TickMediumPen = new Pen(Color.Black, PanelSize.Width * 4.0f / 600.0f);
TickMajorPen = new Pen(Color.Black, PanelSize.Width * 7.0f / 600.0f);
HighlightPen = new Pen(Color.FromArgb(SelectTransparency, Color.LightPink), PanelSize.Width * 8.0f / 600.0f);
FlairPen = new Pen(Color.FromArgb(FlairTransparency, Color.Yellow), PanelSize.Width * 8.0f / 600.0f);
}
public ArcInfo GetScaledRect(float objectTime)
{
ArcInfo info = new();
float notescaleInit = 1 - ((objectTime - CurrentMeasure) * (1 / TotalMeasureShowNotes)); // Scale from 0-1
info.NoteScale = (float)Math.Pow(10.0f, notescaleInit) / 10.0f;
float scaledRectSize = DrawRect.Width * info.NoteScale;
float scaledRadius = scaledRectSize / 2.0f;
info.Rect = new RectangleF(
new PointF(
CenterPoint.X - scaledRadius,
CenterPoint.Y - scaledRadius),
new SizeF(scaledRectSize, scaledRectSize));
return info;
}
public ArcInfo GetArcInfo(Note note)
{
ArcInfo info = GetScaledRect(note.Measure);
info.StartAngle = -note.Position * 6;
info.ArcLength = -note.Size * 6;
if(info.ArcLength != -360)
{
info.StartAngle -= 2;
info.ArcLength += 4;
}
return info;
}
public Pen GetPen(Note note, float noteScale = 1.0f)
{
return new Pen(note.Color, PanelSize.Width * 8.0f * noteScale / 600.0f);
}
public Pen GetPen(NoteType noteType)
{
return new Pen(Color.FromArgb(CursorTransparency, Utils.NoteTypeToColor(noteType)), PanelSize.Width * 24.0f / 600.0f);
}
}
internal struct ArcInfo
{
public float StartAngle;
public float ArcLength;
public RectangleF Rect;
public float NoteScale;
}
}
+66
View File
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal enum NoteType
{
TouchNoBonus = 1,
TouchBonus = 2,
SnapRedNoBonus = 3,
SnapBlueNoBonus = 4,
SlideOrangeNoBonus = 5,
SlideOrangeBonus = 6,
SlideGreenNoBonus = 7,
SlideGreenBonus = 8,
HoldStartNoBonus = 9,
HoldJoint = 10,
HoldEnd = 11,
MaskAdd = 12,
MaskRemove = 13,
EndOfChart = 14,
// MaskSameTime = 15,
Chain = 16,
// MaskLane = 17,
// TutorialTag = 18,
// BarLine = 19,
TouchBonusFlair = 20,
SnapRedBonusFlair = 21,
SnapBlueBonusFlair = 22,
SlideOrangeBonusFlair = 23,
SlideGreenBonusFlair = 24,
HoldStartBonusFlair = 25,
ChainBonusFlair = 26,
}
internal enum GimmickType
{
NoGimmick = 1,
BpmChange = 2,
TimeSignatureChange = 3,
// Stop = 4,
HiSpeedChange = 5,
ReverseStart = 6,
ReverseMiddle = 7,
ReverseEnd = 8,
StopStart = 9,
StopEnd = 10,
};
internal enum MaskType
{
Clockwise = 0,
CounterClockwise = 1,
Center = 2
}
internal enum BonusType
{
NoBonus = 0,
Bonus = 1,
Flair = 2
}
}
-40
View File
@@ -1,40 +0,0 @@
namespace BAKKA_Editor
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "Form1";
}
#endregion
}
}
+585
View File
@@ -0,0 +1,585 @@
namespace BAKKA_Editor
{
partial class GimmickForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.revEnd2Beat2Numeric = new System.Windows.Forms.NumericUpDown();
this.label18 = new System.Windows.Forms.Label();
this.revEnd2Beat1Numeric = new System.Windows.Forms.NumericUpDown();
this.revEnd2MeasureNumeric = new System.Windows.Forms.NumericUpDown();
this.label19 = new System.Windows.Forms.Label();
this.revEnd1Beat2Numeric = new System.Windows.Forms.NumericUpDown();
this.label16 = new System.Windows.Forms.Label();
this.revEnd1Beat1Numeric = new System.Windows.Forms.NumericUpDown();
this.revEnd1MeasureNumeric = new System.Windows.Forms.NumericUpDown();
this.label17 = new System.Windows.Forms.Label();
this.stopEndBeat2Numeric = new System.Windows.Forms.NumericUpDown();
this.label10 = new System.Windows.Forms.Label();
this.stopEndBeat1Numeric = new System.Windows.Forms.NumericUpDown();
this.stopEndMeasureNumeric = new System.Windows.Forms.NumericUpDown();
this.label11 = new System.Windows.Forms.Label();
this.hiSpeedNumeric = new System.Windows.Forms.NumericUpDown();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.timeSig2Numeric = new System.Windows.Forms.NumericUpDown();
this.timeSig1Numeric = new System.Windows.Forms.NumericUpDown();
this.gimmickBpmNumeric = new System.Windows.Forms.NumericUpDown();
this.label15 = new System.Windows.Forms.Label();
this.insertGimmickButton = new System.Windows.Forms.Button();
this.startBeat2Numeric = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.startBeat1Numeric = new System.Windows.Forms.NumericUpDown();
this.startMeasureNumeric = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.revEnd2Beat2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd2Beat1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd2MeasureNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1Beat2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1Beat1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1MeasureNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndBeat2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndBeat1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndMeasureNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.hiSpeedNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.timeSig2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.timeSig1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gimmickBpmNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.startBeat2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.startBeat1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.startMeasureNumeric)).BeginInit();
this.SuspendLayout();
//
// revEnd2Beat2Numeric
//
this.revEnd2Beat2Numeric.Location = new System.Drawing.Point(219, 206);
this.revEnd2Beat2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.revEnd2Beat2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.revEnd2Beat2Numeric.Name = "revEnd2Beat2Numeric";
this.revEnd2Beat2Numeric.Size = new System.Drawing.Size(42, 23);
this.revEnd2Beat2Numeric.TabIndex = 38;
this.revEnd2Beat2Numeric.Value = new decimal(new int[] {
16,
0,
0,
0});
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(8, 208);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(61, 15);
this.label18.TabIndex = 40;
this.label18.Text = "Rev End 2:";
//
// revEnd2Beat1Numeric
//
this.revEnd2Beat1Numeric.Location = new System.Drawing.Point(168, 206);
this.revEnd2Beat1Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.revEnd2Beat1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
-2147483648});
this.revEnd2Beat1Numeric.Name = "revEnd2Beat1Numeric";
this.revEnd2Beat1Numeric.Size = new System.Drawing.Size(38, 23);
this.revEnd2Beat1Numeric.TabIndex = 37;
this.revEnd2Beat1Numeric.ValueChanged += new System.EventHandler(this.revEnd2Beat1Numeric_ValueChanged);
//
// revEnd2MeasureNumeric
//
this.revEnd2MeasureNumeric.Location = new System.Drawing.Point(75, 206);
this.revEnd2MeasureNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.revEnd2MeasureNumeric.Name = "revEnd2MeasureNumeric";
this.revEnd2MeasureNumeric.Size = new System.Drawing.Size(87, 23);
this.revEnd2MeasureNumeric.TabIndex = 36;
this.revEnd2MeasureNumeric.ValueChanged += new System.EventHandler(this.revEnd2MeasureNumeric_ValueChanged);
//
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(207, 208);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(12, 15);
this.label19.TabIndex = 39;
this.label19.Text = "/";
//
// revEnd1Beat2Numeric
//
this.revEnd1Beat2Numeric.Location = new System.Drawing.Point(219, 177);
this.revEnd1Beat2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.revEnd1Beat2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.revEnd1Beat2Numeric.Name = "revEnd1Beat2Numeric";
this.revEnd1Beat2Numeric.Size = new System.Drawing.Size(42, 23);
this.revEnd1Beat2Numeric.TabIndex = 33;
this.revEnd1Beat2Numeric.Value = new decimal(new int[] {
16,
0,
0,
0});
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(8, 179);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(61, 15);
this.label16.TabIndex = 35;
this.label16.Text = "Rev End 1:";
//
// revEnd1Beat1Numeric
//
this.revEnd1Beat1Numeric.Location = new System.Drawing.Point(168, 177);
this.revEnd1Beat1Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.revEnd1Beat1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
-2147483648});
this.revEnd1Beat1Numeric.Name = "revEnd1Beat1Numeric";
this.revEnd1Beat1Numeric.Size = new System.Drawing.Size(38, 23);
this.revEnd1Beat1Numeric.TabIndex = 32;
this.revEnd1Beat1Numeric.ValueChanged += new System.EventHandler(this.revEnd1Beat1Numeric_ValueChanged);
//
// revEnd1MeasureNumeric
//
this.revEnd1MeasureNumeric.Location = new System.Drawing.Point(75, 177);
this.revEnd1MeasureNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.revEnd1MeasureNumeric.Name = "revEnd1MeasureNumeric";
this.revEnd1MeasureNumeric.Size = new System.Drawing.Size(87, 23);
this.revEnd1MeasureNumeric.TabIndex = 31;
this.revEnd1MeasureNumeric.ValueChanged += new System.EventHandler(this.revEnd1MeasureNumeric_ValueChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(207, 179);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(12, 15);
this.label17.TabIndex = 34;
this.label17.Text = "/";
//
// stopEndBeat2Numeric
//
this.stopEndBeat2Numeric.Location = new System.Drawing.Point(219, 148);
this.stopEndBeat2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.stopEndBeat2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.stopEndBeat2Numeric.Name = "stopEndBeat2Numeric";
this.stopEndBeat2Numeric.Size = new System.Drawing.Size(42, 23);
this.stopEndBeat2Numeric.TabIndex = 13;
this.stopEndBeat2Numeric.Value = new decimal(new int[] {
16,
0,
0,
0});
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 150);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(57, 15);
this.label10.TabIndex = 29;
this.label10.Text = "Stop End:";
//
// stopEndBeat1Numeric
//
this.stopEndBeat1Numeric.Location = new System.Drawing.Point(168, 148);
this.stopEndBeat1Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.stopEndBeat1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
-2147483648});
this.stopEndBeat1Numeric.Name = "stopEndBeat1Numeric";
this.stopEndBeat1Numeric.Size = new System.Drawing.Size(38, 23);
this.stopEndBeat1Numeric.TabIndex = 12;
this.stopEndBeat1Numeric.ValueChanged += new System.EventHandler(this.stopEndBeat1Numeric_ValueChanged);
//
// stopEndMeasureNumeric
//
this.stopEndMeasureNumeric.Location = new System.Drawing.Point(75, 148);
this.stopEndMeasureNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.stopEndMeasureNumeric.Name = "stopEndMeasureNumeric";
this.stopEndMeasureNumeric.Size = new System.Drawing.Size(87, 23);
this.stopEndMeasureNumeric.TabIndex = 11;
this.stopEndMeasureNumeric.ValueChanged += new System.EventHandler(this.stopEndMeasureNumeric_ValueChanged);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(10, 121);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(59, 15);
this.label11.TabIndex = 27;
this.label11.Text = "Hi-Speed:";
//
// hiSpeedNumeric
//
this.hiSpeedNumeric.DecimalPlaces = 6;
this.hiSpeedNumeric.Location = new System.Drawing.Point(75, 119);
this.hiSpeedNumeric.Minimum = new decimal(new int[] {
100,
0,
0,
-2147483648});
this.hiSpeedNumeric.Name = "hiSpeedNumeric";
this.hiSpeedNumeric.Size = new System.Drawing.Size(186, 23);
this.hiSpeedNumeric.TabIndex = 26;
this.hiSpeedNumeric.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(14, 92);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(55, 15);
this.label12.TabIndex = 25;
this.label12.Text = "Time Sig:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(140, 92);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(12, 15);
this.label13.TabIndex = 13;
this.label13.Text = "/";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(34, 63);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(35, 15);
this.label14.TabIndex = 24;
this.label14.Text = "BPM:";
//
// timeSig2Numeric
//
this.timeSig2Numeric.Location = new System.Drawing.Point(158, 90);
this.timeSig2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.timeSig2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.timeSig2Numeric.Name = "timeSig2Numeric";
this.timeSig2Numeric.Size = new System.Drawing.Size(103, 23);
this.timeSig2Numeric.TabIndex = 12;
this.timeSig2Numeric.Value = new decimal(new int[] {
4,
0,
0,
0});
//
// timeSig1Numeric
//
this.timeSig1Numeric.Location = new System.Drawing.Point(75, 90);
this.timeSig1Numeric.Maximum = new decimal(new int[] {
191,
0,
0,
0});
this.timeSig1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.timeSig1Numeric.Name = "timeSig1Numeric";
this.timeSig1Numeric.Size = new System.Drawing.Size(59, 23);
this.timeSig1Numeric.TabIndex = 11;
this.timeSig1Numeric.Value = new decimal(new int[] {
4,
0,
0,
0});
//
// gimmickBpmNumeric
//
this.gimmickBpmNumeric.DecimalPlaces = 6;
this.gimmickBpmNumeric.Location = new System.Drawing.Point(75, 61);
this.gimmickBpmNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.gimmickBpmNumeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.gimmickBpmNumeric.Name = "gimmickBpmNumeric";
this.gimmickBpmNumeric.Size = new System.Drawing.Size(186, 23);
this.gimmickBpmNumeric.TabIndex = 23;
this.gimmickBpmNumeric.Value = new decimal(new int[] {
120,
0,
0,
0});
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(207, 150);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(12, 15);
this.label15.TabIndex = 14;
this.label15.Text = "/";
//
// insertGimmickButton
//
this.insertGimmickButton.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.insertGimmickButton.Location = new System.Drawing.Point(12, 248);
this.insertGimmickButton.Name = "insertGimmickButton";
this.insertGimmickButton.Size = new System.Drawing.Size(253, 40);
this.insertGimmickButton.TabIndex = 33;
this.insertGimmickButton.Text = "Insert Gimmick";
this.insertGimmickButton.UseVisualStyleBackColor = true;
this.insertGimmickButton.Click += new System.EventHandler(this.insertGimmickButton_Click);
//
// startBeat2Numeric
//
this.startBeat2Numeric.Location = new System.Drawing.Point(219, 12);
this.startBeat2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.startBeat2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.startBeat2Numeric.Name = "startBeat2Numeric";
this.startBeat2Numeric.Size = new System.Drawing.Size(42, 23);
this.startBeat2Numeric.TabIndex = 43;
this.startBeat2Numeric.Value = new decimal(new int[] {
16,
0,
0,
0});
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(34, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(34, 15);
this.label1.TabIndex = 45;
this.label1.Text = "Start:";
//
// startBeat1Numeric
//
this.startBeat1Numeric.Location = new System.Drawing.Point(168, 12);
this.startBeat1Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.startBeat1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
-2147483648});
this.startBeat1Numeric.Name = "startBeat1Numeric";
this.startBeat1Numeric.Size = new System.Drawing.Size(38, 23);
this.startBeat1Numeric.TabIndex = 42;
this.startBeat1Numeric.ValueChanged += new System.EventHandler(this.startBeat1Numeric_ValueChanged);
//
// startMeasureNumeric
//
this.startMeasureNumeric.Location = new System.Drawing.Point(75, 12);
this.startMeasureNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.startMeasureNumeric.Name = "startMeasureNumeric";
this.startMeasureNumeric.Size = new System.Drawing.Size(87, 23);
this.startMeasureNumeric.TabIndex = 41;
this.startMeasureNumeric.ValueChanged += new System.EventHandler(this.startMeasureNumeric_ValueChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(207, 14);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(12, 15);
this.label2.TabIndex = 44;
this.label2.Text = "/";
//
// GimmickForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(281, 303);
this.Controls.Add(this.startBeat2Numeric);
this.Controls.Add(this.label1);
this.Controls.Add(this.startBeat1Numeric);
this.Controls.Add(this.startMeasureNumeric);
this.Controls.Add(this.label2);
this.Controls.Add(this.revEnd2Beat2Numeric);
this.Controls.Add(this.insertGimmickButton);
this.Controls.Add(this.label18);
this.Controls.Add(this.revEnd2Beat1Numeric);
this.Controls.Add(this.gimmickBpmNumeric);
this.Controls.Add(this.revEnd2MeasureNumeric);
this.Controls.Add(this.label15);
this.Controls.Add(this.label19);
this.Controls.Add(this.timeSig1Numeric);
this.Controls.Add(this.revEnd1Beat2Numeric);
this.Controls.Add(this.timeSig2Numeric);
this.Controls.Add(this.label16);
this.Controls.Add(this.label14);
this.Controls.Add(this.revEnd1Beat1Numeric);
this.Controls.Add(this.label13);
this.Controls.Add(this.revEnd1MeasureNumeric);
this.Controls.Add(this.label12);
this.Controls.Add(this.label17);
this.Controls.Add(this.hiSpeedNumeric);
this.Controls.Add(this.stopEndBeat2Numeric);
this.Controls.Add(this.label11);
this.Controls.Add(this.label10);
this.Controls.Add(this.stopEndMeasureNumeric);
this.Controls.Add(this.stopEndBeat1Numeric);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "GimmickForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Gimmick Settings";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.GimmickForm_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.revEnd2Beat2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd2Beat1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd2MeasureNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1Beat2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1Beat1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.revEnd1MeasureNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndBeat2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndBeat1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.stopEndMeasureNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.hiSpeedNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.timeSig2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.timeSig1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gimmickBpmNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.startBeat2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.startBeat1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.startMeasureNumeric)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private NumericUpDown revEnd2Beat2Numeric;
private Label label18;
private NumericUpDown revEnd2Beat1Numeric;
private NumericUpDown revEnd2MeasureNumeric;
private Label label19;
private NumericUpDown revEnd1Beat2Numeric;
private Label label16;
private NumericUpDown revEnd1Beat1Numeric;
private NumericUpDown revEnd1MeasureNumeric;
private Label label17;
private NumericUpDown stopEndBeat2Numeric;
private Label label10;
private NumericUpDown stopEndBeat1Numeric;
private NumericUpDown stopEndMeasureNumeric;
private Label label11;
private NumericUpDown hiSpeedNumeric;
private Label label12;
private Label label13;
private Label label14;
private NumericUpDown timeSig2Numeric;
private NumericUpDown timeSig1Numeric;
private NumericUpDown gimmickBpmNumeric;
private Label label15;
private Button insertGimmickButton;
private NumericUpDown startBeat2Numeric;
private Label label1;
private NumericUpDown startBeat1Numeric;
private NumericUpDown startMeasureNumeric;
private Label label2;
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BAKKA_Editor
{
public partial class GimmickForm : Form
{
public GimmickForm()
{
InitializeComponent();
}
}
}
+61
View File
@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+241
View File
@@ -0,0 +1,241 @@
namespace BAKKA_Editor
{
partial class InitChartSettingsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.initSaveSettingsButton = new System.Windows.Forms.Button();
this.label9 = new System.Windows.Forms.Label();
this.initMovieOffsetNumeric = new System.Windows.Forms.NumericUpDown();
this.label8 = new System.Windows.Forms.Label();
this.initOffsetNumeric = new System.Windows.Forms.NumericUpDown();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.initTimeSig2Numeric = new System.Windows.Forms.NumericUpDown();
this.initTimeSig1Numeric = new System.Windows.Forms.NumericUpDown();
this.initBpmNumeric = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.initMovieOffsetNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.initOffsetNumeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.initTimeSig2Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.initTimeSig1Numeric)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.initBpmNumeric)).BeginInit();
this.SuspendLayout();
//
// initSaveSettingsButton
//
this.initSaveSettingsButton.Location = new System.Drawing.Point(12, 128);
this.initSaveSettingsButton.Name = "initSaveSettingsButton";
this.initSaveSettingsButton.Size = new System.Drawing.Size(218, 23);
this.initSaveSettingsButton.TabIndex = 30;
this.initSaveSettingsButton.Text = "Save Settings";
this.initSaveSettingsButton.UseVisualStyleBackColor = true;
this.initSaveSettingsButton.Click += new System.EventHandler(this.initSaveSettingsButton_Click);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(46, 101);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(78, 15);
this.label9.TabIndex = 29;
this.label9.Text = "Movie Offset:";
//
// initMovieOffsetNumeric
//
this.initMovieOffsetNumeric.DecimalPlaces = 6;
this.initMovieOffsetNumeric.Location = new System.Drawing.Point(130, 99);
this.initMovieOffsetNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.initMovieOffsetNumeric.Name = "initMovieOffsetNumeric";
this.initMovieOffsetNumeric.Size = new System.Drawing.Size(100, 23);
this.initMovieOffsetNumeric.TabIndex = 28;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(82, 74);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(42, 15);
this.label8.TabIndex = 27;
this.label8.Text = "Offset:";
//
// initOffsetNumeric
//
this.initOffsetNumeric.DecimalPlaces = 6;
this.initOffsetNumeric.Location = new System.Drawing.Point(130, 70);
this.initOffsetNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.initOffsetNumeric.Name = "initOffsetNumeric";
this.initOffsetNumeric.Size = new System.Drawing.Size(100, 23);
this.initOffsetNumeric.TabIndex = 26;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(35, 43);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(89, 15);
this.label7.TabIndex = 25;
this.label7.Text = "Time Signature:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(174, 43);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(12, 15);
this.label6.TabIndex = 13;
this.label6.Text = "/";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(89, 14);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 15);
this.label5.TabIndex = 24;
this.label5.Text = "BPM:";
//
// initTimeSig2Numeric
//
this.initTimeSig2Numeric.Location = new System.Drawing.Point(192, 41);
this.initTimeSig2Numeric.Maximum = new decimal(new int[] {
1920,
0,
0,
0});
this.initTimeSig2Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.initTimeSig2Numeric.Name = "initTimeSig2Numeric";
this.initTimeSig2Numeric.Size = new System.Drawing.Size(38, 23);
this.initTimeSig2Numeric.TabIndex = 12;
this.initTimeSig2Numeric.Value = new decimal(new int[] {
4,
0,
0,
0});
//
// initTimeSig1Numeric
//
this.initTimeSig1Numeric.Location = new System.Drawing.Point(130, 41);
this.initTimeSig1Numeric.Maximum = new decimal(new int[] {
191,
0,
0,
0});
this.initTimeSig1Numeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.initTimeSig1Numeric.Name = "initTimeSig1Numeric";
this.initTimeSig1Numeric.Size = new System.Drawing.Size(38, 23);
this.initTimeSig1Numeric.TabIndex = 11;
this.initTimeSig1Numeric.Value = new decimal(new int[] {
4,
0,
0,
0});
//
// initBpmNumeric
//
this.initBpmNumeric.DecimalPlaces = 6;
this.initBpmNumeric.Location = new System.Drawing.Point(130, 12);
this.initBpmNumeric.Maximum = new decimal(new int[] {
9999,
0,
0,
0});
this.initBpmNumeric.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.initBpmNumeric.Name = "initBpmNumeric";
this.initBpmNumeric.Size = new System.Drawing.Size(100, 23);
this.initBpmNumeric.TabIndex = 23;
this.initBpmNumeric.Value = new decimal(new int[] {
120,
0,
0,
0});
//
// InitChartSettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(242, 164);
this.Controls.Add(this.initSaveSettingsButton);
this.Controls.Add(this.label9);
this.Controls.Add(this.initBpmNumeric);
this.Controls.Add(this.initMovieOffsetNumeric);
this.Controls.Add(this.initTimeSig1Numeric);
this.Controls.Add(this.label8);
this.Controls.Add(this.initTimeSig2Numeric);
this.Controls.Add(this.initOffsetNumeric);
this.Controls.Add(this.label5);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "InitChartSettingsForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Initial Chart Settings";
((System.ComponentModel.ISupportInitialize)(this.initMovieOffsetNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.initOffsetNumeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.initTimeSig2Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.initTimeSig1Numeric)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.initBpmNumeric)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Button initSaveSettingsButton;
private Label label9;
private NumericUpDown initMovieOffsetNumeric;
private Label label8;
private NumericUpDown initOffsetNumeric;
private Label label7;
private Label label6;
private Label label5;
private NumericUpDown initTimeSig2Numeric;
private NumericUpDown initTimeSig1Numeric;
private NumericUpDown initBpmNumeric;
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BAKKA_Editor
{
public partial class InitChartSettingsForm : Form
{
public InitChartSettingsForm()
{
InitializeComponent();
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+1479
View File
File diff suppressed because it is too large Load Diff
@@ -10,9 +10,9 @@ using System.Windows.Forms;
namespace BAKKA_Editor
{
public partial class Form1 : Form
public partial class MainForm : Form
{
public Form1()
public MainForm()
{
InitializeComponent();
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+229
View File
@@ -0,0 +1,229 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal class BeatInfo
{
public int Measure;
public int Beat;
public BeatInfo(int measure, int beat)
{
Measure = measure;
Beat = beat;
}
public BeatInfo(float measure)
{
Measure = (int)Math.Floor(measure);
Beat = (int)((measure - (float)Measure) * 1920.0f);
}
public BeatInfo(BeatInfo info)
{
Measure = info.Measure;
Beat = info.Beat;
}
public float MeasureDecimal { get { return (float)Measure + (float)Beat / 1920.0f; } }
}
internal class TimeSignature
{
public int Upper;
public int Lower;
public double Ratio { get { return (double)Upper / (double)Lower; } }
public TimeSignature()
{
Upper = 4;
Lower = 4;
}
public TimeSignature(TimeSignature sig)
{
Upper = sig.Upper;
Lower = sig.Lower;
}
}
internal class NoteBase
{
public BeatInfo BeatInfo { get; set; } = new BeatInfo(-1, 0);
public GimmickType GimmickType { get; set; } = GimmickType.NoGimmick;
public float Measure { get { return BeatInfo.MeasureDecimal; } }
}
internal class Note : NoteBase
{
public NoteType NoteType { get; set; } = NoteType.TouchNoBonus;
public int Position { get; set; }
public int Size { get; set; }
[System.ComponentModel.Browsable(false)]
public bool HoldChange { get; set; }
[System.ComponentModel.Browsable(false)]
public MaskType MaskFill { get; set; }
[System.ComponentModel.Browsable(false)]
public Note NextNote { get; set; }
[System.ComponentModel.Browsable(false)]
public Note PrevNote { get; set; }
[System.ComponentModel.Browsable(false)]
public bool IsHold
{
get
{
switch (NoteType)
{
case NoteType.HoldStartNoBonus:
case NoteType.HoldJoint:
case NoteType.HoldEnd:
case NoteType.HoldStartBonusFlair:
return true;
default:
return false;
}
}
}
[System.ComponentModel.Browsable(false)]
public bool IsMask
{
get
{
switch (NoteType)
{
case NoteType.MaskAdd:
case NoteType.MaskRemove:
return true;
default:
return false;
}
}
}
[System.ComponentModel.Browsable(false)]
public bool IsBonus
{
get
{
switch (NoteType)
{
case NoteType.TouchBonus:
case NoteType.SlideOrangeBonus:
case NoteType.SlideGreenBonus:
return true;
default:
return false; ;
}
}
}
[System.ComponentModel.Browsable(false)]
public bool IsFlair
{
get
{
switch (NoteType)
{
case NoteType.TouchBonusFlair:
case NoteType.SnapRedBonusFlair:
case NoteType.SnapBlueBonusFlair:
case NoteType.SlideOrangeBonusFlair:
case NoteType.SlideGreenBonusFlair:
case NoteType.HoldStartBonusFlair:
case NoteType.ChainBonusFlair:
return true;
default:
return false;
}
}
}
[System.ComponentModel.Browsable(false)]
public Color Color
{
get
{
return Utils.NoteTypeToColor(NoteType);
}
}
public Note() { }
public Note(BeatInfo info)
{
BeatInfo = info;
GimmickType = GimmickType.NoGimmick;
}
public Note(Note baseNote) : this(baseNote.BeatInfo)
{
Position = baseNote.Position;
Size = baseNote.Size;
NoteType = baseNote.NoteType;
}
}
internal class Gimmick : NoteBase
{
public double BPM { get; set; }
public TimeSignature TimeSig { get; set; } = new();
public double HiSpeed { get; set; }
public double StartTime { get; set; }
public bool IsReverse
{
get
{
switch (GimmickType)
{
case GimmickType.ReverseStart:
case GimmickType.ReverseMiddle:
case GimmickType.ReverseEnd:
return true;
default:
return false;
}
}
}
public bool IsStop
{
get
{
switch (GimmickType)
{
case GimmickType.StopStart:
case GimmickType.StopEnd:
return true;
default:
return false;
}
}
}
public Gimmick() { }
public Gimmick(BeatInfo info, GimmickType type)
{
BeatInfo = info;
GimmickType = type;
}
public Gimmick(Gimmick baseGimmick) : this(baseGimmick.BeatInfo, baseGimmick.GimmickType)
{
switch (GimmickType)
{
case GimmickType.BpmChange:
HiSpeed = baseGimmick.HiSpeed;
break;
case GimmickType.TimeSignatureChange:
TimeSig = new TimeSignature(baseGimmick.TimeSig);
break;
case GimmickType.HiSpeedChange:
HiSpeed = baseGimmick.HiSpeed;
break;
}
}
}
}
@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor.Operations
{
internal class CompositeOperation : IOperation
{
public string Description { get; }
protected IEnumerable<IOperation> Operations { get; }
public CompositeOperation(string description, IEnumerable<IOperation> operations)
{
Description = description;
Operations = operations;
}
public void Redo()
{
foreach (var op in Operations)
{
op.Redo();
}
}
public void Undo()
{
foreach (var op in Operations)
{
op.Undo();
}
}
}
}
+111
View File
@@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor.Operations
{
internal abstract class GimmickOperation : IOperation
{
protected Gimmick Gimmick { get; }
protected Chart Chart { get; }
public abstract string Description { get; }
public GimmickOperation(Chart chart, Gimmick item)
{
Chart = chart;
Gimmick = item;
}
public abstract void Redo();
public abstract void Undo();
}
internal class InsertGimmick : GimmickOperation
{
public override string Description => "Insert gimmick";
public InsertGimmick(Chart chart, Gimmick item) : base(chart, item)
{ }
public override void Redo()
{
Chart.Gimmicks.Add(Gimmick);
}
public override void Undo()
{
Chart.Gimmicks.Remove(Gimmick);
}
}
internal class RemoveGimmick : GimmickOperation
{
public override string Description => "Remove gimmick";
public RemoveGimmick(Chart chart, Gimmick item) : base(chart, item)
{ }
public override void Redo()
{
Chart.Gimmicks.Remove(Gimmick);
}
public override void Undo()
{
Chart.Gimmicks.Add(Gimmick);
}
}
internal class EditGimmick : IOperation
{
public string Description => "Edit gimmick";
protected Gimmick Base { get; }
protected Gimmick OldGimmick { get; }
protected Gimmick NewGimmick { get; }
public EditGimmick(Gimmick baseGimmick, Gimmick newGimmick)
{
Base = baseGimmick;
OldGimmick = new Gimmick(baseGimmick);
NewGimmick = new Gimmick(newGimmick);
}
public void Redo()
{
Base.BeatInfo = new BeatInfo(NewGimmick.BeatInfo);
switch (Base.GimmickType)
{
case GimmickType.BpmChange:
Base.BPM = NewGimmick.BPM;
break;
case GimmickType.TimeSignatureChange:
Base.TimeSig = new TimeSignature(NewGimmick.TimeSig);
break;
case GimmickType.HiSpeedChange:
Base.HiSpeed = NewGimmick.HiSpeed;
break;
}
}
public void Undo()
{
Base.BeatInfo = new BeatInfo(OldGimmick.BeatInfo);
switch (Base.GimmickType)
{
case GimmickType.BpmChange:
Base.BPM = OldGimmick.BPM;
break;
case GimmickType.TimeSignatureChange:
Base.TimeSig = new TimeSignature(OldGimmick.TimeSig);
break;
case GimmickType.HiSpeedChange:
Base.HiSpeed = OldGimmick.HiSpeed;
break;
}
}
}
}
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor.Operations
{
internal interface IOperation
{
string Description { get; }
void Undo();
void Redo();
}
}
+91
View File
@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor.Operations
{
internal abstract class NoteOperation : IOperation
{
protected Note Note { get; }
protected Chart Chart { get; }
public abstract string Description { get; }
public NoteOperation(Chart chart, Note item)
{
Chart = chart;
Note = item;
}
public abstract void Redo();
public abstract void Undo();
}
internal class InsertNote : NoteOperation
{
public override string Description => "Insert note";
public InsertNote(Chart chart, Note item) : base(chart, item)
{ }
public override void Redo()
{
Chart.Notes.Add(Note);
}
public override void Undo()
{
Chart.Notes.Remove(Note);
}
}
internal class RemoveNote : NoteOperation
{
public override string Description => "Remove note";
public RemoveNote(Chart chart, Note item) : base(chart, item)
{ }
public override void Redo()
{
Chart.Notes.Remove(Note);
}
public override void Undo()
{
Chart.Notes.Add(Note);
}
}
internal class EditNote : IOperation
{
public string Description => "Edit note";
protected Note Base { get; }
protected Note OldNote { get; }
protected Note NewNote { get; }
public EditNote(Note baseNote, Note newNote)
{
Base = baseNote;
OldNote = new Note(baseNote);
NewNote = new Note(newNote);
}
public void Redo()
{
Base.BeatInfo = new BeatInfo(NewNote.BeatInfo);
Base.Position = NewNote.Position;
Base.Size = NewNote.Size;
}
public void Undo()
{
Base.BeatInfo = new BeatInfo(OldNote.BeatInfo);
Base.Position = OldNote.Position;
Base.Size = OldNote.Size;
}
}
}
@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor.Operations
{
internal class OperationManager
{
public event EventHandler? OperationHistoryChanged;
public event EventHandler? ChangesCommitted;
protected Stack<IOperation> UndoStack { get; } = new Stack<IOperation>();
protected Stack<IOperation> RedoStack { get; } = new Stack<IOperation>();
private IOperation? LastCommittedOperation { get; set; } = null;
public IEnumerable<string> UndoOperationsDescription
{
get { return UndoStack.Select(p => p.Description); }
}
public IEnumerable<string> RedoOperationsDescription
{
get { return RedoStack.Select(p => p.Description); }
}
public bool CanUndo { get { return UndoStack.Count > 0; } }
public bool CanRedo { get { return RedoStack.Count > 0; } }
public void Push(IOperation op)
{
UndoStack.Push(op);
RedoStack.Clear();
OperationHistoryChanged?.Invoke(this, EventArgs.Empty);
}
public void InvokeAndPush(IOperation op)
{
op.Redo();
Push(op);
}
public void Undo()
{
IOperation op = UndoStack.Pop();
op.Undo();
RedoStack.Push(op);
OperationHistoryChanged?.Invoke(this, EventArgs.Empty);
}
public void Redo()
{
IOperation op = RedoStack.Pop();
op.Redo();
UndoStack.Push(op);
OperationHistoryChanged?.Invoke(this, EventArgs.Empty);
}
public void Clear()
{
UndoStack.Clear();
RedoStack.Clear();
LastCommittedOperation = null;
OperationHistoryChanged?.Invoke(this, EventArgs.Empty);
}
}
}
+6 -11
View File
@@ -1,22 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BAKKA_Editor
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new MainForm());
}
}
}
}
-36
View File
@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BAKKA-Editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BAKKA-Editor")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("76336598-b2be-4f67-b3d6-821f6a0e302f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
+18 -26
View File
@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace BAKKA_Editor.Properties
{
namespace BAKKA_Editor.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -19,51 +19,43 @@ namespace BAKKA_Editor.Properties
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BAKKA_Editor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}
+8 -5
View File
@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -109,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
-30
View File
@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BAKKA_Editor.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
@@ -0,0 +1,7 @@
{
"profiles": {
"BAKKA-Editor": {
"commandName": "Project"
}
}
}
+29
View File
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal class UserSettings
{
public ViewSettings ViewSettings { get; set; } = new();
public SaveSettings SaveSettings { get; set; } = new();
}
internal class ViewSettings
{
public bool ShowCursor { get; set; } = true;
public bool ShowCursorDuringPlayback { get; set; } = false;
public bool HighlightViewedNote { get; set; } = true;
}
internal class SaveSettings
{
/// <summary>
/// How frequently autosave occurs (in minutes)
/// </summary>
public int AutoSaveInterval { get; set; } = 1;
}
}
+182
View File
@@ -0,0 +1,182 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BAKKA_Editor
{
internal static class Utils
{
internal static string? GetTag(string input, string tag)
{
if(input.Contains(tag))
{
return input.Substring(input.IndexOf(tag) + tag.Length);
}
return null;
}
internal static double DegToRad(double deg)
{
return deg * Math.PI / 180.0f;
}
internal static Color NoteTypeToColor(NoteType type)
{
switch (type)
{
case NoteType.TouchNoBonus:
case NoteType.TouchBonus:
case NoteType.TouchBonusFlair:
return Color.Fuchsia;
case NoteType.SnapRedNoBonus:
case NoteType.SnapRedBonusFlair:
return Color.Red;
case NoteType.SnapBlueNoBonus:
case NoteType.SnapBlueBonusFlair:
return Color.Aqua;
case NoteType.SlideOrangeNoBonus:
case NoteType.SlideOrangeBonus:
case NoteType.SlideOrangeBonusFlair:
return Color.FromArgb(255, 128, 0);
case NoteType.SlideGreenNoBonus:
case NoteType.SlideGreenBonus:
case NoteType.SlideGreenBonusFlair:
return Color.LimeGreen;
case NoteType.HoldStartNoBonus:
case NoteType.HoldJoint:
case NoteType.HoldEnd:
case NoteType.HoldStartBonusFlair:
return Color.Yellow;
case NoteType.Chain:
case NoteType.ChainBonusFlair:
return Color.FromArgb(204, 190, 45);
default:
return Color.Transparent;
}
}
internal static void InvokeIfRequired(this Control control, MethodInvoker action)
{
if (control.InvokeRequired)
{
control.Invoke(action);
}
else
{
action();
}
}
internal static Rectangle ToInt(this RectangleF rect)
{
return new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height);
}
internal static int FindGCD(int a, int b)
{
if (b == 0)
return a;
return FindGCD(b, a & b);
}
internal static string ToLabel(this NoteType type)
{
switch (type)
{
case NoteType.TouchNoBonus:
return "Touch";
case NoteType.TouchBonus:
return "Touch [Bonus]";
case NoteType.SnapRedNoBonus:
return "Snap (R)";
case NoteType.SnapBlueNoBonus:
return "Snap (B)";
case NoteType.SlideOrangeNoBonus:
return "Slide (O)";
case NoteType.SlideOrangeBonus:
return "Slide (O) [Bonus]";
case NoteType.SlideGreenNoBonus:
return "Slide (G)";
case NoteType.SlideGreenBonus:
return "Slide (G) [Bonus]";
case NoteType.HoldStartNoBonus:
return "Hold Start";
case NoteType.HoldJoint:
return "Hold Joint";
case NoteType.HoldEnd:
return "Hold End";
case NoteType.MaskAdd:
return "Mask Add";
case NoteType.MaskRemove:
return "Mask Remove";
case NoteType.EndOfChart:
return "End of Chart";
case NoteType.Chain:
return "Chain";
case NoteType.TouchBonusFlair:
return "Touch [R Note]";
case NoteType.SnapRedBonusFlair:
return "Snap (R) [R Note]";
case NoteType.SnapBlueBonusFlair:
return "Snap (B) [R Note]";
case NoteType.SlideOrangeBonusFlair:
return "Slide (O) [R Note]";
case NoteType.SlideGreenBonusFlair:
return "Slide (G) [R Note]";
case NoteType.HoldStartBonusFlair:
return "Hold Start [R Note]";
case NoteType.ChainBonusFlair:
return "Chain [R Note]";
default:
return "Undefined Note Type";
}
}
internal static string ToLabel(this GimmickType type)
{
switch (type)
{
case GimmickType.BpmChange:
return "BPM Change";
case GimmickType.TimeSignatureChange:
return "Time Signature Change";
case GimmickType.HiSpeedChange:
return "Hi-Speed Change";
case GimmickType.ReverseStart:
return "Reverse Start";
case GimmickType.ReverseMiddle:
return "Reverse Middle";
case GimmickType.ReverseEnd:
return "Reverse Stop";
case GimmickType.StopStart:
return "Stop Start";
case GimmickType.StopEnd:
return "Stop End";
default:
return "Undefined Gimmick";
}
}
internal static bool HasDecimal(double num)
{
return Math.Ceiling(num) == Math.Floor(num);
}
internal static Tuple<int, int> GetQuantization(int val, int min)
{
while (!HasDecimal((double)(val * min) / 1920.0))
{
min *= 2;
}
return new Tuple<int, int>((int)(val * min / 1920.0), min);
}
internal static float GetDist(Point a, Point b)
{
return (float)Math.Sqrt(Math.Pow(a.X - b.X, 2) + Math.Pow(a.Y - b.Y, 2));
}
}
}
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.