1
0
mirror of https://github.com/SirusDoma/VoxCharger.git synced 2024-11-27 17:00:51 +01:00

Update 0.9.12c

- Fix naming and other code style issues
- Fix `float` and `double` parsing issue when current System Culture comma separator is not `.` - This fixes issue when parsing BPM and other floating numbers.
- Fix song selection when the program doesn't support the latest datecode in the future - It will disable Game Version and Infinite Version selection.
- Replaced ancient `FolderBrowserDialog` with `CommonFileDialog`
- Update default GameVersion and BackgroundId to latest version
- Implement Radar information in `LevelEditorForm`
- Implement built-in 2DX Encoder
- Start Offset / TimeStamp and Fader effect for audio preview is now supported
- Audio preview files is no longer divided into multiple files by default when audio files are unique. It still possible to specify unique preview via `LevelEditorForm`
- Implement advanced configuration when importing .ksh chart
- Add draft codes for Effect Mapping configurations and S3V support
- Other Bugfixes and QoL improvements
This commit is contained in:
CXO2 2023-01-06 20:58:29 +07:00
parent 7fed5d6283
commit b8f49e3e2d
59 changed files with 8886 additions and 7332 deletions

10
App.config Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NAudio.Core" publicKeyToken="e279aa5131008a41" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

4
FodyWeavers.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>

141
FodyWeavers.xsd Normal file
View File

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
@ -14,6 +15,9 @@ namespace VoxCharger
[STAThread] [STAThread]
static void Main() static void Main()
{ {
// Fix numeric float / double / decimal separator from comma to dots for certain System Locales.
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm()); Application.Run(new MainForm());

View File

@ -1,66 +1,68 @@
# VoxCharger # # VoxCharger #
- **Author**: CXO2 Recharge your KFC Chicken sauce ([Download](https://github.com/SirusDoma/VoxCharger/releases))
- **Email**: com@cxo2.me
- **Version**: 0.9.8b
Recharge your KFC Chicken sauce ([Download](https://github.com/SirusDoma/VoxCharger/releases))
Written under C# language, this program allow you to manage music asset files of your KFC installation. Written under C# language, this program allow you to manage music asset files of your KFC installation.
Additionally, it include built-in converter to import ksh into vox that can be consumed by KFC. Additionally, it include built-in converter and encoder to import ksh and it's audio files into vox and 2dx files that can be consumed by KFC.
If you're not familiar with these file formats, then this sauce is not for you. If you're not familiar with these file formats, then this sauce is not for you.
## Features ##
- Create, manage and delete (omni)mix's in your KFC installation
- Import .vox or .ksh into your KFC with ease
- Automatically convert imported audio files (e.g mp3, ogg, flac, etc) to .2dx file
- Deferred asset modifications to keep your Music DB and asset files stay in sync until you save it
- Music DB metadata editor
- Standalone .ksh / .2dx file converter
## Prerequisite ## ## Prerequisite ##
### .NET Framework 4.7 ### .NET Framework 4.7.2
This program require .NET Framework 4.7 in order to run properly. This program require .NET Framework 4.7.2 in order to run properly.
### Latest datecodes or newer only ### Media Pack / Desktop Experience
Latest omnimix structures is slightly changed compared to previous datecodes, it won't load anything that doesn't match with `2020011500` structure. This program now has its integrated Wav and 2DX Encoder and downloading [mon's 2dx tools](https://github.com/mon/2dxTools) is no **longer required**.
However, the audio decoder depends on Media Foundation API under the hood, which is only available in Windows 7 and newer.
Furthermore, you might need to install the following dependencies:
- [Media Feature Pack](https://support.microsoft.com/en-us/topic/media-feature-pack-list-for-windows-n-editions-c1c6fffa-d052-8338-7a79-a4bb980a700a) - Install this if you're running on Windows N or KN version (Common Windows distribution in Korea region)
- [Desktop Experience](https://learn.microsoft.com/en-us/windows-server/get-started/install-options-server-core-desktop-experience) - Install this if you're running on Windows Server
### Latest datecodes only
This program won't load anything that doesn't match with `2020011500` or newer structure.
### Backup ### Backup
Backup your data before using this program, it able to modify and delete your music assets. Backup your data before using this program, it able to modify and delete your music assets.
Keep in mind that the program won't allow you to make any changes against original mix. Keep in mind that the program won't allow you to make any changes against original mix.
### No IFS Support ### No IFS Support
Use [IFS LayeredFS](https://github.com/mon/ifs_layeredfs) in your KFC installation. This program will not pack your assets into IFS, nor attempt to process existing ones. Use [IFS LayeredFS](https://github.com/mon/ifs_layeredfs) in your KFC installation. This program will not pack your assets into IFS, nor attempt to process existing ones.
When mix with ifs files is selected, the program won't be able load music assets properly. When mix with ifs files is selected, the program won't be able load music assets properly.
If you need to pack your music assets into ifs, use another tool that process ifs file (for an instance: [mon ifs tools](https://github.com/mon/ifstools)). If you need to pack your music assets into ifs, use another tool that process ifs file (for an instance: [mon's ifs tools](https://github.com/mon/ifstools)).
### 2DX Tools ## Remarks, Restrictions and Limitations ##
Make sure that mon `2dxwavconvert.exe` and `2dxbuild.exe` are placed in the same directory along with the program.
Can't find it? you can grab the tools [here](https://github.com/mon/2dxTools/releases).
## Remarks ##
### Mix Lock ### Mix Lock
Original mix is locked to prevent you (yes, you) to break your KFC installation. Original mix is locked to prevent you (yes, you) to break your KFC installation.
Again, use [IFS LayeredFS](https://github.com/mon/ifs_layeredfs). If you haven't heard this then you're totally missing out! Again, use [IFS LayeredFS](https://github.com/mon/ifs_layeredfs). If you haven't heard this then you're totally missing out!
### Conversion Output ### Conversion Output
Vox have some sense in it's file format than ksh file, as the result, not all attributes can be mapped precisely and potentially lead into bug in the output file. For FX mapping, user defined FX will be ignored, only basic FX's that will be included into the output. Vox have some sense in it's file format than ksh file, as the result, not all attributes can be mapped precisely and potentially lead into bug in the output file. For FX mapping, user defined FX will be ignored, only basic FX's that will be included into the output.
Remember, stupid input get stupid output. But if you believe it's a bug, feel free to open issue or PR. Remember, stupid input get stupid output. But if you believe it's a bug, feel free to open issue or PR.
### Network Scores ### Network Scores
Make sure you are using under Offline environment and **NOT** connected to any KFC network server while using the output files of this tool. It could break network score table and you may get banned from the network for doing so. Make sure you are running the game under offline environment and **NOT** connected to any KFC network server while using the output files of this tool. It could break network score table and you may get banned from the network for doing so.
### Music DB ### Music DB
The program also prevent you to modify Music ID and some attributes are kept hidden from editor, For existing songs, some of their attributes might untouched throughout save iteration, but the rest of hidden attributes might be replaced with dummy / stub data. The program also prevent you to modify Music ID and some attributes are kept hidden from editor, For existing songs, the program will try to preserve all attributes throughout save iteration.
However, attributes that not recognized by the program might be lost.
If this really concern you, make sure to backup your `music_db.xml` / `music_db.merged.xml`. Make sure to backup your `music_db.xml` / `music_db.merged.xml` if you have non-standard attributes in your music db or attributes that newly introduced after `2022` latest datecode (Note: `radar` is supported!).
### Music Preview
Imported music preview from normal audio files may broken or not trimmed properly in the output file. Preview offset in ksh is also ignored, you need dedicated preview file with proper fade in and out.
Keep in mind that `2dxwavconvert.exe` will not do this for you, it only trim your audio into 10 second for preview purpose. Until program supports built in encoder, you have to provide 2dx preview manually for proper preview file.
If you can't live without it, consider making PR to this feature.
### Asset File Modification ### Asset File Modification
Replacing asset files such as vox, 2dx and graphic files are happen immediately after changes are confirmed. In other hand, metadata need to be saved manually by clicking `File -> Save` or `CTRL+S`. Replacing asset files such as vox, 2dx and graphic files are happen immediately after changes are confirmed. In other hand, metadata need to be saved manually by clicking `File -> Save` or `CTRL+S`.
Note that you can postpone asset modification until you save metadata by disabling autosave in `Edit -> Autosave Assets` Note that you can postpone asset modification until you save metadata by disabling autosave in `Edit -> Autosave Assets`

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,62 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
namespace VoxCharger
{
public static class DxTool
{
private const string ConverterFileName = "2dxwavconvert.exe";
private const string BuilderFileName = "2dxbuild.exe";
public static string ConvertToWave(string inputFileName, bool preview = false)
{
string tempDir = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
Directory.CreateDirectory(tempDir);
string output = Path.Combine(tempDir, $"{Directory.GetFiles(tempDir).Length}.wav");
Execute(
ConverterFileName,
$"\"{inputFileName}\" \"{output}\"" + (preview ? " preview" : string.Empty)
);
return tempDir;
}
public static void Build(string inputDir, string outputFileName)
{
Execute(
BuilderFileName,
$"\"{outputFileName}\"",
inputDir
);
}
private static void Execute(string fileName, string args, string workingDir = null)
{
if (!File.Exists(fileName))
throw new FileNotFoundException($"{fileName} not found", fileName);
workingDir = workingDir ?? Environment.CurrentDirectory;
var info = new ProcessStartInfo()
{
FileName = fileName,
Arguments = args,
WorkingDirectory = workingDir,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true
};
using (var process = Process.Start(info))
{
process.WaitForExit();
if (process.ExitCode != 0)
throw new ApplicationException($"{fileName} execution failed:\n{process.StandardOutput.ReadToEnd()}");
}
}
}
}

View File

@ -8,12 +8,47 @@ using System.Text;
namespace VoxCharger namespace VoxCharger
{ {
public enum AudioFormat
{
Iidx,
S3V
}
public class AudioImportOptions
{
public static readonly AudioImportOptions Default = new AudioImportOptions();
public AudioFormat Format { get; set; } = AudioFormat.Iidx;
public bool IsPreview { get; set; } = false;
public int PreviewOffset { get; set; } = 0;
public static AudioImportOptions WithFormat(AudioFormat format)
{
return new AudioImportOptions
{
Format = format,
IsPreview = false,
PreviewOffset = 0
};
}
public AudioImportOptions AsPreview()
{
return new AudioImportOptions
{
Format = Format,
IsPreview = true,
PreviewOffset = PreviewOffset
};
}
}
public static class AssetManager public static class AssetManager
{ {
#region --- Properties --- #region --- Properties ---
private static List<string> MixList = new List<string>(); private static List<string> _mixList = new List<string>();
private static MusicDb InternalHeaders = null; private static MusicDb _internalHeaders = null;
private static int LastOriginalID = 0; private static int _lastOriginalId = 0;
public static string MixName { get; private set; } public static string MixName { get; private set; }
@ -35,7 +70,7 @@ namespace VoxCharger
throw new FormatException("Invalid Game Directory"); throw new FormatException("Invalid Game Directory");
// Look for other mixes // Look for other mixes
MixList.Clear(); _mixList.Clear();
string modsPath = Path.Combine(gamePath, @"data_mods\"); string modsPath = Path.Combine(gamePath, @"data_mods\");
foreach (var modDir in Directory.GetDirectories(modsPath)) foreach (var modDir in Directory.GetDirectories(modsPath))
{ {
@ -54,10 +89,10 @@ namespace VoxCharger
continue; continue;
// Confirmed mod path, append into music db, ignore cache to avoid uncached mix being excluded // Confirmed mod path, append into music db, ignore cache to avoid uncached mix being excluded
MixList.Add(modName); _mixList.Add(modName);
} }
LastOriginalID = 0; _lastOriginalId = 0;
GamePath = gamePath; GamePath = gamePath;
} }
@ -93,8 +128,8 @@ namespace VoxCharger
// Load Existing song DB to avoid duplicate id // Load Existing song DB to avoid duplicate id
LoadInternalDb(mixName); LoadInternalDb(mixName);
if (!string.IsNullOrEmpty(mixName) && !MixList.Contains(mixName)) if (!string.IsNullOrEmpty(mixName) && !_mixList.Contains(mixName))
MixList.Add(mixName); _mixList.Add(mixName);
// Locate the music db, if unavailable, create it // Locate the music db, if unavailable, create it
MdbFilename = Path.Combine(mixPath, @"others\", string.IsNullOrEmpty(mixName) ? "music_db.xml" : "music_db.merged.xml"); MdbFilename = Path.Combine(mixPath, @"others\", string.IsNullOrEmpty(mixName) ? "music_db.xml" : "music_db.merged.xml");
@ -106,7 +141,7 @@ namespace VoxCharger
public static string[] GetMixes() public static string[] GetMixes()
{ {
return MixList.ToArray(); return _mixList.ToArray();
} }
private static void LoadInternalDb(string mixName) private static void LoadInternalDb(string mixName)
@ -119,9 +154,9 @@ namespace VoxCharger
string modsPath = Path.Combine(GamePath, @"data_mods\"); string modsPath = Path.Combine(GamePath, @"data_mods\");
// Load original headers data // Load original headers data
InternalHeaders = new MusicDb(); _internalHeaders = new MusicDb();
InternalHeaders.Load(dbFilename); _internalHeaders.Load(dbFilename);
LastOriginalID = InternalHeaders.LastID; _lastOriginalId = _internalHeaders.LastId;
// Load other music db // Load other music db
foreach (var modDir in Directory.GetDirectories(modsPath)) foreach (var modDir in Directory.GetDirectories(modsPath))
@ -138,40 +173,53 @@ namespace VoxCharger
continue; continue;
// Confirmed mod path, append into music db // Confirmed mod path, append into music db
InternalHeaders.Load(dbFilename, true); _internalHeaders.Load(dbFilename, true);
} }
} }
#endregion #endregion
#region --- Asset Management --- #region --- Asset Management ---
public static void Import2DX(string source, VoxHeader header, bool preview = false) public static void ImportAudio(string source, VoxHeader header, AudioImportOptions opt = null)
{ {
opt = opt ?? AudioImportOptions.Default;
if (!File.Exists(source)) if (!File.Exists(source))
throw new FileNotFoundException($"{source} not found", source); throw new FileNotFoundException($"{source} not found", source);
Import2DX(source, Get2DXPath(header, preview), preview); ImportAudio(source, GetAudioPath(header, opt.Format, opt.IsPreview), opt);
} }
public static void Import2DX(string source, VoxHeader header, Difficulty difficulty, bool preview = false) public static void ImportAudio(string source, VoxHeader header, Difficulty difficulty, AudioImportOptions opt = null)
{ {
opt = opt ?? AudioImportOptions.Default;
if (!File.Exists(source)) if (!File.Exists(source))
throw new FileNotFoundException($"{source} not found", source); throw new FileNotFoundException($"{source} not found", source);
Import2DX(source, Get2DXPath(header, difficulty, preview), preview); ImportAudio(source, GetAudioPath(header, difficulty, opt.Format, opt.IsPreview), opt);
} }
private static void Import2DX(string source, string output, bool preview = false) private static void ImportAudio(string source, string output, AudioImportOptions opt = null)
{ {
if (!source.EndsWith(".2dx") && !source.EndsWith(".s3v")) opt = opt ?? AudioImportOptions.Default;
source = source.ToLower(); // Just in case something wrong with extension casing
if (!source.ToLower().EndsWith(".2dx") && !source.EndsWith(".s3v") && !source.EndsWith(".asf"))
{ {
string tmp = DxTool.ConvertToWave(source, preview); if (output.EndsWith(".s3v"))
DxTool.Build(tmp, output); throw new NotSupportedException("S3V Encoder is not supported (yet).");
Directory.Delete(tmp, true); // Encode 2dx file
DxEncoder.Encode(new[] { source }, output, opt);
// Remove conflicting file, in case s3v file is exists before hand
string s3VFile = Path.ChangeExtension(output, ".s3v");
if (File.Exists(s3VFile))
File.Delete(s3VFile);
} }
else else
{ {
if (source.EndsWith(".asf"))
output = $"{output.Substring(0, output.Length - 4)}.s3v";
File.Copy(source, output); File.Copy(source, output);
} }
} }
@ -238,7 +286,7 @@ namespace VoxCharger
$"graphics\\s_jacket00_ifs\\" $"graphics\\s_jacket00_ifs\\"
); );
string pattern = $"jk_{header.ID:D4}*"; string pattern = $"jk_{header.Id:D4}*";
foreach (string jacket in Directory.GetFiles(jacketPath, pattern)) foreach (string jacket in Directory.GetFiles(jacketPath, pattern))
{ {
if (File.Exists(jacket)) if (File.Exists(jacket))
@ -248,22 +296,22 @@ namespace VoxCharger
#endregion #endregion
#region --- Asset Identifier --- #region --- Asset Identifier ---
public static int GetNextMusicID() public static int GetNextMusicId()
{ {
// TODO: This probably inefficient in scenario where one or more mix has gap between each ids // TODO: This probably inefficient in scenario where one or more mix has gap between each ids
// This could be waste to those gaps, and eat up our precious limited id // This could be waste to those gaps, and eat up our precious limited id
// However, these gaps may indicate deleted song, which should be taken by omnimix // However, these gaps may indicate deleted song, which should be taken by omnimix
int id = InternalHeaders.LastID + 1; int id = _internalHeaders.LastId + 1;
while (InternalHeaders.Contains(id) || Headers.Contains(id)) // Contains is O(1) so its should be fine while (_internalHeaders.Contains(id) || Headers.Contains(id)) // Contains is O(1) so its should be fine
id++; id++;
return id; return id;
} }
public static bool ValidateMusicID(int id) public static bool ValidateMusicId(int id)
{ {
return !InternalHeaders.Contains(id); return !_internalHeaders.Contains(id);
} }
public static string GetDifficultyCodes(VoxHeader header, Difficulty difficulty) public static string GetDifficultyCodes(VoxHeader header, Difficulty difficulty)
@ -274,7 +322,7 @@ namespace VoxCharger
case Difficulty.Advanced: return "2a"; case Difficulty.Advanced: return "2a";
case Difficulty.Exhaust: return "3e"; case Difficulty.Exhaust: return "3e";
default: default:
if (header.InfVersion == InfiniteVersion.MXM) if (header.InfVersion == InfiniteVersion.Mxm)
return "5m"; return "5m";
return "4i"; return "4i";
@ -297,18 +345,20 @@ namespace VoxCharger
); );
} }
public static string Get2DXPath(VoxHeader header, bool preview = false) public static string GetAudioPath(VoxHeader header, AudioFormat format = AudioFormat.S3V, bool preview = false)
{ {
string ext = preview ? "_pre.2dx" : ".2dx"; string prefix = preview ? "_pre" : string.Empty;
string ext = $"{prefix}" + (format == AudioFormat.S3V ? ".s3v" : ".2dx");
return Path.Combine( return Path.Combine(
GetMusicPath(header), GetMusicPath(header),
$"{header.CodeName}{ext}" $"{header.CodeName}{ext}"
); );
} }
public static string Get2DXPath(VoxHeader header, Difficulty difficulty, bool preview = false) public static string GetAudioPath(VoxHeader header, Difficulty difficulty, AudioFormat format = AudioFormat.S3V, bool preview = false)
{ {
string ext = preview ? "_pre.2dx" : ".2dx"; string prefix = preview ? "_pre" : string.Empty;
string ext = $"{prefix}" + (format == AudioFormat.S3V ? ".s3v" : ".2dx");
return Path.Combine( return Path.Combine(
GetMusicPath(header), GetMusicPath(header),
$"{header.CodeName}_{GetDifficultyCodes(header, difficulty)}{ext}" $"{header.CodeName}_{GetDifficultyCodes(header, difficulty)}{ext}"
@ -318,10 +368,10 @@ namespace VoxCharger
public static string GetJacketPath(VoxHeader header, Difficulty difficulty) public static string GetJacketPath(VoxHeader header, Difficulty difficulty)
{ {
int index = (int)difficulty; int index = (int)difficulty;
if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.MXM) if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.Mxm)
index = 5; index = 5;
return Path.Combine(GetMusicPath(header), $"jk_{header.ID:D4}_{index}"); return Path.Combine(GetMusicPath(header), $"jk_{header.Id:D4}_{index}");
} }
public static string GetDefaultJacketPath(VoxHeader header) public static string GetDefaultJacketPath(VoxHeader header)
@ -332,7 +382,7 @@ namespace VoxCharger
public static string GetThumbnailJacketPath(VoxHeader header, Difficulty difficulty) public static string GetThumbnailJacketPath(VoxHeader header, Difficulty difficulty)
{ {
int index = (int)difficulty; int index = (int)difficulty;
if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.MXM) if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.Mxm)
index = 5; index = 5;
string thumbnailDir = "s_jacket00_ifs"; string thumbnailDir = "s_jacket00_ifs";
@ -354,7 +404,7 @@ namespace VoxCharger
return Path.Combine( return Path.Combine(
graphicsDir, graphicsDir,
$"{thumbnailDir}\\", $"{thumbnailDir}\\",
$"jk_{header.ID:D4}_{index}_t" $"jk_{header.Id:D4}_{index}_t"
); );
} }

View File

@ -23,7 +23,7 @@ namespace VoxCharger
{ {
} }
public static new BitCrusher FromVox(string data) public new static BitCrusher FromVox(string data)
{ {
var bitCrusher = new BitCrusher(); var bitCrusher = new BitCrusher();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -47,7 +47,7 @@ namespace VoxCharger
return bitCrusher; return bitCrusher;
} }
public static new BitCrusher FromKsh(KshDefinition definition) public new static BitCrusher FromKsh(KshDefinition definition)
{ {
var bitCrusher = new BitCrusher(); var bitCrusher = new BitCrusher();

View File

@ -64,7 +64,7 @@ namespace VoxCharger
if (!Enum.TryParse(prop[0].Replace("Echo", "Retrigger"), out FxType type)) if (!Enum.TryParse(prop[0].Replace("Echo", "Retrigger"), out FxType type))
return null; return null;
switch(type) switch(type)
{ {
case FxType.Retrigger: case FxType.Retrigger:
case FxType.RetriggerEx: return Retrigger.FromKsh(data); case FxType.RetriggerEx: return Retrigger.FromKsh(data);

View File

@ -26,7 +26,7 @@ namespace VoxCharger
{ {
} }
public static new Flanger FromVox(string data) public new static Flanger FromVox(string data)
{ {
var highPass = new Flanger(); var highPass = new Flanger();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -52,7 +52,7 @@ namespace VoxCharger
return highPass; return highPass;
} }
public static new Phaser FromKsh(string data) public new static Phaser FromKsh(string data)
{ {
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
if (!Enum.TryParse(prop[0], out FxType type) || type != FxType.Flanger) if (!Enum.TryParse(prop[0], out FxType type) || type != FxType.Flanger)
@ -61,7 +61,7 @@ namespace VoxCharger
return new Phaser(80.00f, 2.00f, 0.50f, 90, 2.00f); return new Phaser(80.00f, 2.00f, 0.50f, 90, 2.00f);
} }
public static new Flanger FromKsh(KshDefinition definition) public new static Flanger FromKsh(KshDefinition definition)
{ {
var flanger = new Flanger(); var flanger = new Flanger();

View File

@ -25,7 +25,7 @@ namespace VoxCharger
} }
public static new Gate FromVox(string data) public new static Gate FromVox(string data)
{ {
var gate = new Gate(); var gate = new Gate();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -50,7 +50,7 @@ namespace VoxCharger
return gate; return gate;
} }
public static new Gate FromKsh(string data) public new static Gate FromKsh(string data)
{ {
var gate = new Gate(); var gate = new Gate();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -69,7 +69,7 @@ namespace VoxCharger
return gate; return gate;
} }
public static new Gate FromKsh(KshDefinition definition) public new static Gate FromKsh(KshDefinition definition)
{ {
var gate = new Gate(); var gate = new Gate();

View File

@ -22,7 +22,7 @@ namespace VoxCharger
{ {
} }
public static new LowPass FromVox(string data) public new static LowPass FromVox(string data)
{ {
var lowPass = new LowPass(); var lowPass = new LowPass();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -47,7 +47,7 @@ namespace VoxCharger
} }
public static new LowPass FromKsh(KshDefinition definition) public new static LowPass FromKsh(KshDefinition definition)
{ {
var lowPass = new LowPass(); var lowPass = new LowPass();

View File

@ -28,7 +28,7 @@ namespace VoxCharger
{ {
} }
public static new Phaser FromVox(string data) public new static Phaser FromVox(string data)
{ {
var flanger = new Phaser(); var flanger = new Phaser();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -55,7 +55,7 @@ namespace VoxCharger
return flanger; return flanger;
} }
public static new Wobble FromKsh(string data) public new static Wobble FromKsh(string data)
{ {
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
if (!Enum.TryParse(prop[0], out FxType type) || type != FxType.Phaser) if (!Enum.TryParse(prop[0], out FxType type) || type != FxType.Phaser)
@ -67,7 +67,7 @@ namespace VoxCharger
return wobble; return wobble;
} }
public static new Phaser FromKsh(KshDefinition definition) public new static Phaser FromKsh(KshDefinition definition)
{ {
var phaser = new Phaser(); var phaser = new Phaser();

View File

@ -23,7 +23,7 @@ namespace VoxCharger
{ {
} }
public static new PitchShift FromVox(string data) public new static PitchShift FromVox(string data)
{ {
var pitchShift = new PitchShift(); var pitchShift = new PitchShift();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -47,7 +47,7 @@ namespace VoxCharger
return pitchShift; return pitchShift;
} }
public static new PitchShift FromKsh(string data) public new static PitchShift FromKsh(string data)
{ {
var pitchShift = new PitchShift(); var pitchShift = new PitchShift();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -65,7 +65,7 @@ namespace VoxCharger
return pitchShift; return pitchShift;
} }
public static new PitchShift FromKsh(KshDefinition definition) public new static PitchShift FromKsh(KshDefinition definition)
{ {
var pitchShift = new PitchShift(); var pitchShift = new PitchShift();

View File

@ -34,7 +34,7 @@ namespace VoxCharger
{ {
} }
public static new Retrigger FromVox(string data) public new static Retrigger FromVox(string data)
{ {
var retrigger = new Retrigger(); var retrigger = new Retrigger();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -64,7 +64,7 @@ namespace VoxCharger
return retrigger; return retrigger;
} }
public static new Retrigger FromKsh(string data) public new static Retrigger FromKsh(string data)
{ {
var retrigger = new Retrigger(); var retrigger = new Retrigger();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -93,7 +93,7 @@ namespace VoxCharger
return retrigger; return retrigger;
} }
public static new Retrigger FromKsh(KshDefinition definition) public new static Retrigger FromKsh(KshDefinition definition)
{ {
var retrigger = new Retrigger(); var retrigger = new Retrigger();

View File

@ -28,7 +28,7 @@ namespace VoxCharger
{ {
} }
public static new SideChain FromVox(string data) public new static SideChain FromVox(string data)
{ {
var sideChain = new SideChain(); var sideChain = new SideChain();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -55,7 +55,7 @@ namespace VoxCharger
return sideChain; return sideChain;
} }
public static new SideChain FromKsh(string data) public new static SideChain FromKsh(string data)
{ {
var sideChain = new SideChain(); var sideChain = new SideChain();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -72,7 +72,7 @@ namespace VoxCharger
return sideChain; return sideChain;
} }
public static new SideChain FromKsh(KshDefinition definition) public new static SideChain FromKsh(KshDefinition definition)
{ {
var sideChain = new SideChain(); var sideChain = new SideChain();

View File

@ -24,7 +24,7 @@ namespace VoxCharger
{ {
} }
public static new TapeStop FromVox(string data) public new static TapeStop FromVox(string data)
{ {
var tapeStop = new TapeStop(); var tapeStop = new TapeStop();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -49,7 +49,7 @@ namespace VoxCharger
return tapeStop; return tapeStop;
} }
public static new TapeStop FromKsh(string data) public new static TapeStop FromKsh(string data)
{ {
var tapeStop = new TapeStop(); var tapeStop = new TapeStop();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -75,7 +75,7 @@ namespace VoxCharger
return tapeStop; return tapeStop;
} }
public static new TapeStop FromKsh(KshDefinition definition) public new static TapeStop FromKsh(KshDefinition definition)
{ {
var tapeStop = new TapeStop(); var tapeStop = new TapeStop();

View File

@ -29,7 +29,7 @@ namespace VoxCharger
{ {
} }
public static new Wobble FromVox(string data) public new static Wobble FromVox(string data)
{ {
var wobble = new Wobble(); var wobble = new Wobble();
var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(',').Select(p => p.Trim()).ToArray();
@ -56,7 +56,7 @@ namespace VoxCharger
return wobble; return wobble;
} }
public static new Wobble FromKsh(string data) public new static Wobble FromKsh(string data)
{ {
var wobble = new Wobble(); var wobble = new Wobble();
var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray(); var prop = data.Trim().Split(';').Select(p => p.Trim()).ToArray();
@ -73,7 +73,7 @@ namespace VoxCharger
return wobble; return wobble;
} }
public static new Wobble FromKsh(KshDefinition definition) public new static Wobble FromKsh(KshDefinition definition)
{ {
var wobble = new Wobble(); var wobble = new Wobble();
@ -107,7 +107,7 @@ namespace VoxCharger
return base.ToString(); return base.ToString();
return $"{(int)Type}," + return $"{(int)Type}," +
$"\t,0,\t{Flag}," + // Unknown params $"\t0,\t{Flag}," + // Unknown params
$"\t{Mix:0.00}," + $"\t{Mix:0.00}," +
$"\t{LowFrequency:0.00}," + $"\t{LowFrequency:0.00}," +
$"\t{HiFrequency:0.00}," + $"\t{HiFrequency:0.00}," +

View File

@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using NAudio.Vorbis;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
using NAudio.Utils;
namespace VoxCharger
{
public static class DxEncoder
{
// We need a custom MS-ADPCM format to encode the wav to .2dx file later
[StructLayout(LayoutKind.Sequential, Pack = 2)]
private class DxAdpcmWaveFormat : AdpcmWaveFormat
{
public DxAdpcmWaveFormat(int sampleRate, int channels)
: base(sampleRate, channels)
{
// The parameters must be:
// blockAlign = 256
// samplePerBlock = 244
// averageBytesPerSecond = (blockAlign * sampleRate / samplesPerBlock + 0.5)
blockAlign = 256;
// We could define the wave format from the scratch so we can assign custom samplesPerBlock
// But Im too lazy for that, so I had to resort reflection to get this done
var samplesPerBlockProp = typeof(AdpcmWaveFormat).GetField("samplesPerBlock", BindingFlags.NonPublic | BindingFlags.Instance);
samplesPerBlockProp?.SetValue(this, (short)244);
averageBytesPerSecond = (int)(blockAlign * sampleRate / (double)SamplesPerBlock + 0.5D);
}
}
public static void Encode(string[] sources, string output, AudioImportOptions opt = null)
{
opt ??= AudioImportOptions.Default;
var samples = sources.Select(source => ConvertWav(source, opt)).ToList();
using var stream = File.Create(output);
using var writer = new BinaryWriter(stream);
string name = Path.GetFileName(output);
name = name.Substring(0, Math.Min(name.Length, 16)).PadRight(16, '\0');
int headerSize = 72 + sources.Length * sizeof(int);
writer.Write(Encoding.UTF8.GetBytes(name));
writer.Write(headerSize);
writer.Write(sources.Length);
writer.Write(new byte[48]);
int offset = headerSize;
for (int i = 0; i < sources.Length; i++)
{
writer.Write(offset);
offset += (int)(samples[i].Length + 24);
}
for (int i = 0; i < sources.Length; i++)
{
using var sample = samples[i];
writer.Write(Encoding.UTF8.GetBytes("2DX9"));
writer.Write(24);
writer.Write((int)sample.Length);
writer.Write((short)12849);
writer.Write((short)-1);
writer.Write((short)64);
writer.Write((short)0);
writer.Write(0);
writer.Write(sample.ToArray());
}
}
private static MemoryStream ConvertWav(string fileName, AudioImportOptions opt)
{
// The conversion happen in 3 steps:
// 1. Convert our source into a temporary PCM WAV, here I use 44.1khz 16bit @ 2 channels
// 2. If the file is preview file, apply preview effects (trim and fading) to our temporary PCM, otherwise skip this step
// 3. Convert our temporary PCM to MS-ADPCM (44.1khz 4bit @ 2channels)
//
// The `WaveFormatConversionStream` will likely to fail if we convert our source straight to MS-ADPCM
// Also, NAudio doesn't support writing samples smaller than 16bit (our MS-ADPCM use 4 bit), so we had to put our preview effects while in 16bit format
// Zero, define our target format and preview flag
var format = new DxAdpcmWaveFormat(44100, 2); // it's 4 bits per sample
bool preview = opt.IsPreview;
int previewStart = opt.PreviewOffset; // in seconds format
// First, convert OGG to PCM WAV 44.1k 16bit @ 2 channels
// Note that, MediaFoundationReader is not supported in WinXP and subject to NAudio limitation, refer to their doc for more info
WaveStream source;
if (Path.GetExtension(fileName) == ".ogg")
source = new VorbisWaveReader(fileName);
else
source = new MediaFoundationReader(fileName);
// Initializes memory stream to store our temporary PCM 16bit
// Use IgnoreDisposeStream, otherwise our memory stream will be disposed when disposing wav writer
using var ms = new MemoryStream();
var tmp = new IgnoreDisposeStream(ms); // No need `using`, disposing this thing won't dispose our MemoryStream
// Initialize our PCM 44.1khz 16bit @ 2 channels
using (var wav = new WaveFileWriter(tmp, new WaveFormat(44100, 16, 2)))
{
// We can use either IWaveProvider or ISampleProvider here doesn't matter
// Just be aware the values you feed during the conversion (Read() use byte[] buffer vs float[] samples)
IWaveProvider provider = source;
if (preview)
{
// Trim audio for preview purpose
provider = new OffsetSampleProvider(provider.ToSampleProvider())
{
SkipOver = TimeSpan.FromSeconds(previewStart),
Take = TimeSpan.FromSeconds(10)
}.ToWaveProvider();
// Add fade in effect in the beginning of audio for preview purpose
var fader = new FadeInOutSampleProvider(provider.ToSampleProvider());
fader.BeginFadeIn(1000);
provider = fader.ToWaveProvider();
}
// Convert our Source to 16bit Wave
provider = new SampleToWaveProvider16(provider.ToSampleProvider());
// You could probably use AverageBytesPerSecond * 2 here to store the whole second for 2 channels samples
// Just don't set it too much, otherwise our fade-out checking won't hit
byte[] buffer = new byte[provider.WaveFormat.AverageBytesPerSecond];
bool fadeOut = false;
for (int read; (read = provider.Read(buffer, 0, buffer.Length)) > 0;)
{
// Check whether it's preview or not, and if it is, we want to add fade out effect for the last second
if (preview && !fadeOut && wav.TotalTime.TotalMilliseconds >= 8000)
{
// Add fade out effect at the end of audio for preview purpose
var fader = new FadeInOutSampleProvider(provider.ToSampleProvider());
fader.BeginFadeOut(1000);
fadeOut = true;
// Sample it to 16 bit again to avoid distortion after adding fade out effect
provider = new SampleToWaveProvider16(fader);
}
// Write converted 16bit sample to the temporary memory stream
wav.Write(buffer, 0, read);
}
} // Ensure writer disposed so the data is completely flushed to our memory stream
// Finally, convert PCM Wav to ADPCM Wav
tmp.Seek(0, SeekOrigin.Begin); // reset offset so our WaveFileReader read our header correctly
var output = new IgnoreDisposeStream(new MemoryStream());
using (var pcm = new WaveFileReader(tmp.SourceStream))
using (var adpcm = new WaveFormatConversionStream(format, pcm))
using (var writer = new WaveFileWriter(output, format))
{
byte[] buffer = new byte[adpcm.Length];
int read = adpcm.Read(buffer, 0, buffer.Length);
writer.Write(buffer, 0, read);
}
return output.SourceStream as MemoryStream;
}
}
}

View File

@ -0,0 +1,54 @@
using System;
using System.Diagnostics;
using System.IO;
namespace VoxCharger
{
public static class S3VTool
{
public static string ConverterFileName { get; set; } = "ffmpeg.exe";
public static void Convert(string inputFileName, string outputFileName, AudioImportOptions opt = null)
{
opt = opt ?? AudioImportOptions.Default;
if (!File.Exists(ConverterFileName))
throw new FileNotFoundException($"{ConverterFileName} not found", ConverterFileName);
/*
* TODO: DO NOT USE! Original .s3v (.asf) file seems encoded by Windows Media Audio Pro 10 encoder with close to Lossless quality.
* FFMPEG doesn't support this, and thus, this will generate non-working audio file for the game
*
* Format: 256000 Bit Rate with 44100 Sample Rate 24 Bit depth @ 2 Channels
*/
string previewArgs = "";
if (opt.IsPreview)
previewArgs = $"-ss {opt.PreviewOffset / 60:00}:{opt.PreviewOffset % 60:00} -t 10 -af afade=t=in:st={opt.PreviewOffset}:d=1,afade=t=out:st={opt.PreviewOffset + 9}:d=1";
string args = $"-y -i \"{inputFileName}\" {previewArgs} -maxrate 297k -minrate 297k -bufsize 297 -vb 280k -ab 380k -ac 2 -ar 44100 -f asf \"{outputFileName}\"";
var info = new ProcessStartInfo()
{
FileName = ConverterFileName,
Arguments = args,
WorkingDirectory = Environment.CurrentDirectory,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true
};
using (var process = Process.Start(info))
{
process.WaitForExit();
if (process.ExitCode != 0)
{
int exitCode = process.ExitCode;
string stdout = (process.StandardOutput.ReadToEnd() + ' ' + process.StandardError.ReadToEnd().Trim()).Trim();
if (string.IsNullOrEmpty(stdout))
stdout = "Unknown error.";
throw new ApplicationException($"{Path.GetFileName(ConverterFileName)} execution failed.\n({exitCode}): {stdout}");
}
}
}
}
}

View File

@ -4,13 +4,13 @@ namespace VoxCharger
{ {
public abstract partial class Event public abstract partial class Event
{ {
public class BPM : Event public class Bpm : Event
{ {
public float Value { get; set; } public float Value { get; set; }
public bool IsStop { get; set; } public bool IsStop { get; set; }
public BPM(Time time, float value) public Bpm(Time time, float value)
: base(time) : base(time)
{ {
Value = value; Value = value;
@ -18,7 +18,7 @@ namespace VoxCharger
public override string ToString() public override string ToString()
{ {
return $"{base.ToString()}\t{Value:0.00}\t{4}" + (IsStop ? "-" : string.Empty); return $"{base.ToString()}\t{Value:0.0000}\t{4}" + (IsStop ? "-" : string.Empty);
} }
} }
} }

View File

@ -7,7 +7,7 @@ namespace VoxCharger
public class Tilt : Camera public class Tilt : Camera
{ {
public Tilt(Time time, int duration, float start, float end) public Tilt(Time time, int duration, float start, float end)
: base(time, WorkType.Rotation) : base(time, WorkType.Tilt)
{ {
Duration = duration; Duration = duration;
Start = start; Start = start;

View File

@ -11,7 +11,9 @@ namespace VoxCharger
Radian, Radian,
Realize, Realize,
AirLeftScaleX, AirLeftScaleX,
AirRightScaleX,
AirLeftScaleY, AirLeftScaleY,
AirRightScaleY,
Tilt, Tilt,
LaneClear LaneClear
} }

View File

@ -8,9 +8,9 @@ namespace VoxCharger
{ {
public class EventCollection : ICollection<Event> public class EventCollection : ICollection<Event>
{ {
private List<Event> Events = new List<Event>(); private List<Event> _events = new List<Event>();
public int Count => Events.Count; public int Count => _events.Count;
public bool IsReadOnly => false; public bool IsReadOnly => false;
@ -20,13 +20,13 @@ namespace VoxCharger
public Event[] this[int measure] public Event[] this[int measure]
{ {
get => Events.FindAll((ev) => ev.Time.Measure == measure).ToArray(); get => _events.FindAll((ev) => ev.Time.Measure == measure).ToArray();
} }
public Event[] this[Time time] public Event[] this[Time time]
{ {
get => Events.FindAll((ev) => ev.Time == time).ToArray(); get => _events.FindAll((ev) => ev.Time == time).ToArray();
set => Events.AddRange(value.Where(ev => ev != null).Select(ev => { ev.Time = time; return ev; })); set => _events.AddRange(value.Where(ev => ev != null).Select(ev => { ev.Time = time; return ev; }));
} }
public Event.TimeSignature GetTimeSignature(int measure) public Event.TimeSignature GetTimeSignature(int measure)
@ -36,64 +36,64 @@ namespace VoxCharger
public Event.TimeSignature GetTimeSignature(Time time) public Event.TimeSignature GetTimeSignature(Time time)
{ {
var timeSig = Events.LastOrDefault(ev => var timeSig = _events.LastOrDefault(ev =>
ev is Event.TimeSignature && (ev.Time == time || ev.Time.Measure < time.Measure) ev is Event.TimeSignature && (ev.Time == time || ev.Time.Measure < time.Measure)
) as Event.TimeSignature; ) as Event.TimeSignature;
return timeSig != null ? timeSig : new Event.TimeSignature(time, 4, 4); return timeSig != null ? timeSig : new Event.TimeSignature(time, 4, 4);
} }
public Event.BPM GetBPM(int measure) public Event.Bpm GetBpm(int measure)
{ {
return GetBPM(new Time(measure, 1, 0)); return GetBpm(new Time(measure, 1, 0));
} }
public Event.BPM GetBPM(Time time) public Event.Bpm GetBpm(Time time)
{ {
return Events.LastOrDefault(ev => return _events.LastOrDefault(ev =>
ev is Event.BPM && (ev.Time == time || ev.Time.Measure < time.Measure) ev is Event.Bpm && (ev.Time == time || ev.Time.Measure < time.Measure)
) as Event.BPM; ) as Event.Bpm;
} }
public void Add(Event ev) public void Add(Event ev)
{ {
if (ev != null) if (ev != null)
Events.Add(ev); _events.Add(ev);
} }
public void Add(params Event[] ev) public void Add(params Event[] ev)
{ {
Events.AddRange(new List<Event>(ev).FindAll(e => e != null)); _events.AddRange(new List<Event>(ev).FindAll(e => e != null));
} }
public bool Remove(Event ev) public bool Remove(Event ev)
{ {
return Events.Remove(ev); return _events.Remove(ev);
} }
public bool Contains(Event ev) public bool Contains(Event ev)
{ {
return Events.Contains(ev); return _events.Contains(ev);
} }
public void CopyTo(Event[] events, int index) public void CopyTo(Event[] events, int index)
{ {
Events.CopyTo(events, index); _events.CopyTo(events, index);
} }
public void Clear() public void Clear()
{ {
Events.Clear(); _events.Clear();
} }
public IEnumerator<Event> GetEnumerator() public IEnumerator<Event> GetEnumerator()
{ {
return Events.GetEnumerator(); return _events.GetEnumerator();
} }
IEnumerator IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator()
{ {
return Events.GetEnumerator(); return _events.GetEnumerator();
} }
} }
} }

View File

@ -19,16 +19,17 @@ namespace VoxCharger
public enum SlamImpact public enum SlamImpact
{ {
None = 0, None = 0,
Measure = 1, Measure = 1,
HalfMeasure = 2, HalfMeasure = 2,
ThreeBeat = 3, ThreeBeat = 3,
TripleMeasure = 4, TripleMeasure = 4,
Swing = 5 Swing = 5
} }
public enum LaserFilter public enum LaserFilter
{ {
None = -1,
Peak = 0, Peak = 0,
LowPass = 1, LowPass = 1,
HighPass = 3, HighPass = 3,
@ -49,7 +50,7 @@ namespace VoxCharger
public SlamImpact Impact { get; set; } public SlamImpact Impact { get; set; }
public int Range { get; set; } public int Range { get; set; }
public LaserFilter Filter { get; set; } public LaserFilter Filter { get; set; }
public bool Slam { get; set; } public bool IsLaserSlam { get; set; }
public Laser(Time time, LaserTrack track, int offset, LaserFlag flag, SlamImpact impact) public Laser(Time time, LaserTrack track, int offset, LaserFlag flag, SlamImpact impact)
: base (time) : base (time)

View File

@ -4,6 +4,8 @@ namespace VoxCharger
{ {
public class Time public class Time
{ {
public static readonly Time Initial = new Time(1, 1, 0);
public int Measure { get; set; } public int Measure { get; set; }
public int Beat { get; set; } public int Beat { get; set; }
public int Offset { get; set; } public int Offset { get; set; }

View File

@ -15,6 +15,11 @@ namespace VoxCharger
System.Diagnostics.Process.Start("mailto://o2jam@cxo2.me"); System.Diagnostics.Process.Start("mailto://o2jam@cxo2.me");
} }
private void OnGithubLinkLabelLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(((LinkLabel)sender).Text);
}
private void OnCloseButtonClick(object sender, EventArgs e) private void OnCloseButtonClick(object sender, EventArgs e)
{ {
Close(); Close();

View File

@ -36,6 +36,7 @@
this.EmailLinkLabel = new System.Windows.Forms.LinkLabel(); this.EmailLinkLabel = new System.Windows.Forms.LinkLabel();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.CloseButton = new System.Windows.Forms.Button(); this.CloseButton = new System.Windows.Forms.Button();
this.GithubLinkLabel = new System.Windows.Forms.LinkLabel();
((System.ComponentModel.ISupportInitialize)(this.ProfilePictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.ProfilePictureBox)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -65,9 +66,9 @@
this.label2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(107, 36); this.label2.Location = new System.Drawing.Point(107, 36);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(77, 13); this.label2.Size = new System.Drawing.Size(82, 13);
this.label2.TabIndex = 2; this.label2.TabIndex = 2;
this.label2.Text = "Version 0.9.7b"; this.label2.Text = "Version 0.9.12c";
// //
// label3 // label3
// //
@ -77,7 +78,7 @@
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(131, 13); this.label3.Size = new System.Drawing.Size(131, 13);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
this.label3.Text = "Copyright © 2020 - CXO2"; this.label3.Text = "Copyright © 2022 - CXO2";
// //
// EmailLinkLabel // EmailLinkLabel
// //
@ -104,8 +105,7 @@
// //
// CloseButton // CloseButton
// //
this.CloseButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.CloseButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.CloseButton.Location = new System.Drawing.Point(21, 151); this.CloseButton.Location = new System.Drawing.Point(21, 151);
this.CloseButton.Name = "CloseButton"; this.CloseButton.Name = "CloseButton";
this.CloseButton.Size = new System.Drawing.Size(292, 26); this.CloseButton.Size = new System.Drawing.Size(292, 26);
@ -114,11 +114,25 @@
this.CloseButton.UseVisualStyleBackColor = true; this.CloseButton.UseVisualStyleBackColor = true;
this.CloseButton.Click += new System.EventHandler(this.OnCloseButtonClick); this.CloseButton.Click += new System.EventHandler(this.OnCloseButtonClick);
// //
// GithubLinkLabel
//
this.GithubLinkLabel.AutoSize = true;
this.GithubLinkLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.GithubLinkLabel.Location = new System.Drawing.Point(107, 83);
this.GithubLinkLabel.Name = "GithubLinkLabel";
this.GithubLinkLabel.Size = new System.Drawing.Size(212, 13);
this.GithubLinkLabel.TabIndex = 7;
this.GithubLinkLabel.TabStop = true;
this.GithubLinkLabel.Text = "https://github.com/SirusDoma/VoxCharger";
this.GithubLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.OnGithubLinkLabelLinkClicked);
//
// AboutForm // AboutForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(334, 189); this.ClientSize = new System.Drawing.Size(334, 189);
this.Controls.Add(this.GithubLinkLabel);
this.Controls.Add(this.CloseButton); this.Controls.Add(this.CloseButton);
this.Controls.Add(this.label4); this.Controls.Add(this.label4);
this.Controls.Add(this.EmailLinkLabel); this.Controls.Add(this.EmailLinkLabel);
@ -128,17 +142,18 @@
this.Controls.Add(this.ProfilePictureBox); this.Controls.Add(this.ProfilePictureBox);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(15, 15);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "AboutForm"; this.Name = "AboutForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "About VoxCharger";
((System.ComponentModel.ISupportInitialize)(this.ProfilePictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.ProfilePictureBox)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.LinkLabel GithubLinkLabel;
#endregion #endregion
private System.Windows.Forms.PictureBox ProfilePictureBox; private System.Windows.Forms.PictureBox ProfilePictureBox;

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
namespace VoxCharger using System.Windows.Forms;
namespace VoxCharger
{ {
partial class ConverterForm partial class ConverterForm
{ {
@ -39,7 +41,23 @@
this.JacketNovPictureBox = new System.Windows.Forms.PictureBox(); this.JacketNovPictureBox = new System.Windows.Forms.PictureBox();
this.PathTextBox = new System.Windows.Forms.TextBox(); this.PathTextBox = new System.Windows.Forms.TextBox();
this.OptionsGroupBox = new System.Windows.Forms.GroupBox(); this.OptionsGroupBox = new System.Windows.Forms.GroupBox();
this.SlamImpactCheckBox = new System.Windows.Forms.CheckBox(); this.SoundEffectsCheckBox = new System.Windows.Forms.CheckBox();
this.CameraEffectsCheckBox = new System.Windows.Forms.CheckBox();
this.CameraEffectsGroupBox = new System.Windows.Forms.GroupBox();
this.CameraMappingButton = new System.Windows.Forms.Button();
this.CameraEffectsCheckedListBox = new System.Windows.Forms.CheckedListBox();
this.TracksGroupBox = new System.Windows.Forms.GroupBox();
this.TrackFXRCheckBox = new System.Windows.Forms.CheckBox();
this.TrackFXLCheckBox = new System.Windows.Forms.CheckBox();
this.TrackVolRCheckBox = new System.Windows.Forms.CheckBox();
this.TrackButtonDCheckBox = new System.Windows.Forms.CheckBox();
this.TrackButtonCCheckBox = new System.Windows.Forms.CheckBox();
this.TrackButtonBCheckBox = new System.Windows.Forms.CheckBox();
this.TrackButtonACheckBox = new System.Windows.Forms.CheckBox();
this.TrackVolLCheckBox = new System.Windows.Forms.CheckBox();
this.SoundEffectGroupBox = new System.Windows.Forms.GroupBox();
this.SoundMappingButton = new System.Windows.Forms.Button();
this.SoundEffectsCheckedListBox = new System.Windows.Forms.CheckedListBox();
this.VersionDropDown = new System.Windows.Forms.ComboBox(); this.VersionDropDown = new System.Windows.Forms.ComboBox();
this.InfVerDropDown = new System.Windows.Forms.ComboBox(); this.InfVerDropDown = new System.Windows.Forms.ComboBox();
this.BackgroundDropDown = new System.Windows.Forms.ComboBox(); this.BackgroundDropDown = new System.Windows.Forms.ComboBox();
@ -47,25 +65,27 @@
this.RealignOffsetCheckBox = new System.Windows.Forms.CheckBox(); this.RealignOffsetCheckBox = new System.Windows.Forms.CheckBox();
this.AsciiAutoCheckBox = new System.Windows.Forms.CheckBox(); this.AsciiAutoCheckBox = new System.Windows.Forms.CheckBox();
this.InfVerLabel = new System.Windows.Forms.Label(); this.InfVerLabel = new System.Windows.Forms.Label();
this.CameraCheckBox = new System.Windows.Forms.CheckBox();
this.TrackButtonCheckBox = new System.Windows.Forms.CheckBox();
this.TrackLaserCheckBox = new System.Windows.Forms.CheckBox();
this.TrackLabel = new System.Windows.Forms.Label();
this.EffectsLabel = new System.Windows.Forms.Label();
this.MeasureLabel = new System.Windows.Forms.Label(); this.MeasureLabel = new System.Windows.Forms.Label();
this.AsciiTextBox = new System.Windows.Forms.TextBox(); this.AsciiTextBox = new System.Windows.Forms.TextBox();
this.LongFxCheckBox = new System.Windows.Forms.CheckBox();
this.ChipFxCheckBox = new System.Windows.Forms.CheckBox();
this.MusicCodeLabel = new System.Windows.Forms.Label(); this.MusicCodeLabel = new System.Windows.Forms.Label();
this.CancelConvertButton = new System.Windows.Forms.Button(); this.CancelConvertButton = new System.Windows.Forms.Button();
this.ProcessConvertButton = new System.Windows.Forms.Button(); this.ProcessConvertButton = new System.Windows.Forms.Button();
this.TargetLabel = new System.Windows.Forms.Label(); this.TargetLabel = new System.Windows.Forms.Label();
this.MusicGroupBox = new System.Windows.Forms.GroupBox();
this.FormatLabel = new System.Windows.Forms.Label();
this.PreviewTimePicker = new System.Windows.Forms.DateTimePicker();
this.MusicFormatDropDown = new System.Windows.Forms.ComboBox();
this.PreviewOffsetLabel = new System.Windows.Forms.Label();
this.LevelGroupBox.SuspendLayout(); this.LevelGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.JacketInfPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketInfPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.JacketExhPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketExhPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.JacketAdvPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketAdvPictureBox)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.JacketNovPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketNovPictureBox)).BeginInit();
this.OptionsGroupBox.SuspendLayout(); this.OptionsGroupBox.SuspendLayout();
this.CameraEffectsGroupBox.SuspendLayout();
this.TracksGroupBox.SuspendLayout();
this.SoundEffectGroupBox.SuspendLayout();
this.MusicGroupBox.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// LevelGroupBox // LevelGroupBox
@ -81,7 +101,7 @@
this.LevelGroupBox.Location = new System.Drawing.Point(12, 44); this.LevelGroupBox.Location = new System.Drawing.Point(12, 44);
this.LevelGroupBox.Name = "LevelGroupBox"; this.LevelGroupBox.Name = "LevelGroupBox";
this.LevelGroupBox.Size = new System.Drawing.Size(447, 165); this.LevelGroupBox.Size = new System.Drawing.Size(447, 165);
this.LevelGroupBox.TabIndex = 15; this.LevelGroupBox.TabIndex = 1;
this.LevelGroupBox.TabStop = false; this.LevelGroupBox.TabStop = false;
this.LevelGroupBox.Text = "Levels"; this.LevelGroupBox.Text = "Levels";
// //
@ -90,7 +110,7 @@
this.InfEditButton.Location = new System.Drawing.Point(331, 133); this.InfEditButton.Location = new System.Drawing.Point(331, 133);
this.InfEditButton.Name = "InfEditButton"; this.InfEditButton.Name = "InfEditButton";
this.InfEditButton.Size = new System.Drawing.Size(108, 26); this.InfEditButton.Size = new System.Drawing.Size(108, 26);
this.InfEditButton.TabIndex = 18; this.InfEditButton.TabIndex = 3;
this.InfEditButton.Tag = "4"; this.InfEditButton.Tag = "4";
this.InfEditButton.Text = "--"; this.InfEditButton.Text = "--";
this.InfEditButton.UseVisualStyleBackColor = true; this.InfEditButton.UseVisualStyleBackColor = true;
@ -101,7 +121,7 @@
this.ExhEditButton.Location = new System.Drawing.Point(223, 133); this.ExhEditButton.Location = new System.Drawing.Point(223, 133);
this.ExhEditButton.Name = "ExhEditButton"; this.ExhEditButton.Name = "ExhEditButton";
this.ExhEditButton.Size = new System.Drawing.Size(108, 26); this.ExhEditButton.Size = new System.Drawing.Size(108, 26);
this.ExhEditButton.TabIndex = 17; this.ExhEditButton.TabIndex = 2;
this.ExhEditButton.Tag = "3"; this.ExhEditButton.Tag = "3";
this.ExhEditButton.Text = "EXH"; this.ExhEditButton.Text = "EXH";
this.ExhEditButton.UseVisualStyleBackColor = true; this.ExhEditButton.UseVisualStyleBackColor = true;
@ -112,7 +132,7 @@
this.AdvEditButton.Location = new System.Drawing.Point(115, 133); this.AdvEditButton.Location = new System.Drawing.Point(115, 133);
this.AdvEditButton.Name = "AdvEditButton"; this.AdvEditButton.Name = "AdvEditButton";
this.AdvEditButton.Size = new System.Drawing.Size(108, 26); this.AdvEditButton.Size = new System.Drawing.Size(108, 26);
this.AdvEditButton.TabIndex = 16; this.AdvEditButton.TabIndex = 1;
this.AdvEditButton.Tag = "2"; this.AdvEditButton.Tag = "2";
this.AdvEditButton.Text = "ADV"; this.AdvEditButton.Text = "ADV";
this.AdvEditButton.UseVisualStyleBackColor = true; this.AdvEditButton.UseVisualStyleBackColor = true;
@ -123,7 +143,7 @@
this.NovEditButton.Location = new System.Drawing.Point(7, 133); this.NovEditButton.Location = new System.Drawing.Point(7, 133);
this.NovEditButton.Name = "NovEditButton"; this.NovEditButton.Name = "NovEditButton";
this.NovEditButton.Size = new System.Drawing.Size(108, 26); this.NovEditButton.Size = new System.Drawing.Size(108, 26);
this.NovEditButton.TabIndex = 15; this.NovEditButton.TabIndex = 0;
this.NovEditButton.Tag = "1"; this.NovEditButton.Tag = "1";
this.NovEditButton.Text = "NOV"; this.NovEditButton.Text = "NOV";
this.NovEditButton.UseVisualStyleBackColor = true; this.NovEditButton.UseVisualStyleBackColor = true;
@ -179,11 +199,15 @@
this.PathTextBox.Name = "PathTextBox"; this.PathTextBox.Name = "PathTextBox";
this.PathTextBox.ReadOnly = true; this.PathTextBox.ReadOnly = true;
this.PathTextBox.Size = new System.Drawing.Size(409, 20); this.PathTextBox.Size = new System.Drawing.Size(409, 20);
this.PathTextBox.TabIndex = 16; this.PathTextBox.TabIndex = 0;
// //
// OptionsGroupBox // OptionsGroupBox
// //
this.OptionsGroupBox.Controls.Add(this.SlamImpactCheckBox); this.OptionsGroupBox.Controls.Add(this.SoundEffectsCheckBox);
this.OptionsGroupBox.Controls.Add(this.CameraEffectsCheckBox);
this.OptionsGroupBox.Controls.Add(this.CameraEffectsGroupBox);
this.OptionsGroupBox.Controls.Add(this.TracksGroupBox);
this.OptionsGroupBox.Controls.Add(this.SoundEffectGroupBox);
this.OptionsGroupBox.Controls.Add(this.VersionDropDown); this.OptionsGroupBox.Controls.Add(this.VersionDropDown);
this.OptionsGroupBox.Controls.Add(this.InfVerDropDown); this.OptionsGroupBox.Controls.Add(this.InfVerDropDown);
this.OptionsGroupBox.Controls.Add(this.BackgroundDropDown); this.OptionsGroupBox.Controls.Add(this.BackgroundDropDown);
@ -191,148 +215,260 @@
this.OptionsGroupBox.Controls.Add(this.RealignOffsetCheckBox); this.OptionsGroupBox.Controls.Add(this.RealignOffsetCheckBox);
this.OptionsGroupBox.Controls.Add(this.AsciiAutoCheckBox); this.OptionsGroupBox.Controls.Add(this.AsciiAutoCheckBox);
this.OptionsGroupBox.Controls.Add(this.InfVerLabel); this.OptionsGroupBox.Controls.Add(this.InfVerLabel);
this.OptionsGroupBox.Controls.Add(this.CameraCheckBox);
this.OptionsGroupBox.Controls.Add(this.TrackButtonCheckBox);
this.OptionsGroupBox.Controls.Add(this.TrackLaserCheckBox);
this.OptionsGroupBox.Controls.Add(this.TrackLabel);
this.OptionsGroupBox.Controls.Add(this.EffectsLabel);
this.OptionsGroupBox.Controls.Add(this.MeasureLabel); this.OptionsGroupBox.Controls.Add(this.MeasureLabel);
this.OptionsGroupBox.Controls.Add(this.AsciiTextBox); this.OptionsGroupBox.Controls.Add(this.AsciiTextBox);
this.OptionsGroupBox.Controls.Add(this.LongFxCheckBox);
this.OptionsGroupBox.Controls.Add(this.ChipFxCheckBox);
this.OptionsGroupBox.Controls.Add(this.MusicCodeLabel); this.OptionsGroupBox.Controls.Add(this.MusicCodeLabel);
this.OptionsGroupBox.Location = new System.Drawing.Point(12, 215); this.OptionsGroupBox.Location = new System.Drawing.Point(12, 215);
this.OptionsGroupBox.Name = "OptionsGroupBox"; this.OptionsGroupBox.Name = "OptionsGroupBox";
this.OptionsGroupBox.Size = new System.Drawing.Size(447, 170); this.OptionsGroupBox.Size = new System.Drawing.Size(447, 372);
this.OptionsGroupBox.TabIndex = 1; this.OptionsGroupBox.TabIndex = 2;
this.OptionsGroupBox.TabStop = false; this.OptionsGroupBox.TabStop = false;
this.OptionsGroupBox.Text = "Options"; this.OptionsGroupBox.Text = "Metadata && Charts";
// //
// SlamImpactCheckBox // SoundEffectsCheckBox
// //
this.SlamImpactCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.SoundEffectsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.SlamImpactCheckBox.AutoSize = true; this.SoundEffectsCheckBox.AutoSize = true;
this.SlamImpactCheckBox.Checked = true; this.SoundEffectsCheckBox.Checked = true;
this.SlamImpactCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.SoundEffectsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.SlamImpactCheckBox.Location = new System.Drawing.Point(293, 114); this.SoundEffectsCheckBox.Location = new System.Drawing.Point(17, 119);
this.SlamImpactCheckBox.Name = "SlamImpactCheckBox"; this.SoundEffectsCheckBox.Name = "SoundEffectsCheckBox";
this.SlamImpactCheckBox.Size = new System.Drawing.Size(84, 17); this.SoundEffectsCheckBox.Size = new System.Drawing.Size(93, 17);
this.SlamImpactCheckBox.TabIndex = 20; this.SoundEffectsCheckBox.TabIndex = 6;
this.SlamImpactCheckBox.Text = "Slam Impact"; this.SoundEffectsCheckBox.Text = "Sound Effects";
this.SlamImpactCheckBox.UseVisualStyleBackColor = true; this.SoundEffectsCheckBox.UseVisualStyleBackColor = true;
this.SoundEffectsCheckBox.CheckedChanged += new System.EventHandler(this.OnSoundEffectsCheckBoxCheckedChanged);
//
// CameraEffectsCheckBox
//
this.CameraEffectsCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.CameraEffectsCheckBox.AutoSize = true;
this.CameraEffectsCheckBox.Checked = true;
this.CameraEffectsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.CameraEffectsCheckBox.Location = new System.Drawing.Point(235, 119);
this.CameraEffectsCheckBox.Name = "CameraEffectsCheckBox";
this.CameraEffectsCheckBox.Size = new System.Drawing.Size(98, 17);
this.CameraEffectsCheckBox.TabIndex = 7;
this.CameraEffectsCheckBox.Text = "Camera Effects";
this.CameraEffectsCheckBox.UseVisualStyleBackColor = true;
this.CameraEffectsCheckBox.CheckedChanged += new System.EventHandler(this.OnCameraEffectsCheckBoxCheckedChanged);
//
// CameraEffectsGroupBox
//
this.CameraEffectsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.CameraEffectsGroupBox.Controls.Add(this.CameraMappingButton);
this.CameraEffectsGroupBox.Controls.Add(this.CameraEffectsCheckedListBox);
this.CameraEffectsGroupBox.Location = new System.Drawing.Point(228, 121);
this.CameraEffectsGroupBox.Name = "CameraEffectsGroupBox";
this.CameraEffectsGroupBox.Size = new System.Drawing.Size(211, 168);
this.CameraEffectsGroupBox.TabIndex = 9;
this.CameraEffectsGroupBox.TabStop = false;
//
// CameraMappingButton
//
this.CameraMappingButton.Location = new System.Drawing.Point(6, 134);
this.CameraMappingButton.Name = "CameraMappingButton";
this.CameraMappingButton.Size = new System.Drawing.Size(199, 28);
this.CameraMappingButton.TabIndex = 1;
this.CameraMappingButton.Text = "Configure Mappings..";
this.CameraMappingButton.UseVisualStyleBackColor = true;
this.CameraMappingButton.Click += new System.EventHandler(this.OnMappingButtonClick);
//
// CameraEffectsCheckedListBox
//
this.CameraEffectsCheckedListBox.BackColor = System.Drawing.SystemColors.Control;
this.CameraEffectsCheckedListBox.CheckOnClick = true;
this.CameraEffectsCheckedListBox.FormattingEnabled = true;
this.CameraEffectsCheckedListBox.Location = new System.Drawing.Point(6, 19);
this.CameraEffectsCheckedListBox.Name = "CameraEffectsCheckedListBox";
this.CameraEffectsCheckedListBox.ScrollAlwaysVisible = true;
this.CameraEffectsCheckedListBox.Size = new System.Drawing.Size(199, 109);
this.CameraEffectsCheckedListBox.TabIndex = 0;
this.CameraEffectsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.OnCameraEffectsCheckedListBoxItemCheck);
//
// TracksGroupBox
//
this.TracksGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.TracksGroupBox.Controls.Add(this.TrackFXRCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackFXLCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackVolRCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackButtonDCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackButtonCCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackButtonBCheckBox);
this.TracksGroupBox.Controls.Add(this.TrackButtonACheckBox);
this.TracksGroupBox.Controls.Add(this.TrackVolLCheckBox);
this.TracksGroupBox.Location = new System.Drawing.Point(10, 295);
this.TracksGroupBox.Name = "TracksGroupBox";
this.TracksGroupBox.Size = new System.Drawing.Size(429, 68);
this.TracksGroupBox.TabIndex = 10;
this.TracksGroupBox.TabStop = false;
this.TracksGroupBox.Text = "Tracks";
//
// TrackFXRCheckBox
//
this.TrackFXRCheckBox.AutoSize = true;
this.TrackFXRCheckBox.Checked = true;
this.TrackFXRCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackFXRCheckBox.Location = new System.Drawing.Point(236, 42);
this.TrackFXRCheckBox.Name = "TrackFXRCheckBox";
this.TrackFXRCheckBox.Size = new System.Drawing.Size(50, 17);
this.TrackFXRCheckBox.TabIndex = 7;
this.TrackFXRCheckBox.Text = "FX-R";
this.TrackFXRCheckBox.UseVisualStyleBackColor = true;
//
// TrackFXLCheckBox
//
this.TrackFXLCheckBox.AutoSize = true;
this.TrackFXLCheckBox.Checked = true;
this.TrackFXLCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackFXLCheckBox.Location = new System.Drawing.Point(124, 42);
this.TrackFXLCheckBox.Name = "TrackFXLCheckBox";
this.TrackFXLCheckBox.Size = new System.Drawing.Size(48, 17);
this.TrackFXLCheckBox.TabIndex = 6;
this.TrackFXLCheckBox.Text = "FX-L";
this.TrackFXLCheckBox.UseVisualStyleBackColor = true;
//
// TrackVolRCheckBox
//
this.TrackVolRCheckBox.AutoSize = true;
this.TrackVolRCheckBox.Checked = true;
this.TrackVolRCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackVolRCheckBox.Location = new System.Drawing.Point(331, 19);
this.TrackVolRCheckBox.Name = "TrackVolRCheckBox";
this.TrackVolRCheckBox.Size = new System.Drawing.Size(52, 17);
this.TrackVolRCheckBox.TabIndex = 5;
this.TrackVolRCheckBox.Text = "Vol-R";
this.TrackVolRCheckBox.UseVisualStyleBackColor = true;
//
// TrackButtonDCheckBox
//
this.TrackButtonDCheckBox.AutoSize = true;
this.TrackButtonDCheckBox.Checked = true;
this.TrackButtonDCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackButtonDCheckBox.Location = new System.Drawing.Point(274, 19);
this.TrackButtonDCheckBox.Name = "TrackButtonDCheckBox";
this.TrackButtonDCheckBox.Size = new System.Drawing.Size(51, 17);
this.TrackButtonDCheckBox.TabIndex = 4;
this.TrackButtonDCheckBox.Text = "BT-D";
this.TrackButtonDCheckBox.UseVisualStyleBackColor = true;
//
// TrackButtonCCheckBox
//
this.TrackButtonCCheckBox.AutoSize = true;
this.TrackButtonCCheckBox.Checked = true;
this.TrackButtonCCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackButtonCCheckBox.Location = new System.Drawing.Point(218, 19);
this.TrackButtonCCheckBox.Name = "TrackButtonCCheckBox";
this.TrackButtonCCheckBox.Size = new System.Drawing.Size(50, 17);
this.TrackButtonCCheckBox.TabIndex = 3;
this.TrackButtonCCheckBox.Text = "BT-C";
this.TrackButtonCCheckBox.UseVisualStyleBackColor = true;
//
// TrackButtonBCheckBox
//
this.TrackButtonBCheckBox.AutoSize = true;
this.TrackButtonBCheckBox.Checked = true;
this.TrackButtonBCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackButtonBCheckBox.Location = new System.Drawing.Point(162, 19);
this.TrackButtonBCheckBox.Name = "TrackButtonBCheckBox";
this.TrackButtonBCheckBox.Size = new System.Drawing.Size(50, 17);
this.TrackButtonBCheckBox.TabIndex = 2;
this.TrackButtonBCheckBox.Text = "BT-B";
this.TrackButtonBCheckBox.UseVisualStyleBackColor = true;
//
// TrackButtonACheckBox
//
this.TrackButtonACheckBox.AutoSize = true;
this.TrackButtonACheckBox.Checked = true;
this.TrackButtonACheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackButtonACheckBox.Location = new System.Drawing.Point(106, 19);
this.TrackButtonACheckBox.Name = "TrackButtonACheckBox";
this.TrackButtonACheckBox.Size = new System.Drawing.Size(50, 17);
this.TrackButtonACheckBox.TabIndex = 1;
this.TrackButtonACheckBox.Text = "BT-A";
this.TrackButtonACheckBox.UseVisualStyleBackColor = true;
//
// TrackVolLCheckBox
//
this.TrackVolLCheckBox.AutoSize = true;
this.TrackVolLCheckBox.Checked = true;
this.TrackVolLCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackVolLCheckBox.Location = new System.Drawing.Point(50, 19);
this.TrackVolLCheckBox.Name = "TrackVolLCheckBox";
this.TrackVolLCheckBox.Size = new System.Drawing.Size(50, 17);
this.TrackVolLCheckBox.TabIndex = 0;
this.TrackVolLCheckBox.Text = "Vol-L";
this.TrackVolLCheckBox.UseVisualStyleBackColor = true;
//
// SoundEffectGroupBox
//
this.SoundEffectGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.SoundEffectGroupBox.Controls.Add(this.SoundMappingButton);
this.SoundEffectGroupBox.Controls.Add(this.SoundEffectsCheckedListBox);
this.SoundEffectGroupBox.Location = new System.Drawing.Point(10, 121);
this.SoundEffectGroupBox.Name = "SoundEffectGroupBox";
this.SoundEffectGroupBox.Size = new System.Drawing.Size(212, 168);
this.SoundEffectGroupBox.TabIndex = 8;
this.SoundEffectGroupBox.TabStop = false;
//
// SoundMappingButton
//
this.SoundMappingButton.Location = new System.Drawing.Point(6, 134);
this.SoundMappingButton.Name = "SoundMappingButton";
this.SoundMappingButton.Size = new System.Drawing.Size(200, 28);
this.SoundMappingButton.TabIndex = 1;
this.SoundMappingButton.Text = "Configure Mappings..";
this.SoundMappingButton.UseVisualStyleBackColor = true;
this.SoundMappingButton.Click += new System.EventHandler(this.OnMappingButtonClick);
//
// SoundEffectsCheckedListBox
//
this.SoundEffectsCheckedListBox.BackColor = System.Drawing.SystemColors.Control;
this.SoundEffectsCheckedListBox.CheckOnClick = true;
this.SoundEffectsCheckedListBox.FormattingEnabled = true;
this.SoundEffectsCheckedListBox.Location = new System.Drawing.Point(6, 19);
this.SoundEffectsCheckedListBox.Name = "SoundEffectsCheckedListBox";
this.SoundEffectsCheckedListBox.ScrollAlwaysVisible = true;
this.SoundEffectsCheckedListBox.Size = new System.Drawing.Size(200, 109);
this.SoundEffectsCheckedListBox.TabIndex = 0;
this.SoundEffectsCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.OnSoundEffectsCheckedListBoxItemCheck);
// //
// VersionDropDown // VersionDropDown
// //
this.VersionDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.VersionDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
| System.Windows.Forms.AnchorStyles.Right)));
this.VersionDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.VersionDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.VersionDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VersionDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.VersionDropDown.FormattingEnabled = true; this.VersionDropDown.FormattingEnabled = true;
this.VersionDropDown.Items.AddRange(new object[] { this.VersionDropDown.Items.AddRange(new object[] { "Sound Voltex: Booth", "Sound Voltex II: Infinite Infection", "Sound Voltex III: Gravity Wars", "Sound Voltex IV: Heavenly Haven", "Sound Voltex V: Vivid Wave", "Sound Voltex VI: Exceed Gear" });
"Sound Voltex: Booth",
"Sound Voltex II: Infinite Infection",
"Sound Voltex III: Gravity Wars",
"Sound Voltex IV: Heavenly Haven",
"Sound Voltex V: VividWave"});
this.VersionDropDown.Location = new System.Drawing.Point(90, 42); this.VersionDropDown.Location = new System.Drawing.Point(90, 42);
this.VersionDropDown.Name = "VersionDropDown"; this.VersionDropDown.Name = "VersionDropDown";
this.VersionDropDown.Size = new System.Drawing.Size(247, 21); this.VersionDropDown.Size = new System.Drawing.Size(247, 21);
this.VersionDropDown.TabIndex = 19; this.VersionDropDown.TabIndex = 2;
// //
// InfVerDropDown // InfVerDropDown
// //
this.InfVerDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.InfVerDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.InfVerDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.InfVerDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.InfVerDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfVerDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.InfVerDropDown.FormattingEnabled = true; this.InfVerDropDown.FormattingEnabled = true;
this.InfVerDropDown.Items.AddRange(new object[] { this.InfVerDropDown.Items.AddRange(new object[] { "MXM", "INF", "GRV", "HVN", "VVD", "XCD" });
"MXM",
"INF",
"GRV",
"HVN",
"VVD"});
this.InfVerDropDown.Location = new System.Drawing.Point(343, 42); this.InfVerDropDown.Location = new System.Drawing.Point(343, 42);
this.InfVerDropDown.Name = "InfVerDropDown"; this.InfVerDropDown.Name = "InfVerDropDown";
this.InfVerDropDown.Size = new System.Drawing.Size(96, 21); this.InfVerDropDown.Size = new System.Drawing.Size(96, 21);
this.InfVerDropDown.TabIndex = 18; this.InfVerDropDown.TabIndex = 3;
this.InfVerDropDown.SelectedIndexChanged += new System.EventHandler(this.OnInfVerDropDownSelectedIndexChanged); this.InfVerDropDown.SelectedIndexChanged += new System.EventHandler(this.OnInfVerDropDownSelectedIndexChanged);
// //
// BackgroundDropDown // BackgroundDropDown
// //
this.BackgroundDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.BackgroundDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
| System.Windows.Forms.AnchorStyles.Right)));
this.BackgroundDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.BackgroundDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.BackgroundDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BackgroundDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BackgroundDropDown.FormattingEnabled = true; this.BackgroundDropDown.FormattingEnabled = true;
this.BackgroundDropDown.Items.AddRange(new object[] { this.BackgroundDropDown.Items.AddRange(new object[] { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "18", "19", "27", "29", "30", "31", "34", "36", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "53", "54", "57", "58", "59", "60", "61", "63", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "86", "87", "88", "89", "90", "91", "92", "93", "92", "95", "96", "97", "98" });
"00",
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"18",
"19",
"27",
"29",
"30",
"31",
"34",
"36",
"38",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
"46",
"47",
"48",
"49",
"50",
"51",
"53",
"54",
"57",
"58",
"59",
"60",
"61",
"63",
"65",
"66",
"67",
"68",
"69",
"70",
"71",
"72",
"73",
"74",
"75",
"76",
"77",
"78",
"79",
"80",
"81"});
this.BackgroundDropDown.Location = new System.Drawing.Point(90, 65); this.BackgroundDropDown.Location = new System.Drawing.Point(90, 65);
this.BackgroundDropDown.Name = "BackgroundDropDown"; this.BackgroundDropDown.Name = "BackgroundDropDown";
this.BackgroundDropDown.Size = new System.Drawing.Size(349, 21); this.BackgroundDropDown.Size = new System.Drawing.Size(349, 21);
this.BackgroundDropDown.TabIndex = 17; this.BackgroundDropDown.TabIndex = 4;
this.BackgroundDropDown.SelectedIndexChanged += new System.EventHandler(this.OnBackgroundDropDownSelectedIndexChanged); this.BackgroundDropDown.SelectedIndexChanged += new System.EventHandler(this.OnBackgroundDropDownSelectedIndexChanged);
// //
// BackgroundLabel // BackgroundLabel
@ -341,7 +477,7 @@
this.BackgroundLabel.Location = new System.Drawing.Point(10, 65); this.BackgroundLabel.Location = new System.Drawing.Point(10, 65);
this.BackgroundLabel.Name = "BackgroundLabel"; this.BackgroundLabel.Name = "BackgroundLabel";
this.BackgroundLabel.Size = new System.Drawing.Size(74, 20); this.BackgroundLabel.Size = new System.Drawing.Size(74, 20);
this.BackgroundLabel.TabIndex = 16; this.BackgroundLabel.TabIndex = 0;
this.BackgroundLabel.Text = "Background"; this.BackgroundLabel.Text = "Background";
this.BackgroundLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.BackgroundLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
@ -351,9 +487,9 @@
this.RealignOffsetCheckBox.AutoSize = true; this.RealignOffsetCheckBox.AutoSize = true;
this.RealignOffsetCheckBox.Location = new System.Drawing.Point(90, 91); this.RealignOffsetCheckBox.Location = new System.Drawing.Point(90, 91);
this.RealignOffsetCheckBox.Name = "RealignOffsetCheckBox"; this.RealignOffsetCheckBox.Name = "RealignOffsetCheckBox";
this.RealignOffsetCheckBox.Size = new System.Drawing.Size(141, 17); this.RealignOffsetCheckBox.Size = new System.Drawing.Size(195, 17);
this.RealignOffsetCheckBox.TabIndex = 15; this.RealignOffsetCheckBox.TabIndex = 5;
this.RealignOffsetCheckBox.Text = "Adapt Start Music Offset"; this.RealignOffsetCheckBox.Text = "Adapt Start Music Offset (Unstable!)";
this.RealignOffsetCheckBox.UseVisualStyleBackColor = true; this.RealignOffsetCheckBox.UseVisualStyleBackColor = true;
// //
// AsciiAutoCheckBox // AsciiAutoCheckBox
@ -361,10 +497,10 @@
this.AsciiAutoCheckBox.AutoSize = true; this.AsciiAutoCheckBox.AutoSize = true;
this.AsciiAutoCheckBox.Checked = true; this.AsciiAutoCheckBox.Checked = true;
this.AsciiAutoCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; this.AsciiAutoCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.AsciiAutoCheckBox.Location = new System.Drawing.Point(391, 23); this.AsciiAutoCheckBox.Location = new System.Drawing.Point(391, 21);
this.AsciiAutoCheckBox.Name = "AsciiAutoCheckBox"; this.AsciiAutoCheckBox.Name = "AsciiAutoCheckBox";
this.AsciiAutoCheckBox.Size = new System.Drawing.Size(48, 17); this.AsciiAutoCheckBox.Size = new System.Drawing.Size(48, 17);
this.AsciiAutoCheckBox.TabIndex = 14; this.AsciiAutoCheckBox.TabIndex = 1;
this.AsciiAutoCheckBox.Text = "Auto"; this.AsciiAutoCheckBox.Text = "Auto";
this.AsciiAutoCheckBox.UseVisualStyleBackColor = true; this.AsciiAutoCheckBox.UseVisualStyleBackColor = true;
this.AsciiAutoCheckBox.CheckedChanged += new System.EventHandler(this.OnAsciiAutoCheckBoxCheckedChanged); this.AsciiAutoCheckBox.CheckedChanged += new System.EventHandler(this.OnAsciiAutoCheckBoxCheckedChanged);
@ -375,76 +511,17 @@
this.InfVerLabel.Location = new System.Drawing.Point(10, 42); this.InfVerLabel.Location = new System.Drawing.Point(10, 42);
this.InfVerLabel.Name = "InfVerLabel"; this.InfVerLabel.Name = "InfVerLabel";
this.InfVerLabel.Size = new System.Drawing.Size(74, 20); this.InfVerLabel.Size = new System.Drawing.Size(74, 20);
this.InfVerLabel.TabIndex = 12; this.InfVerLabel.TabIndex = 0;
this.InfVerLabel.Text = "Version"; this.InfVerLabel.Text = "Version";
this.InfVerLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.InfVerLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// CameraCheckBox
//
this.CameraCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.CameraCheckBox.AutoSize = true;
this.CameraCheckBox.Checked = true;
this.CameraCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.CameraCheckBox.Location = new System.Drawing.Point(225, 114);
this.CameraCheckBox.Name = "CameraCheckBox";
this.CameraCheckBox.Size = new System.Drawing.Size(62, 17);
this.CameraCheckBox.TabIndex = 5;
this.CameraCheckBox.Text = "Camera";
this.CameraCheckBox.UseVisualStyleBackColor = true;
//
// TrackButtonCheckBox
//
this.TrackButtonCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.TrackButtonCheckBox.AutoSize = true;
this.TrackButtonCheckBox.Checked = true;
this.TrackButtonCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackButtonCheckBox.Location = new System.Drawing.Point(157, 137);
this.TrackButtonCheckBox.Name = "TrackButtonCheckBox";
this.TrackButtonCheckBox.Size = new System.Drawing.Size(62, 17);
this.TrackButtonCheckBox.TabIndex = 7;
this.TrackButtonCheckBox.Text = "Buttons";
this.TrackButtonCheckBox.UseVisualStyleBackColor = true;
//
// TrackLaserCheckBox
//
this.TrackLaserCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.TrackLaserCheckBox.AutoSize = true;
this.TrackLaserCheckBox.Checked = true;
this.TrackLaserCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.TrackLaserCheckBox.Location = new System.Drawing.Point(90, 137);
this.TrackLaserCheckBox.Name = "TrackLaserCheckBox";
this.TrackLaserCheckBox.Size = new System.Drawing.Size(57, 17);
this.TrackLaserCheckBox.TabIndex = 6;
this.TrackLaserCheckBox.Text = "Lasers";
this.TrackLaserCheckBox.UseVisualStyleBackColor = true;
//
// TrackLabel
//
this.TrackLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.TrackLabel.Location = new System.Drawing.Point(10, 134);
this.TrackLabel.Name = "TrackLabel";
this.TrackLabel.Size = new System.Drawing.Size(74, 20);
this.TrackLabel.TabIndex = 11;
this.TrackLabel.Text = "Tracks";
this.TrackLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// EffectsLabel
//
this.EffectsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.EffectsLabel.Location = new System.Drawing.Point(10, 111);
this.EffectsLabel.Name = "EffectsLabel";
this.EffectsLabel.Size = new System.Drawing.Size(74, 20);
this.EffectsLabel.TabIndex = 10;
this.EffectsLabel.Text = "Effects";
this.EffectsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// MeasureLabel // MeasureLabel
// //
this.MeasureLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.MeasureLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MeasureLabel.Location = new System.Drawing.Point(10, 88); this.MeasureLabel.Location = new System.Drawing.Point(10, 88);
this.MeasureLabel.Name = "MeasureLabel"; this.MeasureLabel.Name = "MeasureLabel";
this.MeasureLabel.Size = new System.Drawing.Size(74, 20); this.MeasureLabel.Size = new System.Drawing.Size(74, 20);
this.MeasureLabel.TabIndex = 6; this.MeasureLabel.TabIndex = 0;
this.MeasureLabel.Text = "Offset"; this.MeasureLabel.Text = "Offset";
this.MeasureLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.MeasureLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
@ -456,32 +533,6 @@
this.AsciiTextBox.Size = new System.Drawing.Size(295, 20); this.AsciiTextBox.Size = new System.Drawing.Size(295, 20);
this.AsciiTextBox.TabIndex = 0; this.AsciiTextBox.TabIndex = 0;
// //
// LongFxCheckBox
//
this.LongFxCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.LongFxCheckBox.AutoSize = true;
this.LongFxCheckBox.Checked = true;
this.LongFxCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.LongFxCheckBox.Location = new System.Drawing.Point(157, 114);
this.LongFxCheckBox.Name = "LongFxCheckBox";
this.LongFxCheckBox.Size = new System.Drawing.Size(64, 17);
this.LongFxCheckBox.TabIndex = 4;
this.LongFxCheckBox.Text = "Long Fx";
this.LongFxCheckBox.UseVisualStyleBackColor = true;
//
// ChipFxCheckBox
//
this.ChipFxCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ChipFxCheckBox.AutoSize = true;
this.ChipFxCheckBox.Checked = true;
this.ChipFxCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChipFxCheckBox.Location = new System.Drawing.Point(90, 114);
this.ChipFxCheckBox.Name = "ChipFxCheckBox";
this.ChipFxCheckBox.Size = new System.Drawing.Size(61, 17);
this.ChipFxCheckBox.TabIndex = 3;
this.ChipFxCheckBox.Text = "Chip Fx";
this.ChipFxCheckBox.UseVisualStyleBackColor = true;
//
// MusicCodeLabel // MusicCodeLabel
// //
this.MusicCodeLabel.Location = new System.Drawing.Point(10, 19); this.MusicCodeLabel.Location = new System.Drawing.Point(10, 19);
@ -495,10 +546,10 @@
// //
this.CancelConvertButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.CancelConvertButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelConvertButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelConvertButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelConvertButton.Location = new System.Drawing.Point(343, 401); this.CancelConvertButton.Location = new System.Drawing.Point(343, 687);
this.CancelConvertButton.Name = "CancelConvertButton"; this.CancelConvertButton.Name = "CancelConvertButton";
this.CancelConvertButton.Size = new System.Drawing.Size(116, 28); this.CancelConvertButton.Size = new System.Drawing.Size(116, 28);
this.CancelConvertButton.TabIndex = 20; this.CancelConvertButton.TabIndex = 4;
this.CancelConvertButton.Text = "Cancel"; this.CancelConvertButton.Text = "Cancel";
this.CancelConvertButton.UseVisualStyleBackColor = true; this.CancelConvertButton.UseVisualStyleBackColor = true;
this.CancelConvertButton.Click += new System.EventHandler(this.OnCancelConvertButtonClick); this.CancelConvertButton.Click += new System.EventHandler(this.OnCancelConvertButtonClick);
@ -506,10 +557,10 @@
// ProcessConvertButton // ProcessConvertButton
// //
this.ProcessConvertButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.ProcessConvertButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.ProcessConvertButton.Location = new System.Drawing.Point(221, 401); this.ProcessConvertButton.Location = new System.Drawing.Point(221, 687);
this.ProcessConvertButton.Name = "ProcessConvertButton"; this.ProcessConvertButton.Name = "ProcessConvertButton";
this.ProcessConvertButton.Size = new System.Drawing.Size(116, 28); this.ProcessConvertButton.Size = new System.Drawing.Size(116, 28);
this.ProcessConvertButton.TabIndex = 19; this.ProcessConvertButton.TabIndex = 3;
this.ProcessConvertButton.Text = "Continue"; this.ProcessConvertButton.Text = "Continue";
this.ProcessConvertButton.UseVisualStyleBackColor = true; this.ProcessConvertButton.UseVisualStyleBackColor = true;
this.ProcessConvertButton.Click += new System.EventHandler(this.OnProcessConvertButtonClick); this.ProcessConvertButton.Click += new System.EventHandler(this.OnProcessConvertButtonClick);
@ -524,13 +575,68 @@
this.TargetLabel.Text = "Target"; this.TargetLabel.Text = "Target";
this.TargetLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.TargetLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// MusicGroupBox
//
this.MusicGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.MusicGroupBox.Controls.Add(this.FormatLabel);
this.MusicGroupBox.Controls.Add(this.PreviewTimePicker);
this.MusicGroupBox.Controls.Add(this.MusicFormatDropDown);
this.MusicGroupBox.Controls.Add(this.PreviewOffsetLabel);
this.MusicGroupBox.Location = new System.Drawing.Point(12, 593);
this.MusicGroupBox.Name = "MusicGroupBox";
this.MusicGroupBox.Size = new System.Drawing.Size(447, 76);
this.MusicGroupBox.TabIndex = 22;
this.MusicGroupBox.TabStop = false;
this.MusicGroupBox.Text = "Music Format && Converter";
//
// FormatLabel
//
this.FormatLabel.Location = new System.Drawing.Point(7, 20);
this.FormatLabel.Name = "FormatLabel";
this.FormatLabel.Size = new System.Drawing.Size(110, 20);
this.FormatLabel.TabIndex = 23;
this.FormatLabel.Text = "Format";
this.FormatLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// PreviewTimePicker
//
this.PreviewTimePicker.CustomFormat = "mm:ss";
this.PreviewTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.PreviewTimePicker.Location = new System.Drawing.Point(122, 45);
this.PreviewTimePicker.Name = "PreviewTimePicker";
this.PreviewTimePicker.ShowUpDown = true;
this.PreviewTimePicker.Size = new System.Drawing.Size(315, 20);
this.PreviewTimePicker.TabIndex = 23;
this.PreviewTimePicker.ValueChanged += new System.EventHandler(this.OnPreviewTimePickerValueChanged);
//
// MusicFormatDropDown
//
this.MusicFormatDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.MusicFormatDropDown.FormattingEnabled = true;
this.MusicFormatDropDown.Items.AddRange(new object[] { "Legacy Format (.2dx)" });
this.MusicFormatDropDown.Location = new System.Drawing.Point(122, 19);
this.MusicFormatDropDown.Name = "MusicFormatDropDown";
this.MusicFormatDropDown.Size = new System.Drawing.Size(316, 21);
this.MusicFormatDropDown.TabIndex = 0;
this.MusicFormatDropDown.SelectedIndexChanged += new System.EventHandler(this.OnMusicFormatDropDownSelectedIndexChanged);
//
// PreviewOffsetLabel
//
this.PreviewOffsetLabel.Location = new System.Drawing.Point(7, 45);
this.PreviewOffsetLabel.Name = "PreviewOffsetLabel";
this.PreviewOffsetLabel.Size = new System.Drawing.Size(110, 20);
this.PreviewOffsetLabel.TabIndex = 8;
this.PreviewOffsetLabel.Text = "Preview TimeStamp";
this.PreviewOffsetLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ConverterForm // ConverterForm
// //
this.AcceptButton = this.ProcessConvertButton; this.AcceptButton = this.ProcessConvertButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelConvertButton; this.CancelButton = this.CancelConvertButton;
this.ClientSize = new System.Drawing.Size(471, 441); this.ClientSize = new System.Drawing.Size(471, 724);
this.Controls.Add(this.MusicGroupBox);
this.Controls.Add(this.TargetLabel); this.Controls.Add(this.TargetLabel);
this.Controls.Add(this.CancelConvertButton); this.Controls.Add(this.CancelConvertButton);
this.Controls.Add(this.ProcessConvertButton); this.Controls.Add(this.ProcessConvertButton);
@ -553,11 +659,46 @@
((System.ComponentModel.ISupportInitialize)(this.JacketNovPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketNovPictureBox)).EndInit();
this.OptionsGroupBox.ResumeLayout(false); this.OptionsGroupBox.ResumeLayout(false);
this.OptionsGroupBox.PerformLayout(); this.OptionsGroupBox.PerformLayout();
this.CameraEffectsGroupBox.ResumeLayout(false);
this.TracksGroupBox.ResumeLayout(false);
this.TracksGroupBox.PerformLayout();
this.SoundEffectGroupBox.ResumeLayout(false);
this.MusicGroupBox.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.Label FormatLabel;
private System.Windows.Forms.CheckBox TrackFXLCheckBox;
private System.Windows.Forms.CheckBox TrackFXRCheckBox;
private System.Windows.Forms.DateTimePicker PreviewTimePicker;
private System.Windows.Forms.Label PreviewOffsetLabel;
private System.Windows.Forms.CheckBox SoundEffectsCheckBox;
private System.Windows.Forms.CheckedListBox SoundEffectsCheckedListBox;
private System.Windows.Forms.Button SoundMappingButton;
private System.Windows.Forms.GroupBox MusicGroupBox;
private System.Windows.Forms.ComboBox MusicFormatDropDown;
private System.Windows.Forms.CheckBox CameraEffectsCheckBox;
private System.Windows.Forms.Button CameraMappingButton;
private System.Windows.Forms.CheckedListBox CameraEffectsCheckedListBox;
private System.Windows.Forms.CheckBox TrackButtonBCheckBox;
private System.Windows.Forms.CheckBox TrackButtonCCheckBox;
private System.Windows.Forms.CheckBox TrackButtonDCheckBox;
private System.Windows.Forms.CheckBox TrackVolRCheckBox;
private System.Windows.Forms.GroupBox CameraEffectsGroupBox;
private System.Windows.Forms.GroupBox SoundEffectGroupBox;
private System.Windows.Forms.GroupBox TracksGroupBox;
#endregion #endregion
private System.Windows.Forms.GroupBox LevelGroupBox; private System.Windows.Forms.GroupBox LevelGroupBox;
@ -571,16 +712,11 @@
private System.Windows.Forms.PictureBox JacketNovPictureBox; private System.Windows.Forms.PictureBox JacketNovPictureBox;
private System.Windows.Forms.TextBox PathTextBox; private System.Windows.Forms.TextBox PathTextBox;
private System.Windows.Forms.GroupBox OptionsGroupBox; private System.Windows.Forms.GroupBox OptionsGroupBox;
private System.Windows.Forms.CheckBox LongFxCheckBox;
private System.Windows.Forms.CheckBox ChipFxCheckBox;
private System.Windows.Forms.Label MusicCodeLabel; private System.Windows.Forms.Label MusicCodeLabel;
private System.Windows.Forms.Label MeasureLabel; private System.Windows.Forms.Label MeasureLabel;
private System.Windows.Forms.TextBox AsciiTextBox; private System.Windows.Forms.TextBox AsciiTextBox;
private System.Windows.Forms.CheckBox CameraCheckBox; private System.Windows.Forms.CheckBox TrackButtonACheckBox;
private System.Windows.Forms.CheckBox TrackButtonCheckBox; private System.Windows.Forms.CheckBox TrackVolLCheckBox;
private System.Windows.Forms.CheckBox TrackLaserCheckBox;
private System.Windows.Forms.Label TrackLabel;
private System.Windows.Forms.Label EffectsLabel;
private System.Windows.Forms.Label InfVerLabel; private System.Windows.Forms.Label InfVerLabel;
private System.Windows.Forms.CheckBox AsciiAutoCheckBox; private System.Windows.Forms.CheckBox AsciiAutoCheckBox;
private System.Windows.Forms.Button CancelConvertButton; private System.Windows.Forms.Button CancelConvertButton;
@ -591,6 +727,5 @@
private System.Windows.Forms.ComboBox InfVerDropDown; private System.Windows.Forms.ComboBox InfVerDropDown;
private System.Windows.Forms.ComboBox VersionDropDown; private System.Windows.Forms.ComboBox VersionDropDown;
private System.Windows.Forms.Label TargetLabel; private System.Windows.Forms.Label TargetLabel;
private System.Windows.Forms.CheckBox SlamImpactCheckBox;
} }
} }

View File

@ -1,13 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using System.Diagnostics; using System.Diagnostics;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace VoxCharger namespace VoxCharger
{ {
@ -21,14 +20,98 @@ namespace VoxCharger
public partial class ConverterForm : Form public partial class ConverterForm : Form
{ {
private readonly Image DummyJacket = VoxCharger.Properties.Resources.jk_dummy_s; private enum SoundFxType
public static string LastBackground { get; private set; } = "63"; {
Chip,
Long,
Laser
}
private string target; private class CameraEffectOption
private string defaultAscii; {
private ConvertMode mode; public Camera.WorkType Work { get; set; }
private Dictionary<Difficulty, ChartInfo> charts = new Dictionary<Difficulty, ChartInfo>(); public bool SlamImpact { get; set; } = false;
private Ksh.Exporter exporter; public string Name { get; set; }
public override string ToString()
{
return Name;
}
}
private class SoundFxOption
{
public SoundFxType Type { get; set; }
public string Name { get; set; }
public override string ToString()
{
return Name;
}
}
private static readonly Image DummyJacket = VoxCharger.Properties.Resources.jk_dummy_s;
public static string LastBackground { get; private set; } = "88";
private readonly CameraEffectOption[] _cameraOptions =
{
new CameraEffectOption
{
Work = Camera.WorkType.Realize,
Name = "Realize"
},
new CameraEffectOption
{
Work = Camera.WorkType.Rotation,
Name = "CAM_RotX"
},
new CameraEffectOption
{
Work = Camera.WorkType.Radian,
Name = "CAM_Radian"
},
new CameraEffectOption
{
Work = Camera.WorkType.Tilt,
Name = "Tilt / Tilt Mode"
},
new CameraEffectOption
{
Work = Camera.WorkType.LaneClear,
Name = "LaneY"
},
new CameraEffectOption
{
SlamImpact = true,
Name = "Slam Impact"
},
};
private readonly SoundFxOption[] _sfxOptions =
{
new SoundFxOption
{
Type = SoundFxType.Chip,
Name = "Chip"
},
new SoundFxOption
{
Type = SoundFxType.Long,
Name = "Long"
},
new SoundFxOption
{
Type = SoundFxType.Laser,
Name = "Laser"
}
};
private string _target;
private string _defaultAscii;
private ConvertMode _mode;
private Dictionary<Difficulty, ChartInfo> _charts = new Dictionary<Difficulty, ChartInfo>();
private Ksh.Exporter _exporter;
private bool _updatingAllEffects = false;
public VoxHeader Result { get; private set; } = null; public VoxHeader Result { get; private set; } = null;
public VoxHeader[] ResultSet { get; private set; } = new VoxHeader[0]; public VoxHeader[] ResultSet { get; private set; } = new VoxHeader[0];
@ -40,89 +123,102 @@ namespace VoxCharger
{ {
InitializeComponent(); InitializeComponent();
target = path; _target = path;
mode = convert; _mode = convert;
foreach (var camOpt in _cameraOptions)
CameraEffectsCheckedListBox.Items.Add(camOpt, camOpt.Work == Camera.WorkType.Realize ? CheckState.Indeterminate : CheckState.Checked);
foreach (var sfxOpt in _sfxOptions)
SoundEffectsCheckedListBox.Items.Add(sfxOpt, true);
// Cancerous code to adjust layout depending what this form going to be // Cancerous code to adjust layout depending what this form going to be
if (mode == ConvertMode.Converter) if (_mode == ConvertMode.Converter)
{ {
MusicCodeLabel.Visible = false; MusicCodeLabel.Visible = false;
InfVerLabel.Visible = false; InfVerLabel.Visible = false;
BackgroundLabel.Visible = false; BackgroundLabel.Visible = false;
BackgroundDropDown.Enabled = BackgroundDropDown.Visible = false;
MusicGroupBox.Enabled = MusicGroupBox.Visible = false;
LevelGroupBox.Enabled = LevelGroupBox.Visible = false; LevelGroupBox.Enabled = LevelGroupBox.Visible = false;
AsciiTextBox.Enabled = AsciiTextBox.Visible = false; AsciiTextBox.Enabled = AsciiTextBox.Visible = false;
AsciiAutoCheckBox.Enabled = AsciiAutoCheckBox.Visible = false; AsciiAutoCheckBox.Enabled = AsciiAutoCheckBox.Visible = false;
VersionDropDown.Enabled = VersionDropDown.Visible = false; VersionDropDown.Enabled = VersionDropDown.Visible = false;
InfVerDropDown.Enabled = InfVerDropDown.Visible = false; InfVerDropDown.Enabled = InfVerDropDown.Visible = false;
BackgroundDropDown.Enabled = BackgroundDropDown.Visible = false;
int componentHeight = AsciiTextBox.Height + VersionDropDown.Height + BackgroundDropDown.Height; int componentHeight = AsciiTextBox.Height + VersionDropDown.Height + BackgroundDropDown.Height;
OptionsGroupBox.Location = LevelGroupBox.Location; OptionsGroupBox.Location = LevelGroupBox.Location;
OptionsGroupBox.Height -= componentHeight; OptionsGroupBox.Height -= componentHeight;
Height -= LevelGroupBox.Height + componentHeight; Height -= LevelGroupBox.Height + componentHeight + MusicGroupBox.Height;
Text = "Convert Music";
ProcessConvertButton.Text = "Convert"; ProcessConvertButton.Text = "Convert";
PathTextBox.Text = target; PathTextBox.Text = _target;
return; return;
} }
else if (mode == ConvertMode.BulkImporter) else if (_mode == ConvertMode.BulkImporter)
{ {
MusicCodeLabel.Visible = false; MusicCodeLabel.Visible = false;
LevelGroupBox.Enabled = LevelGroupBox.Visible = false; LevelGroupBox.Enabled = LevelGroupBox.Visible = false;
AsciiTextBox.Enabled = AsciiTextBox.Visible = false; AsciiTextBox.Enabled = AsciiTextBox.Visible = false;
AsciiAutoCheckBox.Enabled = AsciiAutoCheckBox.Visible = false; AsciiAutoCheckBox.Enabled = AsciiAutoCheckBox.Visible = false;
MusicGroupBox.Enabled = MusicGroupBox.Visible = false;
int componentHeight = AsciiTextBox.Height; int componentHeight = AsciiTextBox.Height;
OptionsGroupBox.Location = LevelGroupBox.Location; OptionsGroupBox.Location = LevelGroupBox.Location;
OptionsGroupBox.Height -= componentHeight; OptionsGroupBox.Height -= componentHeight;
Height -= LevelGroupBox.Height + componentHeight; Height -= LevelGroupBox.Height + MusicGroupBox.Height + componentHeight;
} }
PathTextBox.Text = target; MusicGroupBox.Anchor = AnchorStyles.Top | AnchorStyles.Left;
PreviewTimePicker.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, 0, 0);
MusicFormatDropDown.SelectedIndex = 0;
MusicFormatDropDown.Enabled = false;
PathTextBox.Text = _target;
BackgroundDropDown.SelectedItem = LastBackground; BackgroundDropDown.SelectedItem = LastBackground;
VersionDropDown.SelectedIndex = 4; VersionDropDown.SelectedIndex = 5;
InfVerDropDown.SelectedIndex = 0; InfVerDropDown.SelectedIndex = 0;
ProcessConvertButton.Text = "Add"; ProcessConvertButton.Text = "Add";
} }
private void OnConverterFormLoad(object sender, EventArgs e) private void OnConverterFormLoad(object sender, EventArgs e)
{ {
if (mode != ConvertMode.Importer) if (_mode != ConvertMode.Importer)
return; return;
try try
{ {
var main = new Ksh(); var main = new Ksh();
main.Parse(target); main.Parse(_target);
Result = main.ToHeader(); Result = main.ToHeader();
Result.ID = AssetManager.GetNextMusicID(); Result.Id = AssetManager.GetNextMusicId();
Result.Ascii = defaultAscii = AsciiTextBox.Text = Path.GetFileName(Path.GetDirectoryName(target)); Result.Ascii = _defaultAscii = AsciiTextBox.Text = Path.GetFileName(Path.GetDirectoryName(_target));
exporter = new Ksh.Exporter(main); _exporter = new Ksh.Exporter(main);
for (int i = 1; Directory.Exists(AssetManager.GetMusicPath(Result)); i++) for (int i = 1; Directory.Exists(AssetManager.GetMusicPath(Result)); i++)
{ {
if (i >= 100) if (i >= 100)
break; // seriously? stupid input get stupid output break; // seriously? stupid input get stupid output
Result.Ascii = $"{defaultAscii}{i:D2}"; Result.Ascii = $"{_defaultAscii}{i:D2}";
} }
defaultAscii = AsciiTextBox.Text = Result.Ascii; _defaultAscii = AsciiTextBox.Text = Result.Ascii;
charts[main.Difficulty] = new ChartInfo(main, main.ToLevelHeader(), target); _charts[main.Difficulty] = new ChartInfo(main, main.ToLevelHeader(), _target);
LoadJacket(charts[main.Difficulty]); LoadJacket(_charts[main.Difficulty]);
// Try to locate another difficulty // Try to locate another difficulty
foreach (var lv in Ksh.Exporter.GetCharts(Path.GetDirectoryName(target), main.Title)) foreach (var lv in Ksh.Exporter.GetCharts(Path.GetDirectoryName(_target), main.Title))
{ {
// Don't replace main file, there might 2 files with similar meta or another stupid cases // Don't replace main file, there might 2 files with similar meta or another stupid cases
if (lv.Key != main.Difficulty) if (lv.Key != main.Difficulty)
charts[lv.Key] = lv.Value; _charts[lv.Key] = lv.Value;
} }
UpdateUI(); UpdateLevels();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -142,7 +238,7 @@ namespace VoxCharger
{ {
AsciiTextBox.ReadOnly = AsciiAutoCheckBox.Checked; AsciiTextBox.ReadOnly = AsciiAutoCheckBox.Checked;
if (AsciiTextBox.ReadOnly) if (AsciiTextBox.ReadOnly)
AsciiTextBox.Text = defaultAscii; AsciiTextBox.Text = _defaultAscii;
} }
private void OnBackgroundDropDownSelectedIndexChanged(object sender, EventArgs e) private void OnBackgroundDropDownSelectedIndexChanged(object sender, EventArgs e)
@ -152,7 +248,7 @@ namespace VoxCharger
private void OnInfVerDropDownSelectedIndexChanged(object sender, EventArgs e) private void OnInfVerDropDownSelectedIndexChanged(object sender, EventArgs e)
{ {
if (!charts.ContainsKey(Difficulty.Infinite)) if (!_charts.ContainsKey(Difficulty.Infinite))
InfEditButton.Text = "--"; InfEditButton.Text = "--";
else else
InfEditButton.Text = InfVerDropDown.SelectedItem.ToString(); InfEditButton.Text = InfVerDropDown.SelectedItem.ToString();
@ -178,8 +274,8 @@ namespace VoxCharger
chart.Parse(browser.FileName); chart.Parse(browser.FileName);
chart.Difficulty = diff; // make sure to replace diff chart.Difficulty = diff; // make sure to replace diff
charts[diff] = new ChartInfo(chart, chart.ToLevelHeader(), browser.FileName); _charts[diff] = new ChartInfo(chart, chart.ToLevelHeader(), browser.FileName);
UpdateUI(); UpdateLevels();
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -193,6 +289,108 @@ namespace VoxCharger
} }
} }
private void OnSoundEffectsCheckBoxCheckedChanged(object sender, EventArgs e)
{
if (SoundEffectsCheckBox.CheckState == CheckState.Indeterminate)
return;
_updatingAllEffects = true;
for (int i = 0; i < SoundEffectsCheckedListBox.Items.Count; i++)
{
if (SoundEffectsCheckedListBox.GetItemCheckState(i) == CheckState.Indeterminate)
continue;
SoundEffectsCheckedListBox.SetItemChecked(i, SoundEffectsCheckBox.Checked);
}
_updatingAllEffects = false;
}
private void OnCameraEffectsCheckBoxCheckedChanged(object sender, EventArgs e)
{
if (CameraEffectsCheckBox.CheckState == CheckState.Indeterminate)
return;
_updatingAllEffects = true;
for (int i = 0; i < CameraEffectsCheckedListBox.Items.Count; i++)
{
if (CameraEffectsCheckedListBox.GetItemCheckState(i) == CheckState.Indeterminate)
continue;
CameraEffectsCheckedListBox.SetItemChecked(i, CameraEffectsCheckBox.Checked);
}
_updatingAllEffects = false;
}
private void OnSoundEffectsCheckedListBoxItemCheck(object sender, ItemCheckEventArgs e)
{
if (_updatingAllEffects || e.CurrentValue == CheckState.Indeterminate)
return;
bool value = e.NewValue == CheckState.Checked || e.NewValue == CheckState.Indeterminate;
for (int i = 0; i < SoundEffectsCheckedListBox.Items.Count; i++)
{
if (i != e.Index && SoundEffectsCheckedListBox.GetItemChecked(i) != value)
{
SoundEffectsCheckBox.CheckState = CheckState.Indeterminate;
return;
}
}
SoundEffectsCheckBox.CheckState = value ? CheckState.Checked : CheckState.Unchecked;
}
private void OnCameraEffectsCheckedListBoxItemCheck(object sender, ItemCheckEventArgs e)
{
if (_updatingAllEffects || e.CurrentValue == CheckState.Indeterminate)
{
if (e.CurrentValue == CheckState.Indeterminate)
e.NewValue = CheckState.Indeterminate;
return;
}
bool value = e.NewValue == CheckState.Checked || e.NewValue == CheckState.Indeterminate;
for (int i = 0; i < CameraEffectsCheckedListBox.Items.Count; i++)
{
if (i != e.Index && CameraEffectsCheckedListBox.GetItemChecked(i) != value)
{
CameraEffectsCheckBox.CheckState = CheckState.Indeterminate;
return;
}
}
CameraEffectsCheckBox.CheckState = value ? CheckState.Checked : CheckState.Unchecked;
}
private void OnMappingButtonClick(object sender, EventArgs e)
{
MessageBox.Show("Custom mapping for Sound & Camera Effects is not supported (yet).",
"Coming Soon™", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void OnMusicFormatDropDownSelectedIndexChanged(object sender, EventArgs e)
{
// Not Implemented
}
private void OnBrowseMainToolButtonClick(object sender, EventArgs e)
{
}
private void OnBrowseSecondaryToolButtonClick(object sender, EventArgs e)
{
using (var browser = new OpenFileDialog())
{
browser.Filter = $"{PreviewOffsetLabel.Text.Replace(".exe", string.Empty)} | {PreviewOffsetLabel.Text}";
browser.CheckFileExists = true;
browser.Title = "Browse Converter";
}
}
private void OnHelpButtonClicked(object sender, CancelEventArgs e) private void OnHelpButtonClicked(object sender, CancelEventArgs e)
{ {
e.Cancel = true; e.Cancel = true;
@ -208,19 +406,54 @@ namespace VoxCharger
private void OnProcessConvertButtonClick(object sender, EventArgs e) private void OnProcessConvertButtonClick(object sender, EventArgs e)
{ {
Options = new Ksh.ParseOption() bool slamImpact = true;
var cameraOpts = new Dictionary<Camera.WorkType, bool>();
for (int i = 0; i < CameraEffectsCheckedListBox.Items.Count; i++)
{
if (!(CameraEffectsCheckedListBox.Items[i] is CameraEffectOption opt))
continue;
if (opt.SlamImpact)
slamImpact = CameraEffectsCheckedListBox.GetItemChecked(i);
else
cameraOpts[opt.Work] = CameraEffectsCheckedListBox.GetItemChecked(i);
}
Options = new Ksh.ParseOption
{ {
RealignOffset = RealignOffsetCheckBox.Checked, RealignOffset = RealignOffsetCheckBox.Checked,
EnableChipFx = ChipFxCheckBox.Checked, Camera = new Ksh.ParseOption.CameraOptions
EnableLongFx = LongFxCheckBox.Checked, {
EnableCamera = CameraCheckBox.Checked, SlamImpact = slamImpact,
EnableSlamImpact = SlamImpactCheckBox.Checked, EnabledWorks = cameraOpts
EnableLaserTrack = TrackLaserCheckBox.Checked, },
EnableButtonTrack = TrackButtonCheckBox.Checked SoundFx = new Ksh.ParseOption.SoundFxOptions
{
Chip = SoundEffectsCheckedListBox.GetItemChecked(0),
Long = SoundEffectsCheckedListBox.GetItemChecked(1),
Laser = SoundEffectsCheckedListBox.GetItemChecked(2),
},
Track = new Ksh.ParseOption.TrackOptions
{
EnabledLaserTracks = new Dictionary<Event.LaserTrack, bool>
{
{ Event.LaserTrack.Left, TrackVolLCheckBox.Checked },
{ Event.LaserTrack.Right, TrackVolRCheckBox.Checked }
},
EnabledButtonTracks = new Dictionary<Event.ButtonTrack, bool>
{
{ Event.ButtonTrack.A, TrackButtonACheckBox.Checked },
{ Event.ButtonTrack.B, TrackButtonBCheckBox.Checked },
{ Event.ButtonTrack.C, TrackButtonCCheckBox.Checked },
{ Event.ButtonTrack.D, TrackButtonDCheckBox.Checked },
{ Event.ButtonTrack.FxL, TrackFXLCheckBox.Checked },
{ Event.ButtonTrack.FxR, TrackFXRCheckBox.Checked }
}
}
}; };
// Act as converter // Act as converter
switch (mode) switch (_mode)
{ {
case ConvertMode.Converter: SingleConvert(); break; case ConvertMode.Converter: SingleConvert(); break;
case ConvertMode.BulkConverter: BulkConvert(); break; case ConvertMode.BulkConverter: BulkConvert(); break;
@ -231,17 +464,18 @@ namespace VoxCharger
private void SingleImport() private void SingleImport()
{ {
try try
{ {
// Assign metadata // Assign metadata
Result.Ascii = AsciiTextBox.Text; Result.Ascii = AsciiTextBox.Text;
Result.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]); Result.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]);
Result.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1); Result.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1);
Result.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.MXM : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1); Result.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.Mxm : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1);
Result.GenreId = 16; Result.GenreId = 16;
Result.Levels = new Dictionary<Difficulty, VoxLevelHeader>(); Result.Levels = new Dictionary<Difficulty, VoxLevelHeader>();
if (Result.BpmMin != Result.BpmMax && exporter.Source.MusicOffset % 48 != 0 && Options.RealignOffset) if (Result.BpmMin != Result.BpmMax && _exporter.Source.MusicOffset % 48 != 0 && Options.RealignOffset)
{ {
// You've been warned! // You've been warned!
var prompt = MessageBox.Show( var prompt = MessageBox.Show(
@ -259,7 +493,7 @@ namespace VoxCharger
if (Directory.Exists(AssetManager.GetMusicPath(Result)) || AssetManager.Headers.Any(h => h.Ascii == Result.Ascii)) if (Directory.Exists(AssetManager.GetMusicPath(Result)) || AssetManager.Headers.Any(h => h.Ascii == Result.Ascii))
{ {
MessageBox.Show( MessageBox.Show(
$"Music Code {Result.CodeName} is already taken.", $"Music Code {Result.CodeName} is already taken.\nTry configure \"Music Code\" manually.",
"Error", "Error",
MessageBoxButtons.OK, MessageBoxButtons.OK,
MessageBoxIcon.Error MessageBoxIcon.Error
@ -268,8 +502,14 @@ namespace VoxCharger
return; return;
} }
exporter.Export(Result, charts, Options); var importOptions = new AudioImportOptions
Action = exporter.Action; {
Format = AudioFormat.Iidx,
PreviewOffset = PreviewTimePicker.Value.Minute * 60 + PreviewTimePicker.Value.Second
};
_exporter.Export(Result, _charts, Options, importOptions);
Action = _exporter.Action;
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
Close(); Close();
@ -284,14 +524,14 @@ namespace VoxCharger
); );
// Eliminate non-existent files // Eliminate non-existent files
foreach (var chart in charts.Values.ToArray()) foreach (var chart in _charts.Values.ToArray())
{ {
if (!File.Exists(chart.FileName)) if (!File.Exists(chart.FileName))
charts.Remove(chart.Header.Difficulty); _charts.Remove(chart.Header.Difficulty);
} }
// Reload jacket // Reload jacket
UpdateUI(); UpdateLevels();
} }
} }
@ -302,14 +542,14 @@ namespace VoxCharger
var errors = new List<string>(); var errors = new List<string>();
using (var loader = new LoadingForm()) using (var loader = new LoadingForm())
{ {
var action = new Action(() => loader.SetAction(dialog =>
{ {
var directories = Directory.GetDirectories(target); var directories = Directory.GetDirectories(_target);
int current = 0; int current = 0;
foreach (string dir in directories) foreach (string dir in directories)
{ {
loader.SetStatus($"Processing {Path.GetFileName(dir)}.."); dialog.SetStatus($"Processing {Path.GetFileName(dir)}..");
loader.SetProgress((current + 1 / (float)directories.Length) * 100f); dialog.SetProgress((current + 1 / (float)directories.Length) * 100f);
var files = Directory.GetFiles(dir, "*.ksh"); var files = Directory.GetFiles(dir, "*.ksh");
if (files.Length == 0) if (files.Length == 0)
@ -323,10 +563,10 @@ namespace VoxCharger
ksh.Parse(fn, Options); ksh.Parse(fn, Options);
var header = ksh.ToHeader(); var header = ksh.ToHeader();
header.ID = AssetManager.GetNextMusicID() + current++; header.Id = AssetManager.GetNextMusicId() + current++;
header.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]); header.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]);
header.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1); header.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1);
header.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.MXM : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1); header.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.Mxm : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1);
header.GenreId = 16; header.GenreId = 16;
header.Levels = new Dictionary<Difficulty, VoxLevelHeader>(); header.Levels = new Dictionary<Difficulty, VoxLevelHeader>();
@ -352,15 +592,12 @@ namespace VoxCharger
string err = $"Failed attempt to convert ksh file: {Path.GetFileName(fn)} ({ex.Message})"; string err = $"Failed attempt to convert ksh file: {Path.GetFileName(fn)} ({ex.Message})";
errors.Add(err); errors.Add(err);
Debug.WriteLine(err); Debug.WriteLine(err);
continue;
} }
} }
loader.Complete(); dialog.Complete();
}); });
loader.SetAction(action);
loader.ShowDialog(); loader.ShowDialog();
} }
@ -397,7 +634,7 @@ namespace VoxCharger
return; return;
var ksh = new Ksh(); var ksh = new Ksh();
ksh.Parse(target, Options); ksh.Parse(_target, Options);
var vox = new VoxChart(); var vox = new VoxChart();
vox.Import(ksh); vox.Import(ksh);
@ -428,29 +665,32 @@ namespace VoxCharger
private void BulkConvert() private void BulkConvert()
{ {
var errors = new List<string>(); var errors = new List<string>();
using (var browser = new FolderBrowserDialog()) using (var browser = new CommonOpenFileDialog())
{ {
browser.Description = "Select output directory"; browser.IsFolderPicker = true;
if (browser.ShowDialog() != DialogResult.OK) browser.Multiselect = false;
if (browser.ShowDialog() != CommonFileDialogResult.Ok)
return; return;
string outputDir = browser.FileName;
using (var loader = new LoadingForm()) using (var loader = new LoadingForm())
{ {
var action = new Action(() => loader.SetAction(dialog =>
{ {
var directories = Directory.GetDirectories(target); var directories = Directory.GetDirectories(_target);
int progress = 0; int progress = 0;
foreach (string dir in directories) foreach (string dir in directories)
{ {
loader.SetStatus($"Processing {Path.GetFileName(dir)}.."); dialog.SetStatus($"Processing {Path.GetFileName(dir)}..");
loader.SetProgress((progress++ / (float)directories.Length) * 100f); dialog.SetProgress((progress++ / (float)directories.Length) * 100f);
foreach (var fn in Directory.GetFiles(dir, "*.ksh")) foreach (var fn in Directory.GetFiles(dir, "*.ksh"))
{ {
try try
{ {
// Determine output path // Determine output path
string path = Path.Combine( string path = Path.Combine(
$"{browser.SelectedPath}", $"{outputDir}",
$"{Path.GetFileName(dir)}\\" $"{Path.GetFileName(dir)}\\"
); );
@ -471,16 +711,13 @@ namespace VoxCharger
string err = $"Failed attempt to convert ksh file: {Path.GetFileName(fn)} ({ex.Message})"; string err = $"Failed attempt to convert ksh file: {Path.GetFileName(fn)} ({ex.Message})";
errors.Add(err); errors.Add(err);
Debug.WriteLine(err); Debug.WriteLine(err);
continue;
} }
} }
} }
loader.Complete(); dialog.Complete();
}); });
loader.SetAction(action);
loader.ShowDialog(); loader.ShowDialog();
} }
} }
@ -532,7 +769,7 @@ namespace VoxCharger
if (pictureBox == null) if (pictureBox == null)
return; return;
string filename = Path.Combine(Path.GetDirectoryName(info.FileName), chart.JacketFileName); string filename = Path.Combine(Path.GetDirectoryName(info.FileName) ?? "", chart.JacketFileName);
if (!File.Exists(filename)) if (!File.Exists(filename))
{ {
pictureBox.Image = DummyJacket; pictureBox.Image = DummyJacket;
@ -551,7 +788,7 @@ namespace VoxCharger
} }
} }
private void UpdateUI() private void UpdateLevels()
{ {
var buttons = new List<Button>(); var buttons = new List<Button>();
foreach (var control in LevelGroupBox.Controls) foreach (var control in LevelGroupBox.Controls)
@ -573,9 +810,9 @@ namespace VoxCharger
} }
} }
if (!charts.ContainsKey(diff) || charts[diff] == null) if (!_charts.ContainsKey(diff) || _charts[diff] == null)
{ {
charts.Remove(diff); // should be UpdateUiButAlterMapCharts, ya whatever _charts.Remove(diff);
if (button != null) if (button != null)
button.Text = "--"; button.Text = "--";
@ -603,9 +840,20 @@ namespace VoxCharger
} }
} }
LoadJacket(charts[diff]); LoadJacket(_charts[diff]);
} }
} }
} }
private void OnPreviewTimePickerValueChanged(object sender, EventArgs e)
{
if (PreviewTimePicker.Value.Minute == 59)
PreviewTimePicker.Value = PreviewTimePicker.Value.AddMinutes(1);
else if (PreviewTimePicker.Value.Minute >= 11)
PreviewTimePicker.Value = PreviewTimePicker.Value.AddMinutes(-1);
if (PreviewTimePicker.Value.Minute == 10)
PreviewTimePicker.Value = PreviewTimePicker.Value.AddSeconds(-PreviewTimePicker.Value.Second);
}
} }
} }

View File

@ -28,9 +28,12 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HelpForm));
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.OkButton = new System.Windows.Forms.Button(); this.OkButton = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
@ -49,28 +52,30 @@
// //
// panel1 // panel1
// //
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.OkButton); this.panel1.Controls.Add(this.OkButton);
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel1.Location = new System.Drawing.Point(0, 322); this.panel1.Location = new System.Drawing.Point(0, 424);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(603, 40); this.panel1.Size = new System.Drawing.Size(631, 40);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// OkButton // OkButton
// //
this.OkButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.OkButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right))); this.OkButton.Location = new System.Drawing.Point(515, 8);
this.OkButton.Location = new System.Drawing.Point(516, 8);
this.OkButton.Name = "OkButton"; this.OkButton.Name = "OkButton";
this.OkButton.Size = new System.Drawing.Size(75, 22); this.OkButton.Size = new System.Drawing.Size(102, 20);
this.OkButton.TabIndex = 0; this.OkButton.TabIndex = 0;
this.OkButton.Text = "OK"; this.OkButton.Text = "Got it!";
this.OkButton.UseVisualStyleBackColor = true; this.OkButton.UseVisualStyleBackColor = true;
this.OkButton.Click += new System.EventHandler(this.OnOkButtonClick); this.OkButton.Click += new System.EventHandler(this.OnOkButtonClick);
// //
// panel2 // panel2
// //
this.panel2.BackColor = System.Drawing.Color.White; this.panel2.BackColor = System.Drawing.SystemColors.Control;
this.panel2.Controls.Add(this.label13);
this.panel2.Controls.Add(this.label14);
this.panel2.Controls.Add(this.label11); this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.label12); this.panel2.Controls.Add(this.label12);
this.panel2.Controls.Add(this.label9); this.panel2.Controls.Add(this.label9);
@ -86,18 +91,38 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(603, 322); this.panel2.Size = new System.Drawing.Size(631, 424);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label13.Location = new System.Drawing.Point(15, 340);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(487, 65);
this.label13.TabIndex = 13;
this.label13.Text = resources.GetString("label13.Text");
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
this.label14.Location = new System.Drawing.Point(10, 323);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(146, 15);
this.label14.TabIndex = 12;
this.label14.Text = "Music Format && Converter";
//
// label11 // label11
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label11.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label11.Location = new System.Drawing.Point(15, 109); this.label11.Location = new System.Drawing.Point(15, 109);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(185, 13); this.label11.Size = new System.Drawing.Size(188, 13);
this.label11.TabIndex = 11; this.label11.TabIndex = 11;
this.label11.Text = "ID of gameplay background theme"; this.label11.Text = "ID of gameplay background theme.\r\n";
// //
// label12 // label12
// //
@ -113,18 +138,17 @@
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(15, 253); this.label9.Location = new System.Drawing.Point(15, 266);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(302, 52); this.label9.Size = new System.Drawing.Size(353, 52);
this.label9.TabIndex = 9; this.label9.TabIndex = 9;
this.label9.Text = "Only include selected tracks to the output\r\nFor example, laser can be disabled by" + this.label9.Text = "Only include selected tracks to the output\r\nFor example, laser can be disabled by" + " deselect \"Vol-L\" or \"Vol-R\" box\r\n\r\nUseful for experimental or debugging purpose" + ".";
" deselect \"Laser\" box\r\n\r\nUseful for experimental or debugging purpose.";
// //
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold); this.label10.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
this.label10.Location = new System.Drawing.Point(10, 236); this.label10.Location = new System.Drawing.Point(10, 249);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(40, 15); this.label10.Size = new System.Drawing.Size(40, 15);
this.label10.TabIndex = 8; this.label10.TabIndex = 8;
@ -136,11 +160,9 @@
this.label7.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(15, 192); this.label7.Location = new System.Drawing.Point(15, 192);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(531, 39); this.label7.Size = new System.Drawing.Size(594, 52);
this.label7.TabIndex = 7; this.label7.TabIndex = 7;
this.label7.Text = "Attempt to convert selected events into Vox format.\r\nAll of these effects are map" + this.label7.Text = resources.GetString("label7.Text");
"ped, there\'s chance some effects to misaligned and even cease to function.\r\nNote" +
" that user defined Fx\'s are excluded";
// //
// label8 // label8
// //
@ -148,9 +170,9 @@
this.label8.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold); this.label8.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
this.label8.Location = new System.Drawing.Point(10, 175); this.label8.Location = new System.Drawing.Point(10, 175);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(42, 15); this.label8.Size = new System.Drawing.Size(135, 15);
this.label8.TabIndex = 6; this.label8.TabIndex = 6;
this.label8.Text = "Effects"; this.label8.Text = "Camera && Sound Effects";
// //
// label5 // label5
// //
@ -160,9 +182,7 @@
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(530, 26); this.label5.Size = new System.Drawing.Size(530, 26);
this.label5.TabIndex = 5; this.label5.TabIndex = 5;
this.label5.Text = "Trim or add additional measures to the beginning of chart. Useful when Ksh rely o" + this.label5.Text = "Trim or add additional measures to the beginning of chart. Useful when Ksh rely o" + "n start music offset.\r\nHowever, chart can be broken when signature / bpm change " + "occurs.\r\n";
"n start music offset.\r\nHowever, chart can be broken when signature / bpm change " +
"occurs";
// //
// label6 // label6
// //
@ -180,9 +200,9 @@
this.label3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(15, 74); this.label3.Location = new System.Drawing.Point(15, 74);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(365, 13); this.label3.Size = new System.Drawing.Size(368, 13);
this.label3.TabIndex = 3; this.label3.TabIndex = 3;
this.label3.Text = "Assigned game version and 4th Difficulty that will appear in the game"; this.label3.Text = "Assigned game version and 4th Difficulty that will appear in the game.\r\n";
// //
// label4 // label4
// //
@ -200,10 +220,9 @@
this.label2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(17, 26); this.label2.Location = new System.Drawing.Point(17, 26);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(488, 26); this.label2.Size = new System.Drawing.Size(491, 26);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "Music identifier that contains only valid ascii.\r\nThis will determine asset file " + this.label2.Text = "Music identifier that contains only valid ascii (the field also known as \"ascii\")" + ".\r\nThis will determine asset file location (data_mods\\\\<mix>\\\\music\\\\<music_id>_" + "<music_code>).";
"location (data_mods\\\\<mix>\\\\music\\\\<music_id>_<music_code>)";
// //
// label1 // label1
// //
@ -219,7 +238,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(603, 362); this.ClientSize = new System.Drawing.Size(631, 464);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
@ -227,14 +246,16 @@
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "HelpForm"; this.Name = "HelpForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Converter"; this.Text = "Help";
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.panel2.PerformLayout(); this.panel2.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
#endregion #endregion
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;

View File

@ -1,11 +1,4 @@
using System; 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; using System.Windows.Forms;
namespace VoxCharger namespace VoxCharger

View File

@ -117,4 +117,19 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.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> </resheader>
<data name="label13.Text" xml:space="preserve">
<value>Select which music file format to use.
- Sound Voltex (.s3v): Support "Preview Timestamp" with reliable encoder (Recommended)
- Beatmania IIDX (.2dx): Legacy music format (Compatibility for Vivid Wave and older versions)
You can select the path of the converter programs by clicking "..." button.
</value>
</data>
<data name="label7.Text" xml:space="preserve">
<value>Attempt to convert selected Sound Fx's and Camera movements into Vox format.
All of these effects are mapped, there's chance that the produced effects are misaligned or even cease to function.
Note that user defined and advanced Fx's are excluded.
</value>
</data>
</root> </root>

View File

@ -1,11 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace VoxCharger namespace VoxCharger

View File

@ -37,14 +37,35 @@
this.CancelEditButton = new System.Windows.Forms.Button(); this.CancelEditButton = new System.Windows.Forms.Button();
this.JacketButton = new System.Windows.Forms.Button(); this.JacketButton = new System.Windows.Forms.Button();
this.SaveEditButton = new System.Windows.Forms.Button(); this.SaveEditButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.MetadataGroupBox = new System.Windows.Forms.GroupBox();
this.Preview2DX = new System.Windows.Forms.Button(); this.Preview2DX = new System.Windows.Forms.Button();
this.MainDxButton = new System.Windows.Forms.Button(); this.MainDxButton = new System.Windows.Forms.Button();
this.VoxButton = new System.Windows.Forms.Button(); this.VoxButton = new System.Windows.Forms.Button();
this.JacketPictureBox = new System.Windows.Forms.PictureBox(); this.JacketPictureBox = new System.Windows.Forms.PictureBox();
this.RadarGroupBox = new System.Windows.Forms.GroupBox();
this.RadarHandTripLabel = new System.Windows.Forms.Label();
this.HandTripNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.RadarTsumamiLabel = new System.Windows.Forms.Label();
this.TsumamiNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.RadarTrickyLabel = new System.Windows.Forms.Label();
this.TrickyNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.RadarOneHandLabel = new System.Windows.Forms.Label();
this.OneHandNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.RadarPeakLabel = new System.Windows.Forms.Label();
this.PeakNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.RadarNotesLabel = new System.Windows.Forms.Label();
this.NotesNumericUpDown = new System.Windows.Forms.NumericUpDown();
this.AddRadarDataButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.LevelNumericBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.LevelNumericBox)).BeginInit();
this.groupBox1.SuspendLayout(); this.MetadataGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.JacketPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketPictureBox)).BeginInit();
this.RadarGroupBox.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.HandTripNumericUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TsumamiNumericUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.TrickyNumericUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.OneHandNumericUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PeakNumericUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NotesNumericUpDown)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// LevelLabel // LevelLabel
@ -60,32 +81,22 @@
// //
// LevelNumericBox // LevelNumericBox
// //
this.LevelNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.LevelNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.LevelNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.LevelNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.LevelNumericBox.Location = new System.Drawing.Point(72, 24); this.LevelNumericBox.Location = new System.Drawing.Point(72, 24);
this.LevelNumericBox.Maximum = new decimal(new int[] { this.LevelNumericBox.Maximum = new decimal(new int[] { 20, 0, 0, 0 });
20,
0,
0,
0});
this.LevelNumericBox.Name = "LevelNumericBox"; this.LevelNumericBox.Name = "LevelNumericBox";
this.LevelNumericBox.Size = new System.Drawing.Size(214, 21); this.LevelNumericBox.Size = new System.Drawing.Size(214, 21);
this.LevelNumericBox.TabIndex = 14; this.LevelNumericBox.TabIndex = 0;
this.LevelNumericBox.Value = new decimal(new int[] { this.LevelNumericBox.Value = new decimal(new int[] { 1, 0, 0, 0 });
1,
0,
0,
0});
// //
// EffectorTextBox // EffectorTextBox
// //
this.EffectorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.EffectorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.EffectorTextBox.Location = new System.Drawing.Point(72, 51); this.EffectorTextBox.Location = new System.Drawing.Point(72, 51);
this.EffectorTextBox.Name = "EffectorTextBox"; this.EffectorTextBox.Name = "EffectorTextBox";
this.EffectorTextBox.Size = new System.Drawing.Size(214, 20); this.EffectorTextBox.Size = new System.Drawing.Size(214, 20);
this.EffectorTextBox.TabIndex = 15; this.EffectorTextBox.TabIndex = 1;
// //
// EffectorLabel // EffectorLabel
// //
@ -111,20 +122,20 @@
// //
// IllustratorTextBox // IllustratorTextBox
// //
this.IllustratorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.IllustratorTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.IllustratorTextBox.Location = new System.Drawing.Point(72, 77); this.IllustratorTextBox.Location = new System.Drawing.Point(72, 77);
this.IllustratorTextBox.Name = "IllustratorTextBox"; this.IllustratorTextBox.Name = "IllustratorTextBox";
this.IllustratorTextBox.Size = new System.Drawing.Size(214, 20); this.IllustratorTextBox.Size = new System.Drawing.Size(214, 20);
this.IllustratorTextBox.TabIndex = 17; this.IllustratorTextBox.TabIndex = 2;
// //
// CancelEditButton // CancelEditButton
// //
this.CancelEditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.CancelEditButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.CancelEditButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelEditButton.Location = new System.Drawing.Point(343, 180); this.CancelEditButton.Location = new System.Drawing.Point(343, 411);
this.CancelEditButton.Name = "CancelEditButton"; this.CancelEditButton.Name = "CancelEditButton";
this.CancelEditButton.Size = new System.Drawing.Size(80, 28); this.CancelEditButton.Size = new System.Drawing.Size(80, 28);
this.CancelEditButton.TabIndex = 19; this.CancelEditButton.TabIndex = 4;
this.CancelEditButton.Text = "Cancel"; this.CancelEditButton.Text = "Cancel";
this.CancelEditButton.UseVisualStyleBackColor = true; this.CancelEditButton.UseVisualStyleBackColor = true;
this.CancelEditButton.Click += new System.EventHandler(this.OnCancelEditButtonClick); this.CancelEditButton.Click += new System.EventHandler(this.OnCancelEditButtonClick);
@ -135,71 +146,69 @@
this.JacketButton.Name = "JacketButton"; this.JacketButton.Name = "JacketButton";
this.JacketButton.Size = new System.Drawing.Size(108, 22); this.JacketButton.Size = new System.Drawing.Size(108, 22);
this.JacketButton.TabIndex = 3; this.JacketButton.TabIndex = 3;
this.JacketButton.Text = "Jacket File"; this.JacketButton.Text = "Import Jacket";
this.JacketButton.UseVisualStyleBackColor = true; this.JacketButton.UseVisualStyleBackColor = true;
this.JacketButton.Click += new System.EventHandler(this.OnJacketButtonClick); this.JacketButton.Click += new System.EventHandler(this.OnJacketButtonClick);
// //
// SaveEditButton // SaveEditButton
// //
this.SaveEditButton.Location = new System.Drawing.Point(257, 180); this.SaveEditButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SaveEditButton.Location = new System.Drawing.Point(257, 411);
this.SaveEditButton.Name = "SaveEditButton"; this.SaveEditButton.Name = "SaveEditButton";
this.SaveEditButton.Size = new System.Drawing.Size(80, 28); this.SaveEditButton.Size = new System.Drawing.Size(80, 28);
this.SaveEditButton.TabIndex = 23; this.SaveEditButton.TabIndex = 3;
this.SaveEditButton.Text = "Save"; this.SaveEditButton.Text = "Save";
this.SaveEditButton.UseVisualStyleBackColor = true; this.SaveEditButton.UseVisualStyleBackColor = true;
this.SaveEditButton.Click += new System.EventHandler(this.OnSaveEditButtonClick); this.SaveEditButton.Click += new System.EventHandler(this.OnSaveEditButtonClick);
// //
// groupBox1 // MetadataGroupBox
// //
this.groupBox1.Controls.Add(this.Preview2DX); this.MetadataGroupBox.Controls.Add(this.Preview2DX);
this.groupBox1.Controls.Add(this.MainDxButton); this.MetadataGroupBox.Controls.Add(this.MainDxButton);
this.groupBox1.Controls.Add(this.VoxButton); this.MetadataGroupBox.Controls.Add(this.VoxButton);
this.groupBox1.Controls.Add(this.IllustratorTextBox); this.MetadataGroupBox.Controls.Add(this.IllustratorTextBox);
this.groupBox1.Controls.Add(this.LevelNumericBox); this.MetadataGroupBox.Controls.Add(this.LevelNumericBox);
this.groupBox1.Controls.Add(this.LevelLabel); this.MetadataGroupBox.Controls.Add(this.LevelLabel);
this.groupBox1.Controls.Add(this.IllustratorLabel); this.MetadataGroupBox.Controls.Add(this.IllustratorLabel);
this.groupBox1.Controls.Add(this.EffectorTextBox); this.MetadataGroupBox.Controls.Add(this.EffectorTextBox);
this.groupBox1.Controls.Add(this.EffectorLabel); this.MetadataGroupBox.Controls.Add(this.EffectorLabel);
this.groupBox1.Location = new System.Drawing.Point(126, 12); this.MetadataGroupBox.Location = new System.Drawing.Point(126, 12);
this.groupBox1.Name = "groupBox1"; this.MetadataGroupBox.Name = "MetadataGroupBox";
this.groupBox1.Size = new System.Drawing.Size(297, 162); this.MetadataGroupBox.Size = new System.Drawing.Size(297, 162);
this.groupBox1.TabIndex = 21; this.MetadataGroupBox.TabIndex = 0;
this.groupBox1.TabStop = false; this.MetadataGroupBox.TabStop = false;
this.groupBox1.Text = "Level Data"; this.MetadataGroupBox.Text = "Level Data";
// //
// Preview2DX // Preview2DX
// //
this.Preview2DX.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.Preview2DX.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.Preview2DX.Location = new System.Drawing.Point(181, 129); this.Preview2DX.Location = new System.Drawing.Point(181, 129);
this.Preview2DX.Name = "Preview2DX"; this.Preview2DX.Name = "Preview2DX";
this.Preview2DX.Size = new System.Drawing.Size(105, 22); this.Preview2DX.Size = new System.Drawing.Size(105, 22);
this.Preview2DX.TabIndex = 23; this.Preview2DX.TabIndex = 5;
this.Preview2DX.Text = "2DX Preview"; this.Preview2DX.Text = "Import Preview";
this.Preview2DX.UseVisualStyleBackColor = true; this.Preview2DX.UseVisualStyleBackColor = true;
this.Preview2DX.Click += new System.EventHandler(this.OnPreview2DXClick); this.Preview2DX.Click += new System.EventHandler(this.OnPreview2DXClick);
// //
// MainDxButton // MainDxButton
// //
this.MainDxButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.MainDxButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.MainDxButton.Location = new System.Drawing.Point(72, 129); this.MainDxButton.Location = new System.Drawing.Point(72, 129);
this.MainDxButton.Name = "MainDxButton"; this.MainDxButton.Name = "MainDxButton";
this.MainDxButton.Size = new System.Drawing.Size(105, 22); this.MainDxButton.Size = new System.Drawing.Size(105, 22);
this.MainDxButton.TabIndex = 22; this.MainDxButton.TabIndex = 4;
this.MainDxButton.Text = "2DX Music"; this.MainDxButton.Text = "Import Music";
this.MainDxButton.UseVisualStyleBackColor = true; this.MainDxButton.UseVisualStyleBackColor = true;
this.MainDxButton.Click += new System.EventHandler(this.OnMainDxButtonClick); this.MainDxButton.Click += new System.EventHandler(this.OnMainDxButtonClick);
// //
// VoxButton // VoxButton
// //
this.VoxButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.VoxButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.VoxButton.Location = new System.Drawing.Point(72, 101); this.VoxButton.Location = new System.Drawing.Point(72, 101);
this.VoxButton.Name = "VoxButton"; this.VoxButton.Name = "VoxButton";
this.VoxButton.Size = new System.Drawing.Size(214, 22); this.VoxButton.Size = new System.Drawing.Size(214, 22);
this.VoxButton.TabIndex = 21; this.VoxButton.TabIndex = 3;
this.VoxButton.Text = "Vox / Ksh File"; this.VoxButton.Text = "Import Chart Data";
this.VoxButton.UseVisualStyleBackColor = true; this.VoxButton.UseVisualStyleBackColor = true;
this.VoxButton.Click += new System.EventHandler(this.OnVoxButtonClick); this.VoxButton.Click += new System.EventHandler(this.OnVoxButtonClick);
// //
@ -214,33 +223,199 @@
this.JacketPictureBox.TabStop = false; this.JacketPictureBox.TabStop = false;
this.JacketPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick); this.JacketPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick);
// //
// RadarGroupBox
//
this.RadarGroupBox.Controls.Add(this.RadarHandTripLabel);
this.RadarGroupBox.Controls.Add(this.HandTripNumericUpDown);
this.RadarGroupBox.Controls.Add(this.RadarTsumamiLabel);
this.RadarGroupBox.Controls.Add(this.TsumamiNumericUpDown);
this.RadarGroupBox.Controls.Add(this.RadarTrickyLabel);
this.RadarGroupBox.Controls.Add(this.TrickyNumericUpDown);
this.RadarGroupBox.Controls.Add(this.RadarOneHandLabel);
this.RadarGroupBox.Controls.Add(this.OneHandNumericUpDown);
this.RadarGroupBox.Controls.Add(this.RadarPeakLabel);
this.RadarGroupBox.Controls.Add(this.PeakNumericUpDown);
this.RadarGroupBox.Controls.Add(this.RadarNotesLabel);
this.RadarGroupBox.Controls.Add(this.NotesNumericUpDown);
this.RadarGroupBox.Location = new System.Drawing.Point(12, 180);
this.RadarGroupBox.Name = "RadarGroupBox";
this.RadarGroupBox.Size = new System.Drawing.Size(411, 225);
this.RadarGroupBox.TabIndex = 2;
this.RadarGroupBox.TabStop = false;
this.RadarGroupBox.Text = "Radar";
//
// RadarHandTripLabel
//
this.RadarHandTripLabel.AutoSize = true;
this.RadarHandTripLabel.Location = new System.Drawing.Point(101, 111);
this.RadarHandTripLabel.Name = "RadarHandTripLabel";
this.RadarHandTripLabel.Size = new System.Drawing.Size(33, 26);
this.RadarHandTripLabel.TabIndex = 35;
this.RadarHandTripLabel.Text = "Hand\r\nTrip";
this.RadarHandTripLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// HandTripNumericUpDown
//
this.HandTripNumericUpDown.Location = new System.Drawing.Point(85, 141);
this.HandTripNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.HandTripNumericUpDown.Name = "HandTripNumericUpDown";
this.HandTripNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.HandTripNumericUpDown.TabIndex = 29;
//
// RadarTsumamiLabel
//
this.RadarTsumamiLabel.AutoSize = true;
this.RadarTsumamiLabel.Location = new System.Drawing.Point(264, 111);
this.RadarTsumamiLabel.Name = "RadarTsumamiLabel";
this.RadarTsumamiLabel.Size = new System.Drawing.Size(49, 26);
this.RadarTsumamiLabel.TabIndex = 34;
this.RadarTsumamiLabel.Text = "Tsumami\r\n(Laser)";
this.RadarTsumamiLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// TsumamiNumericUpDown
//
this.TsumamiNumericUpDown.Location = new System.Drawing.Point(256, 141);
this.TsumamiNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.TsumamiNumericUpDown.Name = "TsumamiNumericUpDown";
this.TsumamiNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.TsumamiNumericUpDown.TabIndex = 30;
//
// RadarTrickyLabel
//
this.RadarTrickyLabel.AutoSize = true;
this.RadarTrickyLabel.Location = new System.Drawing.Point(185, 171);
this.RadarTrickyLabel.Name = "RadarTrickyLabel";
this.RadarTrickyLabel.Size = new System.Drawing.Size(36, 13);
this.RadarTrickyLabel.TabIndex = 33;
this.RadarTrickyLabel.Text = "Tricky";
this.RadarTrickyLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// TrickyNumericUpDown
//
this.TrickyNumericUpDown.Location = new System.Drawing.Point(170, 187);
this.TrickyNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.TrickyNumericUpDown.Name = "TrickyNumericUpDown";
this.TrickyNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.TrickyNumericUpDown.TabIndex = 31;
//
// RadarOneHandLabel
//
this.RadarOneHandLabel.AutoSize = true;
this.RadarOneHandLabel.Location = new System.Drawing.Point(101, 43);
this.RadarOneHandLabel.Name = "RadarOneHandLabel";
this.RadarOneHandLabel.Size = new System.Drawing.Size(33, 26);
this.RadarOneHandLabel.TabIndex = 32;
this.RadarOneHandLabel.Text = "One\r\nHand";
this.RadarOneHandLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// OneHandNumericUpDown
//
this.OneHandNumericUpDown.Location = new System.Drawing.Point(85, 73);
this.OneHandNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.OneHandNumericUpDown.Name = "OneHandNumericUpDown";
this.OneHandNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.OneHandNumericUpDown.TabIndex = 25;
//
// RadarPeakLabel
//
this.RadarPeakLabel.AutoSize = true;
this.RadarPeakLabel.Location = new System.Drawing.Point(272, 57);
this.RadarPeakLabel.Name = "RadarPeakLabel";
this.RadarPeakLabel.Size = new System.Drawing.Size(32, 13);
this.RadarPeakLabel.TabIndex = 28;
this.RadarPeakLabel.Text = "Peak";
this.RadarPeakLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// PeakNumericUpDown
//
this.PeakNumericUpDown.Location = new System.Drawing.Point(256, 73);
this.PeakNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.PeakNumericUpDown.Name = "PeakNumericUpDown";
this.PeakNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.PeakNumericUpDown.TabIndex = 27;
//
// RadarNotesLabel
//
this.RadarNotesLabel.AutoSize = true;
this.RadarNotesLabel.Location = new System.Drawing.Point(185, 14);
this.RadarNotesLabel.Name = "RadarNotesLabel";
this.RadarNotesLabel.Size = new System.Drawing.Size(35, 13);
this.RadarNotesLabel.TabIndex = 26;
this.RadarNotesLabel.Text = "Notes";
this.RadarNotesLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// NotesNumericUpDown
//
this.NotesNumericUpDown.Location = new System.Drawing.Point(170, 30);
this.NotesNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 });
this.NotesNumericUpDown.Name = "NotesNumericUpDown";
this.NotesNumericUpDown.Size = new System.Drawing.Size(70, 20);
this.NotesNumericUpDown.TabIndex = 24;
//
// AddRadarDataButton
//
this.AddRadarDataButton.Location = new System.Drawing.Point(12, 180);
this.AddRadarDataButton.Name = "AddRadarDataButton";
this.AddRadarDataButton.Size = new System.Drawing.Size(411, 25);
this.AddRadarDataButton.TabIndex = 1;
this.AddRadarDataButton.Text = "Add Radar Data";
this.AddRadarDataButton.UseVisualStyleBackColor = true;
this.AddRadarDataButton.Click += new System.EventHandler(this.OnAddRadarDataButtonClick);
//
// LevelEditorForm // LevelEditorForm
// //
this.AcceptButton = this.SaveEditButton; this.AcceptButton = this.SaveEditButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelEditButton; this.CancelButton = this.CancelEditButton;
this.ClientSize = new System.Drawing.Size(435, 220); this.ClientSize = new System.Drawing.Size(435, 451);
this.Controls.Add(this.SaveEditButton); this.Controls.Add(this.SaveEditButton);
this.Controls.Add(this.CancelEditButton);
this.Controls.Add(this.RadarGroupBox);
this.Controls.Add(this.AddRadarDataButton);
this.Controls.Add(this.JacketPictureBox); this.Controls.Add(this.JacketPictureBox);
this.Controls.Add(this.JacketButton); this.Controls.Add(this.JacketButton);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.MetadataGroupBox);
this.Controls.Add(this.CancelEditButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "LevelEditorForm"; this.Name = "LevelEditorForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Level Editor - MXM"; this.Text = "Level Editor - MXM";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnLevelEditorFormFormClosing);
this.Load += new System.EventHandler(this.OnLevelEditorFormLoad); this.Load += new System.EventHandler(this.OnLevelEditorFormLoad);
((System.ComponentModel.ISupportInitialize)(this.LevelNumericBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.LevelNumericBox)).EndInit();
this.groupBox1.ResumeLayout(false); this.MetadataGroupBox.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.MetadataGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.JacketPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.JacketPictureBox)).EndInit();
this.RadarGroupBox.ResumeLayout(false);
this.RadarGroupBox.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.HandTripNumericUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TsumamiNumericUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.TrickyNumericUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.OneHandNumericUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PeakNumericUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NotesNumericUpDown)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private System.Windows.Forms.Button AddRadarDataButton;
private System.Windows.Forms.Label RadarHandTripLabel;
private System.Windows.Forms.NumericUpDown HandTripNumericUpDown;
private System.Windows.Forms.Label RadarTsumamiLabel;
private System.Windows.Forms.NumericUpDown TsumamiNumericUpDown;
private System.Windows.Forms.Label RadarTrickyLabel;
private System.Windows.Forms.NumericUpDown TrickyNumericUpDown;
private System.Windows.Forms.Label RadarOneHandLabel;
private System.Windows.Forms.NumericUpDown OneHandNumericUpDown;
private System.Windows.Forms.Label RadarPeakLabel;
private System.Windows.Forms.NumericUpDown PeakNumericUpDown;
private System.Windows.Forms.Label RadarNotesLabel;
private System.Windows.Forms.NumericUpDown NotesNumericUpDown;
private System.Windows.Forms.GroupBox RadarGroupBox;
#endregion #endregion
private System.Windows.Forms.PictureBox JacketPictureBox; private System.Windows.Forms.PictureBox JacketPictureBox;
@ -253,7 +428,7 @@
private System.Windows.Forms.Button CancelEditButton; private System.Windows.Forms.Button CancelEditButton;
private System.Windows.Forms.Button JacketButton; private System.Windows.Forms.Button JacketButton;
private System.Windows.Forms.Button SaveEditButton; private System.Windows.Forms.Button SaveEditButton;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox MetadataGroupBox;
private System.Windows.Forms.Button VoxButton; private System.Windows.Forms.Button VoxButton;
private System.Windows.Forms.Button MainDxButton; private System.Windows.Forms.Button MainDxButton;
private System.Windows.Forms.Button Preview2DX; private System.Windows.Forms.Button Preview2DX;

View File

@ -1,6 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Text; using System.Text;
@ -10,13 +8,13 @@ namespace VoxCharger
{ {
public partial class LevelEditorForm : Form public partial class LevelEditorForm : Form
{ {
private readonly Image DummyJacket = VoxCharger.Properties.Resources.jk_dummy_s; private static readonly Image DummyJacket = VoxCharger.Properties.Resources.jk_dummy_s;
private VoxHeader header; private VoxHeader _header;
private Ksh kshUpdate = null; private Ksh _kshUpdate = null;
private string voxUpdatePath = string.Empty; private string _voxUpdatePath = string.Empty;
private string dxMainUpdatePath = string.Empty; private string _audioMainUpdatePath = string.Empty;
private string dxPreviewUpdatePath = string.Empty; private string _audioPreviewUpdatePath = string.Empty;
public VoxLevelHeader Result { get; private set; } public VoxLevelHeader Result { get; private set; }
@ -24,7 +22,7 @@ namespace VoxCharger
public LevelEditorForm(VoxHeader header, Difficulty difficulty) public LevelEditorForm(VoxHeader header, Difficulty difficulty)
{ {
this.header = header; this._header = header;
VoxLevelHeader level; VoxLevelHeader level;
if (!header.Levels.TryGetValue(difficulty, out level)) if (!header.Levels.TryGetValue(difficulty, out level))
Result = new VoxLevelHeader(); Result = new VoxLevelHeader();
@ -42,12 +40,13 @@ namespace VoxCharger
case Difficulty.Advanced: Text = "Level Editor - ADV"; break; case Difficulty.Advanced: Text = "Level Editor - ADV"; break;
case Difficulty.Exhaust: Text = "Level Editor - EXH"; break; case Difficulty.Exhaust: Text = "Level Editor - EXH"; break;
default: default:
switch (header.InfVersion) switch (_header.InfVersion)
{ {
case InfiniteVersion.INF: Text = "Level Editor - INF"; break; case InfiniteVersion.Inf: Text = "Level Editor - INF"; break;
case InfiniteVersion.GRV: Text = "Level Editor - GRV"; break; case InfiniteVersion.Grv: Text = "Level Editor - GRV"; break;
case InfiniteVersion.HVN: Text = "Level Editor - HVN"; break; case InfiniteVersion.Hvn: Text = "Level Editor - HVN"; break;
case InfiniteVersion.VVD: Text = "Level Editor - VVD"; break; case InfiniteVersion.Vvd: Text = "Level Editor - VVD"; break;
case InfiniteVersion.Xcd: Text = "Level Editor - XCD"; break;
default: Text = "Level Editor - MXM"; break; default: Text = "Level Editor - MXM"; break;
} }
break; break;
@ -56,7 +55,22 @@ namespace VoxCharger
LevelNumericBox.Value = Result.Level; LevelNumericBox.Value = Result.Level;
EffectorTextBox.Text = Result.Effector; EffectorTextBox.Text = Result.Effector;
IllustratorTextBox.Text = Result.Illustrator; IllustratorTextBox.Text = Result.Illustrator;
AddRadarDataButton.Visible = Result.Radar == null;
RadarGroupBox.Visible = Result.Radar != null;
if (Result.Radar != null)
{
NotesNumericUpDown.Value = Result.Radar.Notes;
PeakNumericUpDown.Value = Result.Radar.Peak;
TsumamiNumericUpDown.Value = Result.Radar.Lasers;
TrickyNumericUpDown.Value = Result.Radar.Tricky;
HandTripNumericUpDown.Value = Result.Radar.HandTrip;
OneHandNumericUpDown.Value = Result.Radar.OneHand;
}
else
Height -= (RadarGroupBox.Height - AddRadarDataButton.Height);
LoadJacket(); LoadJacket();
} }
@ -100,16 +114,16 @@ namespace VoxCharger
var vox = new VoxChart(); var vox = new VoxChart();
vox.Parse(filename); vox.Parse(filename);
voxUpdatePath = filename; _voxUpdatePath = filename;
kshUpdate = null; _kshUpdate = null;
} }
else if (filename.EndsWith(".ksh")) else if (filename.EndsWith(".ksh"))
{ {
var ksh = new Ksh(); var ksh = new Ksh();
ksh.Parse(filename); ksh.Parse(filename);
kshUpdate = ksh; _kshUpdate = ksh;
voxUpdatePath = string.Empty; _voxUpdatePath = string.Empty;
} }
else else
MessageBox.Show("Warning! Stupid input, get stupid output :)", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("Warning! Stupid input, get stupid output :)", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
@ -117,7 +131,7 @@ namespace VoxCharger
} }
catch (Exception ex) catch (Exception ex)
{ {
voxUpdatePath = null; _voxUpdatePath = null;
MessageBox.Show( MessageBox.Show(
$"Failed to load chart.\n{ex.Message}", $"Failed to load chart.\n{ex.Message}",
"Error", "Error",
@ -132,36 +146,25 @@ namespace VoxCharger
private void OnMainDxButtonClick(object sender, EventArgs e) private void OnMainDxButtonClick(object sender, EventArgs e)
{ {
Load2DX(); LoadAudio();
} }
private void OnPreview2DXClick(object sender, EventArgs e) private void OnPreview2DXClick(object sender, EventArgs e)
{ {
Load2DX(true); LoadAudio(true);
} }
private void Load2DX(bool preview = false) private void OnAddRadarDataButtonClick(object sender, EventArgs e)
{ {
using (var browser = new OpenFileDialog()) RadarGroupBox.Visible = true;
{ Height += RadarGroupBox.Height - AddRadarDataButton.Height;
browser.Filter = "All supported formats|*.2dx;*.s3v;*.wav;*.ogg;*.mp3;*.flac|2DX Music File|*.2dx;*.s3v|Music Files|*.wav;*.ogg;*.mp3;*.flac"; ;
browser.CheckFileExists = true;
if (browser.ShowDialog() == DialogResult.OK)
{
if (!preview)
dxMainUpdatePath = browser.FileName;
else
dxPreviewUpdatePath = browser.FileName;
}
}
} }
private void OnJacketPictureBoxClick(object sender, EventArgs e) private void OnJacketPictureBoxClick(object sender, EventArgs e)
{ {
if (Result.Jacket == null) if (Result.Jacket == null)
{ {
string jacket = $"{AssetManager.GetJacketPath(header, Result.Difficulty)}_b.png"; string jacket = $"{AssetManager.GetJacketPath(_header, Result.Difficulty)}_b.png";
if (!File.Exists(jacket)) if (!File.Exists(jacket))
return; return;
@ -182,83 +185,106 @@ namespace VoxCharger
Close(); Close();
} }
private void OnLevelEditorFormFormClosing(object sender, FormClosingEventArgs e)
{
}
private void OnSaveEditButtonClick(object sender, EventArgs e) private void OnSaveEditButtonClick(object sender, EventArgs e)
{ {
try try
{ {
string voxData = string.Empty; string voxData = string.Empty;
if (!string.IsNullOrEmpty(voxUpdatePath)) if (!string.IsNullOrEmpty(_voxUpdatePath))
{ {
if (File.Exists(voxUpdatePath)) if (File.Exists(_voxUpdatePath))
voxData = File.ReadAllText(voxUpdatePath, Encoding.GetEncoding("Shift_JIS")); voxData = File.ReadAllText(_voxUpdatePath, Encoding.GetEncoding("Shift_JIS"));
else else
throw new FileNotFoundException("Vox file not found", voxUpdatePath); throw new FileNotFoundException("Vox file not found", _voxUpdatePath);
} }
VoxChart voxChart = null; VoxChart voxChart = null;
if (kshUpdate != null) if (_kshUpdate != null)
{ {
voxChart = new VoxChart(); voxChart = new VoxChart();
voxChart.Import(kshUpdate); voxChart.Import(_kshUpdate);
} }
if (!string.IsNullOrEmpty(dxMainUpdatePath)) if (!string.IsNullOrEmpty(_audioMainUpdatePath))
{ {
if (File.Exists(dxMainUpdatePath)) if (File.Exists(_audioMainUpdatePath))
{ {
string tmp = Path.Combine( string tmp = Path.Combine(
Path.GetTempPath(), Path.GetTempPath(),
$"{Path.GetRandomFileName()}{new FileInfo(dxMainUpdatePath).Extension}" $"{Path.GetRandomFileName()}{new FileInfo(_audioMainUpdatePath).Extension}"
); );
File.Copy(dxMainUpdatePath, tmp); File.Copy(_audioMainUpdatePath, tmp);
dxMainUpdatePath = tmp; _audioMainUpdatePath = tmp;
} }
else else
throw new FileNotFoundException("Music file not found", dxMainUpdatePath); throw new FileNotFoundException("Music file not found", _audioMainUpdatePath);
} }
if (!string.IsNullOrEmpty(dxPreviewUpdatePath)) if (!string.IsNullOrEmpty(_audioPreviewUpdatePath))
{ {
if (File.Exists(dxPreviewUpdatePath)) if (File.Exists(_audioPreviewUpdatePath))
{ {
string tmp = Path.Combine( string tmp = Path.Combine(
Path.GetTempPath(), Path.GetTempPath(),
$"{Path.GetRandomFileName()}{new FileInfo(dxPreviewUpdatePath).Extension}" $"{Path.GetRandomFileName()}{new FileInfo(_audioPreviewUpdatePath).Extension}"
); );
File.Copy(dxPreviewUpdatePath, tmp); File.Copy(_audioPreviewUpdatePath, tmp);
dxPreviewUpdatePath = tmp; _audioPreviewUpdatePath = tmp;
} }
else else
throw new FileNotFoundException("Preview file not found", dxPreviewUpdatePath); throw new FileNotFoundException("Preview file not found", _audioPreviewUpdatePath);
} }
if (Result.Jacket != null || voxChart != null || !string.IsNullOrEmpty(voxData) || !string.IsNullOrEmpty(dxMainUpdatePath) || !string.IsNullOrEmpty(dxPreviewUpdatePath)) if (Result.Jacket != null || voxChart != null || !string.IsNullOrEmpty(voxData) || !string.IsNullOrEmpty(_audioMainUpdatePath) || !string.IsNullOrEmpty(_audioPreviewUpdatePath))
{ {
Action = new Action(() => Action = () =>
{ {
if (Result.Jacket != null) if (Result.Jacket != null)
AssetManager.ImportJacket(header, Result.Difficulty, Result.Jacket); AssetManager.ImportJacket(_header, Result.Difficulty, Result.Jacket);
if (!string.IsNullOrEmpty(voxData)) if (!string.IsNullOrEmpty(voxData))
AssetManager.ImportVox(header, Result.Difficulty, voxUpdatePath); AssetManager.ImportVox(_header, Result.Difficulty, _voxUpdatePath);
else if (voxChart != null) else if (voxChart != null)
AssetManager.ImportVox(header, Result.Difficulty, voxChart); AssetManager.ImportVox(_header, Result.Difficulty, voxChart);
if (File.Exists(dxMainUpdatePath)) if (File.Exists(_audioMainUpdatePath))
AssetManager.Import2DX(dxMainUpdatePath, header, Result.Difficulty); {
var audioFormat = _audioMainUpdatePath.ToLower().EndsWith(".s3v") ? AudioFormat.S3V : AudioFormat.Iidx;
AssetManager.ImportAudio(_audioMainUpdatePath, _header, Result.Difficulty, AudioImportOptions.WithFormat(audioFormat));
}
if (File.Exists(dxPreviewUpdatePath)) if (File.Exists(_audioPreviewUpdatePath))
AssetManager.Import2DX(dxPreviewUpdatePath, header, Result.Difficulty, true); {
}); var audioFormat = _audioPreviewUpdatePath.ToLower().EndsWith(".s3v") ? AudioFormat.S3V : AudioFormat.Iidx;
AssetManager.ImportAudio(_audioPreviewUpdatePath, _header, Result.Difficulty, AudioImportOptions.WithFormat(audioFormat).AsPreview());
}
};
} }
Result.Level = (int)LevelNumericBox.Value; Result.Level = (int)LevelNumericBox.Value;
Result.Effector = EffectorTextBox.Text; Result.Effector = EffectorTextBox.Text;
Result.Illustrator = IllustratorTextBox.Text; Result.Illustrator = IllustratorTextBox.Text;
if (RadarGroupBox.Visible)
{
Result.Radar = new VoxLevelRadar
{
Notes = (byte)NotesNumericUpDown.Value,
Peak = (byte)PeakNumericUpDown.Value,
Lasers = (byte)TsumamiNumericUpDown.Value,
Tricky = (byte)TrickyNumericUpDown.Value,
HandTrip = (byte)HandTripNumericUpDown.Value,
OneHand = (byte)OneHandNumericUpDown.Value,
};
}
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
Close(); Close();
} }
catch (Exception ex) catch (Exception ex)
@ -266,6 +292,23 @@ namespace VoxCharger
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
private void LoadAudio(bool preview = false)
{
using (var browser = new OpenFileDialog())
{
browser.Filter = "All supported formats|*.2dx;*.s3v;*.asf;*.wav;*.ogg;*.mp3;*.flac|BEMANI Music Files|*.2dx;*.s3v|Music Files|*.wav;*.ogg;*.mp3;*.flac;*.asf";
browser.CheckFileExists = true;
if (browser.ShowDialog() == DialogResult.OK)
{
if (!preview)
_audioMainUpdatePath = browser.FileName;
else
_audioPreviewUpdatePath = browser.FileName;
}
}
}
private void LoadJacket() private void LoadJacket()
{ {
@ -277,8 +320,8 @@ namespace VoxCharger
try try
{ {
string currentJacket = $"{AssetManager.GetJacketPath(header, Result.Difficulty)}_s.png"; string currentJacket = $"{AssetManager.GetJacketPath(_header, Result.Difficulty)}_s.png";
string defaultJacket = $"{AssetManager.GetDefaultJacketPath(header)}_s.png"; string defaultJacket = $"{AssetManager.GetDefaultJacketPath(_header)}_s.png";
if (File.Exists(currentJacket)) if (File.Exists(currentJacket))
{ {
using (var image = Image.FromFile(currentJacket)) using (var image = Image.FromFile(currentJacket))

View File

@ -1,19 +1,12 @@
using System; 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; using System.Windows.Forms;
namespace VoxCharger namespace VoxCharger
{ {
public partial class LoadingForm : Form public partial class LoadingForm : Form
{ {
private Action action; private Action<LoadingForm> _action;
private bool completed = false; private bool _completed = false;
public LoadingForm() public LoadingForm()
{ {
@ -26,12 +19,12 @@ namespace VoxCharger
private void OnLoadingFormShown(object sender, EventArgs e) private void OnLoadingFormShown(object sender, EventArgs e)
{ {
this.action(); this._action(this);
} }
public void SetAction(Action action) public void SetAction(Action<LoadingForm> action)
{ {
this.action = action; this._action = action;
} }
public void SetStatus(string text) public void SetStatus(string text)
@ -61,7 +54,7 @@ namespace VoxCharger
public void Complete() public void Complete()
{ {
completed = true; _completed = true;
if (InvokeRequired) if (InvokeRequired)
Invoke(new Action(Close)); Invoke(new Action(Close));
else else
@ -70,7 +63,7 @@ namespace VoxCharger
private void OnLoadingFormFormClosing(object sender, FormClosingEventArgs e) private void OnLoadingFormFormClosing(object sender, FormClosingEventArgs e)
{ {
e.Cancel = !completed; e.Cancel = !_completed;
} }
} }
} }

View File

@ -50,8 +50,8 @@
this.BulkImportKshEditMenu = new System.Windows.Forms.MenuItem(); this.BulkImportKshEditMenu = new System.Windows.Forms.MenuItem();
this.RemoveEditMenu = new System.Windows.Forms.MenuItem(); this.RemoveEditMenu = new System.Windows.Forms.MenuItem();
this.MenuSeparator4 = new System.Windows.Forms.MenuItem(); this.MenuSeparator4 = new System.Windows.Forms.MenuItem();
this.Import2DXEditMenu = new System.Windows.Forms.MenuItem(); this.ImportAudioEditMenu = new System.Windows.Forms.MenuItem();
this.Import2DXPreviewEditMenu = new System.Windows.Forms.MenuItem(); this.ImportAudioPreviewEditMenu = new System.Windows.Forms.MenuItem();
this.MenuSeparator5 = new System.Windows.Forms.MenuItem(); this.MenuSeparator5 = new System.Windows.Forms.MenuItem();
this.ExplorerEditMenu = new System.Windows.Forms.MenuItem(); this.ExplorerEditMenu = new System.Windows.Forms.MenuItem();
this.MenuSeparator6 = new System.Windows.Forms.MenuItem(); this.MenuSeparator6 = new System.Windows.Forms.MenuItem();
@ -61,6 +61,7 @@
this.SingleConvertToolsMenu = new System.Windows.Forms.MenuItem(); this.SingleConvertToolsMenu = new System.Windows.Forms.MenuItem();
this.BulkConvertToolsMenu = new System.Windows.Forms.MenuItem(); this.BulkConvertToolsMenu = new System.Windows.Forms.MenuItem();
this.MusicFileBuilder = new System.Windows.Forms.MenuItem(); this.MusicFileBuilder = new System.Windows.Forms.MenuItem();
this.S3VFileBuilder = new System.Windows.Forms.MenuItem();
this.HelpMenu = new System.Windows.Forms.MenuItem(); this.HelpMenu = new System.Windows.Forms.MenuItem();
this.AboutHelpMenu = new System.Windows.Forms.MenuItem(); this.AboutHelpMenu = new System.Windows.Forms.MenuItem();
this.FileLabel = new System.Windows.Forms.Label(); this.FileLabel = new System.Windows.Forms.Label();
@ -76,10 +77,12 @@
this.RemoveButton = new System.Windows.Forms.Button(); this.RemoveButton = new System.Windows.Forms.Button();
this.MusicListBox = new System.Windows.Forms.ListBox(); this.MusicListBox = new System.Windows.Forms.ListBox();
this.MetadataGroupBox = new System.Windows.Forms.GroupBox(); this.MetadataGroupBox = new System.Windows.Forms.GroupBox();
this.ArtistYomiganaTextBox = new System.Windows.Forms.TextBox();
this.TitleYomiganaTextBox = new System.Windows.Forms.TextBox();
this.SoundGroupBox = new System.Windows.Forms.GroupBox(); this.SoundGroupBox = new System.Windows.Forms.GroupBox();
this.VolumeIndicatorLabel = new System.Windows.Forms.Label(); this.VolumeIndicatorLabel = new System.Windows.Forms.Label();
this.Import2DXPreviewFileButton = new System.Windows.Forms.Button(); this.ImportPreviewFileButton = new System.Windows.Forms.Button();
this.Import2DXMusicFileButton = new System.Windows.Forms.Button(); this.ImportMusicFileButton = new System.Windows.Forms.Button();
this.VolumeLabel = new System.Windows.Forms.Label(); this.VolumeLabel = new System.Windows.Forms.Label();
this.VolumeTrackBar = new System.Windows.Forms.TrackBar(); this.VolumeTrackBar = new System.Windows.Forms.TrackBar();
this.DistributionPicker = new System.Windows.Forms.DateTimePicker(); this.DistributionPicker = new System.Windows.Forms.DateTimePicker();
@ -123,26 +126,12 @@
// //
// MainMenu // MainMenu
// //
this.MainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.MainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.FileMenu, this.EditMenu, this.ToolsMenu, this.HelpMenu });
this.FileMenu,
this.EditMenu,
this.ToolsMenu,
this.HelpMenu});
// //
// FileMenu // FileMenu
// //
this.FileMenu.Index = 0; this.FileMenu.Index = 0;
this.FileMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.FileMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.NewFileMenu, this.OpenFileMenu, this.MenuSeparator1, this.SaveFileMenu, this.SaveAsFileMenu, this.MenuSeparator2, this.ChangeMixFileMenu, this.DeleteMixFileMenu, this.MenuSeparator3, this.ExitFileMenu });
this.NewFileMenu,
this.OpenFileMenu,
this.MenuSeparator1,
this.SaveFileMenu,
this.SaveAsFileMenu,
this.MenuSeparator2,
this.ChangeMixFileMenu,
this.DeleteMixFileMenu,
this.MenuSeparator3,
this.ExitFileMenu});
this.FileMenu.Text = "File"; this.FileMenu.Text = "File";
// //
// NewFileMenu // NewFileMenu
@ -215,26 +204,13 @@
// //
this.EditMenu.Enabled = false; this.EditMenu.Enabled = false;
this.EditMenu.Index = 1; this.EditMenu.Index = 1;
this.EditMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.EditMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.AddEditMenu, this.RemoveEditMenu, this.MenuSeparator4, this.ImportAudioEditMenu, this.ImportAudioPreviewEditMenu, this.MenuSeparator5, this.ExplorerEditMenu, this.MenuSeparator6, this.AutosaveEditMenu });
this.AddEditMenu,
this.RemoveEditMenu,
this.MenuSeparator4,
this.Import2DXEditMenu,
this.Import2DXPreviewEditMenu,
this.MenuSeparator5,
this.ExplorerEditMenu,
this.MenuSeparator6,
this.AutosaveEditMenu});
this.EditMenu.Text = "Edit"; this.EditMenu.Text = "Edit";
// //
// AddEditMenu // AddEditMenu
// //
this.AddEditMenu.Index = 0; this.AddEditMenu.Index = 0;
this.AddEditMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.AddEditMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.AddNewEditMenu, this.ImportKshEditMenu, this.MenuSeparator7, this.BulkImportKshEditMenu });
this.AddNewEditMenu,
this.ImportKshEditMenu,
this.MenuSeparator7,
this.BulkImportKshEditMenu});
this.AddEditMenu.Shortcut = System.Windows.Forms.Shortcut.Ins; this.AddEditMenu.Shortcut = System.Windows.Forms.Shortcut.Ins;
this.AddEditMenu.Text = "Add"; this.AddEditMenu.Text = "Add";
// //
@ -273,19 +249,19 @@
this.MenuSeparator4.Index = 2; this.MenuSeparator4.Index = 2;
this.MenuSeparator4.Text = "-"; this.MenuSeparator4.Text = "-";
// //
// Import2DXEditMenu // ImportAudioEditMenu
// //
this.Import2DXEditMenu.Enabled = false; this.ImportAudioEditMenu.Enabled = false;
this.Import2DXEditMenu.Index = 3; this.ImportAudioEditMenu.Index = 3;
this.Import2DXEditMenu.Text = "Import 2DX Music.."; this.ImportAudioEditMenu.Text = "Import Music..";
this.Import2DXEditMenu.Click += new System.EventHandler(this.OnImport2DXMusicFileButtonClick); this.ImportAudioEditMenu.Click += new System.EventHandler(this.OnImportMusicFileButtonClick);
// //
// Import2DXPreviewEditMenu // ImportAudioPreviewEditMenu
// //
this.Import2DXPreviewEditMenu.Enabled = false; this.ImportAudioPreviewEditMenu.Enabled = false;
this.Import2DXPreviewEditMenu.Index = 4; this.ImportAudioPreviewEditMenu.Index = 4;
this.Import2DXPreviewEditMenu.Text = "Import 2DX Preview.."; this.ImportAudioPreviewEditMenu.Text = "Import Preview..";
this.Import2DXPreviewEditMenu.Click += new System.EventHandler(this.OnImport2DXPreviewFileButtonClick); this.ImportAudioPreviewEditMenu.Click += new System.EventHandler(this.OnImportPreviewFileButtonClick);
// //
// MenuSeparator5 // MenuSeparator5
// //
@ -315,17 +291,13 @@
// ToolsMenu // ToolsMenu
// //
this.ToolsMenu.Index = 2; this.ToolsMenu.Index = 2;
this.ToolsMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.ToolsMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.ConvertToolsMenu, this.MusicFileBuilder, this.S3VFileBuilder });
this.ConvertToolsMenu,
this.MusicFileBuilder});
this.ToolsMenu.Text = "Tools"; this.ToolsMenu.Text = "Tools";
// //
// ConvertToolsMenu // ConvertToolsMenu
// //
this.ConvertToolsMenu.Index = 0; this.ConvertToolsMenu.Index = 0;
this.ConvertToolsMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.ConvertToolsMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.SingleConvertToolsMenu, this.BulkConvertToolsMenu });
this.SingleConvertToolsMenu,
this.BulkConvertToolsMenu});
this.ConvertToolsMenu.Text = "KSH Converter"; this.ConvertToolsMenu.Text = "KSH Converter";
// //
// SingleConvertToolsMenu // SingleConvertToolsMenu
@ -345,22 +317,28 @@
this.MusicFileBuilder.Index = 1; this.MusicFileBuilder.Index = 1;
this.MusicFileBuilder.Text = "2DX Builder"; this.MusicFileBuilder.Text = "2DX Builder";
this.MusicFileBuilder.Click += new System.EventHandler(this.OnMusicFileBuilderClick); this.MusicFileBuilder.Click += new System.EventHandler(this.OnMusicFileBuilderClick);
// //
// S3VFileBuilder
//
this.S3VFileBuilder.Enabled = false;
this.S3VFileBuilder.Index = 2;
this.S3VFileBuilder.Text = "S3V Builder";
this.S3VFileBuilder.Click += new System.EventHandler(this.OnS3VFileBuilderClick);
//
// HelpMenu // HelpMenu
// //
this.HelpMenu.Index = 3; this.HelpMenu.Index = 3;
this.HelpMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.HelpMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.AboutHelpMenu });
this.AboutHelpMenu});
this.HelpMenu.Text = "Help"; this.HelpMenu.Text = "Help";
// //
// AboutHelpMenu // AboutHelpMenu
// //
this.AboutHelpMenu.Index = 0; this.AboutHelpMenu.Index = 0;
this.AboutHelpMenu.Text = "About"; this.AboutHelpMenu.Text = "About";
this.AboutHelpMenu.Click += new System.EventHandler(this.OnAboutHelpMenuClick); this.AboutHelpMenu.Click += new System.EventHandler(this.OnAboutHelpMenuClick);
// //
// FileLabel // FileLabel
// //
this.FileLabel.AutoSize = true; this.FileLabel.AutoSize = true;
this.FileLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FileLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FileLabel.Location = new System.Drawing.Point(12, 15); this.FileLabel.Location = new System.Drawing.Point(12, 15);
@ -368,11 +346,10 @@
this.FileLabel.Size = new System.Drawing.Size(48, 13); this.FileLabel.Size = new System.Drawing.Size(48, 13);
this.FileLabel.TabIndex = 0; this.FileLabel.TabIndex = 0;
this.FileLabel.Text = "Mix Path"; this.FileLabel.Text = "Mix Path";
// //
// PathTextBox // PathTextBox
// //
this.PathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.PathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.PathTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.PathTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.PathTextBox.Location = new System.Drawing.Point(66, 12); this.PathTextBox.Location = new System.Drawing.Point(66, 12);
this.PathTextBox.Name = "PathTextBox"; this.PathTextBox.Name = "PathTextBox";
@ -380,9 +357,9 @@
this.PathTextBox.Size = new System.Drawing.Size(605, 21); this.PathTextBox.Size = new System.Drawing.Size(605, 21);
this.PathTextBox.TabIndex = 1; this.PathTextBox.TabIndex = 1;
this.PathTextBox.TextChanged += new System.EventHandler(this.OnPathTextBoxTextChanged); this.PathTextBox.TextChanged += new System.EventHandler(this.OnPathTextBoxTextChanged);
// //
// OpenButton // OpenButton
// //
this.OpenButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.OpenButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.OpenButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.OpenButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.OpenButton.Location = new System.Drawing.Point(677, 10); this.OpenButton.Location = new System.Drawing.Point(677, 10);
@ -392,12 +369,10 @@
this.OpenButton.Text = "Open"; this.OpenButton.Text = "Open";
this.OpenButton.UseVisualStyleBackColor = true; this.OpenButton.UseVisualStyleBackColor = true;
this.OpenButton.Click += new System.EventHandler(this.OnOpenButtonClick); this.OpenButton.Click += new System.EventHandler(this.OnOpenButtonClick);
// //
// MusicGroupBox // MusicGroupBox
// //
this.MusicGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.MusicGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MusicGroupBox.Controls.Add(this.AddButton); this.MusicGroupBox.Controls.Add(this.AddButton);
this.MusicGroupBox.Controls.Add(this.RemoveButton); this.MusicGroupBox.Controls.Add(this.RemoveButton);
this.MusicGroupBox.Controls.Add(this.MusicListBox); this.MusicGroupBox.Controls.Add(this.MusicListBox);
@ -405,16 +380,15 @@
this.MusicGroupBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MusicGroupBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MusicGroupBox.Location = new System.Drawing.Point(15, 40); this.MusicGroupBox.Location = new System.Drawing.Point(15, 40);
this.MusicGroupBox.Name = "MusicGroupBox"; this.MusicGroupBox.Name = "MusicGroupBox";
this.MusicGroupBox.Size = new System.Drawing.Size(258, 478); this.MusicGroupBox.Size = new System.Drawing.Size(258, 498);
this.MusicGroupBox.TabIndex = 3; this.MusicGroupBox.TabIndex = 3;
this.MusicGroupBox.TabStop = false; this.MusicGroupBox.TabStop = false;
this.MusicGroupBox.Text = "Music"; this.MusicGroupBox.Text = "Music";
// //
// AddButton // AddButton
// //
this.AddButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.AddButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right))); this.AddButton.Location = new System.Drawing.Point(6, 467);
this.AddButton.Location = new System.Drawing.Point(6, 447);
this.AddButton.Menu = this.ImportContextMenu; this.AddButton.Menu = this.ImportContextMenu;
this.AddButton.Name = "AddButton"; this.AddButton.Name = "AddButton";
this.AddButton.Size = new System.Drawing.Size(120, 25); this.AddButton.Size = new System.Drawing.Size(120, 25);
@ -422,68 +396,63 @@
this.AddButton.TabIndex = 5; this.AddButton.TabIndex = 5;
this.AddButton.Text = "Add"; this.AddButton.Text = "Add";
this.AddButton.UseVisualStyleBackColor = true; this.AddButton.UseVisualStyleBackColor = true;
// //
// ImportContextMenu // ImportContextMenu
// //
this.ImportContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.ImportContextMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { this.ImportVoxMenu, this.ImportKshMenu, this.MenuSeparator8, this.BulkImportKshMenu });
this.ImportVoxMenu, //
this.ImportKshMenu,
this.MenuSeparator8,
this.BulkImportKshMenu});
//
// ImportVoxMenu // ImportVoxMenu
// //
this.ImportVoxMenu.Index = 0; this.ImportVoxMenu.Index = 0;
this.ImportVoxMenu.Text = "Add New"; this.ImportVoxMenu.Text = "Add New";
this.ImportVoxMenu.Click += new System.EventHandler(this.OnAddNewMenuClick); this.ImportVoxMenu.Click += new System.EventHandler(this.OnAddNewMenuClick);
// //
// ImportKshMenu // ImportKshMenu
// //
this.ImportKshMenu.Index = 1; this.ImportKshMenu.Index = 1;
this.ImportKshMenu.Text = "Import Ksh.."; this.ImportKshMenu.Text = "Import Ksh..";
this.ImportKshMenu.Click += new System.EventHandler(this.OnSingleImportMenuClick); this.ImportKshMenu.Click += new System.EventHandler(this.OnSingleImportMenuClick);
// //
// MenuSeparator8 // MenuSeparator8
// //
this.MenuSeparator8.Index = 2; this.MenuSeparator8.Index = 2;
this.MenuSeparator8.Text = "-"; this.MenuSeparator8.Text = "-";
// //
// BulkImportKshMenu // BulkImportKshMenu
// //
this.BulkImportKshMenu.Index = 3; this.BulkImportKshMenu.Index = 3;
this.BulkImportKshMenu.Text = "Bulk Import Ksh.."; this.BulkImportKshMenu.Text = "Bulk Import Ksh..";
this.BulkImportKshMenu.Click += new System.EventHandler(this.OnBulkImportKshMenuClick); this.BulkImportKshMenu.Click += new System.EventHandler(this.OnBulkImportKshMenuClick);
// //
// RemoveButton // RemoveButton
// //
this.RemoveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.RemoveButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.RemoveButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.RemoveButton.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.RemoveButton.Location = new System.Drawing.Point(132, 447); this.RemoveButton.Location = new System.Drawing.Point(132, 467);
this.RemoveButton.Name = "RemoveButton"; this.RemoveButton.Name = "RemoveButton";
this.RemoveButton.Size = new System.Drawing.Size(120, 25); this.RemoveButton.Size = new System.Drawing.Size(120, 25);
this.RemoveButton.TabIndex = 4; this.RemoveButton.TabIndex = 4;
this.RemoveButton.Text = "Remove"; this.RemoveButton.Text = "Remove";
this.RemoveButton.UseVisualStyleBackColor = true; this.RemoveButton.UseVisualStyleBackColor = true;
this.RemoveButton.Click += new System.EventHandler(this.OnRemoveButtonClick); this.RemoveButton.Click += new System.EventHandler(this.OnRemoveButtonClick);
// //
// MusicListBox // MusicListBox
// //
this.MusicListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.MusicListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MusicListBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MusicListBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MusicListBox.FormattingEnabled = true; this.MusicListBox.FormattingEnabled = true;
this.MusicListBox.Location = new System.Drawing.Point(6, 19); this.MusicListBox.Location = new System.Drawing.Point(6, 19);
this.MusicListBox.Name = "MusicListBox"; this.MusicListBox.Name = "MusicListBox";
this.MusicListBox.Size = new System.Drawing.Size(246, 420); this.MusicListBox.Size = new System.Drawing.Size(246, 433);
this.MusicListBox.Sorted = true; this.MusicListBox.Sorted = true;
this.MusicListBox.TabIndex = 2; this.MusicListBox.TabIndex = 2;
this.MusicListBox.SelectedIndexChanged += new System.EventHandler(this.OnMusicListBoxSelectedIndexChanged); this.MusicListBox.SelectedIndexChanged += new System.EventHandler(this.OnMusicListBoxSelectedIndexChanged);
// //
// MetadataGroupBox // MetadataGroupBox
// //
this.MetadataGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.MetadataGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right))); this.MetadataGroupBox.Controls.Add(this.ArtistYomiganaTextBox);
this.MetadataGroupBox.Controls.Add(this.TitleYomiganaTextBox);
this.MetadataGroupBox.Controls.Add(this.SoundGroupBox); this.MetadataGroupBox.Controls.Add(this.SoundGroupBox);
this.MetadataGroupBox.Controls.Add(this.DistributionPicker); this.MetadataGroupBox.Controls.Add(this.DistributionPicker);
this.MetadataGroupBox.Controls.Add(this.ReleaseLabel); this.MetadataGroupBox.Controls.Add(this.ReleaseLabel);
@ -506,58 +475,75 @@
this.MetadataGroupBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MetadataGroupBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MetadataGroupBox.Location = new System.Drawing.Point(279, 40); this.MetadataGroupBox.Location = new System.Drawing.Point(279, 40);
this.MetadataGroupBox.Name = "MetadataGroupBox"; this.MetadataGroupBox.Name = "MetadataGroupBox";
this.MetadataGroupBox.Size = new System.Drawing.Size(473, 478); this.MetadataGroupBox.Size = new System.Drawing.Size(473, 498);
this.MetadataGroupBox.TabIndex = 4; this.MetadataGroupBox.TabIndex = 4;
this.MetadataGroupBox.TabStop = false; this.MetadataGroupBox.TabStop = false;
this.MetadataGroupBox.Text = "Metadata"; this.MetadataGroupBox.Text = "Metadata";
// //
// ArtistYomiganaTextBox
//
this.ArtistYomiganaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.ArtistYomiganaTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ArtistYomiganaTextBox.Location = new System.Drawing.Point(314, 76);
this.ArtistYomiganaTextBox.Name = "ArtistYomiganaTextBox";
this.ArtistYomiganaTextBox.Size = new System.Drawing.Size(152, 21);
this.ArtistYomiganaTextBox.TabIndex = 31;
//
// TitleYomiganaTextBox
//
this.TitleYomiganaTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
this.TitleYomiganaTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TitleYomiganaTextBox.Location = new System.Drawing.Point(314, 49);
this.TitleYomiganaTextBox.Name = "TitleYomiganaTextBox";
this.TitleYomiganaTextBox.Size = new System.Drawing.Size(151, 21);
this.TitleYomiganaTextBox.TabIndex = 30;
//
// SoundGroupBox // SoundGroupBox
// //
this.SoundGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.SoundGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.SoundGroupBox.Controls.Add(this.VolumeIndicatorLabel); this.SoundGroupBox.Controls.Add(this.VolumeIndicatorLabel);
this.SoundGroupBox.Controls.Add(this.Import2DXPreviewFileButton); this.SoundGroupBox.Controls.Add(this.ImportPreviewFileButton);
this.SoundGroupBox.Controls.Add(this.Import2DXMusicFileButton); this.SoundGroupBox.Controls.Add(this.ImportMusicFileButton);
this.SoundGroupBox.Controls.Add(this.VolumeLabel); this.SoundGroupBox.Controls.Add(this.VolumeLabel);
this.SoundGroupBox.Controls.Add(this.VolumeTrackBar); this.SoundGroupBox.Controls.Add(this.VolumeTrackBar);
this.SoundGroupBox.Location = new System.Drawing.Point(19, 217); this.SoundGroupBox.Location = new System.Drawing.Point(19, 237);
this.SoundGroupBox.Name = "SoundGroupBox"; this.SoundGroupBox.Name = "SoundGroupBox";
this.SoundGroupBox.Size = new System.Drawing.Size(447, 80); this.SoundGroupBox.Size = new System.Drawing.Size(447, 80);
this.SoundGroupBox.TabIndex = 10; this.SoundGroupBox.TabIndex = 10;
this.SoundGroupBox.TabStop = false; this.SoundGroupBox.TabStop = false;
this.SoundGroupBox.Text = "Music Assets && Settings"; this.SoundGroupBox.Text = "Music Assets && Settings";
// //
// VolumeIndicatorLabel // VolumeIndicatorLabel
// //
this.VolumeIndicatorLabel.Location = new System.Drawing.Point(400, 51); this.VolumeIndicatorLabel.Location = new System.Drawing.Point(400, 51);
this.VolumeIndicatorLabel.Name = "VolumeIndicatorLabel"; this.VolumeIndicatorLabel.Name = "VolumeIndicatorLabel";
this.VolumeIndicatorLabel.Size = new System.Drawing.Size(37, 13); this.VolumeIndicatorLabel.Size = new System.Drawing.Size(37, 13);
this.VolumeIndicatorLabel.TabIndex = 27; this.VolumeIndicatorLabel.TabIndex = 27;
this.VolumeIndicatorLabel.Text = "91%"; this.VolumeIndicatorLabel.Text = "91%";
this.VolumeIndicatorLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.VolumeIndicatorLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// Import2DXPreviewFileButton // ImportPreviewFileButton
// //
this.Import2DXPreviewFileButton.Location = new System.Drawing.Point(227, 20); this.ImportPreviewFileButton.Location = new System.Drawing.Point(227, 20);
this.Import2DXPreviewFileButton.Name = "Import2DXPreviewFileButton"; this.ImportPreviewFileButton.Name = "ImportPreviewFileButton";
this.Import2DXPreviewFileButton.Size = new System.Drawing.Size(207, 23); this.ImportPreviewFileButton.Size = new System.Drawing.Size(207, 23);
this.Import2DXPreviewFileButton.TabIndex = 12; this.ImportPreviewFileButton.TabIndex = 12;
this.Import2DXPreviewFileButton.Text = "Import 2DX Preview"; this.ImportPreviewFileButton.Text = "Import Preview";
this.Import2DXPreviewFileButton.UseVisualStyleBackColor = true; this.ImportPreviewFileButton.UseVisualStyleBackColor = true;
this.Import2DXPreviewFileButton.Click += new System.EventHandler(this.OnImport2DXPreviewFileButtonClick); this.ImportPreviewFileButton.Click += new System.EventHandler(this.OnImportPreviewFileButtonClick);
// //
// Import2DXMusicFileButton // ImportMusicFileButton
// //
this.Import2DXMusicFileButton.Location = new System.Drawing.Point(14, 20); this.ImportMusicFileButton.Location = new System.Drawing.Point(14, 20);
this.Import2DXMusicFileButton.Name = "Import2DXMusicFileButton"; this.ImportMusicFileButton.Name = "ImportMusicFileButton";
this.Import2DXMusicFileButton.Size = new System.Drawing.Size(207, 23); this.ImportMusicFileButton.Size = new System.Drawing.Size(207, 23);
this.Import2DXMusicFileButton.TabIndex = 11; this.ImportMusicFileButton.TabIndex = 11;
this.Import2DXMusicFileButton.Text = "Import 2DX Music"; this.ImportMusicFileButton.Text = "Import Music";
this.Import2DXMusicFileButton.UseVisualStyleBackColor = true; this.ImportMusicFileButton.UseVisualStyleBackColor = true;
this.Import2DXMusicFileButton.Click += new System.EventHandler(this.OnImport2DXMusicFileButtonClick); this.ImportMusicFileButton.Click += new System.EventHandler(this.OnImportMusicFileButtonClick);
// //
// VolumeLabel // VolumeLabel
// //
this.VolumeLabel.AutoSize = true; this.VolumeLabel.AutoSize = true;
this.VolumeLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VolumeLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.VolumeLabel.Location = new System.Drawing.Point(17, 51); this.VolumeLabel.Location = new System.Drawing.Point(17, 51);
@ -566,11 +552,10 @@
this.VolumeLabel.TabIndex = 26; this.VolumeLabel.TabIndex = 26;
this.VolumeLabel.Text = "Volume"; this.VolumeLabel.Text = "Volume";
this.VolumeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.VolumeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// VolumeTrackBar // VolumeTrackBar
// //
this.VolumeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.VolumeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.VolumeTrackBar.AutoSize = false; this.VolumeTrackBar.AutoSize = false;
this.VolumeTrackBar.Location = new System.Drawing.Point(54, 49); this.VolumeTrackBar.Location = new System.Drawing.Point(54, 49);
this.VolumeTrackBar.Maximum = 120; this.VolumeTrackBar.Maximum = 120;
@ -580,11 +565,10 @@
this.VolumeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; this.VolumeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
this.VolumeTrackBar.Value = 91; this.VolumeTrackBar.Value = 91;
this.VolumeTrackBar.ValueChanged += new System.EventHandler(this.OnMetadataChanged); this.VolumeTrackBar.ValueChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// DistributionPicker // DistributionPicker
// //
this.DistributionPicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.DistributionPicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.DistributionPicker.CustomFormat = "yyyy-MM-dd"; this.DistributionPicker.CustomFormat = "yyyy-MM-dd";
this.DistributionPicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.DistributionPicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DistributionPicker.Location = new System.Drawing.Point(83, 157); this.DistributionPicker.Location = new System.Drawing.Point(83, 157);
@ -592,9 +576,9 @@
this.DistributionPicker.Size = new System.Drawing.Size(382, 21); this.DistributionPicker.Size = new System.Drawing.Size(382, 21);
this.DistributionPicker.TabIndex = 8; this.DistributionPicker.TabIndex = 8;
this.DistributionPicker.ValueChanged += new System.EventHandler(this.OnMetadataChanged); this.DistributionPicker.ValueChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// ReleaseLabel // ReleaseLabel
// //
this.ReleaseLabel.AutoSize = true; this.ReleaseLabel.AutoSize = true;
this.ReleaseLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ReleaseLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ReleaseLabel.Location = new System.Drawing.Point(16, 162); this.ReleaseLabel.Location = new System.Drawing.Point(16, 162);
@ -603,11 +587,10 @@
this.ReleaseLabel.TabIndex = 29; this.ReleaseLabel.TabIndex = 29;
this.ReleaseLabel.Text = "Dist. Date"; this.ReleaseLabel.Text = "Dist. Date";
this.ReleaseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ReleaseLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// LevelGroupBox // LevelGroupBox
// //
this.LevelGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) this.LevelGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.LevelGroupBox.Controls.Add(this.InfEditButton); this.LevelGroupBox.Controls.Add(this.InfEditButton);
this.LevelGroupBox.Controls.Add(this.ExhEditButton); this.LevelGroupBox.Controls.Add(this.ExhEditButton);
this.LevelGroupBox.Controls.Add(this.AdvEditButton); this.LevelGroupBox.Controls.Add(this.AdvEditButton);
@ -616,15 +599,15 @@
this.LevelGroupBox.Controls.Add(this.JacketExhPictureBox); this.LevelGroupBox.Controls.Add(this.JacketExhPictureBox);
this.LevelGroupBox.Controls.Add(this.JacketAdvPictureBox); this.LevelGroupBox.Controls.Add(this.JacketAdvPictureBox);
this.LevelGroupBox.Controls.Add(this.JacketNovPictureBox); this.LevelGroupBox.Controls.Add(this.JacketNovPictureBox);
this.LevelGroupBox.Location = new System.Drawing.Point(19, 307); this.LevelGroupBox.Location = new System.Drawing.Point(19, 327);
this.LevelGroupBox.Name = "LevelGroupBox"; this.LevelGroupBox.Name = "LevelGroupBox";
this.LevelGroupBox.Size = new System.Drawing.Size(447, 165); this.LevelGroupBox.Size = new System.Drawing.Size(447, 165);
this.LevelGroupBox.TabIndex = 14; this.LevelGroupBox.TabIndex = 14;
this.LevelGroupBox.TabStop = false; this.LevelGroupBox.TabStop = false;
this.LevelGroupBox.Text = "Level Assets && Metadata"; this.LevelGroupBox.Text = "Level Assets && Metadata";
// //
// InfEditButton // InfEditButton
// //
this.InfEditButton.Location = new System.Drawing.Point(331, 133); this.InfEditButton.Location = new System.Drawing.Point(331, 133);
this.InfEditButton.Name = "InfEditButton"; this.InfEditButton.Name = "InfEditButton";
this.InfEditButton.Size = new System.Drawing.Size(108, 26); this.InfEditButton.Size = new System.Drawing.Size(108, 26);
@ -633,9 +616,9 @@
this.InfEditButton.Text = "--"; this.InfEditButton.Text = "--";
this.InfEditButton.UseVisualStyleBackColor = true; this.InfEditButton.UseVisualStyleBackColor = true;
this.InfEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick); this.InfEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick);
// //
// ExhEditButton // ExhEditButton
// //
this.ExhEditButton.Location = new System.Drawing.Point(223, 133); this.ExhEditButton.Location = new System.Drawing.Point(223, 133);
this.ExhEditButton.Name = "ExhEditButton"; this.ExhEditButton.Name = "ExhEditButton";
this.ExhEditButton.Size = new System.Drawing.Size(108, 26); this.ExhEditButton.Size = new System.Drawing.Size(108, 26);
@ -644,9 +627,9 @@
this.ExhEditButton.Text = "EXH"; this.ExhEditButton.Text = "EXH";
this.ExhEditButton.UseVisualStyleBackColor = true; this.ExhEditButton.UseVisualStyleBackColor = true;
this.ExhEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick); this.ExhEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick);
// //
// AdvEditButton // AdvEditButton
// //
this.AdvEditButton.Location = new System.Drawing.Point(115, 133); this.AdvEditButton.Location = new System.Drawing.Point(115, 133);
this.AdvEditButton.Name = "AdvEditButton"; this.AdvEditButton.Name = "AdvEditButton";
this.AdvEditButton.Size = new System.Drawing.Size(108, 26); this.AdvEditButton.Size = new System.Drawing.Size(108, 26);
@ -655,9 +638,9 @@
this.AdvEditButton.Text = "ADV"; this.AdvEditButton.Text = "ADV";
this.AdvEditButton.UseVisualStyleBackColor = true; this.AdvEditButton.UseVisualStyleBackColor = true;
this.AdvEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick); this.AdvEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick);
// //
// NovEditButton // NovEditButton
// //
this.NovEditButton.Location = new System.Drawing.Point(7, 133); this.NovEditButton.Location = new System.Drawing.Point(7, 133);
this.NovEditButton.Name = "NovEditButton"; this.NovEditButton.Name = "NovEditButton";
this.NovEditButton.Size = new System.Drawing.Size(108, 26); this.NovEditButton.Size = new System.Drawing.Size(108, 26);
@ -666,9 +649,9 @@
this.NovEditButton.Text = "NOV"; this.NovEditButton.Text = "NOV";
this.NovEditButton.UseVisualStyleBackColor = true; this.NovEditButton.UseVisualStyleBackColor = true;
this.NovEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick); this.NovEditButton.Click += new System.EventHandler(this.OnLevelEditButtonClick);
// //
// JacketInfPictureBox // JacketInfPictureBox
// //
this.JacketInfPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s; this.JacketInfPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s;
this.JacketInfPictureBox.Location = new System.Drawing.Point(331, 19); this.JacketInfPictureBox.Location = new System.Drawing.Point(331, 19);
this.JacketInfPictureBox.Name = "JacketInfPictureBox"; this.JacketInfPictureBox.Name = "JacketInfPictureBox";
@ -678,9 +661,9 @@
this.JacketInfPictureBox.TabStop = false; this.JacketInfPictureBox.TabStop = false;
this.JacketInfPictureBox.Tag = "4"; this.JacketInfPictureBox.Tag = "4";
this.JacketInfPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick); this.JacketInfPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick);
// //
// JacketExhPictureBox // JacketExhPictureBox
// //
this.JacketExhPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s; this.JacketExhPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s;
this.JacketExhPictureBox.Location = new System.Drawing.Point(223, 19); this.JacketExhPictureBox.Location = new System.Drawing.Point(223, 19);
this.JacketExhPictureBox.Name = "JacketExhPictureBox"; this.JacketExhPictureBox.Name = "JacketExhPictureBox";
@ -690,9 +673,9 @@
this.JacketExhPictureBox.TabStop = false; this.JacketExhPictureBox.TabStop = false;
this.JacketExhPictureBox.Tag = "3"; this.JacketExhPictureBox.Tag = "3";
this.JacketExhPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick); this.JacketExhPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick);
// //
// JacketAdvPictureBox // JacketAdvPictureBox
// //
this.JacketAdvPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s; this.JacketAdvPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s;
this.JacketAdvPictureBox.Location = new System.Drawing.Point(115, 19); this.JacketAdvPictureBox.Location = new System.Drawing.Point(115, 19);
this.JacketAdvPictureBox.Name = "JacketAdvPictureBox"; this.JacketAdvPictureBox.Name = "JacketAdvPictureBox";
@ -702,9 +685,9 @@
this.JacketAdvPictureBox.TabStop = false; this.JacketAdvPictureBox.TabStop = false;
this.JacketAdvPictureBox.Tag = "2"; this.JacketAdvPictureBox.Tag = "2";
this.JacketAdvPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick); this.JacketAdvPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick);
// //
// JacketNovPictureBox // JacketNovPictureBox
// //
this.JacketNovPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s; this.JacketNovPictureBox.Image = global::VoxCharger.Properties.Resources.jk_dummy_s;
this.JacketNovPictureBox.Location = new System.Drawing.Point(7, 19); this.JacketNovPictureBox.Location = new System.Drawing.Point(7, 19);
this.JacketNovPictureBox.Name = "JacketNovPictureBox"; this.JacketNovPictureBox.Name = "JacketNovPictureBox";
@ -714,9 +697,9 @@
this.JacketNovPictureBox.TabStop = false; this.JacketNovPictureBox.TabStop = false;
this.JacketNovPictureBox.Tag = "1"; this.JacketNovPictureBox.Tag = "1";
this.JacketNovPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick); this.JacketNovPictureBox.Click += new System.EventHandler(this.OnJacketPictureBoxClick);
// //
// BackgroundLabel // BackgroundLabel
// //
this.BackgroundLabel.AutoSize = true; this.BackgroundLabel.AutoSize = true;
this.BackgroundLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BackgroundLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BackgroundLabel.Location = new System.Drawing.Point(16, 189); this.BackgroundLabel.Location = new System.Drawing.Point(16, 189);
@ -725,134 +708,50 @@
this.BackgroundLabel.TabIndex = 23; this.BackgroundLabel.TabIndex = 23;
this.BackgroundLabel.Text = "Background"; this.BackgroundLabel.Text = "Background";
this.BackgroundLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.BackgroundLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// BackgroundDropDown // BackgroundDropDown
// //
this.BackgroundDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.BackgroundDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.BackgroundDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.BackgroundDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.BackgroundDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BackgroundDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BackgroundDropDown.FormattingEnabled = true; this.BackgroundDropDown.FormattingEnabled = true;
this.BackgroundDropDown.Items.AddRange(new object[] { this.BackgroundDropDown.Items.AddRange(new object[] { "00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "18", "19", "27", "29", "30", "31", "34", "36", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "53", "54", "57", "58", "59", "60", "61", "63", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "86", "87", "88", "89", "90", "91", "92", "93", "92", "95", "96", "97", "98" });
"00",
"01",
"02",
"03",
"04",
"05",
"06",
"07",
"08",
"09",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"18",
"19",
"27",
"29",
"30",
"31",
"34",
"36",
"38",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
"46",
"47",
"48",
"49",
"50",
"51",
"53",
"54",
"57",
"58",
"59",
"60",
"61",
"63",
"65",
"66",
"67",
"68",
"69",
"70",
"71",
"72",
"73",
"74",
"75",
"76",
"77",
"78",
"79",
"80",
"81"});
this.BackgroundDropDown.Location = new System.Drawing.Point(83, 184); this.BackgroundDropDown.Location = new System.Drawing.Point(83, 184);
this.BackgroundDropDown.Name = "BackgroundDropDown"; this.BackgroundDropDown.Name = "BackgroundDropDown";
this.BackgroundDropDown.Size = new System.Drawing.Size(383, 21); this.BackgroundDropDown.Size = new System.Drawing.Size(383, 21);
this.BackgroundDropDown.TabIndex = 9; this.BackgroundDropDown.TabIndex = 9;
this.BackgroundDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged); this.BackgroundDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged);
// //
// InfVerDropDown // InfVerDropDown
// //
this.InfVerDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.InfVerDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.InfVerDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.InfVerDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.InfVerDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.InfVerDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.InfVerDropDown.FormattingEnabled = true; this.InfVerDropDown.FormattingEnabled = true;
this.InfVerDropDown.Items.AddRange(new object[] { this.InfVerDropDown.Items.AddRange(new object[] { "MXM", "INF", "GRV", "HVN", "VVD", "XCD" });
"MXM",
"INF",
"GRV",
"HVN",
"VVD"});
this.InfVerDropDown.Location = new System.Drawing.Point(370, 130); this.InfVerDropDown.Location = new System.Drawing.Point(370, 130);
this.InfVerDropDown.Name = "InfVerDropDown"; this.InfVerDropDown.Name = "InfVerDropDown";
this.InfVerDropDown.Size = new System.Drawing.Size(96, 21); this.InfVerDropDown.Size = new System.Drawing.Size(96, 21);
this.InfVerDropDown.TabIndex = 7; this.InfVerDropDown.TabIndex = 7;
this.InfVerDropDown.SelectedIndexChanged += new System.EventHandler(this.OnInfVerDropDownSelectedIndexChanged); this.InfVerDropDown.SelectedIndexChanged += new System.EventHandler(this.OnInfVerDropDownSelectedIndexChanged);
this.InfVerDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged); this.InfVerDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged);
// //
// BpmMaxNumericBox // BpmMaxNumericBox
// //
this.BpmMaxNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.BpmMaxNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.BpmMaxNumericBox.DecimalPlaces = 2; this.BpmMaxNumericBox.DecimalPlaces = 2;
this.BpmMaxNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BpmMaxNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BpmMaxNumericBox.Location = new System.Drawing.Point(277, 103); this.BpmMaxNumericBox.Location = new System.Drawing.Point(277, 103);
this.BpmMaxNumericBox.Maximum = new decimal(new int[] { this.BpmMaxNumericBox.Maximum = new decimal(new int[] { 10000, 0, 0, 0 });
10000, this.BpmMaxNumericBox.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
0,
0,
0});
this.BpmMaxNumericBox.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.BpmMaxNumericBox.Name = "BpmMaxNumericBox"; this.BpmMaxNumericBox.Name = "BpmMaxNumericBox";
this.BpmMaxNumericBox.Size = new System.Drawing.Size(189, 21); this.BpmMaxNumericBox.Size = new System.Drawing.Size(189, 21);
this.BpmMaxNumericBox.TabIndex = 5; this.BpmMaxNumericBox.TabIndex = 5;
this.BpmMaxNumericBox.Value = new decimal(new int[] { this.BpmMaxNumericBox.Value = new decimal(new int[] { 1, 0, 0, 0 });
1,
0,
0,
0});
this.BpmMaxNumericBox.ValueChanged += new System.EventHandler(this.OnMetadataChanged); this.BpmMaxNumericBox.ValueChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// VersionlLabel // VersionlLabel
// //
this.VersionlLabel.AutoSize = true; this.VersionlLabel.AutoSize = true;
this.VersionlLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VersionlLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.VersionlLabel.Location = new System.Drawing.Point(16, 135); this.VersionlLabel.Location = new System.Drawing.Point(16, 135);
@ -861,39 +760,32 @@
this.VersionlLabel.TabIndex = 15; this.VersionlLabel.TabIndex = 15;
this.VersionlLabel.Text = "Version"; this.VersionlLabel.Text = "Version";
this.VersionlLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.VersionlLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// VersionDropDown // VersionDropDown
// //
this.VersionDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.VersionDropDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.VersionDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.VersionDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.VersionDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.VersionDropDown.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.VersionDropDown.FormattingEnabled = true; this.VersionDropDown.FormattingEnabled = true;
this.VersionDropDown.Items.AddRange(new object[] { this.VersionDropDown.Items.AddRange(new object[] { "Sound Voltex: Booth", "Sound Voltex II: Infinite Infection", "Sound Voltex III: Gravity Wars", "Sound Voltex IV: Heavenly Haven", "Sound Voltex V: Vivid Wave", "Sound Voltex VI: Exceed Gear" });
"Sound Voltex: Booth",
"Sound Voltex II: Infinite Infection",
"Sound Voltex III: Gravity Wars",
"Sound Voltex IV: Heavenly Haven",
"Sound Voltex V: VividWave"});
this.VersionDropDown.Location = new System.Drawing.Point(83, 130); this.VersionDropDown.Location = new System.Drawing.Point(83, 130);
this.VersionDropDown.Name = "VersionDropDown"; this.VersionDropDown.Name = "VersionDropDown";
this.VersionDropDown.Size = new System.Drawing.Size(282, 21); this.VersionDropDown.Size = new System.Drawing.Size(282, 21);
this.VersionDropDown.TabIndex = 6; this.VersionDropDown.TabIndex = 6;
this.VersionDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged); this.VersionDropDown.SelectionChangeCommitted += new System.EventHandler(this.OnMetadataChanged);
// //
// IdTextBox // IdTextBox
// //
this.IdTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.IdTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.IdTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.IdTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.IdTextBox.Location = new System.Drawing.Point(83, 23); this.IdTextBox.Location = new System.Drawing.Point(83, 23);
this.IdTextBox.Name = "IdTextBox"; this.IdTextBox.Name = "IdTextBox";
this.IdTextBox.ReadOnly = true; this.IdTextBox.ReadOnly = true;
this.IdTextBox.Size = new System.Drawing.Size(383, 21); this.IdTextBox.Size = new System.Drawing.Size(383, 21);
this.IdTextBox.TabIndex = 1; this.IdTextBox.TabIndex = 1;
// //
// IdLabel // IdLabel
// //
this.IdLabel.AutoSize = true; this.IdLabel.AutoSize = true;
this.IdLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.IdLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.IdLabel.Location = new System.Drawing.Point(16, 28); this.IdLabel.Location = new System.Drawing.Point(16, 28);
@ -902,9 +794,9 @@
this.IdLabel.TabIndex = 0; this.IdLabel.TabIndex = 0;
this.IdLabel.Text = "ID"; this.IdLabel.Text = "ID";
this.IdLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.IdLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// BpmLabel // BpmLabel
// //
this.BpmLabel.AutoSize = true; this.BpmLabel.AutoSize = true;
this.BpmLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BpmLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BpmLabel.Location = new System.Drawing.Point(16, 106); this.BpmLabel.Location = new System.Drawing.Point(16, 106);
@ -913,47 +805,33 @@
this.BpmLabel.TabIndex = 11; this.BpmLabel.TabIndex = 11;
this.BpmLabel.Text = "BPM"; this.BpmLabel.Text = "BPM";
this.BpmLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.BpmLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// BpmMinNumericBox // BpmMinNumericBox
// //
this.BpmMinNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.BpmMinNumericBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.BpmMinNumericBox.DecimalPlaces = 2; this.BpmMinNumericBox.DecimalPlaces = 2;
this.BpmMinNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.BpmMinNumericBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.BpmMinNumericBox.Location = new System.Drawing.Point(83, 103); this.BpmMinNumericBox.Location = new System.Drawing.Point(83, 103);
this.BpmMinNumericBox.Maximum = new decimal(new int[] { this.BpmMinNumericBox.Maximum = new decimal(new int[] { 10000, 0, 0, 0 });
10000, this.BpmMinNumericBox.Minimum = new decimal(new int[] { 1, 0, 0, 0 });
0,
0,
0});
this.BpmMinNumericBox.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.BpmMinNumericBox.Name = "BpmMinNumericBox"; this.BpmMinNumericBox.Name = "BpmMinNumericBox";
this.BpmMinNumericBox.Size = new System.Drawing.Size(188, 21); this.BpmMinNumericBox.Size = new System.Drawing.Size(188, 21);
this.BpmMinNumericBox.TabIndex = 4; this.BpmMinNumericBox.TabIndex = 4;
this.BpmMinNumericBox.Value = new decimal(new int[] { this.BpmMinNumericBox.Value = new decimal(new int[] { 1, 0, 0, 0 });
1,
0,
0,
0});
this.BpmMinNumericBox.ValueChanged += new System.EventHandler(this.OnMetadataChanged); this.BpmMinNumericBox.ValueChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// ArtistTextBox // ArtistTextBox
// //
this.ArtistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.ArtistTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.ArtistTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ArtistTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ArtistTextBox.Location = new System.Drawing.Point(83, 76); this.ArtistTextBox.Location = new System.Drawing.Point(83, 76);
this.ArtistTextBox.Name = "ArtistTextBox"; this.ArtistTextBox.Name = "ArtistTextBox";
this.ArtistTextBox.Size = new System.Drawing.Size(383, 21); this.ArtistTextBox.Size = new System.Drawing.Size(225, 21);
this.ArtistTextBox.TabIndex = 3; this.ArtistTextBox.TabIndex = 3;
this.ArtistTextBox.TextChanged += new System.EventHandler(this.OnMetadataChanged); this.ArtistTextBox.TextChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// ArtistLabel // ArtistLabel
// //
this.ArtistLabel.AutoSize = true; this.ArtistLabel.AutoSize = true;
this.ArtistLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ArtistLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ArtistLabel.Location = new System.Drawing.Point(16, 81); this.ArtistLabel.Location = new System.Drawing.Point(16, 81);
@ -962,20 +840,19 @@
this.ArtistLabel.TabIndex = 5; this.ArtistLabel.TabIndex = 5;
this.ArtistLabel.Text = "Artist"; this.ArtistLabel.Text = "Artist";
this.ArtistLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ArtistLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// TitleTextBox // TitleTextBox
// //
this.TitleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.TitleTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
| System.Windows.Forms.AnchorStyles.Right)));
this.TitleTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.TitleTextBox.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TitleTextBox.Location = new System.Drawing.Point(83, 49); this.TitleTextBox.Location = new System.Drawing.Point(83, 49);
this.TitleTextBox.Name = "TitleTextBox"; this.TitleTextBox.Name = "TitleTextBox";
this.TitleTextBox.Size = new System.Drawing.Size(383, 21); this.TitleTextBox.Size = new System.Drawing.Size(225, 21);
this.TitleTextBox.TabIndex = 2; this.TitleTextBox.TabIndex = 2;
this.TitleTextBox.TextChanged += new System.EventHandler(this.OnMetadataChanged); this.TitleTextBox.TextChanged += new System.EventHandler(this.OnMetadataChanged);
// //
// TitleLabel // TitleLabel
// //
this.TitleLabel.AutoSize = true; this.TitleLabel.AutoSize = true;
this.TitleLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.TitleLabel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.TitleLabel.Location = new System.Drawing.Point(16, 54); this.TitleLabel.Location = new System.Drawing.Point(16, 54);
@ -984,21 +861,21 @@
this.TitleLabel.TabIndex = 2; this.TitleLabel.TabIndex = 2;
this.TitleLabel.Text = "Title"; this.TitleLabel.Text = "Title";
this.TitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.TitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// MainStatusBar // MainStatusBar
// //
this.MainStatusBar.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MainStatusBar.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.MainStatusBar.Location = new System.Drawing.Point(0, 529); this.MainStatusBar.Location = new System.Drawing.Point(0, 559);
this.MainStatusBar.Name = "MainStatusBar"; this.MainStatusBar.Name = "MainStatusBar";
this.MainStatusBar.Size = new System.Drawing.Size(764, 22); this.MainStatusBar.Size = new System.Drawing.Size(774, 22);
this.MainStatusBar.TabIndex = 5; this.MainStatusBar.TabIndex = 5;
this.MainStatusBar.Text = "Ready"; this.MainStatusBar.Text = "Ready";
// //
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(764, 551); this.ClientSize = new System.Drawing.Size(774, 581);
this.Controls.Add(this.MainStatusBar); this.Controls.Add(this.MainStatusBar);
this.Controls.Add(this.MetadataGroupBox); this.Controls.Add(this.MetadataGroupBox);
this.Controls.Add(this.MusicGroupBox); this.Controls.Add(this.MusicGroupBox);
@ -1030,9 +907,11 @@
((System.ComponentModel.ISupportInitialize)(this.BpmMinNumericBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.BpmMinNumericBox)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.TextBox TitleYomiganaTextBox;
private System.Windows.Forms.TextBox ArtistYomiganaTextBox;
#endregion #endregion
private System.Windows.Forms.MainMenu MainMenu; private System.Windows.Forms.MainMenu MainMenu;
@ -1090,15 +969,16 @@
private System.Windows.Forms.MenuItem SaveAsFileMenu; private System.Windows.Forms.MenuItem SaveAsFileMenu;
private System.Windows.Forms.StatusBar MainStatusBar; private System.Windows.Forms.StatusBar MainStatusBar;
private System.Windows.Forms.GroupBox SoundGroupBox; private System.Windows.Forms.GroupBox SoundGroupBox;
private System.Windows.Forms.Button Import2DXPreviewFileButton; private System.Windows.Forms.Button ImportPreviewFileButton;
private System.Windows.Forms.Button Import2DXMusicFileButton; private System.Windows.Forms.Button ImportMusicFileButton;
private System.Windows.Forms.Label VolumeIndicatorLabel; private System.Windows.Forms.Label VolumeIndicatorLabel;
private System.Windows.Forms.MenuItem MenuSeparator4; private System.Windows.Forms.MenuItem MenuSeparator4;
private System.Windows.Forms.MenuItem Import2DXEditMenu; private System.Windows.Forms.MenuItem ImportAudioEditMenu;
private System.Windows.Forms.MenuItem Import2DXPreviewEditMenu; private System.Windows.Forms.MenuItem ImportAudioPreviewEditMenu;
private System.Windows.Forms.MenuItem MenuSeparator5; private System.Windows.Forms.MenuItem MenuSeparator5;
private System.Windows.Forms.MenuItem ExplorerEditMenu; private System.Windows.Forms.MenuItem ExplorerEditMenu;
private System.Windows.Forms.MenuItem MusicFileBuilder; private System.Windows.Forms.MenuItem MusicFileBuilder;
private System.Windows.Forms.MenuItem S3VFileBuilder;
private MenuButton AddButton; private MenuButton AddButton;
private System.Windows.Forms.ContextMenu ImportContextMenu; private System.Windows.Forms.ContextMenu ImportContextMenu;
private System.Windows.Forms.MenuItem ImportKshMenu; private System.Windows.Forms.MenuItem ImportKshMenu;

View File

@ -1,16 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO; using System.IO;
using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace VoxCharger namespace VoxCharger
{ {
@ -18,11 +13,11 @@ namespace VoxCharger
{ {
#region -- Variables -- #region -- Variables --
private const int DefaultVolume = 91; private const int DefaultVolume = 91;
private readonly Image DummyJacket = VoxCharger.Properties.Resources.jk_dummy_s; private readonly Image _dummyJacket = VoxCharger.Properties.Resources.jk_dummy_s;
private readonly Dictionary<string, Queue<Action>> actions = new Dictionary<string, Queue<Action>>(); private readonly Dictionary<string, Queue<Action>> _actions = new Dictionary<string, Queue<Action>>();
private bool Pristine = true; private bool _pristine = true;
private bool Autosave = true; private bool _autosave = true;
#endregion #endregion
#region --- Form --- #region --- Form ---
@ -37,7 +32,7 @@ namespace VoxCharger
private void OnMainFormFormClosing(object sender, FormClosingEventArgs e) private void OnMainFormFormClosing(object sender, FormClosingEventArgs e)
{ {
if (!Pristine && SaveFileMenu.Enabled) if (!_pristine && SaveFileMenu.Enabled)
{ {
var response = MessageBox.Show( var response = MessageBox.Show(
"Save file before exit the program?", "Save file before exit the program?",
@ -57,7 +52,7 @@ namespace VoxCharger
#region --- Menu --- #region --- Menu ---
private void OnNewFileMenuClick(object sender, EventArgs e) private void OnNewFileMenuClick(object sender, EventArgs e)
{ {
if (!Pristine && SaveFileMenu.Enabled) if (!_pristine && SaveFileMenu.Enabled)
{ {
var response = MessageBox.Show( var response = MessageBox.Show(
"Save file before open another mix?", "Save file before open another mix?",
@ -71,27 +66,26 @@ namespace VoxCharger
else if (response == DialogResult.Cancel) else if (response == DialogResult.Cancel)
return; return;
Pristine = true; _pristine = true;
actions.Clear(); _actions.Clear();
} }
string gamePath = AssetManager.GamePath; string gamePath = AssetManager.GamePath;
if (string.IsNullOrEmpty(AssetManager.MixPath) || !Directory.Exists(AssetManager.MixPath)) if (string.IsNullOrEmpty(AssetManager.MixPath) || !Directory.Exists(AssetManager.MixPath))
{ {
using (var browser = new FolderBrowserDialog()) using (var browser = new CommonOpenFileDialog())
{ {
browser.ShowNewFolderButton = true; browser.IsFolderPicker = true;
browser.Description = "Select KFC Content Root"; browser.Multiselect = false;
if (browser.ShowDialog() == DialogResult.OK) if (browser.ShowDialog() != CommonFileDialogResult.Ok)
{ return;
gamePath = browser.SelectedPath;
gamePath = browser.FileName;
PathTextBox.Text = string.Empty;
MusicListBox.Items.Clear();
PathTextBox.Text = string.Empty; ResetEditor();
MusicListBox.Items.Clear();
ResetEditor();
}
} }
} }
@ -165,10 +159,10 @@ namespace VoxCharger
private void OnChangeMixFileMenuClick(object sender, EventArgs e) private void OnChangeMixFileMenuClick(object sender, EventArgs e)
{ {
if (!Pristine && SaveFileMenu.Enabled) if (!_pristine && SaveFileMenu.Enabled)
{ {
var response = MessageBox.Show( var response = MessageBox.Show(
"Save file before open another mix?", "Save file before Open another mix?",
"Change Mix", "Change Mix",
MessageBoxButtons.YesNoCancel, MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Question MessageBoxIcon.Question
@ -179,8 +173,8 @@ namespace VoxCharger
else if (response == DialogResult.Cancel) else if (response == DialogResult.Cancel)
return; return;
Pristine = true; _pristine = true;
actions.Clear(); _actions.Clear();
} }
using (var mixSelector = new MixSelectorForm()) using (var mixSelector = new MixSelectorForm())
@ -211,7 +205,7 @@ namespace VoxCharger
MetadataGroupBox.Enabled = false; MetadataGroupBox.Enabled = false;
MusicListBox.Items.Clear(); MusicListBox.Items.Clear();
DisableUI(); DisableUi();
ResetEditor(); ResetEditor();
AssetManager.Initialize(AssetManager.GamePath); AssetManager.Initialize(AssetManager.GamePath);
@ -235,8 +229,8 @@ namespace VoxCharger
private void OnAutosaveEditMenuClick(object sender, EventArgs e) private void OnAutosaveEditMenuClick(object sender, EventArgs e)
{ {
Autosave = !Autosave; _autosave = !_autosave;
AutosaveEditMenu.Checked = Autosave; AutosaveEditMenu.Checked = _autosave;
} }
private void OnExplorerEditMenuClick(object sender, EventArgs e) private void OnExplorerEditMenuClick(object sender, EventArgs e)
@ -266,13 +260,15 @@ namespace VoxCharger
private void OnBulkConvertToolsMenuClick(object sender, EventArgs e) private void OnBulkConvertToolsMenuClick(object sender, EventArgs e)
{ {
using (var browser = new FolderBrowserDialog()) using (var browser = new CommonOpenFileDialog())
{ {
browser.Description = "Select Kshoot chart repository"; browser.IsFolderPicker = true;
if (browser.ShowDialog() != DialogResult.OK) browser.Multiselect = false;
if (browser.ShowDialog() != CommonFileDialogResult.Ok)
return; return;
using (var converter = new ConverterForm(browser.SelectedPath, ConvertMode.Converter)) using (var converter = new ConverterForm(browser.FileName, ConvertMode.Converter))
converter.ShowDialog(); converter.ShowDialog();
} }
} }
@ -282,7 +278,7 @@ namespace VoxCharger
using (var browser = new OpenFileDialog()) using (var browser = new OpenFileDialog())
using (var exporter = new SaveFileDialog()) using (var exporter = new SaveFileDialog())
{ {
browser.Filter = "Audio Files|*.wav;*.ogg;*.mp3;*.flac|2DX Music File|*.2dx;*.s3v|Music Files|*.wav;*.ogg;*.mp3;*.flac"; browser.Filter = "Audio Files|*.wav;*.ogg;*.mp3;*.flac";
browser.CheckFileExists = true; browser.CheckFileExists = true;
if (browser.ShowDialog() != DialogResult.OK) if (browser.ShowDialog() != DialogResult.OK)
@ -292,31 +288,29 @@ namespace VoxCharger
if (exporter.ShowDialog() != DialogResult.OK) if (exporter.ShowDialog() != DialogResult.OK)
return; return;
string source = browser.FileName;
string output = exporter.FileName;
string error = string.Empty; string error = string.Empty;
using (var loader = new LoadingForm()) using (var loader = new LoadingForm())
{ {
loader.SetAction(() => loader.SetAction(dialog =>
{ {
try try
{ {
loader.SetStatus("Processing assets.."); dialog.SetStatus("Processing assets..");
DxEncoder.Encode(new[] { source }, output);
string source = browser.FileName; dialog.SetProgress(100);
string tmp = DxTool.ConvertToWave(source, false); dialog.DialogResult = DialogResult.OK;
DxTool.Build(tmp, exporter.FileName); dialog.Complete();
Directory.Delete(tmp, true);
loader.SetProgress(100);
loader.DialogResult = DialogResult.OK;
loader.Complete();
} }
catch (Exception ex) catch (Exception ex)
{ {
error = ex.Message; error = ex.Message;
loader.DialogResult = DialogResult.Abort; dialog.DialogResult = DialogResult.Abort;
loader.Complete(); dialog.Complete();
} }
}); });
@ -342,6 +336,84 @@ namespace VoxCharger
} }
} }
private void OnS3VFileBuilderClick(object sender, EventArgs e)
{
using (var browser = new OpenFileDialog())
using (var exporter = new SaveFileDialog())
{
browser.Filter = "Audio Files|*.wav;*.ogg;*.mp3;*.flac";
browser.CheckFileExists = true;
if (browser.ShowDialog() != DialogResult.OK)
return;
exporter.Filter = "S3V File|*.s3v";
if (exporter.ShowDialog() != DialogResult.OK)
return;
string source = browser.FileName;
string output = exporter.FileName;
string error = string.Empty;
using (var loader = new LoadingForm())
{
loader.SetAction(dialog =>
{
try
{
dialog.SetStatus("Processing assets..");
S3VTool.Convert(source, output, AudioImportOptions.Default);
dialog.SetProgress(100);
dialog.DialogResult = DialogResult.OK;
dialog.Complete();
}
catch (Exception ex)
{
error = ex.Message;
dialog.DialogResult = DialogResult.Abort;
dialog.Complete();
}
});
if (!File.Exists(S3VTool.ConverterFileName))
S3VTool.ConverterFileName = "ffmpeg.exe";
if (!File.Exists(S3VTool.ConverterFileName))
{
using (var ofd = new OpenFileDialog())
{
ofd.Filter = "ffmpeg.exe | ffmpeg.exe";
ofd.CheckFileExists = true;
if (ofd.ShowDialog() == DialogResult.OK)
S3VTool.ConverterFileName = ofd.FileName;
}
}
if (loader.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(
"Audio file has been converted successfully",
"S3V Builder",
MessageBoxButtons.OK,
MessageBoxIcon.Information
);
}
else
{
MessageBox.Show(
$"Failed to convert audio file.\n{error}",
"S3V Builder",
MessageBoxButtons.OK,
MessageBoxIcon.Error
);
}
}
}
}
private void OnAboutHelpMenuClick(object sender, EventArgs e) private void OnAboutHelpMenuClick(object sender, EventArgs e)
{ {
using (var about = new AboutForm()) using (var about = new AboutForm())
@ -359,7 +431,7 @@ namespace VoxCharger
{ {
try try
{ {
if (!Pristine && SaveFileMenu.Enabled) if (!_pristine && SaveFileMenu.Enabled)
{ {
var response = MessageBox.Show( var response = MessageBox.Show(
"Save file before open another mix?", "Save file before open another mix?",
@ -373,19 +445,17 @@ namespace VoxCharger
else if (response == DialogResult.Cancel) else if (response == DialogResult.Cancel)
return; return;
Pristine = true; _pristine = true;
actions.Clear(); _actions.Clear();
} }
using (var browser = new FolderBrowserDialog()) using (var browser = new CommonOpenFileDialog())
using (var mixSelector = new MixSelectorForm()) using (var mixSelector = new MixSelectorForm())
{ {
browser.ShowNewFolderButton = true; browser.IsFolderPicker = true;
browser.Description = "Select KFC Content Root"; if (browser.ShowDialog() == CommonFileDialogResult.Ok)
if (browser.ShowDialog() == DialogResult.OK)
{ {
AssetManager.Initialize(browser.SelectedPath); AssetManager.Initialize(browser.FileName);
PathTextBox.Text = string.Empty; PathTextBox.Text = string.Empty;
MusicListBox.Items.Clear(); MusicListBox.Items.Clear();
@ -432,10 +502,12 @@ namespace VoxCharger
var header = new VoxHeader() var header = new VoxHeader()
{ {
Title = "Untitled", Title = "Untitled",
TitleYomigana = "ダミー", // dummy
Ascii = defaultAscii, Ascii = defaultAscii,
Artist = "Unknown", Artist = "Unknown",
Version = GameVersion.VividWave, ArtistYomigana = "ダミー", // dummy
InfVersion = InfiniteVersion.MXM, Version = GameVersion.ExceedGear,
InfVersion = InfiniteVersion.Mxm,
BackgroundId = short.Parse(ConverterForm.LastBackground), BackgroundId = short.Parse(ConverterForm.LastBackground),
GenreId = 16, GenreId = 16,
BpmMin = 1, BpmMin = 1,
@ -448,7 +520,7 @@ namespace VoxCharger
} }
}; };
Pristine = false; _pristine = false;
AssetManager.Headers.Add(header); AssetManager.Headers.Add(header);
MusicListBox.Items.Add(header); MusicListBox.Items.Add(header);
} }
@ -469,15 +541,15 @@ namespace VoxCharger
return; return;
var header = converter.Result; var header = converter.Result;
if (!actions.ContainsKey(header.Ascii)) if (!_actions.ContainsKey(header.Ascii))
actions[header.Ascii] = new Queue<Action>(); _actions[header.Ascii] = new Queue<Action>();
Pristine = false; _pristine = false;
AssetManager.Headers.Add(header); AssetManager.Headers.Add(header);
MusicListBox.Items.Add(header); MusicListBox.Items.Add(header);
actions[header.Ascii].Enqueue(converter.Action); _actions[header.Ascii].Enqueue(converter.Action);
if (Autosave) if (_autosave)
Save(AssetManager.MdbFilename); Save(AssetManager.MdbFilename);
} }
} }
@ -485,30 +557,32 @@ namespace VoxCharger
private void OnBulkImportKshMenuClick(object sender, EventArgs e) private void OnBulkImportKshMenuClick(object sender, EventArgs e)
{ {
using (var browser = new FolderBrowserDialog()) using (var browser = new CommonOpenFileDialog())
{ {
browser.Description = "Select Kshoot chart repository"; browser.IsFolderPicker = true;
if (browser.ShowDialog() != DialogResult.OK) browser.Multiselect = false;
if (browser.ShowDialog() != CommonFileDialogResult.Ok)
return; return;
using (var converter = new ConverterForm(browser.SelectedPath, ConvertMode.BulkImporter)) using (var converter = new ConverterForm(browser.FileName, ConvertMode.BulkImporter))
{ {
if (converter.ShowDialog() != DialogResult.OK) if (converter.ShowDialog() != DialogResult.OK)
return; return;
foreach (var header in converter.ResultSet) foreach (var header in converter.ResultSet)
{ {
if (!actions.ContainsKey(header.Ascii)) if (!_actions.ContainsKey(header.Ascii))
actions[header.Ascii] = new Queue<Action>(); _actions[header.Ascii] = new Queue<Action>();
AssetManager.Headers.Add(header); AssetManager.Headers.Add(header);
MusicListBox.Items.Add(header); MusicListBox.Items.Add(header);
actions[header.Ascii].Enqueue(converter.ActionSet[header.Ascii]); _actions[header.Ascii].Enqueue(converter.ActionSet[header.Ascii]);
} }
Pristine = false; _pristine = false;
if (Autosave) if (_autosave)
Save(AssetManager.MdbFilename); Save(AssetManager.MdbFilename);
} }
} }
@ -528,16 +602,16 @@ namespace VoxCharger
if (int.TryParse(IdTextBox.Text, out int id)) if (int.TryParse(IdTextBox.Text, out int id))
{ {
// Validate ID // Validate ID
if (!AssetManager.ValidateMusicID(id)) if (!AssetManager.ValidateMusicId(id))
{ {
IdTextBox.Text = header.ID.ToString(); IdTextBox.Text = header.Id.ToString();
MessageBox.Show("Music ID is already taken", "Duplicate", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show("Music ID is already taken", "Duplicate", MessageBoxButtons.OK, MessageBoxIcon.Warning);
} }
else else
header.ID = id; header.Id = id;
} }
else else
IdTextBox.Text = header.ID.ToString(); IdTextBox.Text = header.Id.ToString();
double min = (double)Math.Min(BpmMinNumericBox.Value, BpmMaxNumericBox.Value); double min = (double)Math.Min(BpmMinNumericBox.Value, BpmMaxNumericBox.Value);
double max = (double)Math.Max(BpmMinNumericBox.Value, BpmMaxNumericBox.Value); double max = (double)Math.Max(BpmMinNumericBox.Value, BpmMaxNumericBox.Value);
@ -545,17 +619,19 @@ namespace VoxCharger
BpmMaxNumericBox.Value = (decimal)max; BpmMaxNumericBox.Value = (decimal)max;
header.Title = TitleTextBox.Text; header.Title = TitleTextBox.Text;
header.TitleYomigana = TitleYomiganaTextBox.Text;
header.Artist = ArtistTextBox.Text; header.Artist = ArtistTextBox.Text;
header.ArtistYomigana = ArtistYomiganaTextBox.Text;
header.BpmMin = min; header.BpmMin = min;
header.BpmMax = max; header.BpmMax = max;
header.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1); header.Version = (GameVersion)(VersionDropDown.SelectedIndex + 1);
header.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.MXM : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1); header.InfVersion = InfVerDropDown.SelectedIndex == 0 ? InfiniteVersion.Mxm : (InfiniteVersion)(InfVerDropDown.SelectedIndex + 1);
header.DistributionDate = DistributionPicker.Value; header.DistributionDate = DistributionPicker.Value;
header.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]); header.BackgroundId = short.Parse((BackgroundDropDown.SelectedItem ?? "0").ToString().Split(' ')[0]);
header.Volume = (short)VolumeTrackBar.Value; header.Volume = (short)VolumeTrackBar.Value;
VolumeIndicatorLabel.Text = $"{VolumeTrackBar.Value:#00}%"; VolumeIndicatorLabel.Text = $"{VolumeTrackBar.Value:#00}%";
Pristine = false; _pristine = false;
} }
private void OnLevelEditButtonClick(object sender, EventArgs e) private void OnLevelEditButtonClick(object sender, EventArgs e)
@ -575,10 +651,10 @@ namespace VoxCharger
header.Levels[difficulty] = editor.Result; header.Levels[difficulty] = editor.Result;
if (editor.Action != null) if (editor.Action != null)
{ {
if (!actions.ContainsKey(header.Ascii)) if (!_actions.ContainsKey(header.Ascii))
actions[header.Ascii] = new Queue<Action>(); _actions[header.Ascii] = new Queue<Action>();
actions[header.Ascii].Enqueue(editor.Action); _actions[header.Ascii].Enqueue(editor.Action);
} }
if (header.Levels.ContainsKey(Difficulty.Infinite)) if (header.Levels.ContainsKey(Difficulty.Infinite))
@ -588,10 +664,10 @@ namespace VoxCharger
OnInfVerDropDownSelectedIndexChanged(sender, e); OnInfVerDropDownSelectedIndexChanged(sender, e);
Pristine = false; _pristine = false;
LoadJacket(header); LoadJacket(header);
if (Autosave) if (_autosave)
Save(AssetManager.MdbFilename); Save(AssetManager.MdbFilename);
} }
} }
@ -606,18 +682,14 @@ namespace VoxCharger
InfEditButton.Text = InfVerDropDown.SelectedItem.ToString(); InfEditButton.Text = InfVerDropDown.SelectedItem.ToString();
} }
private void OnImport2DXMusicFileButtonClick(object sender, EventArgs e) private void OnImportMusicFileButtonClick(object sender, EventArgs e)
{ {
Import2DX(); ImportAudioFile();
if (Autosave)
Save(AssetManager.MdbFilename);
} }
private void OnImport2DXPreviewFileButtonClick(object sender, EventArgs e) private void OnImportPreviewFileButtonClick(object sender, EventArgs e)
{ {
Import2DX(true); ImportAudioFile(true);
if (Autosave)
Save(AssetManager.MdbFilename);
} }
private void OnJacketPictureBoxClick(object sender, EventArgs e) private void OnJacketPictureBoxClick(object sender, EventArgs e)
@ -648,8 +720,7 @@ namespace VoxCharger
#region --- Mix List Management --- #region --- Mix List Management ---
private void OnMusicListBoxSelectedIndexChanged(object sender, EventArgs e) private void OnMusicListBoxSelectedIndexChanged(object sender, EventArgs e)
{ {
var header = MusicListBox.SelectedItem as VoxHeader; if (!(MusicListBox.SelectedItem is VoxHeader header))
if (header == null)
{ {
MetadataGroupBox.Enabled = false; MetadataGroupBox.Enabled = false;
ResetEditor(); ResetEditor();
@ -657,34 +728,78 @@ namespace VoxCharger
return; return;
} }
IdTextBox.Text = header.ID.ToString(); IdTextBox.Text = header.Id.ToString();
TitleTextBox.Text = VoxHeader.FixMappedChars(header.Title); TitleTextBox.Text = VoxHeader.WithDecodedSymbols(header.Title);
ArtistTextBox.Text = VoxHeader.FixMappedChars(header.Artist); TitleYomiganaTextBox.Text = VoxHeader.WithDecodedSymbols(header.TitleYomigana);
BpmMinNumericBox.Value = (decimal)header.BpmMin; ArtistTextBox.Text = VoxHeader.WithDecodedSymbols(header.Artist);
BpmMaxNumericBox.Value = (decimal)header.BpmMax; ArtistYomiganaTextBox.Text = VoxHeader.WithDecodedSymbols(header.ArtistYomigana);
VersionDropDown.SelectedIndex = (int)(header.Version) - 1;
InfVerDropDown.SelectedIndex = header.InfVersion == InfiniteVersion.MXM ? 0 : (int)(header.InfVersion) - 1; try
{
BpmMinNumericBox.Minimum = 1;
BpmMaxNumericBox.Minimum = 1;
BpmMinNumericBox.Value = (decimal)header.BpmMin;
BpmMaxNumericBox.Value = (decimal)header.BpmMax;
BpmMinNumericBox.Enabled = true;
BpmMaxNumericBox.Enabled = true;
}
catch (Exception)
{
BpmMinNumericBox.Minimum = 0;
BpmMaxNumericBox.Minimum = 0;
BpmMinNumericBox.Value = 0;
BpmMaxNumericBox.Value = 0;
BpmMinNumericBox.Enabled = false;
BpmMaxNumericBox.Enabled = false;
}
try
{
VersionDropDown.DropDownStyle = ComboBoxStyle.DropDownList;
InfVerDropDown.DropDownStyle = ComboBoxStyle.DropDownList;
VersionDropDown.SelectedIndex = (int)(header.Version) - 1;
InfVerDropDown.SelectedIndex = header.InfVersion == InfiniteVersion.Mxm ? 0 : (int)(header.InfVersion) - 1;
if (header.Levels.ContainsKey(Difficulty.Infinite))
InfVerDropDown.Items[0] = "MXM";
else
InfVerDropDown.Items[0] = "--";
VersionDropDown.Enabled = true;
InfVerDropDown.Enabled = true;
}
catch (Exception)
{
VersionDropDown.DropDownStyle = ComboBoxStyle.DropDown;
InfVerDropDown.DropDownStyle = ComboBoxStyle.DropDown;
VersionDropDown.Text = "--";
VersionDropDown.Enabled = false;
InfVerDropDown.Text = "--";
InfVerDropDown.Enabled = false;
}
DistributionPicker.Value = header.DistributionDate; DistributionPicker.Value = header.DistributionDate;
VolumeTrackBar.Value = header.Volume; VolumeTrackBar.Value = header.Volume;
BackgroundDropDown.SelectedItem = $"{header.BackgroundId:D2}"; BackgroundDropDown.SelectedItem = $"{header.BackgroundId:D2}";
VolumeIndicatorLabel.Text = $"{VolumeTrackBar.Value:#00}%";
VolumeIndicatorLabel.Text = $"{VolumeTrackBar.Value:#00}%"; bool safe = !string.IsNullOrEmpty(AssetManager.MixName);
if (header.Levels.ContainsKey(Difficulty.Infinite)) AddButton.Enabled = safe;
InfVerDropDown.Items[0] = "MXM"; AddEditMenu.Enabled = safe;
else RemoveButton.Enabled = safe;
InfVerDropDown.Items[0] = "--"; RemoveEditMenu.Enabled = safe;
ImportAudioEditMenu.Enabled = safe;
bool safe = !string.IsNullOrEmpty(AssetManager.MixName); ImportAudioPreviewEditMenu.Enabled = safe;
AddButton.Enabled = safe; ExplorerEditMenu.Enabled = true;
AddEditMenu.Enabled = safe; EditMenu.Enabled = true;
RemoveButton.Enabled = safe; MetadataGroupBox.Enabled = true;
RemoveEditMenu.Enabled = safe; InfEditButton.Text = InfVerDropDown.SelectedItem.ToString();
Import2DXEditMenu.Enabled = safe;
Import2DXPreviewEditMenu.Enabled = safe;
ExplorerEditMenu.Enabled = true;
EditMenu.Enabled = true;
MetadataGroupBox.Enabled = true;
InfEditButton.Text = InfVerDropDown.SelectedItem.ToString();
LoadJacket(header); LoadJacket(header);
} }
@ -709,10 +824,10 @@ namespace VoxCharger
MusicListBox.Items.Remove(header); MusicListBox.Items.Remove(header);
// Clear pending modification, since this asset will be deleted anyway // Clear pending modification, since this asset will be deleted anyway
actions[header.Ascii] = new Queue<Action>(); _actions[header.Ascii] = new Queue<Action>();
actions[header.Ascii].Enqueue(() => AssetManager.DeleteAssets(header)); _actions[header.Ascii].Enqueue(() => AssetManager.DeleteAssets(header));
if (Autosave) if (_autosave)
Save(AssetManager.MdbFilename); Save(AssetManager.MdbFilename);
} }
@ -728,18 +843,18 @@ namespace VoxCharger
{ {
using (var loader = new LoadingForm()) using (var loader = new LoadingForm())
{ {
loader.SetAction(() => loader.SetAction(dialog =>
{ {
MusicListBox.Items.Clear(); MusicListBox.Items.Clear();
foreach (var header in AssetManager.Headers) foreach (var header in AssetManager.Headers)
{ {
MusicListBox.Items.Add(header); MusicListBox.Items.Add(header);
loader.SetStatus(header.Title); dialog.SetStatus(header.Title);
loader.SetProgress(((float)MusicListBox.Items.Count / AssetManager.Headers.Count) * 100f); dialog.SetProgress(((float)MusicListBox.Items.Count / AssetManager.Headers.Count) * 100f);
} }
loader.Complete(); dialog.Complete();
}); });
@ -752,14 +867,14 @@ namespace VoxCharger
var errors = new List<string>(); var errors = new List<string>();
using (var loader = new LoadingForm()) using (var loader = new LoadingForm())
{ {
var proc = new Action(() => var proc = new Action<LoadingForm>(dialog =>
{ {
float it = 1f; float it = 1f;
foreach (var action in actions) foreach (var action in _actions)
{ {
float progress = (it++ / actions.Count) * 100f; float progress = (it++ / _actions.Count) * 100f;
loader.SetStatus($"[{progress:00}%] - Processing {action.Key} assets.."); dialog.SetStatus($"[{progress:00}%] - Processing {action.Key} assets..");
loader.SetProgress(progress); dialog.SetProgress(progress);
var queue = action.Value; var queue = action.Value;
while (queue.Count > 0) while (queue.Count > 0)
@ -776,14 +891,14 @@ namespace VoxCharger
} }
} }
loader.SetStatus("[100%] - Processing Music DB.."); dialog.SetStatus("[100%] - Processing Music DB..");
loader.SetProgress(100f); dialog.SetProgress(100f);
AssetManager.Headers.Save(dbFilename); AssetManager.Headers.Save(dbFilename);
loader.Complete(); dialog.Complete();
}); });
loader.SetAction(() => new Thread(() => proc()).Start()); loader.SetAction(dialog => new Thread(() => proc(dialog)).Start());
loader.ShowDialog(); loader.ShowDialog();
} }
@ -796,13 +911,13 @@ namespace VoxCharger
MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
} }
actions.Clear(); _actions.Clear();
Pristine = true; _pristine = true;
return errors.Count == 0; return errors.Count == 0;
} }
private void Import2DX(bool preview = false) private void ImportAudioFile(bool preview = false)
{ {
var header = MusicListBox.SelectedItem as VoxHeader; var header = MusicListBox.SelectedItem as VoxHeader;
if (header == null) if (header == null)
@ -810,7 +925,7 @@ namespace VoxCharger
using (var browser = new OpenFileDialog()) using (var browser = new OpenFileDialog())
{ {
browser.Filter = "All supported format|*.2dx;*.s3v;*.wav;*.ogg;*.mp3;*.flac|2DX Music File|*.2dx;*.s3v|Music Files|*.wav;*.ogg;*.mp3;*.flac"; browser.Filter = "All supported formats|*.2dx;*.s3v;*.asf;*.wav;*.ogg;*.mp3;*.flac|BEMANI Music Files|*.2dx;*.s3v|Music Files|*.wav;*.ogg;*.mp3;*.flac;*.asf";
browser.CheckFileExists = true; browser.CheckFileExists = true;
if (browser.ShowDialog() != DialogResult.OK) if (browser.ShowDialog() != DialogResult.OK)
@ -823,10 +938,18 @@ namespace VoxCharger
); );
File.Copy(source, tmp); File.Copy(source, tmp);
if (!actions.ContainsKey(header.Ascii)) if (!_actions.ContainsKey(header.Ascii))
actions[header.Ascii] = new Queue<Action>(); _actions[header.Ascii] = new Queue<Action>();
actions[header.Ascii].Enqueue(() => AssetManager.Import2DX(tmp, header, preview)); var importOptions = new AudioImportOptions
{
Format = browser.FileName.ToLower().EndsWith(".s3v") ? AudioFormat.S3V : AudioFormat.Iidx,
IsPreview = preview,
};
_actions[header.Ascii].Enqueue(() => AssetManager.ImportAudio(tmp, header, importOptions));
if (_autosave)
Save(AssetManager.MdbFilename);
} }
} }
@ -846,14 +969,14 @@ namespace VoxCharger
if (!header.Levels.ContainsKey(diff)) if (!header.Levels.ContainsKey(diff))
{ {
picture.Image = DummyJacket; picture.Image = _dummyJacket;
continue; continue;
} }
try try
{ {
string filename = $"{AssetManager.GetJacketPath(header, diff)}_s.png"; string filename = $"{AssetManager.GetJacketPath(header, diff)}_s.png";
if (File.Exists(filename) && (Pristine || header.Levels[diff].Jacket == null)) if (File.Exists(filename) && (_pristine || header.Levels[diff].Jacket == null))
{ {
using (var image = Image.FromFile(filename)) using (var image = Image.FromFile(filename))
picture.Image = new Bitmap(image); picture.Image = new Bitmap(image);
@ -875,11 +998,11 @@ namespace VoxCharger
picture.Image = new Bitmap(image); picture.Image = new Bitmap(image);
} }
else else
picture.Image = DummyJacket; picture.Image = _dummyJacket;
} }
catch (Exception) catch (Exception)
{ {
picture.Image = DummyJacket; picture.Image = _dummyJacket;
} }
} }
} }
@ -890,24 +1013,24 @@ namespace VoxCharger
MetadataGroupBox.Enabled = false; MetadataGroupBox.Enabled = false;
ResetEditor(); ResetEditor();
DisableUI(); DisableUi();
LoadMusicDb(); LoadMusicDb();
EnableUI(); EnableUi();
} }
private void EnableUI() private void EnableUi()
{ {
UpdateUI(true); UpdateUi(true);
} }
private void DisableUI() private void DisableUi()
{ {
UpdateUI(false); UpdateUi(false);
ResetEditor(); ResetEditor();
} }
private void UpdateUI(bool state) private void UpdateUi(bool state)
{ {
// Dont break your goddamn kfc // Dont break your goddamn kfc
bool safe = !string.IsNullOrEmpty(AssetManager.MixName); bool safe = !string.IsNullOrEmpty(AssetManager.MixName);
@ -925,8 +1048,8 @@ namespace VoxCharger
RemoveButton.Enabled = state && safe; RemoveButton.Enabled = state && safe;
RemoveEditMenu.Enabled = state && safe; RemoveEditMenu.Enabled = state && safe;
EditMenu.Enabled = state && safe; EditMenu.Enabled = state && safe;
Import2DXEditMenu.Enabled = state && safe; ImportAudioEditMenu.Enabled = state && safe;
Import2DXPreviewEditMenu.Enabled = state && safe; ImportAudioPreviewEditMenu.Enabled = state && safe;
foreach (Control control in MetadataGroupBox.Controls) foreach (Control control in MetadataGroupBox.Controls)
{ {
@ -967,7 +1090,7 @@ namespace VoxCharger
if (control is PictureBox) if (control is PictureBox)
{ {
var pictureBox = control as PictureBox; var pictureBox = control as PictureBox;
pictureBox.Image = DummyJacket; pictureBox.Image = _dummyJacket;
} }
else if (control is Button && control.Tag.ToString() == "4") else if (control is Button && control.Tag.ToString() == "4")
{ {
@ -979,8 +1102,8 @@ namespace VoxCharger
VolumeTrackBar.Value = DefaultVolume; VolumeTrackBar.Value = DefaultVolume;
EditMenu.Enabled = false; EditMenu.Enabled = false;
Import2DXEditMenu.Enabled = false; ImportAudioEditMenu.Enabled = false;
Import2DXPreviewEditMenu.Enabled = false; ImportAudioPreviewEditMenu.Enabled = false;
ExplorerEditMenu.Enabled = false; ExplorerEditMenu.Enabled = false;
} }
#endregion #endregion

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
using System; using System.ComponentModel;
using System.ComponentModel;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.Windows.Forms; using System.Windows.Forms;

View File

@ -1,19 +1,14 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace VoxCharger namespace VoxCharger
{ {
public partial class MixSelectorForm : Form public partial class MixSelectorForm : Form
{ {
public int EXPANDED_HEIGHT = 165; public int ExpandedHeight = 165;
public int COLLAPSED_HEIGHT = 140; public int CollapsedHeight = 140;
public MixSelectorForm(bool createMode = false) public MixSelectorForm(bool createMode = false)
{ {
@ -27,7 +22,7 @@ namespace VoxCharger
MixSelectorDropDown.Visible = MixSelectorDropDown.Enabled = false; MixSelectorDropDown.Visible = MixSelectorDropDown.Enabled = false;
ModSelectorLabel.Text = "Enter mix name:"; ModSelectorLabel.Text = "Enter mix name:";
Size = new Size(Size.Width, COLLAPSED_HEIGHT); Size = new Size(Size.Width, CollapsedHeight);
} }
} }
@ -40,9 +35,9 @@ namespace VoxCharger
private void OnModSelectorDropDownSelectedIndexChanged(object sender, EventArgs e) private void OnModSelectorDropDownSelectedIndexChanged(object sender, EventArgs e)
{ {
if (MixSelectorDropDown.SelectedIndex == 0) if (MixSelectorDropDown.SelectedIndex == 0)
Size = new Size(Size.Width, EXPANDED_HEIGHT); Size = new Size(Size.Width, ExpandedHeight);
else else
Size = new Size(Size.Width, COLLAPSED_HEIGHT); Size = new Size(Size.Width, CollapsedHeight);
NameTextBox.Visible = MixSelectorDropDown.SelectedIndex == 0; NameTextBox.Visible = MixSelectorDropDown.SelectedIndex == 0;
ContinueButton.Enabled = true; ContinueButton.Enabled = true;

View File

@ -43,7 +43,7 @@ namespace VoxCharger
Export(header, null, options); Export(header, null, options);
} }
public void Export(VoxHeader header, Dictionary<Difficulty, ChartInfo> charts, ParseOption options = null) public void Export(VoxHeader header, Dictionary<Difficulty, ChartInfo> charts, ParseOption options = null, AudioImportOptions importOptions = null)
{ {
// Assign level info and charts // Assign level info and charts
foreach (var chart in charts) foreach (var chart in charts)
@ -74,10 +74,10 @@ namespace VoxCharger
{ {
var info = chart.Value; var info = chart.Value;
// Make sure to reuse 2dx file for music that share same file // Make sure to reuse 2dx / s3v file for music that share same file
if (string.IsNullOrEmpty(musicFile) || chart.Value.MusicFileName != musicFile) if (string.IsNullOrEmpty(musicFile) || chart.Value.MusicFileName != musicFile)
{ {
string music = Path.Combine(Path.GetDirectoryName(info.FileName), info.Source.MusicFileName); string music = Path.Combine(Path.GetDirectoryName(info.FileName) ?? "", info.Source.MusicFileName);
if (File.Exists(music)) if (File.Exists(music))
{ {
string tmp = Path.Combine( string tmp = Path.Combine(
@ -111,7 +111,7 @@ namespace VoxCharger
} }
} }
Action = new Action(() => Action = () =>
{ {
bool unique = false; bool unique = false;
musicFile = charts.Values.First().MusicFileName; musicFile = charts.Values.First().MusicFileName;
@ -130,22 +130,27 @@ namespace VoxCharger
// Make sure to use single asset for music for shared music file // Make sure to use single asset for music for shared music file
if (!unique) if (!unique)
{ {
AssetManager.Import2DX(musicFile, header); AssetManager.ImportAudio(musicFile, header, importOptions);
AssetManager.Import2DX(musicFile, header, true); AssetManager.ImportAudio(musicFile, header, (importOptions ?? AudioImportOptions.Default).AsPreview());
} }
foreach (var chart in charts.Values) var highest = charts.Max(e => e.Key);
foreach (var entry in charts)
{ {
var chart = entry.Value;
if (unique && File.Exists(chart.MusicFileName)) if (unique && File.Exists(chart.MusicFileName))
{ {
AssetManager.Import2DX(chart.MusicFileName, header, chart.Header.Difficulty); AssetManager.ImportAudio(chart.MusicFileName, header, chart.Header.Difficulty, importOptions);
AssetManager.Import2DX(chart.MusicFileName, header, chart.Header.Difficulty, true);
// Use shared preview using highest level music file
if (entry.Key == highest)
AssetManager.ImportAudio(chart.MusicFileName, header, (importOptions ?? AudioImportOptions.Default).AsPreview());
} }
if (chart.Header.Jacket != null) if (chart.Header.Jacket != null)
AssetManager.ImportJacket(header, chart.Header.Difficulty, chart.Header.Jacket); AssetManager.ImportJacket(header, chart.Header.Difficulty, chart.Header.Jacket);
} }
}); };
} }
public static Dictionary<Difficulty, ChartInfo> GetCharts(string dir, string title) public static Dictionary<Difficulty, ChartInfo> GetCharts(string dir, string title)

View File

@ -12,6 +12,9 @@ namespace VoxCharger
private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("Shift_JIS"); private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("Shift_JIS");
private const string VolPositions = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno"; private const string VolPositions = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno";
private const int DefaultBackgroundId = 88;
private const int DefaultGenre = 16;
public string Title { get; set; } public string Title { get; set; }
public string Artist { get; set; } public string Artist { get; set; }
public string Effector { get; set; } public string Effector { get; set; }
@ -31,13 +34,45 @@ namespace VoxCharger
public class ParseOption public class ParseOption
{ {
public class SoundFxOptions
{
public bool Chip { get; set; } = true;
public bool Long { get; set; } = true;
public bool Laser { get; set; } = true;
}
public class CameraOptions
{
public bool SlamImpact { get; set; } = true;
public Dictionary<Camera.WorkType, bool> EnabledWorks { get; set; } = new Dictionary<Camera.WorkType, bool>();
public bool IsEnabled(Camera.WorkType work)
{
// Non-configured work should be enabled by default
return !EnabledWorks.ContainsKey(work) || EnabledWorks[work];
}
}
public class TrackOptions
{
public Dictionary<Event.ButtonTrack, bool> EnabledButtonTracks { get; set; } = new Dictionary<Event.ButtonTrack, bool>();
public Dictionary<Event.LaserTrack, bool> EnabledLaserTracks { get; set; } = new Dictionary<Event.LaserTrack, bool>();
public bool IsButtonTrackEnabled(Event.ButtonTrack track)
{
return !EnabledButtonTracks.ContainsKey(track) || EnabledButtonTracks[track];
}
public bool IsLaserTrackEnabled(Event.LaserTrack track)
{
return !EnabledLaserTracks.ContainsKey(track) || EnabledLaserTracks[track];
}
}
public bool RealignOffset { get; set; } = false; public bool RealignOffset { get; set; } = false;
public bool EnableChipFx { get; set; } = true; public SoundFxOptions SoundFx { get; set; } = new SoundFxOptions();
public bool EnableLongFx { get; set; } = true; public CameraOptions Camera { get; set; } = new CameraOptions();
public bool EnableCamera { get; set; } = true; public TrackOptions Track { get; set; } = new TrackOptions();
public bool EnableSlamImpact { get; set; } = true;
public bool EnableLaserTrack { get; set; } = true;
public bool EnableButtonTrack { get; set; } = true;
} }
public Ksh() public Ksh()
@ -49,13 +84,15 @@ namespace VoxCharger
return new VoxHeader() return new VoxHeader()
{ {
Title = Title, Title = Title,
TitleYomigana = "ダミー",
Artist = Artist, Artist = Artist,
ArtistYomigana = "ダミー",
BpmMin = BpmMin, BpmMin = BpmMin,
BpmMax = BpmMax, BpmMax = BpmMax,
Volume = Volume > 0 ? (short)Volume : (short)91, Volume = Volume > 0 ? (short)Volume : (short)91,
DistributionDate = DateTime.Now, DistributionDate = DateTime.Now,
BackgroundId = 63, BackgroundId = DefaultBackgroundId,
GenreId = 16, GenreId = DefaultGenre,
}; };
} }
@ -73,19 +110,18 @@ namespace VoxCharger
public void Parse(string fileName, ParseOption opt = null) public void Parse(string fileName, ParseOption opt = null)
{ {
// I pulled all nighters for few days, all for this piece of trash codes :) // I pulled all nighters for few days, all for this piece of trash codes :)
// Reminder: there's lot of "offset" that can be ambigous between many contexts everywhere // Reminder: there's lot of "offset" that can be ambiguous between many contexts everywhere
var lines = File.ReadAllLines(fileName, DefaultEncoding); var lines = File.ReadAllLines(fileName, DefaultEncoding);
if (opt == null) if (opt == null)
opt = new ParseOption(); opt = new ParseOption();
Time time = new Time(1, 1, 0); var time = Time.Initial;
var signature = new Event.TimeSignature(time, 4, 4); var signature = new Event.TimeSignature(time, 4, 4);
var filter = Event.LaserFilter.Peak; var filter = Event.LaserFilter.Peak;
int rangeLeft = 0; int rangeLeft = 0;
int rangeRight = 0; int rangeRight = 0;
var cameras = new Dictionary<Camera.WorkType, Camera>(); var cameras = new Dictionary<Camera.WorkType, Camera>();
var lastCamera = new Dictionary<Camera.WorkType, Camera>();
var hitFx = new Dictionary<Event.ButtonTrack, KshSoundEffect>(); var hitFx = new Dictionary<Event.ButtonTrack, KshSoundEffect>();
var holdFx = new Dictionary<Event.ButtonTrack, Effect>(); var holdFx = new Dictionary<Event.ButtonTrack, Effect>();
var longNotes = new Dictionary<Event.ButtonTrack, Event.Button>(); var longNotes = new Dictionary<Event.ButtonTrack, Event.Button>();
@ -147,7 +183,7 @@ namespace VoxCharger
{ {
// Might just pull it to first bar // Might just pull it to first bar
if (time.Measure == 0) if (time.Measure == 0)
time = new Time(1, 1, 0); time = Time.Initial;
var data = line.Split('='); var data = line.Split('=');
if (data.Length < 2) if (data.Length < 2)
@ -209,9 +245,9 @@ namespace VoxCharger
if (BpmMax == 0f || t > BpmMax) if (BpmMax == 0f || t > BpmMax)
BpmMax = t; BpmMax = t;
if (!value.Contains("-")) if (!value.Contains("-") && Events.GetBpm(new Time(time.Measure, time.Beat, 0))?.Value != t)
{ {
var bpm = new Event.BPM(new Time(time.Measure, time.Beat, 0), t); // beat still acceptable var bpm = new Event.Bpm(new Time(time.Measure, time.Beat, 0), t); // beat still acceptable
Events.Add(bpm); Events.Add(bpm);
} }
} }
@ -222,11 +258,11 @@ namespace VoxCharger
break; break;
case "stop" when float.TryParse(value, out float duration): case "stop" when float.TryParse(value, out float duration):
Event.BPM start = null; Event.Bpm start = null;
time = new Time(time.Measure, time.Beat, 0); time = new Time(time.Measure, time.Beat, 0);
foreach (var ev in Events[time]) foreach (var ev in Events[time])
{ {
if (ev is Event.BPM x) if (ev is Event.Bpm x)
{ {
start = x; start = x;
start.IsStop = true; start.IsStop = true;
@ -236,20 +272,20 @@ namespace VoxCharger
if (start == null) if (start == null)
{ {
var last = Events.GetBPM(time); var last = Events.GetBpm(time);
if (last == null) if (last == null)
break; break;
start = new Event.BPM(time, last.Value); start = new Event.Bpm(time, last.Value);
start.IsStop = true; start.IsStop = true;
Events.Add(start); Events.Add(start);
} }
Event.BPM end = null; Event.Bpm end = null;
var target = Time.FromOffset((int)duration, signature); var target = Time.FromOffset((int)duration, signature);
foreach (var ev in Events[target]) foreach (var ev in Events[target])
{ {
if (ev is Event.BPM x) if (ev is Event.Bpm x)
{ {
end = x; end = x;
end.IsStop = false; end.IsStop = false;
@ -259,11 +295,11 @@ namespace VoxCharger
if (end == null) if (end == null)
{ {
var last = Events.GetBPM(target); var last = Events.GetBpm(target);
if (last == null) if (last == null)
break; break;
end = new Event.BPM(target, last.Value); end = new Event.Bpm(target, last.Value);
end.IsStop = false; end.IsStop = false;
Events.Add(end); Events.Add(end);
} }
@ -284,7 +320,7 @@ namespace VoxCharger
break; break;
case "fx-l": case "fx-l":
case "fx-r": case "fx-r":
if (!opt.EnableLongFx) if (!opt.SoundFx.Long)
break; break;
var htrack = prop == "fx-l" ? Event.ButtonTrack.FxL : Event.ButtonTrack.FxR; var htrack = prop == "fx-l" ? Event.ButtonTrack.FxL : Event.ButtonTrack.FxR;
@ -300,7 +336,7 @@ namespace VoxCharger
break; break;
case "fx-l_se": case "fx-l_se":
case "fx-r_se": case "fx-r_se":
if (!opt.EnableChipFx) if (!opt.SoundFx.Chip)
break; break;
var fxTrack = prop == "fx-l_se" ? Event.ButtonTrack.FxL : Event.ButtonTrack.FxR; var fxTrack = prop == "fx-l_se" ? Event.ButtonTrack.FxL : Event.ButtonTrack.FxR;
@ -316,6 +352,12 @@ namespace VoxCharger
break; break;
case "filtertype": case "filtertype":
if (!opt.SoundFx.Laser)
{
filter = Event.LaserFilter.None;
break;
}
switch (value.Trim()) switch (value.Trim())
{ {
case "peak": filter = Event.LaserFilter.Peak; break; case "peak": filter = Event.LaserFilter.Peak; break;
@ -335,13 +377,29 @@ namespace VoxCharger
#endregion #endregion
#region --- Camera --- #region --- Camera ---
case "tilt" when !float.TryParse(value.Trim(), out float _): case "tilt" when !float.TryParse(value.Trim(), out float _):
if (!opt.EnableCamera) if (!opt.Camera.IsEnabled(Camera.WorkType.Tilt))
break; break;
switch (value.Trim()) // everything untested // We need manually correct the tilt because TiltMode in-game is not reliable
cameras.TryGetValue(Camera.WorkType.Tilt, out var lastTilt);
// Clear the camera cache, leave the previous tilt duration to 0
cameras[Camera.WorkType.Tilt] = null;
switch (value.Trim()) // tested with limited scenario
{ {
case "zero":
case "normal": case "normal":
// Tilt mode normal seems ignored by the game
Events.Add(new Event.TiltMode(time, Event.TiltType.Normal)); Events.Add(new Event.TiltMode(time, Event.TiltType.Normal));
// Instead, we reset the previously applied tilt manually
Events.Add(new Camera.Tilt(time, 0, lastTilt?.End ?? 0.00f, 0.00f));
// Add padding to our reset tilt camera
var tiltPadding = new Camera.Tilt(time, 48, 0.00f, 0.00f);
Events.Add(tiltPadding);
break; break;
case "bigger": case "bigger":
Events.Add(new Event.TiltMode(time, Event.TiltType.Large)); Events.Add(new Event.TiltMode(time, Event.TiltType.Large));
@ -356,139 +414,72 @@ namespace VoxCharger
case "zoom_top": // CAM_RotX case "zoom_top": // CAM_RotX
case "zoom_bottom": // CAM_Radi case "zoom_bottom": // CAM_Radi
case "lane_toggle": // LaneY case "lane_toggle": // LaneY
if (!opt.EnableCamera) if (!float.TryParse(value, out float cameraVal))
break; break;
if (!float.TryParse(value, out float cameraOffset)) var work = Camera.WorkType.None;
break;
Camera.WorkType work = Camera.WorkType.None;
switch (prop) switch (prop)
{ {
case "zoom_top": case "zoom_top":
work = Camera.WorkType.Rotation; work = Camera.WorkType.Rotation;
cameraOffset /= 150.0f; cameraVal /= 100.0f;
break; break;
case "zoom_bottom": case "zoom_bottom":
work = Camera.WorkType.Radian; work = Camera.WorkType.Radian;
cameraOffset /= -150.0f; cameraVal /= -100.0f;
break; break;
case "tilt": case "tilt":
work = Camera.WorkType.Tilt; work = Camera.WorkType.Tilt;
cameraOffset /= 1.0f; // untested cameraVal /= -1.0f; // untested
break; break;
case "lane_toggle": case "lane_toggle":
work = Camera.WorkType.LaneClear; // untested too work = Camera.WorkType.LaneClear; // untested too
break; break;
} }
if (!opt.Camera.IsEnabled(work))
break;
Camera camera = null; Camera camera = null;
cameras.TryGetValue(work, out var lastCamera);
switch (work) switch (work)
{ {
case Camera.WorkType.Rotation: case Camera.WorkType.Rotation:
case Camera.WorkType.Radian: case Camera.WorkType.Radian:
case Camera.WorkType.Tilt: case Camera.WorkType.Tilt:
camera = Camera.Create(work, time, maxDuration, cameraOffset, cameraOffset); camera = Camera.Create(work, time, 0, cameraVal, cameraVal);
break; break;
case Camera.WorkType.LaneClear: case Camera.WorkType.LaneClear:
camera = new Camera.LaneClear(time, (int)cameraOffset, 0.00f, 1024.00f); camera = new Camera.LaneClear(time, (int)cameraVal, 0.00f, 1024.00f);
break; break;
} }
if (!cameras.ContainsKey(work)) if (camera == null)
{ break;
cameras[work] = null;
lastCamera[work] = camera;
Events.Add(camera);
continue; int currentOffset = time.GetAbsoluteOffset(Events.GetTimeSignature(time));
} if (lastCamera != null)
{
var pairCamera = cameras[work]; int lastOffset = lastCamera.Time.GetAbsoluteOffset(Events.GetTimeSignature(lastCamera.Time));
if (pairCamera == null) int diff = Math.Abs(currentOffset - lastOffset);
{
switch (work) lastCamera.End = cameraVal;
{ lastCamera.Duration = diff;
case Camera.WorkType.Rotation: }
case Camera.WorkType.Radian: else
case Camera.WorkType.Tilt: {
cameras[work] = Camera.Create(work, time, -1, cameraOffset, cameraOffset); // Tilt might be reset via TiltMode event
break; var timePair = work != Camera.WorkType.Tilt ? Time.Initial : time;
case Camera.WorkType.LaneClear: int offsetPair = work != Camera.WorkType.Tilt ? currentOffset : Math.Abs(currentOffset - timePair.GetAbsoluteOffset(Events.GetTimeSignature(timePair)));
var ev = new Camera.LaneClear(time, (int)cameraOffset, 1024.00f, 0.00f);
cameras[work] = ev; var init = Camera.Create(work, timePair, 0, 0.00f, cameraVal);
Events.Add(ev); var pair = Camera.Create(work, timePair, offsetPair, cameraVal, cameraVal);
break; Events.Add(init, pair);
}
}
else
{
// Can't really use Time.Difference since time signature can be different across different measures
float curOffset = time.GetAbsoluteOffset(signature);
float pairOffset = pairCamera.Time.GetAbsoluteOffset(Events.GetTimeSignature(pairCamera.Time));
if (work == Camera.WorkType.LaneClear)
{
camera.Start = pairCamera.End;
camera.End = pairCamera.Start;
if ((int)Math.Abs(curOffset - pairOffset) != pairCamera.Duration)
{
var fill = new Camera.LaneClear(null, 0, pairCamera.End, camera.Start);
var fillOffset = pairOffset + pairCamera.Duration;
var timeSig = Events.GetTimeSignature((int)(fillOffset / 192f));
fill.Time = Time.FromOffset(fillOffset, timeSig);
fill.Duration = (int)Math.Abs(curOffset - fill.Time.GetAbsoluteOffset(timeSig));
Events.Add(fill);
}
cameras[work] = camera;
Events.Add(camera);
break;
}
// Assign camera properties
camera.Time = pairCamera.Time;
camera.Duration = (int)Math.Abs(curOffset - pairOffset);
camera.Start = pairCamera.Start;
// Find gap between last camera event
var prevCamera = lastCamera[work];
float lastOffset = prevCamera.Time.GetAbsoluteOffset(Events.GetTimeSignature(prevCamera.Time));
int diff = (int)Math.Abs(pairOffset - lastOffset);
// There's seems to be gap
if (prevCamera != null && prevCamera.Duration != diff)
{
// Check gap, is indeed something that we can fill
if (prevCamera.Duration < diff)
{
// Adjust time and duration to fill the gap, make sure to use correct time signature!
var fill = Camera.Create(work, time, 0, prevCamera.End, pairCamera.Start);
var fillOffset = lastOffset + prevCamera.Duration;
var timeSig = Events.GetTimeSignature((int)(fillOffset / 192f));
fill.Time = Time.FromOffset(fillOffset, timeSig);
fill.Duration = (int)Math.Abs(pairOffset - fill.Time.GetAbsoluteOffset(timeSig));
Events.Add(fill);
}
// The previous duration is overlap with current time, readjust previous event duration
else
{
prevCamera.Duration = diff;
prevCamera.End = camera.Start;
}
}
cameras[work] = null;
lastCamera[work] = camera;
Events.Add(camera);
} }
cameras[work] = camera;
Events.Add(camera);
break; break;
#endregion #endregion
} }
@ -532,9 +523,6 @@ namespace VoxCharger
#region --- BT & FX --- #region --- BT & FX ---
for (int channel = 0; channel < 7; channel++) for (int channel = 0; channel < 7; channel++)
{ {
if (!opt.EnableButtonTrack)
break;
Event.ButtonTrack track; Event.ButtonTrack track;
switch(channel) switch(channel)
{ {
@ -547,6 +535,9 @@ namespace VoxCharger
default: continue; default: continue;
} }
if (!opt.Track.IsButtonTrackEnabled(track))
continue;
// FxL and FxR accept any char for long note // FxL and FxR accept any char for long note
if (!int.TryParse(line[channel].ToString(), out int flag) && (track != Event.ButtonTrack.FxL && track != Event.ButtonTrack.FxR)) if (!int.TryParse(line[channel].ToString(), out int flag) && (track != Event.ButtonTrack.FxL && track != Event.ButtonTrack.FxR))
continue; continue;
@ -625,8 +616,8 @@ namespace VoxCharger
#region --- Laser --- #region --- Laser ---
foreach (var track in new[] { Event.LaserTrack.Left, Event.LaserTrack.Right }) foreach (var track in new[] { Event.LaserTrack.Left, Event.LaserTrack.Right })
{ {
if (!opt.EnableLaserTrack) if (!opt.Track.IsLaserTrackEnabled(track))
break; continue;
int channel = track == Event.LaserTrack.Left ? 8 : 9; int channel = track == Event.LaserTrack.Left ? 8 : 9;
int range = track == Event.LaserTrack.Left ? rangeLeft : rangeRight; int range = track == Event.LaserTrack.Left ? rangeLeft : rangeRight;
@ -637,7 +628,7 @@ namespace VoxCharger
if (flag == ':') if (flag == ':')
continue; continue;
if (line.Length >= 13 && opt.EnableSlamImpact) if (line.Length >= 13 && opt.Camera.SlamImpact)
{ {
// Ignore direction, use slam offset instead // Ignore direction, use slam offset instead
char f = line[10]; char f = line[10];
@ -674,7 +665,7 @@ namespace VoxCharger
range range
); );
laser.Slam = noteCount >= 32; laser.IsLaserSlam = noteCount >= 32;
if (flag != '-') if (flag != '-')
{ {
// Determine laser offset // Determine laser offset
@ -757,7 +748,7 @@ namespace VoxCharger
// Due to terrible ksh format for slam that appear in 1/32 or shorter // Due to terrible ksh format for slam that appear in 1/32 or shorter
// the output of conversion may have 6 cells gap apart each other // the output of conversion may have 6 cells gap apart each other
// TODO: Use offset instead of Time.Difference, cuz it might start and finish in different measure // TODO: Use offset instead of Time.Difference, cuz it might start and finish in different measure
if (start.Slam && end.Slam && end.Time.Difference(start.Time, timeSig) <= 6) if (start.IsLaserSlam && end.IsLaserSlam && end.Time.Difference(start.Time, timeSig) <= 6)
{ {
// Pull one of the offset // Pull one of the offset
// In some rare cases, not pulling the offset will ended up normal laser instead of slam, especially in slow bpm // In some rare cases, not pulling the offset will ended up normal laser instead of slam, especially in slow bpm

View File

@ -8,13 +8,13 @@ namespace VoxCharger
{ {
public class KshDefinition public class KshDefinition
{ {
private Dictionary<string, string> definitions; private Dictionary<string, string> _definitions;
public bool IsNormalized { get; set; } = true; public bool IsNormalized { get; set; } = true;
public string Value { get; private set; } public string Value { get; private set; }
public KshDefinition(string data) public KshDefinition(string data)
{ {
definitions = new Dictionary<string, string>(); _definitions = new Dictionary<string, string>();
foreach (string p in data.Split(';')) foreach (string p in data.Split(';'))
{ {
var prop = p.Split('='); var prop = p.Split('=');
@ -26,7 +26,7 @@ namespace VoxCharger
continue; continue;
} }
definitions.Add( _definitions.Add(
prop[0].Trim(), prop[0].Trim(),
prop[1].Trim() prop[1].Trim()
); );
@ -36,9 +36,9 @@ namespace VoxCharger
public bool GetString(string pname, out string result) public bool GetString(string pname, out string result)
{ {
result = string.Empty; result = string.Empty;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
result = definitions[pname]; result = _definitions[pname];
return true; return true;
} }
@ -48,9 +48,9 @@ namespace VoxCharger
public bool GetValue(string pname, out int result) public bool GetValue(string pname, out int result)
{ {
result = 0; result = 0;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
string str = GetDominantValue(definitions[pname]); string str = GetDominantValue(_definitions[pname]);
if (str.Contains('/')) if (str.Contains('/'))
return GetFraction(pname, out result); return GetFraction(pname, out result);
else if (str.Contains('%')) else if (str.Contains('%'))
@ -67,9 +67,9 @@ namespace VoxCharger
public bool GetValue(string pname, out float result) public bool GetValue(string pname, out float result)
{ {
result = 0; result = 0;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
string str = GetDominantValue(definitions[pname]); string str = GetDominantValue(_definitions[pname]);
if (str.Contains('/')) if (str.Contains('/'))
return GetFraction(pname, out result); return GetFraction(pname, out result);
else if (str.Contains('%')) else if (str.Contains('%'))
@ -110,9 +110,9 @@ namespace VoxCharger
public bool GetFraction(string pname, out int numerator, out int denominator) public bool GetFraction(string pname, out int numerator, out int denominator)
{ {
denominator = numerator = 0; denominator = numerator = 0;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
var data = definitions[pname].Split('/'); var data = _definitions[pname].Split('/');
return data.Length == 2 && int.TryParse(data[0], out numerator) && int.TryParse(data[1], out denominator); return data.Length == 2 && int.TryParse(data[0], out numerator) && int.TryParse(data[1], out denominator);
} }
@ -122,9 +122,9 @@ namespace VoxCharger
public bool GetFraction(string pname, out float numerator, out float denominator) public bool GetFraction(string pname, out float numerator, out float denominator)
{ {
denominator = numerator = 0f; denominator = numerator = 0f;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
var data = definitions[pname].Split('/'); var data = _definitions[pname].Split('/');
return data.Length == 2 && float.TryParse(data[0], out numerator) && float.TryParse(data[1], out denominator); return data.Length == 2 && float.TryParse(data[0], out numerator) && float.TryParse(data[1], out denominator);
} }
@ -134,9 +134,9 @@ namespace VoxCharger
public bool GetPercentage(string pname, out int result) public bool GetPercentage(string pname, out int result)
{ {
result = 0; result = 0;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
string str = definitions[pname]; string str = _definitions[pname];
if (float.TryParse(str.Replace("%", string.Empty), out float percentage)) if (float.TryParse(str.Replace("%", string.Empty), out float percentage))
{ {
result = IsNormalized ? (int)(percentage / 100f) : (int)percentage; result = IsNormalized ? (int)(percentage / 100f) : (int)percentage;
@ -150,9 +150,9 @@ namespace VoxCharger
public bool GetPercentage(string pname, out float result) public bool GetPercentage(string pname, out float result)
{ {
result = 0f; result = 0f;
if (definitions.ContainsKey(pname)) if (_definitions.ContainsKey(pname))
{ {
string str = definitions[pname]; string str = _definitions[pname];
if (float.TryParse(str.Replace("%", string.Empty), out result)) if (float.TryParse(str.Replace("%", string.Empty), out result))
{ {
result = IsNormalized ? result / 100f : result; result = IsNormalized ? result / 100f : result;

View File

@ -8,6 +8,7 @@ namespace VoxCharger
InfiniteInfection = 2, InfiniteInfection = 2,
GravityWars = 3, GravityWars = 3,
HeavenlyHaven = 4, HeavenlyHaven = 4,
VividWave = 5 VividWave = 5,
ExceedGear = 6
} }
} }

View File

@ -8,10 +8,11 @@ namespace VoxCharger
{ {
public enum InfiniteVersion public enum InfiniteVersion
{ {
MXM = 0, Mxm = 0,
INF = 2, Inf = 2,
GRV = 3, Grv = 3,
HVN = 4, Hvn = 4,
VVD = 5 Vvd = 5,
Xcd = 6,
} }
} }

View File

@ -14,21 +14,21 @@ namespace VoxCharger
private const string DummyYomigana = "ダミー"; private const string DummyYomigana = "ダミー";
private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("Shift_JIS"); private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("Shift_JIS");
private Dictionary<int, VoxHeader> headers; private Dictionary<int, VoxHeader> _headers;
private int max = 0; private int _max = 0;
public int Count => headers.Count; public int Count => _headers.Count;
public int LastID => headers.Values.Max(h => h.ID); public int LastId => _headers.Values.Max(h => h.Id);
public MusicDb() public MusicDb()
{ {
headers = new Dictionary<int, VoxHeader>(); _headers = new Dictionary<int, VoxHeader>();
} }
public void Load(string path, bool append = false) public void Load(string path, bool append = false)
{ {
headers = append ? headers : new Dictionary<int, VoxHeader>(); _headers = append ? _headers : new Dictionary<int, VoxHeader>();
var doc = new XmlDocument(); var doc = new XmlDocument();
using (var reader = new StreamReader(path, DefaultEncoding)) using (var reader = new StreamReader(path, DefaultEncoding))
{ {
@ -39,15 +39,17 @@ namespace VoxCharger
foreach (XmlNode music in doc.SelectSingleNode("mdb")) foreach (XmlNode music in doc.SelectSingleNode("mdb"))
{ {
int id = int.Parse(music.Attributes["id"].Value); int id = int.Parse(music.Attributes["id"].Value);
if (append && headers.ContainsKey(id)) if (append && _headers.ContainsKey(id))
continue; continue;
var info = music.SelectSingleNode("info"); var info = music.SelectSingleNode("info");
var header = new VoxHeader var header = new VoxHeader
{ {
ID = id, Id = id,
Title = info.SelectSingleNode("title_name").InnerText, Title = info.SelectSingleNode("title_name").InnerText,
TitleYomigana = info.SelectSingleNode("title_yomigana").InnerText,
Artist = info.SelectSingleNode("artist_name").InnerText, Artist = info.SelectSingleNode("artist_name").InnerText,
ArtistYomigana = info.SelectSingleNode("artist_yomigana").InnerText,
Ascii = info.SelectSingleNode("ascii").InnerText, Ascii = info.SelectSingleNode("ascii").InnerText,
DistributionDate = DateTime.ParseExact(info.SelectSingleNode("distribution_date").InnerText, "yyyyMMdd", CultureInfo.InvariantCulture), DistributionDate = DateTime.ParseExact(info.SelectSingleNode("distribution_date").InnerText, "yyyyMMdd", CultureInfo.InvariantCulture),
Volume = short.Parse(info.SelectSingleNode("volume").InnerText), Volume = short.Parse(info.SelectSingleNode("volume").InnerText),
@ -57,11 +59,15 @@ namespace VoxCharger
InfVersion = (InfiniteVersion)int.Parse(info.SelectSingleNode("inf_ver").InnerText), InfVersion = (InfiniteVersion)int.Parse(info.SelectSingleNode("inf_ver").InnerText),
}; };
// For some reason, konmai decide to use int32 with thousands value for the BPM, e.g 18000 to represent 180.00 BPM
// Why? I don't know, probably the usual fuckery
string bpmMax = info.SelectSingleNode("bpm_max").InnerText; string bpmMax = info.SelectSingleNode("bpm_max").InnerText;
header.BpmMax = double.Parse($"{bpmMax.Substring(0, bpmMax.Length - 2)}.{bpmMax.Substring(bpmMax.Length - 2)}"); header.BpmMax = double.Parse($"{bpmMax.Substring(0, bpmMax.Length - 2)}.{bpmMax.Substring(bpmMax.Length - 2)}");
header.BpmMax = header.BpmMax >= 1000 ? header.BpmMax / 100D : header.BpmMax;
string bpmMin = info.SelectSingleNode("bpm_min").InnerText; string bpmMin = info.SelectSingleNode("bpm_min").InnerText;
header.BpmMin = double.Parse($"{bpmMin.Substring(0, bpmMin.Length - 2)}.{bpmMin.Substring(bpmMin.Length - 2)}"); header.BpmMin = double.Parse($"{bpmMin.Substring(0, bpmMin.Length - 2)}.{bpmMin.Substring(bpmMin.Length - 2)}");
header.BpmMin = header.BpmMin >= 1000 ? header.BpmMin / 100D : header.BpmMin;
header.Levels = new Dictionary<Difficulty, VoxLevelHeader>(); header.Levels = new Dictionary<Difficulty, VoxLevelHeader>();
foreach (XmlNode diffInfo in music.SelectSingleNode("difficulty")) foreach (XmlNode diffInfo in music.SelectSingleNode("difficulty"))
@ -84,10 +90,28 @@ namespace VoxCharger
Level = int.Parse(diffInfo.SelectSingleNode("difnum").InnerText), Level = int.Parse(diffInfo.SelectSingleNode("difnum").InnerText),
Effector = diffInfo.SelectSingleNode("effected_by").InnerText, Effector = diffInfo.SelectSingleNode("effected_by").InnerText,
Illustrator = diffInfo.SelectSingleNode("illustrator").InnerText, Illustrator = diffInfo.SelectSingleNode("illustrator").InnerText,
Limited = int.Parse(diffInfo.SelectSingleNode("limited").InnerText),
Price = int.Parse(diffInfo.SelectSingleNode("price").InnerText), Price = int.Parse(diffInfo.SelectSingleNode("price").InnerText),
Limited = int.Parse(diffInfo.SelectSingleNode("limited").InnerText),
JacketPrint = int.Parse(diffInfo.SelectSingleNode("jacket_print").InnerText),
JacketMask = int.Parse(diffInfo.SelectSingleNode("jacket_mask").InnerText),
}; };
if (diffInfo.SelectSingleNode("radar") != null)
{
var radar = diffInfo.SelectSingleNode("radar");
lvHeader.Radar = new VoxLevelRadar()
{
Notes = byte.Parse(radar.SelectSingleNode("notes").InnerText),
Peak = byte.Parse(radar.SelectSingleNode("peak").InnerText),
Lasers = byte.Parse(radar.SelectSingleNode("tsumami").InnerText),
Tricky = byte.Parse(radar.SelectSingleNode("tricky").InnerText),
HandTrip = byte.Parse(radar.SelectSingleNode("hand-trip").InnerText),
OneHand = byte.Parse(radar.SelectSingleNode("one-hand").InnerText),
};
}
if (lvHeader.Level <= 0) if (lvHeader.Level <= 0)
continue; // Invalid level? continue; // Invalid level?
@ -103,49 +127,49 @@ namespace VoxCharger
var doc = new XmlDocument(); var doc = new XmlDocument();
var master = doc.CreateElement("mdb"); var master = doc.CreateElement("mdb");
var CreateMetaElement = new Func<XmlDocument, string, string, string, XmlElement>((d, n, v, t) => var createMetaElement = new Func<XmlDocument, string, string, string, XmlElement>((d, n, v, t) =>
{ {
var prop = doc.CreateElement(n); var prop = doc.CreateElement(n);
var value = doc.CreateTextNode(v); if (v != null)
prop.AppendChild(doc.CreateTextNode(v));
prop.AppendChild(value);
if (!string.IsNullOrEmpty(t)) if (!string.IsNullOrEmpty(t))
prop.SetAttribute("__type", t); prop.SetAttribute("__type", t);
return prop; return prop;
}); });
foreach (var header in headers.Values) foreach (var header in _headers.Values)
{ {
if (header == null) if (header == null)
continue; continue;
var music = doc.CreateElement("music"); var music = doc.CreateElement("music");
music.SetAttribute("id", header.ID.ToString()); music.SetAttribute("id", header.Id.ToString());
var info = doc.CreateElement("info"); var info = doc.CreateElement("info");
info.AppendChild(CreateMetaElement(doc, "label", header.ID.ToString(), string.Empty)); info.AppendChild(createMetaElement(doc, "label", header.Id.ToString(), string.Empty));
info.AppendChild(CreateMetaElement(doc, "title_name", header.Title, string.Empty)); info.AppendChild(createMetaElement(doc, "title_name", header.Title, string.Empty));
info.AppendChild(CreateMetaElement(doc, "title_yomigana", DummyYomigana, string.Empty)); info.AppendChild(createMetaElement(doc, "title_yomigana", header.TitleYomigana, string.Empty));
info.AppendChild(CreateMetaElement(doc, "artist_name", header.Artist, string.Empty)); info.AppendChild(createMetaElement(doc, "artist_name", header.Artist, string.Empty));
info.AppendChild(CreateMetaElement(doc, "artist_yomigana", DummyYomigana, string.Empty)); info.AppendChild(createMetaElement(doc, "artist_yomigana", header.ArtistYomigana, string.Empty));
info.AppendChild(CreateMetaElement(doc, "ascii", header.Ascii, string.Empty)); info.AppendChild(createMetaElement(doc, "ascii", header.Ascii, string.Empty));
info.AppendChild(CreateMetaElement(doc, "bpm_max", header.BpmMax.ToString("000.00").Replace(".", string.Empty), "u32")); info.AppendChild(createMetaElement(doc, "bpm_max", header.BpmMax.ToString("000.00").Replace(".", string.Empty).Replace(",", string.Empty), "u32"));
info.AppendChild(CreateMetaElement(doc, "bpm_min", header.BpmMin.ToString("000.00").Replace(".", string.Empty), "u32")); info.AppendChild(createMetaElement(doc, "bpm_min", header.BpmMin.ToString("000.00").Replace(".", string.Empty).Replace(",", string.Empty), "u32"));
info.AppendChild(CreateMetaElement(doc, "distribution_date", header.DistributionDate.ToString("yyyyMMdd"), "u32")); info.AppendChild(createMetaElement(doc, "distribution_date", header.DistributionDate.ToString("yyyyMMdd"), "u32"));
info.AppendChild(CreateMetaElement(doc, "volume", header.Volume.ToString(), "u16")); info.AppendChild(createMetaElement(doc, "volume", header.Volume.ToString(), "u16"));
info.AppendChild(CreateMetaElement(doc, "bg_no", header.BackgroundId.ToString(), "u16")); info.AppendChild(createMetaElement(doc, "bg_no", header.BackgroundId.ToString(), "u16"));
info.AppendChild(CreateMetaElement(doc, "genre", header.GenreId.ToString(), "u8")); info.AppendChild(createMetaElement(doc, "genre", header.GenreId.ToString(), "u8"));
info.AppendChild(CreateMetaElement(doc, "is_fixed", "1", "u8")); info.AppendChild(createMetaElement(doc, "is_fixed", "1", "u8"));
info.AppendChild(CreateMetaElement(doc, "version", ((int)header.Version).ToString(), "u8")); info.AppendChild(createMetaElement(doc, "version", ((int)header.Version).ToString(), "u8"));
info.AppendChild(CreateMetaElement(doc, "demo_pri", "0", "s8")); info.AppendChild(createMetaElement(doc, "demo_pri", "0", "s8"));
info.AppendChild(CreateMetaElement(doc, "inf_ver", ((int)header.InfVersion).ToString(), "u8")); info.AppendChild(createMetaElement(doc, "inf_ver", ((int)header.InfVersion).ToString(), "u8"));
var diffInfo = doc.CreateElement("difficulty"); var diffInfo = doc.CreateElement("difficulty");
foreach (Difficulty difficulty in Enum.GetValues(typeof(Difficulty))) foreach (Difficulty difficulty in Enum.GetValues(typeof(Difficulty)))
{ {
string diffName = Enum.GetName(typeof(Difficulty), difficulty).ToLower(); string diffName = Enum.GetName(typeof(Difficulty), difficulty).ToLower();
if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.MXM) if (difficulty == Difficulty.Infinite && header.InfVersion == InfiniteVersion.Mxm)
diffName = "maximum"; diffName = "maximum";
var detail = doc.CreateElement(diffName); var detail = doc.CreateElement(diffName);
@ -153,11 +177,24 @@ namespace VoxCharger
if (header.Levels.ContainsKey(difficulty)) if (header.Levels.ContainsKey(difficulty))
lvHeader = header.Levels[difficulty]; lvHeader = header.Levels[difficulty];
detail.AppendChild(CreateMetaElement(doc, "difnum", lvHeader.Level.ToString(), "u8")); detail.AppendChild(createMetaElement(doc, "difnum", lvHeader.Level.ToString(), "u8"));
detail.AppendChild(CreateMetaElement(doc, "illustrator", lvHeader.Illustrator, string.Empty)); detail.AppendChild(createMetaElement(doc, "illustrator", lvHeader.Illustrator, string.Empty));
detail.AppendChild(CreateMetaElement(doc, "effected_by", lvHeader.Effector, string.Empty)); detail.AppendChild(createMetaElement(doc, "effected_by", lvHeader.Effector, string.Empty));
detail.AppendChild(CreateMetaElement(doc, "price", lvHeader.Price.ToString(), "s32")); detail.AppendChild(createMetaElement(doc, "price", lvHeader.Price.ToString(), "s32"));
detail.AppendChild(CreateMetaElement(doc, "limited", lvHeader.Limited.ToString(), "u8")); detail.AppendChild(createMetaElement(doc, "limited", lvHeader.Limited.ToString(), "u8"));
detail.AppendChild(createMetaElement(doc, "jacket_print", lvHeader.JacketPrint.ToString(), "s32"));
detail.AppendChild(createMetaElement(doc, "jacket_mask", lvHeader.JacketMask.ToString(), "s32"));
if (lvHeader.Radar != null)
{
var radar = detail.AppendChild(createMetaElement(doc, "radar", null, null));
radar.AppendChild(createMetaElement(doc, "notes", lvHeader.Radar.Notes.ToString(), "u8"));
radar.AppendChild(createMetaElement(doc, "peak", lvHeader.Radar.Peak.ToString(), "u8"));
radar.AppendChild(createMetaElement(doc, "tsumami", lvHeader.Radar.Lasers.ToString(), "u8"));
radar.AppendChild(createMetaElement(doc, "tricky", lvHeader.Radar.Tricky.ToString(), "u8"));
radar.AppendChild(createMetaElement(doc, "hand-trip", lvHeader.Radar.HandTrip.ToString(), "u8"));
radar.AppendChild(createMetaElement(doc, "one-hand", lvHeader.Radar.OneHand.ToString(), "u8"));
}
diffInfo.AppendChild(detail); diffInfo.AppendChild(detail);
} }
@ -168,7 +205,7 @@ namespace VoxCharger
master.AppendChild(music); master.AppendChild(music);
} }
var settings = new XmlWriterSettings { Indent = true }; var settings = new XmlWriterSettings { Indent = true, Encoding = DefaultEncoding };
using (var output = new StreamWriter(filename, false, DefaultEncoding)) using (var output = new StreamWriter(filename, false, DefaultEncoding))
using (var writer = XmlWriter.Create(output, settings)) using (var writer = XmlWriter.Create(output, settings))
{ {
@ -179,54 +216,54 @@ namespace VoxCharger
public void Add(VoxHeader header) public void Add(VoxHeader header)
{ {
if (max < header.ID) if (_max < header.Id)
max = header.ID; _max = header.Id;
headers[header.ID] = header; _headers[header.Id] = header;
} }
public void Remove(int id) public void Remove(int id)
{ {
if (max == id) if (_max == id)
max = 0; _max = 0;
headers.Remove(id); _headers.Remove(id);
} }
public void Remove(VoxHeader header) public void Remove(VoxHeader header)
{ {
Remove(header.ID); Remove(header.Id);
} }
public bool Contains(int id) public bool Contains(int id)
{ {
return headers.ContainsKey(id); return _headers.ContainsKey(id);
} }
public bool Contains(VoxHeader header) public bool Contains(VoxHeader header)
{ {
return Contains(header.ID); return Contains(header.Id);
} }
public VoxHeader GetHeader(int id) public VoxHeader GetHeader(int id)
{ {
return headers[id]; return _headers[id];
} }
public void Clear() public void Clear()
{ {
// Clear the list but not the last id // Clear the list but not the last id
headers.Clear(); _headers.Clear();
} }
public IEnumerator<VoxHeader> GetEnumerator() public IEnumerator<VoxHeader> GetEnumerator()
{ {
return headers.Values.GetEnumerator(); return _headers.Values.GetEnumerator();
} }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() IEnumerator IEnumerable.GetEnumerator()
{ {
return headers.Values.GetEnumerator(); return _headers.Values.GetEnumerator();
} }
} }
} }

View File

@ -6,40 +6,40 @@ namespace VoxCharger
{ {
public enum Section public enum Section
{ {
NO_STATE = -1, NoState = -1,
FORMAT_VERSION = 0, FormatVersion = 0,
BEAT_INFO = 1, BeatInfo = 1,
BPM_INFO = 2, BpmInfo = 2,
TILT = 3, Tilt = 3,
LYRIC = 4, Lyric = 4,
END_POSITION = 5, EndPosition = 5,
TAB_EFFECT = 6, TabEffect = 6,
FXBUTTON_EFFECT = 7, FxbuttonEffect = 7,
TAB_PARAM = 8, TabParam = 8,
REVERB = 9, Reverb = 9,
TRACK1 = 10, Track1 = 10,
TRACK2 = 11, Track2 = 11,
TRACK3 = 12, Track3 = 12,
TRACK4 = 13, Track4 = 13,
TRACK5 = 14, Track5 = 14,
TRACK6 = 15, Track6 = 15,
TRACK7 = 16, Track7 = 16,
TRACK8 = 17, Track8 = 17,
TRACK_AUTO = 18, TrackAuto = 18,
SPCONTROLER = 19, Spcontroler = 19,
SOUND_ID = 20, SoundId = 20,
BPM = 21 Bpm = 21
} }
public static bool IsTrackSection(Section section) public static bool IsTrackSection(Section section)
{ {
int value = (int)section; int value = (int)section;
return value >= (int)Section.TRACK1 && value <= (int)Section.TRACK_AUTO; return value >= (int)Section.Track1 && value <= (int)Section.TrackAuto;
} }
public static int GetTrackNumber(Section section) public static int GetTrackNumber(Section section)
{ {
return IsTrackSection(section) ? ((int)section + 1) - (int)Section.TRACK1 : -1; return IsTrackSection(section) ? ((int)section + 1) - (int)Section.Track1 : -1;
} }
} }
} }

View File

@ -12,7 +12,7 @@ namespace VoxCharger
private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("shift_jis"); private static readonly Encoding DefaultEncoding = Encoding.GetEncoding("shift_jis");
private const string VolCodes = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno"; private const string VolCodes = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno";
private readonly string[] Filters = new string[] { "peak", "lpf1", "lpf1", "hpf1", "hpf1", "lbic", "nof" }; private readonly string[] _filters = new string[] { "peak", "lpf1", "lpf1", "hpf1", "hpf1", "lbic", "nof" };
public int Version { get; private set; } = 10; public int Version { get; private set; } = 10;
@ -36,7 +36,7 @@ namespace VoxCharger
public void Parse(string fileName) public void Parse(string fileName)
{ {
var current = Section.NO_STATE; var current = Section.NoState;
var lines = File.ReadAllLines(fileName, DefaultEncoding); var lines = File.ReadAllLines(fileName, DefaultEncoding);
Event.Stop stop = null; Event.Stop stop = null;
@ -49,9 +49,9 @@ namespace VoxCharger
// Identify current section // Identify current section
if (line.StartsWith("#")) if (line.StartsWith("#"))
{ {
if (current == Section.NO_STATE) if (current == Section.NoState)
{ {
var candidate = Section.NO_STATE; var candidate = Section.NoState;
string header = line.Substring(1).Trim().Replace(' ', '_'); string header = line.Substring(1).Trim().Replace(' ', '_');
foreach (Section section in Enum.GetValues(typeof(Section))) foreach (Section section in Enum.GetValues(typeof(Section)))
{ {
@ -66,13 +66,13 @@ namespace VoxCharger
candidate = section; candidate = section;
} }
if (current == Section.NO_STATE) if (current == Section.NoState)
current = candidate; current = candidate;
} }
else else
{ {
if (line == "#END") if (line == "#END")
current = Section.NO_STATE; current = Section.NoState;
} }
continue; continue;
@ -90,7 +90,7 @@ namespace VoxCharger
#endregion #endregion
#region --- FORMAT VERSION --- #region --- FORMAT VERSION ---
if (current == Section.FORMAT_VERSION) if (current == Section.FormatVersion)
{ {
/* /*
* Format Version * Format Version
@ -104,7 +104,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- BEAT INFO --- #region --- BEAT INFO ---
else if (current == Section.BEAT_INFO) else if (current == Section.BeatInfo)
{ {
/* /*
* Beat Info (a.k.a Signature) * Beat Info (a.k.a Signature)
@ -144,7 +144,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- BPM (Simple) --- #region --- BPM (Simple) ---
else if (current == Section.BPM) else if (current == Section.Bpm)
{ {
/* /*
* BPM (Simple) * BPM (Simple)
@ -171,11 +171,11 @@ namespace VoxCharger
if (!float.TryParse(line, out float value)) if (!float.TryParse(line, out float value))
Debug.WriteLine($"[BPM] {i:D4}: Invalid BPM value"); Debug.WriteLine($"[BPM] {i:D4}: Invalid BPM value");
else else
Events.Add(new Event.BPM(new Time(1, 1, 0), value)); Events.Add(new Event.Bpm(new Time(1, 1, 0), value));
} }
#endregion #endregion
#region --- BPM (Extended) --- #region --- BPM (Extended) ---
else if (current == Section.BPM_INFO) else if (current == Section.BpmInfo)
{ {
/* /*
* BPM (Extended) * BPM (Extended)
@ -249,11 +249,11 @@ namespace VoxCharger
} }
} }
Events.Add(new Event.BPM(time, value)); Events.Add(new Event.Bpm(time, value));
} }
#endregion #endregion
#region --- TILT MODE INFO --- #region --- TILT MODE INFO ---
else if (current == Section.TILT) else if (current == Section.Tilt)
{ {
/* /*
* Tilt Mode * Tilt Mode
@ -291,7 +291,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- LYRIC INFO --- #region --- LYRIC INFO ---
else if (current == Section.LYRIC) else if (current == Section.Lyric)
{ {
/* /*
* Lyric Info * Lyric Info
@ -308,7 +308,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- END POSITION --- #region --- END POSITION ---
else if (current == Section.END_POSITION) else if (current == Section.EndPosition)
{ {
/* /*
* End Position * End Position
@ -325,7 +325,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- TAB EFFECT INFO --- #region --- TAB EFFECT INFO ---
else if (current == Section.TAB_EFFECT) else if (current == Section.TabEffect)
{ {
/* /*
* Tab Effect Info * Tab Effect Info
@ -339,7 +339,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- FXBUTTON EFFECT INFO --- #region --- FXBUTTON EFFECT INFO ---
else if (current == Section.FXBUTTON_EFFECT) else if (current == Section.FxbuttonEffect)
{ {
/* /*
* FxButton Effect Info * FxButton Effect Info
@ -363,7 +363,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- TAB PARAM ASSIGN INFO --- #region --- TAB PARAM ASSIGN INFO ---
else if (current == Section.TAB_PARAM) else if (current == Section.TabParam)
{ {
/* /*
* Tab Param Info * Tab Param Info
@ -377,7 +377,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- REVERB EFFECT PARAM --- #region --- REVERB EFFECT PARAM ---
else if (current == Section.REVERB) else if (current == Section.Reverb)
{ {
/* /*
* Reverb Effect * Reverb Effect
@ -388,7 +388,7 @@ namespace VoxCharger
} }
#endregion #endregion
#region --- SPCONTROLLER INFO --- #region --- SPCONTROLLER INFO ---
else if (current == Section.SPCONTROLER) else if (current == Section.Spcontroler)
{ {
/* /*
* SP Controller Info * SP Controller Info
@ -568,10 +568,10 @@ namespace VoxCharger
result += "#END\n\n"; result += "#END\n\n";
result += "#BPM INFO\n"; result += "#BPM INFO\n";
Event.BPM lastBpm = null; Event.Bpm lastBpm = null;
foreach (var ev in Events) foreach (var ev in Events)
{ {
if (ev is Event.BPM bpm) if (ev is Event.Bpm bpm)
{ {
lastBpm = bpm; lastBpm = bpm;
result += bpm.ToString() + "\n"; result += bpm.ToString() + "\n";
@ -679,10 +679,10 @@ namespace VoxCharger
foreach (var ev in Events) foreach (var ev in Events)
{ {
if (ev is Camera camera && camera.Work == work) if (ev is Camera camera && camera.Work == work)
result += camera.ToString() + "\n"; result += $"{camera}\n";
} }
} }
result += "#END\n\n"; result += "#END\n\n";
result += "//====================================\n\n"; result += "//====================================\n\n";

View File

@ -5,21 +5,23 @@ namespace VoxCharger
{ {
public class VoxHeader public class VoxHeader
{ {
public int ID { get; set; } public int Id { get; set; }
public string Title { get; set; } public string Title { get; set; }
public string Artist { get; set; } public string TitleYomigana { get; set; }
public string Ascii { get; set; } public string Artist { get; set; }
public double BpmMin { get; set; } public string ArtistYomigana { get; set; }
public double BpmMax { get; set; } public string Ascii { get; set; }
public DateTime DistributionDate { get; set; } public double BpmMin { get; set; }
public short Volume { get; set; } public double BpmMax { get; set; }
public short BackgroundId { get; set; } public DateTime DistributionDate { get; set; }
public int GenreId { get; set; } public short Volume { get; set; }
public GameVersion Version { get; set; } = GameVersion.VividWave; public short BackgroundId { get; set; }
public InfiniteVersion InfVersion { get; set; } = InfiniteVersion.MXM; public int GenreId { get; set; }
public GameVersion Version { get; set; } = GameVersion.ExceedGear;
public InfiniteVersion InfVersion { get; set; } = InfiniteVersion.Mxm;
public Dictionary<Difficulty, VoxLevelHeader> Levels { get; set; } public Dictionary<Difficulty, VoxLevelHeader> Levels { get; set; }
public string CodeName => $"{ID:D4}_{Ascii}"; public string CodeName => $"{Id:D4}_{Ascii}";
public VoxHeader() public VoxHeader()
{ {
@ -27,10 +29,10 @@ namespace VoxCharger
public override string ToString() public override string ToString()
{ {
return FixMappedChars(Title); return WithDecodedSymbols(Title);
} }
public static string FixMappedChars(string input) public static string WithDecodedSymbols(string input)
{ {
if (string.IsNullOrEmpty(input)) if (string.IsNullOrEmpty(input))
return input; return input;
@ -69,5 +71,45 @@ namespace VoxCharger
return result; return result;
} }
public static string WithEncodedSymbols(string input)
{
if (string.IsNullOrEmpty(input))
return input;
var map = new Dictionary<string, string>
{
{"~", "\u203E"},
{"", "\u301C"},
{"ê", "\u49FA"},
{"ū", "\u5F5C"},
{"à", "\u66E6"},
{"è", "\u66E9"},
{"ê", "\u7F47"},
{"🐾", "\u8E94"},
{"á", "\u9A2B"},
{"Ø", "\u9A69"},
{"ā", "\u9A6B"},
{"ō", "\u9A6A"},
{"ü", "\u9AAD"},
{"ī", "\u9B2F"},
{"ē", "\u9EF7"},
{"Ú", "\u9F63"},
{"Ä", "\u9F67"},
{"♠", "\u973B"},
{"♣", "\u9F6A"},
{"♦", "\u9448"},
{"♥", "\u9F72"},
{"♡", "\u9F76"},
{"é", "\u9F77"},
{"êp", "?壬"}
};
string result = input;
foreach (var c in map)
result = result.Replace(c.Key, c.Value);
return result;
}
} }
} }

View File

@ -6,12 +6,27 @@ namespace VoxCharger
public class VoxLevelHeader public class VoxLevelHeader
{ {
public Difficulty Difficulty { get; set; } public Difficulty Difficulty { get; set; }
public int Level { get; set; } = 1; public int Level { get; set; } = 1;
public string Illustrator { get; set; } = "dummy"; public string Illustrator { get; set; } = "dummy";
public string Effector { get; set; } = "dummy"; public string Effector { get; set; } = "dummy";
public int Price { get; set; } = -1; public int Price { get; set; } = -1;
public int Limited { get; set; } = 3; public int Limited { get; set; } = 3;
public VoxChart Chart { get; set; }
public Image Jacket { get; set; } public int JacketPrint { get; set; } = -2;
public int JacketMask { get; set; } = 0;
public VoxLevelRadar Radar { get; set; }
public VoxChart Chart { get; set; }
public Image Jacket { get; set; }
}
public class VoxLevelRadar
{
public byte Notes { get; set; }
public byte Peak { get; set; }
public byte Lasers { get; set; }
public byte Tricky { get; set; }
public byte HandTrip { get; set; }
public byte OneHand { get; set; }
} }
} }

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<IntermediateOutputPath>.\Temp</IntermediateOutputPath> <IntermediateOutputPath>.\Temp</IntermediateOutputPath>
@ -9,12 +10,13 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>VoxCharger</RootNamespace> <RootNamespace>VoxCharger</RootNamespace>
<AssemblyName>VoxCharger</AssemblyName> <AssemblyName>VoxCharger</AssemblyName>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<LangVersion>8</LangVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<IntermediateOutputPath>.\Temp</IntermediateOutputPath> <IntermediateOutputPath>.\Temp</IntermediateOutputPath>
@ -43,19 +45,167 @@
<PropertyGroup /> <PropertyGroup />
<PropertyGroup /> <PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
</Reference>
<Reference Include="CustomMarshalers" />
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Registry, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Win32.Registry.4.7.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.4.0, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>packages\Microsoft-WindowsAPICodePack-Core.1.1.4\lib\net462\Microsoft.WindowsAPICodePack.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.4.0, Culture=neutral, PublicKeyToken=8985beaab7ea3f04, processorArchitecture=MSIL">
<HintPath>packages\Microsoft-WindowsAPICodePack-Shell.1.1.4\lib\net462\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="NAudio, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.2.1.0\lib\net472\NAudio.dll</HintPath>
</Reference>
<Reference Include="NAudio.Asio, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.Asio.2.1.0\lib\netstandard2.0\NAudio.Asio.dll</HintPath>
</Reference>
<Reference Include="NAudio.Core, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.Core.2.1.0\lib\netstandard2.0\NAudio.Core.dll</HintPath>
</Reference>
<Reference Include="NAudio.Midi, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.Midi.2.1.0\lib\netstandard2.0\NAudio.Midi.dll</HintPath>
</Reference>
<Reference Include="NAudio.Vorbis, Version=1.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\NAudio.Vorbis.1.5.0\lib\netstandard2.0\NAudio.Vorbis.dll</HintPath>
</Reference>
<Reference Include="NAudio.Wasapi, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.Wasapi.2.1.0\lib\netstandard2.0\NAudio.Wasapi.dll</HintPath>
</Reference>
<Reference Include="NAudio.WinForms, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.WinForms.2.1.0\lib\net472\NAudio.WinForms.dll</HintPath>
</Reference>
<Reference Include="NAudio.WinMM, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>packages\NAudio.WinMM.2.1.0\lib\netstandard2.0\NAudio.WinMM.dll</HintPath>
</Reference>
<Reference Include="NVorbis, Version=0.10.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\NVorbis.0.10.4\lib\net45\NVorbis.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
</Reference>
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll</HintPath>
</Reference>
<Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
</Reference>
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
</Reference>
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
</Reference>
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Security.AccessControl, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.AccessControl.4.7.0\lib\net461\System.Security.AccessControl.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Security.Principal.Windows.4.7.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference>
<Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Sources\AssetManager.cs" />
<Compile Include="Sources\Forms\MenuButton.cs"> <Compile Include="Sources\Forms\MenuButton.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
@ -71,8 +221,7 @@
<Compile Include="Sources\Forms\HelpForm.Designer.cs"> <Compile Include="Sources\Forms\HelpForm.Designer.cs">
<DependentUpon>HelpForm.cs</DependentUpon> <DependentUpon>HelpForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Sources\2dx\DxTool.cs" /> <Compile Include="Sources\Encoders\DxEncoder.cs" />
<Compile Include="Sources\AssetManager.cs" />
<Compile Include="Sources\Events\Controller\Camera.cs" /> <Compile Include="Sources\Events\Controller\Camera.cs" />
<Compile Include="Sources\Events\Controller\Radian.cs" /> <Compile Include="Sources\Events\Controller\Radian.cs" />
<Compile Include="Sources\Events\Controller\LaneClear.cs" /> <Compile Include="Sources\Events\Controller\LaneClear.cs" />
@ -97,6 +246,7 @@
<Compile Include="Sources\Events\Signature.cs" /> <Compile Include="Sources\Events\Signature.cs" />
<Compile Include="Sources\Events\Stop.cs" /> <Compile Include="Sources\Events\Stop.cs" />
<Compile Include="Sources\Events\TiltMode.cs" /> <Compile Include="Sources\Events\TiltMode.cs" />
<Compile Include="Sources\Encoders\S3VTool.cs" />
<Compile Include="Sources\Ksh\Exporter.cs" /> <Compile Include="Sources\Ksh\Exporter.cs" />
<Compile Include="Sources\Ksh\Ksh.cs" /> <Compile Include="Sources\Ksh\Ksh.cs" />
<Compile Include="Sources\Events\EventCollection.cs" /> <Compile Include="Sources\Events\EventCollection.cs" />
@ -184,6 +334,8 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="App.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -195,12 +347,8 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="2dxbuild.exe"> <Content Include="FodyWeavers.xml" />
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <Content Include="README.md" />
</None>
<None Include="2dxwavconvert.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Resources\icon.ico" /> <Content Include="Resources\icon.ico" />
<None Include="Resources\jk_dummy_s.png" /> <None Include="Resources\jk_dummy_s.png" />
<None Include="Resources\jk_dummy_b.png" /> <None Include="Resources\jk_dummy_b.png" />
@ -208,4 +356,14 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Fody.6.5.5\build\Fody.targets" Condition="Exists('packages\Fody.6.5.5\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('packages\Fody.6.5.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.6.5.5\build\Fody.targets'))" />
<Error Condition="!Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
<Error Condition="!Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
</Target>
<Import Project="packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
</Project> </Project>

70
packages.config Normal file
View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="5.7.0" targetFramework="net472" developmentDependency="true" />
<package id="Fody" version="6.5.5" targetFramework="net472" developmentDependency="true" />
<package id="Microsoft-WindowsAPICodePack-Core" version="1.1.4" targetFramework="net47" />
<package id="Microsoft-WindowsAPICodePack-Shell" version="1.1.4" targetFramework="net47" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net472" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net472" />
<package id="Microsoft.Win32.Registry" version="4.7.0" targetFramework="net472" />
<package id="NAudio" version="2.1.0" targetFramework="net472" />
<package id="NAudio.Asio" version="2.1.0" targetFramework="net472" />
<package id="NAudio.Core" version="2.1.0" targetFramework="net472" />
<package id="NAudio.Midi" version="2.1.0" targetFramework="net472" />
<package id="NAudio.Vorbis" version="1.5.0" targetFramework="net472" />
<package id="NAudio.Wasapi" version="2.1.0" targetFramework="net472" />
<package id="NAudio.WinForms" version="2.1.0" targetFramework="net472" />
<package id="NAudio.WinMM" version="2.1.0" targetFramework="net472" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net472" />
<package id="NVorbis" version="0.10.4" targetFramework="net472" />
<package id="System.AppContext" version="4.3.0" targetFramework="net472" />
<package id="System.Buffers" version="4.4.0" targetFramework="net472" />
<package id="System.Collections" version="4.3.0" targetFramework="net472" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net472" />
<package id="System.Console" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net472" />
<package id="System.IO" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Linq" version="4.3.0" targetFramework="net472" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net472" />
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net472" />
<package id="System.Security.AccessControl" version="4.7.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Principal.Windows" version="4.7.0" targetFramework="net472" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net472" />
<package id="System.Threading" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net472" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net472" />
</packages>