mirror of
https://github.com/R-YaTian/TinkeDSi.git
synced 2025-06-18 16:45:43 -04:00
* Supported multipalettes of 256 colors
* Added licence to some projects and files * Fixed problems with some NCER sprites * Supported some text files in INAZUMA11 - Blizzard version: - Blogspot, Blogres, Subtitles and USearch * Added export / import XML from text files in Ninokuni * Supported single STRM sound files * Added "multiply" value in FATExtract * Fixed problems editing files with the hexadecimal editor * Added export to ACO (Adobe COlor) format in PaletteControl * Supported STD images from "Pokemon Card Game Asobikata DS" * Supported some pack files from "Suikoden Tierkreis"
This commit is contained in:
parent
7b7a20c549
commit
37942ba5df
@ -12,7 +12,7 @@ IF /I "%conf%"=="D" ( SET conf=Debug
|
||||
SET /P plat=Choose the platform. Press 1 for x86 or 2 for x64:
|
||||
IF "%plat%"=="1" SET plat=x86
|
||||
IF "%plat%"=="2" ( SET plat=x64
|
||||
) ELSE (IF NOT "%plat%"=="x64" GOTO secif)
|
||||
) ELSE (IF NOT "%plat%"=="x86" GOTO secif)
|
||||
|
||||
:check
|
||||
|
||||
|
43
PluginInterface/Helper/BinaryReaderBE.cs
Normal file
43
PluginInterface/Helper/BinaryReaderBE.cs
Normal file
@ -0,0 +1,43 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BinaryReaderBE.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 20:22:31</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
namespace PluginInterface.Helper
|
||||
{
|
||||
// Not finished
|
||||
public class BinaryReaderBE : BinaryReader
|
||||
{
|
||||
public BinaryReaderBE(string file) : base(File.OpenRead(file))
|
||||
{ }
|
||||
|
||||
public ushort ReadUInt16()
|
||||
{
|
||||
return BitConverter.ToUInt16(ReadBytes(2).Reverse().ToArray(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
45
PluginInterface/Helper/BinaryWriterBE.cs
Normal file
45
PluginInterface/Helper/BinaryWriterBE.cs
Normal file
@ -0,0 +1,45 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BinaryWriterBE.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 20:18:58</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
namespace PluginInterface.Helper
|
||||
{
|
||||
// Not finished
|
||||
public class BinaryWriterBE : BinaryWriter
|
||||
{
|
||||
|
||||
public BinaryWriterBE(string file) : base(File.OpenWrite(file))
|
||||
{ }
|
||||
|
||||
public void Write(ushort value)
|
||||
{
|
||||
byte[] v = BitConverter.GetBytes(value);
|
||||
v = v.Reverse().ToArray();
|
||||
Write(v);
|
||||
}
|
||||
}
|
||||
}
|
@ -91,8 +91,5 @@ namespace PluginInterface
|
||||
/// <param name="loops">The number of loops (if 0 = infinite)</param>
|
||||
void Create_APNG(string outFile, Bitmap[] frames, int delay, int loops);
|
||||
void Create_APNG(string outFile, String[] frames, int delay, int loops);
|
||||
|
||||
Color[][] Read_WinPal2(string file, System.Windows.Forms.ColorDepth depth);
|
||||
void Write_WinPal(string fileOut, Color[] palette);
|
||||
}
|
||||
}
|
||||
|
101
PluginInterface/Images/Formats/ACO.cs
Normal file
101
PluginInterface/Images/Formats/ACO.cs
Normal file
@ -0,0 +1,101 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="ACO.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 19:33:55</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace PluginInterface.Images.Formats
|
||||
{
|
||||
/// <summary>
|
||||
/// Adobe COlor
|
||||
/// Info from http://www.nomodes.com/aco.html thanks to "Larry Tesler"
|
||||
/// </summary>
|
||||
public class ACO : PaletteBase
|
||||
{
|
||||
public ACO(IPluginHost pluginHost, string file)
|
||||
: base(pluginHost)
|
||||
{
|
||||
Read(file);
|
||||
}
|
||||
public ACO(IPluginHost pluginHost, Color[] colors)
|
||||
: base(pluginHost)
|
||||
{
|
||||
Set_Palette(new Color[][] { colors }, true);
|
||||
}
|
||||
|
||||
public override void Read(string fileIn)
|
||||
{
|
||||
Helper.BinaryReaderBE br = new Helper.BinaryReaderBE(fileIn);
|
||||
Color[] pal;
|
||||
|
||||
ushort version = br.ReadUInt16();
|
||||
if (version != 0x00)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Version not supported. Only 0");
|
||||
throw new FormatException("Version not supported. Only 0");
|
||||
}
|
||||
ushort num_colors = br.ReadUInt16();
|
||||
|
||||
pal = new Color[num_colors];
|
||||
for (int i = 0; i < num_colors; i++)
|
||||
{
|
||||
ushort spec = br.ReadUInt16();
|
||||
if (spec != 0x00)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Color spec not supported. Only 0");
|
||||
throw new FormatException("Color spec not supported. Only 0");
|
||||
}
|
||||
pal[i] = Color.FromArgb(br.ReadUInt16(), br.ReadUInt16(), br.ReadUInt16());
|
||||
br.ReadUInt16(); // Always 0x00
|
||||
}
|
||||
|
||||
br.Close();
|
||||
}
|
||||
public override void Write(string fileOut)
|
||||
{
|
||||
// Only accept one palette
|
||||
Color[] pal = palette[0];
|
||||
|
||||
Helper.BinaryWriterBE bw = new Helper.BinaryWriterBE(fileOut);
|
||||
|
||||
bw.Write((ushort)0x00); // Version 0
|
||||
bw.Write((ushort)pal.Length); // Number of colors
|
||||
|
||||
|
||||
for (int i = 0; i < pal.Length; i++)
|
||||
{
|
||||
bw.Write((ushort)0x00); // Color spec set to 0
|
||||
bw.Write((ushort)pal[i].R); // Red component
|
||||
bw.Write((ushort)pal[i].G); // Green component
|
||||
bw.Write((ushort)pal[i].B); // Blue component
|
||||
bw.Write((ushort)0x00); // Always 0x00, not used
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,35 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Bitmap.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:28:51</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
|
||||
namespace PluginInterface.Images
|
||||
namespace PluginInterface.Images.Formats
|
||||
{
|
||||
public class BMP : ImageBase
|
||||
{
|
94
PluginInterface/Images/Formats/PaletteWin.cs
Normal file
94
PluginInterface/Images/Formats/PaletteWin.cs
Normal file
@ -0,0 +1,94 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="PaletteWin.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 19:01:44</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
|
||||
namespace PluginInterface.Images.Formats
|
||||
{
|
||||
public class PaletteWin : PaletteBase
|
||||
{
|
||||
public PaletteWin(IPluginHost pluginHost, string file) : base(pluginHost)
|
||||
{
|
||||
Read(file);
|
||||
}
|
||||
public PaletteWin(IPluginHost pluginHost, Color[] colors) : base(pluginHost)
|
||||
{
|
||||
Set_Palette(new Color[][] { colors }, true);
|
||||
}
|
||||
|
||||
public override void Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
|
||||
br.ReadChars(4); // RIFF
|
||||
br.ReadUInt32();
|
||||
br.ReadChars(4); // PAL
|
||||
br.ReadChars(4); // data
|
||||
br.ReadUInt32(); // unknown, always 0x00
|
||||
br.ReadUInt16(); // unknown, always 0x0300
|
||||
ushort nColors = br.ReadUInt16();
|
||||
|
||||
Color[][] colors = new Color[1][];
|
||||
colors[0] = new Color[nColors];
|
||||
for (int j = 0; j < nColors; j++)
|
||||
{
|
||||
Color newColor = Color.FromArgb(br.ReadByte(), br.ReadByte(), br.ReadByte());
|
||||
br.ReadByte(); // always 0x00
|
||||
colors[0][j] = newColor;
|
||||
}
|
||||
|
||||
br.Close();
|
||||
Set_Palette(colors, true);
|
||||
}
|
||||
|
||||
public override void Write(string fileOut)
|
||||
{
|
||||
if (File.Exists(fileOut))
|
||||
File.Delete(fileOut);
|
||||
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
bw.Write(new char[] { 'R', 'I', 'F', 'F' }); // "RIFF"
|
||||
bw.Write((uint)(0x10 + palette[0].Length * 4)); // file_length - 8
|
||||
bw.Write(new char[] { 'P', 'A', 'L', ' ' }); // "PAL "
|
||||
bw.Write(new char[] { 'd', 'a', 't', 'a' }); // "data"
|
||||
bw.Write((uint)palette[0].Length * 4 + 4); // data_size = file_length - 0x14
|
||||
bw.Write((ushort)0x0300); // version = 00 03
|
||||
bw.Write((ushort)(palette[0].Length)); // num_colors
|
||||
for (int i = 0; i < palette[0].Length; i++)
|
||||
{
|
||||
bw.Write(palette[0][i].R);
|
||||
bw.Write(palette[0][i].G);
|
||||
bw.Write(palette[0][i].B);
|
||||
bw.Write((byte)0x00);
|
||||
bw.Flush();
|
||||
}
|
||||
|
||||
bw.Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -18,15 +18,11 @@
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using PluginInterface.Images.Formats;
|
||||
//using FotochohForTinke;
|
||||
|
||||
namespace PluginInterface.Images
|
||||
|
1
PluginInterface/Images/ImageControl.designer.cs
generated
1
PluginInterface/Images/ImageControl.designer.cs
generated
@ -460,6 +460,7 @@ namespace PluginInterface.Images
|
||||
// pic
|
||||
//
|
||||
this.pic.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pic.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pic.Location = new System.Drawing.Point(0, 0);
|
||||
this.pic.Name = "pic";
|
||||
this.pic.Size = new System.Drawing.Size(100, 100);
|
||||
|
@ -95,7 +95,7 @@ namespace PluginInterface.Images
|
||||
|
||||
// Get the new palette data
|
||||
int size = original.Length - start;
|
||||
if (size > 0x200) size = 0x200;
|
||||
if (size > 0x2000) size = 0x2000;
|
||||
|
||||
Byte[] data = new byte[size];
|
||||
Array.Copy(original, start, data, 0, data.Length);
|
||||
@ -103,21 +103,14 @@ namespace PluginInterface.Images
|
||||
List<Color> colors = new List<Color>();
|
||||
colors.AddRange(Actions.BGR555ToColor(data));
|
||||
|
||||
if (depth == ColorFormat.colors16)
|
||||
int num_colors = (depth == ColorFormat.colors16 ? 0x10 : 0x100);
|
||||
bool isExact = (colors.Count % num_colors == 0 ? true : false);
|
||||
palette = new Color[(colors.Count / num_colors) + (isExact ? 0 : 1)][];
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
{
|
||||
bool isExact = (colors.Count % 16 == 0 ? true : false);
|
||||
palette = new Color[(colors.Count / 16) + (isExact ? 0 : 1)][];
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
{
|
||||
int palette_length = i * 16 + 16 <= colors.Count ? 16 : colors.Count - i * 16;
|
||||
palette[i] = new Color[palette_length];
|
||||
Array.Copy(colors.ToArray(), i * 16, palette[i], 0, palette_length);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
palette = new Color[1][];
|
||||
palette[0] = colors.ToArray();
|
||||
int palette_length = i * num_colors + num_colors <= colors.Count ? num_colors : colors.Count - i * num_colors;
|
||||
palette[i] = new Color[palette_length];
|
||||
Array.Copy(colors.ToArray(), i * num_colors, palette[i], 0, palette_length);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,13 +118,27 @@ namespace PluginInterface.Images
|
||||
{
|
||||
this.palette = palette;
|
||||
canEdit = editable;
|
||||
if (palette.Length == 1 && palette[0].Length > 16)
|
||||
if (palette[0].Length > 16)
|
||||
depth = ColorFormat.colors256;
|
||||
else
|
||||
depth = ColorFormat.colors16;
|
||||
|
||||
loaded = true;
|
||||
|
||||
if (depth == ColorFormat.colors16 && (palette.Length == 1 && palette[0].Length > 0x10))
|
||||
{
|
||||
Color[][] newColors = new Color[palette[0].Length / 0x10][];
|
||||
for (int i = 0; i < newColors.Length; i++)
|
||||
{
|
||||
int pal_colors = 0x10;
|
||||
if (i * 0x10 >= palette[0].Length)
|
||||
pal_colors = palette[0].Length - (i - 1) * 0x10;
|
||||
newColors[i] = new Color[pal_colors];
|
||||
Array.Copy(palette[0], i * 0x10, newColors[i], 0, pal_colors);
|
||||
}
|
||||
this.palette = newColors;
|
||||
}
|
||||
|
||||
// Convert the palette to bytes, to store the original palette
|
||||
List<Color> colors = new List<Color>();
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
@ -147,6 +154,20 @@ namespace PluginInterface.Images
|
||||
|
||||
loaded = true;
|
||||
|
||||
if (depth == ColorFormat.colors16 && (palette.Length == 1 && palette[0].Length > 0x10))
|
||||
{
|
||||
Color[][] newColors = new Color[palette[0].Length / 0x10][];
|
||||
for (int i = 0; i < newColors.Length; i++)
|
||||
{
|
||||
int pal_colors = 0x10;
|
||||
if (i * 0x10 >= palette[0].Length)
|
||||
pal_colors = palette[0].Length - (i - 1) * 0x10;
|
||||
newColors[i] = new Color[pal_colors];
|
||||
Array.Copy(palette[0], i * 0x10, newColors[i], 0, pal_colors);
|
||||
}
|
||||
this.palette = newColors;
|
||||
}
|
||||
|
||||
// Convert the palette to bytes, to store the original palette
|
||||
List<Color> colors = new List<Color>();
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
@ -171,13 +192,28 @@ namespace PluginInterface.Images
|
||||
public void Set_Palette(Color[][] palette)
|
||||
{
|
||||
this.palette = palette;
|
||||
if (palette.Length == 1 && palette[0].Length > 16)
|
||||
if (palette[0].Length > 16)
|
||||
depth = ColorFormat.colors256;
|
||||
else
|
||||
depth = ColorFormat.colors16;
|
||||
|
||||
loaded = true;
|
||||
|
||||
|
||||
if (depth == ColorFormat.colors16 && (palette.Length == 1 && palette[0].Length > 0x10))
|
||||
{
|
||||
Color[][] newColors = new Color[palette[0].Length / 0x10][];
|
||||
for (int i = 0; i < newColors.Length; i++)
|
||||
{
|
||||
int pal_colors = 0x10;
|
||||
if (i * 0x10 >= palette[0].Length)
|
||||
pal_colors = palette[0].Length - (i - 1) * 0x10;
|
||||
newColors[i] = new Color[pal_colors];
|
||||
Array.Copy(palette[0], i * 0x10, newColors[i], 0, pal_colors);
|
||||
}
|
||||
this.palette = newColors;
|
||||
}
|
||||
|
||||
// Convert the palette to bytes, to store the original palette
|
||||
List<Color> colors = new List<Color>();
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
|
@ -173,7 +173,8 @@ namespace PluginInterface.Images
|
||||
o.CheckPathExists = true;
|
||||
o.DefaultExt = ".pal";
|
||||
o.Filter = "Windows Palette (*.pal)|*.pal|" +
|
||||
"Portable Network Graphics (*.png)|*.png";
|
||||
"Portable Network Graphics (*.png)|*.png|" +
|
||||
"Adobe COlor (*.aco)|*.aco";
|
||||
o.OverwritePrompt = true;
|
||||
o.FileName = palette.FileName.Substring(12);
|
||||
|
||||
@ -183,13 +184,22 @@ namespace PluginInterface.Images
|
||||
if (o.FilterIndex == 2)
|
||||
picPalette.Image.Save(o.FileName, System.Drawing.Imaging.ImageFormat.Png);
|
||||
else if (o.FilterIndex == 1)
|
||||
pluginHost.Write_WinPal(o.FileName, palette.Palette[(int)numericPalette.Value]);
|
||||
{
|
||||
Formats.PaletteWin palwin = new Formats.PaletteWin(pluginHost, palette.Palette[(int)numericPalette.Value]);
|
||||
palwin.Write(o.FileName);
|
||||
}
|
||||
else if (o.FilterIndex == 3)
|
||||
{
|
||||
Formats.ACO palaco = new Formats.ACO(pluginHost, palette.Palette[(int)numericPalette.Value]);
|
||||
palaco.Write(o.FileName);
|
||||
}
|
||||
}
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName() + palette.FileName;
|
||||
palette.Write(fileOut);
|
||||
pluginHost.ChangeFile(palette.ID, fileOut);
|
||||
// TODO
|
||||
//String fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName() + palette.FileName;
|
||||
//palette.Write(fileOut);
|
||||
//pluginHost.ChangeFile(palette.ID, fileOut);
|
||||
}
|
||||
|
||||
private void checkHex_CheckedChanged(object sender, EventArgs e)
|
||||
|
@ -133,6 +133,7 @@ namespace PluginInterface.Images
|
||||
this.btnImport.Text = "S04";
|
||||
this.btnImport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnImport.UseVisualStyleBackColor = true;
|
||||
this.btnImport.Visible = false;
|
||||
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||
//
|
||||
// label2
|
||||
|
@ -70,22 +70,16 @@ namespace PluginInterface.Images
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
prev_data = br.ReadBytes(offset);
|
||||
|
||||
if (fileSize <= 0) fileSize = (int)br.BaseStream.Length;
|
||||
if (fileSize > 0x200) fileSize = 0x200;
|
||||
if (fileSize <= 0) fileSize = (int)br.BaseStream.Length;
|
||||
if (fileSize > 0x2000) fileSize = 0x2000;
|
||||
|
||||
int palette_length = 0x200;
|
||||
if (depth == ColorFormat.colors16 || fileSize < 0x200) palette_length = 0x20;
|
||||
|
||||
// Color data
|
||||
Color[][] palette = new Color[0][];
|
||||
if (depth == ColorFormat.colors256)
|
||||
{
|
||||
palette = new Color[1][];
|
||||
palette[0] = Actions.BGR555ToColor(br.ReadBytes(fileSize));
|
||||
}
|
||||
else if (depth == ColorFormat.colors16)
|
||||
{
|
||||
palette = new Color[fileSize / 0x20][];
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
palette[i] = Actions.BGR555ToColor(br.ReadBytes(0x20));
|
||||
}
|
||||
Color[][] palette = new Color[fileSize / palette_length][];
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
palette[i] = Actions.BGR555ToColor(br.ReadBytes(palette_length));
|
||||
|
||||
next_data = br.ReadBytes((int)(br.BaseStream.Length - fileSize));
|
||||
|
||||
@ -101,14 +95,15 @@ namespace PluginInterface.Images
|
||||
if (fileSize <= 0)
|
||||
fileSize = (int)br.BaseStream.Length;
|
||||
int fileSize_ = fileSize;
|
||||
if (fileSize > 0x200) fileSize = 0x200;
|
||||
if (fileSize > 0x2000) fileSize = 0x2000;
|
||||
|
||||
int palette_length = 0x200;
|
||||
if (fileSize < 0x200) palette_length = fileSize;
|
||||
|
||||
// Color data
|
||||
Color[][] palette = new Color[1][];
|
||||
palette[0] = Actions.BGR555ToColor(br.ReadBytes(fileSize));
|
||||
|
||||
if (palette[0].Length < 0x100)
|
||||
palette = pluginHost.Palette_8bppTo4bpp(palette);
|
||||
Color[][] palette = new Color[fileSize / palette_length][];
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
palette[i] = Actions.BGR555ToColor(br.ReadBytes(palette_length));
|
||||
|
||||
next_data = br.ReadBytes((int)(br.BaseStream.Length - fileSize));
|
||||
|
||||
@ -133,7 +128,8 @@ namespace PluginInterface.Images
|
||||
byte[] next_data;
|
||||
|
||||
public RawImage(IPluginHost pluginHost, String file, int id, TileForm form, ColorFormat format,
|
||||
bool editable, int offset, int size) : base(pluginHost)
|
||||
bool editable, int offset, int size)
|
||||
: base(pluginHost)
|
||||
{
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
@ -207,7 +203,8 @@ namespace PluginInterface.Images
|
||||
|
||||
Read(file, offset, size, editable);
|
||||
}
|
||||
public RawMap(IPluginHost pluginHost, NTFS[] map, int width, int height, bool editable) : base(pluginHost, map, editable, width, height)
|
||||
public RawMap(IPluginHost pluginHost, NTFS[] map, int width, int height, bool editable)
|
||||
: base(pluginHost, map, editable, width, height)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -18,16 +18,11 @@
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
using PluginInterface.Images.Formats;
|
||||
|
||||
namespace PluginInterface.Images
|
||||
{
|
||||
|
26
PluginInterface/Images/SpriteControl.designer.cs
generated
26
PluginInterface/Images/SpriteControl.designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace PluginInterface.Images
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SpriteControl.designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:29:12</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace PluginInterface.Images
|
||||
{
|
||||
partial class SpriteControl
|
||||
{
|
||||
|
@ -52,14 +52,18 @@
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helper\BinaryReaderBE.cs" />
|
||||
<Compile Include="Helper\BinaryWriterBE.cs" />
|
||||
<Compile Include="Images\Actions.cs" />
|
||||
<Compile Include="Images\Bitmap.cs" />
|
||||
<Compile Include="Images\Formats\ACO.cs" />
|
||||
<Compile Include="Images\Formats\Bitmap.cs" />
|
||||
<Compile Include="Images\Dialogs\OAMEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Images\Dialogs\OAMEditor.Designer.cs">
|
||||
<DependentUpon>OAMEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Images\Formats\PaletteWin.cs" />
|
||||
<Compile Include="Images\ImageBase.cs" />
|
||||
<Compile Include="Images\ImageControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
|
@ -67,13 +67,8 @@ namespace Common
|
||||
return new PNG(pluginHost, archivo).Show_Info();
|
||||
else if (archivo.ToUpper().EndsWith(".WAV") || ext == "RIFF")
|
||||
return new WAV(pluginHost, archivo).Show_Info();
|
||||
//else if (archivo.ToUpper().EndsWith(".BMP"))
|
||||
// return new BMP(pluginHost, archivo).Show_Info();
|
||||
else if (archivo.ToUpper().EndsWith(".BMP"))
|
||||
{
|
||||
PluginInterface.Images.BMP bmp = new PluginInterface.Images.BMP(pluginHost, archivo);
|
||||
return new PluginInterface.Images.ImageControl(pluginHost, bmp, bmp.Palette);
|
||||
}
|
||||
return new BMP(pluginHost, archivo).Show_Info();
|
||||
|
||||
return new Control();
|
||||
}
|
||||
|
@ -45,6 +45,9 @@
|
||||
<Compile Include="Pack.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Licence.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
621
Plugins/DEATHNOTEDS/DEATHNOTEDS/Licence.txt
Normal file
621
Plugins/DEATHNOTEDS/DEATHNOTEDS/Licence.txt
Normal file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
'This License' refers to version 3 of the GNU General Public License.
|
||||
|
||||
'Copyright' also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
'The Program' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as 'you'. 'Licensees' and
|
||||
'recipients' may be individuals or organizations.
|
||||
|
||||
To 'modify' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a 'modified version' of the
|
||||
earlier work or a work 'based on' the earlier work.
|
||||
|
||||
A 'covered work' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To 'propagate' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To 'convey' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays 'Appropriate Legal Notices'
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The 'source code' for a work means the preferred form of the work
|
||||
for making modifications to it. 'Object code' means any non-source
|
||||
form of a work.
|
||||
|
||||
A 'Standard Interface' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The 'System Libraries' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
'Major Component', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The 'Corresponding Source' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
'keep intact all notices'.
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
'aggregate' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A 'User Product' is either (1) a 'consumer product', which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, 'normally used' refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
'Installation Information' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
'Additional permissions' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered 'further
|
||||
restrictions' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An 'entity transaction' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A 'contributor' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's 'contributor version'.
|
||||
|
||||
A contributor's 'essential patent claims' are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, 'control' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a 'patent license' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To 'grant' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. 'Knowingly relying' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is 'discriminatory' if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License 'or any later version' applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Main.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:56:19</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using PluginInterface;
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Pack.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:56:02</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -1,4 +1,28 @@
|
||||
namespace DSDecmp
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="CompressionControl.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:29:46</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace DSDecmp
|
||||
{
|
||||
partial class CompressionControl
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="CompressionControl.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:29:37</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
|
@ -52,6 +52,9 @@
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Licence.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
621
Plugins/HETALIA/HETALIA/Licence.txt
Normal file
621
Plugins/HETALIA/HETALIA/Licence.txt
Normal file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
'This License' refers to version 3 of the GNU General Public License.
|
||||
|
||||
'Copyright' also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
'The Program' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as 'you'. 'Licensees' and
|
||||
'recipients' may be individuals or organizations.
|
||||
|
||||
To 'modify' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a 'modified version' of the
|
||||
earlier work or a work 'based on' the earlier work.
|
||||
|
||||
A 'covered work' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To 'propagate' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To 'convey' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays 'Appropriate Legal Notices'
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The 'source code' for a work means the preferred form of the work
|
||||
for making modifications to it. 'Object code' means any non-source
|
||||
form of a work.
|
||||
|
||||
A 'Standard Interface' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The 'System Libraries' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
'Major Component', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The 'Corresponding Source' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
'keep intact all notices'.
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
'aggregate' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A 'User Product' is either (1) a 'consumer product', which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, 'normally used' refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
'Installation Information' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
'Additional permissions' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered 'further
|
||||
restrictions' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An 'entity transaction' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A 'contributor' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's 'contributor version'.
|
||||
|
||||
A contributor's 'essential patent claims' are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, 'control' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a 'patent license' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To 'grant' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. 'Knowingly relying' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is 'discriminatory' if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License 'or any later version' applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
252
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.Designer.cs
generated
Normal file
252
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.Designer.cs
generated
Normal file
@ -0,0 +1,252 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BlogpostControl.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 12:46:03</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace INAZUMA11
|
||||
{
|
||||
partial class BlogpostControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable del diseñador requerida.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Limpiar los recursos que se estén utilizando.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Código generado por el Diseñador de componentes
|
||||
|
||||
/// <summary>
|
||||
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||
/// el contenido del método con el editor de código.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.numBlock = new System.Windows.Forms.NumericUpDown();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.numIndex = new System.Windows.Forms.NumericUpDown();
|
||||
this.txtText2 = new System.Windows.Forms.TextBox();
|
||||
this.txtText1 = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.numUnk = new System.Windows.Forms.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.btnWrite = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numIndex)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 5);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(76, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Num. of block:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(199, 5);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(19, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "of ";
|
||||
//
|
||||
// numBlock
|
||||
//
|
||||
this.numBlock.Location = new System.Drawing.Point(103, 3);
|
||||
this.numBlock.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numBlock.Name = "numBlock";
|
||||
this.numBlock.Size = new System.Drawing.Size(90, 20);
|
||||
this.numBlock.TabIndex = 2;
|
||||
this.numBlock.ValueChanged += new System.EventHandler(this.numBlock_ValueChanged);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.numIndex);
|
||||
this.groupBox1.Controls.Add(this.txtText2);
|
||||
this.groupBox1.Controls.Add(this.txtText1);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.numUnk);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 29);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(506, 184);
|
||||
this.groupBox1.TabIndex = 3;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Block data";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(220, 21);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(36, 13);
|
||||
this.label6.TabIndex = 7;
|
||||
this.label6.Text = "Index:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(253, 55);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(37, 13);
|
||||
this.label5.TabIndex = 6;
|
||||
this.label5.Text = "Text 2";
|
||||
//
|
||||
// numIndex
|
||||
//
|
||||
this.numIndex.Location = new System.Drawing.Point(304, 19);
|
||||
this.numIndex.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numIndex.Name = "numIndex";
|
||||
this.numIndex.Size = new System.Drawing.Size(90, 20);
|
||||
this.numIndex.TabIndex = 5;
|
||||
this.numIndex.ValueChanged += new System.EventHandler(this.numIndex_ValueChanged);
|
||||
//
|
||||
// txtText2
|
||||
//
|
||||
this.txtText2.Location = new System.Drawing.Point(252, 71);
|
||||
this.txtText2.Multiline = true;
|
||||
this.txtText2.Name = "txtText2";
|
||||
this.txtText2.Size = new System.Drawing.Size(240, 100);
|
||||
this.txtText2.TabIndex = 4;
|
||||
this.txtText2.TextChanged += new System.EventHandler(this.txtText2_TextChanged);
|
||||
//
|
||||
// txtText1
|
||||
//
|
||||
this.txtText1.Location = new System.Drawing.Point(6, 71);
|
||||
this.txtText1.Multiline = true;
|
||||
this.txtText1.Name = "txtText1";
|
||||
this.txtText1.Size = new System.Drawing.Size(240, 100);
|
||||
this.txtText1.TabIndex = 3;
|
||||
this.txtText1.TextChanged += new System.EventHandler(this.txtText1_TextChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(6, 55);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(37, 13);
|
||||
this.label4.TabIndex = 2;
|
||||
this.label4.Text = "Text 1";
|
||||
//
|
||||
// numUnk
|
||||
//
|
||||
this.numUnk.Location = new System.Drawing.Point(98, 19);
|
||||
this.numUnk.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numUnk.Name = "numUnk";
|
||||
this.numUnk.Size = new System.Drawing.Size(90, 20);
|
||||
this.numUnk.TabIndex = 1;
|
||||
this.numUnk.ValueChanged += new System.EventHandler(this.numUnk_ValueChanged);
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(7, 21);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 13);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "Unknown:";
|
||||
//
|
||||
// btnWrite
|
||||
//
|
||||
this.btnWrite.Image = global::INAZUMA11.Properties.Resources.page_white_edit;
|
||||
this.btnWrite.Location = new System.Drawing.Point(6, 219);
|
||||
this.btnWrite.Name = "btnWrite";
|
||||
this.btnWrite.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnWrite.TabIndex = 4;
|
||||
this.btnWrite.Text = "Write file";
|
||||
this.btnWrite.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnWrite.UseVisualStyleBackColor = true;
|
||||
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
|
||||
//
|
||||
// BlogpostControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.btnWrite);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.numBlock);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "BlogpostControl";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numIndex)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown numBlock;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.NumericUpDown numIndex;
|
||||
private System.Windows.Forms.TextBox txtText2;
|
||||
private System.Windows.Forms.TextBox txtText1;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.NumericUpDown numUnk;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button btnWrite;
|
||||
}
|
||||
}
|
150
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.cs
Normal file
150
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.cs
Normal file
@ -0,0 +1,150 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BlogpostControl.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 12:45:55</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace INAZUMA11
|
||||
{
|
||||
public partial class BlogpostControl : UserControl
|
||||
{
|
||||
IPluginHost pluginHost;
|
||||
int id;
|
||||
Blogpost[] bps;
|
||||
|
||||
Encoding enc;
|
||||
|
||||
public BlogpostControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public BlogpostControl(string file, int id, IPluginHost pluginHost)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
enc = Encoding.GetEncoding("shift_jis");
|
||||
|
||||
Read(file);
|
||||
numBlock.Maximum = bps.Length - 1;
|
||||
label2.Text = "of " + numBlock.Maximum.ToString();
|
||||
numBlock_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
bps = new Blogpost[br.BaseStream.Length / 0x248];
|
||||
|
||||
for (int i = 0; i < bps.Length; i++)
|
||||
{
|
||||
bps[i].unknown = br.ReadUInt16();
|
||||
bps[i].header_text = new String(enc.GetChars(br.ReadBytes(0x42)));
|
||||
bps[i].text = new String(enc.GetChars(br.ReadBytes(0x202)));
|
||||
bps[i].index = br.ReadUInt16();
|
||||
}
|
||||
|
||||
br.Close();
|
||||
}
|
||||
private void Write()
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
for (int i = 0; i < bps.Length; i++)
|
||||
{
|
||||
bw.Write(bps[i].unknown);
|
||||
|
||||
int length = enc.GetByteCount(bps[i].header_text);
|
||||
bw.Write(enc.GetBytes(bps[i].header_text));
|
||||
while (length != 0x42)
|
||||
{
|
||||
bw.Write((byte)0x00);
|
||||
length++;
|
||||
}
|
||||
|
||||
length = enc.GetByteCount(bps[i].text);
|
||||
bw.Write(enc.GetBytes(bps[i].text));
|
||||
while (length != 0x202)
|
||||
{
|
||||
bw.Write((byte)0x00);
|
||||
length++;
|
||||
}
|
||||
|
||||
bw.Write(bps[i].index);
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void numBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
|
||||
txtText1.Text = bps[i].header_text.Replace("\n", "\r\n");
|
||||
txtText2.Text = bps[i].text.Replace("\n", "\r\n");
|
||||
numUnk.Value = bps[i].unknown;
|
||||
numIndex.Value = bps[i].index;
|
||||
}
|
||||
|
||||
private void numUnk_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
bps[i].unknown = (ushort)numUnk.Value;
|
||||
}
|
||||
private void numIndex_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
bps[i].index = (ushort)numIndex.Value;
|
||||
}
|
||||
private void txtText1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
bps[i].header_text = txtText1.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
private void txtText2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
bps[i].text = txtText2.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
|
||||
private void btnWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Write();
|
||||
}
|
||||
}
|
||||
|
||||
public struct Blogpost
|
||||
{
|
||||
public ushort unknown;
|
||||
public string header_text;
|
||||
public string text;
|
||||
public ushort index;
|
||||
}
|
||||
}
|
120
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.resx
Normal file
120
Plugins/INAZUMA11/INAZUMA11/BlogpostControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
230
Plugins/INAZUMA11/INAZUMA11/BlogresControl.Designer.cs
generated
Normal file
230
Plugins/INAZUMA11/INAZUMA11/BlogresControl.Designer.cs
generated
Normal file
@ -0,0 +1,230 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BlogresControl.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 13:49:35</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace INAZUMA11
|
||||
{
|
||||
partial class BlogresControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable del diseñador requerida.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Limpiar los recursos que se estén utilizando.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Código generado por el Diseñador de componentes
|
||||
|
||||
/// <summary>
|
||||
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||
/// el contenido del método con el editor de código.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.numBlock = new System.Windows.Forms.NumericUpDown();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.txtText = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.numUnk2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.numUnk1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnWrite = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 5);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(76, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Num. of block:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(182, 5);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(19, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "of ";
|
||||
//
|
||||
// numBlock
|
||||
//
|
||||
this.numBlock.Location = new System.Drawing.Point(86, 3);
|
||||
this.numBlock.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numBlock.Name = "numBlock";
|
||||
this.numBlock.Size = new System.Drawing.Size(90, 20);
|
||||
this.numBlock.TabIndex = 2;
|
||||
this.numBlock.ValueChanged += new System.EventHandler(this.numBlock_ValueChanged);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.txtText);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.numUnk2);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.numUnk1);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 29);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(503, 161);
|
||||
this.groupBox1.TabIndex = 3;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Block data";
|
||||
//
|
||||
// txtText
|
||||
//
|
||||
this.txtText.Location = new System.Drawing.Point(9, 71);
|
||||
this.txtText.Multiline = true;
|
||||
this.txtText.Name = "txtText";
|
||||
this.txtText.Size = new System.Drawing.Size(488, 80);
|
||||
this.txtText.TabIndex = 5;
|
||||
this.txtText.TextChanged += new System.EventHandler(this.txtText_TextChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(11, 55);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(31, 13);
|
||||
this.label5.TabIndex = 4;
|
||||
this.label5.Text = "Text:";
|
||||
//
|
||||
// numUnk2
|
||||
//
|
||||
this.numUnk2.Hexadecimal = true;
|
||||
this.numUnk2.Location = new System.Drawing.Point(323, 21);
|
||||
this.numUnk2.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numUnk2.Name = "numUnk2";
|
||||
this.numUnk2.Size = new System.Drawing.Size(90, 20);
|
||||
this.numUnk2.TabIndex = 3;
|
||||
this.numUnk2.ValueChanged += new System.EventHandler(this.numUnk2_ValueChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(226, 23);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(56, 13);
|
||||
this.label4.TabIndex = 2;
|
||||
this.label4.Text = "Unknown:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 21);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(56, 13);
|
||||
this.label3.TabIndex = 1;
|
||||
this.label3.Text = "Unknown:";
|
||||
//
|
||||
// numUnk1
|
||||
//
|
||||
this.numUnk1.Hexadecimal = true;
|
||||
this.numUnk1.Location = new System.Drawing.Point(105, 19);
|
||||
this.numUnk1.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numUnk1.Name = "numUnk1";
|
||||
this.numUnk1.Size = new System.Drawing.Size(90, 20);
|
||||
this.numUnk1.TabIndex = 0;
|
||||
this.numUnk1.ValueChanged += new System.EventHandler(this.numUnk1_ValueChanged);
|
||||
//
|
||||
// btnWrite
|
||||
//
|
||||
this.btnWrite.Image = global::INAZUMA11.Properties.Resources.page_white_edit;
|
||||
this.btnWrite.Location = new System.Drawing.Point(6, 207);
|
||||
this.btnWrite.Name = "btnWrite";
|
||||
this.btnWrite.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnWrite.TabIndex = 4;
|
||||
this.btnWrite.Text = "Write file";
|
||||
this.btnWrite.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnWrite.UseVisualStyleBackColor = true;
|
||||
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
|
||||
//
|
||||
// BlogresControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.btnWrite);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.numBlock);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "BlogresControl";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown numBlock;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.TextBox txtText;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.NumericUpDown numUnk2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.NumericUpDown numUnk1;
|
||||
private System.Windows.Forms.Button btnWrite;
|
||||
}
|
||||
}
|
131
Plugins/INAZUMA11/INAZUMA11/BlogresControl.cs
Normal file
131
Plugins/INAZUMA11/INAZUMA11/BlogresControl.cs
Normal file
@ -0,0 +1,131 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="BlogresControl.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 13:49:48</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace INAZUMA11
|
||||
{
|
||||
public partial class BlogresControl : UserControl
|
||||
{
|
||||
IPluginHost pluginHost;
|
||||
int id;
|
||||
Blogres[] brs;
|
||||
Encoding enc;
|
||||
|
||||
public BlogresControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public BlogresControl(string file, int id, IPluginHost pluginHost)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
enc = Encoding.GetEncoding("shift_jis");
|
||||
|
||||
Read(file);
|
||||
numBlock.Maximum = brs.Length - 1;
|
||||
label2.Text = "of " + numBlock.Maximum.ToString();
|
||||
numBlock_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
brs = new Blogres[br.BaseStream.Length / 0x108];
|
||||
|
||||
for (int i = 0; i < brs.Length; i++)
|
||||
{
|
||||
brs[i].unknown1 = br.ReadUInt16();
|
||||
brs[i].unknown2 = br.ReadByte();
|
||||
brs[i].text = new String(enc.GetChars(br.ReadBytes(0x105)));
|
||||
}
|
||||
|
||||
br.Close();
|
||||
}
|
||||
private void Write()
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
for (int i = 0; i < brs.Length; i++)
|
||||
{
|
||||
bw.Write(brs[i].unknown1);
|
||||
bw.Write(brs[i].unknown2);
|
||||
|
||||
int length = enc.GetByteCount(brs[i].text);
|
||||
bw.Write(enc.GetBytes(brs[i].text));
|
||||
while (length != 0x105)
|
||||
{
|
||||
bw.Write((byte)0x00);
|
||||
length++;
|
||||
}
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void numBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
txtText.Text = brs[i].text.Replace("\n", "\r\n");
|
||||
numUnk1.Value = brs[i].unknown1;
|
||||
numUnk2.Value = brs[i].unknown2;
|
||||
}
|
||||
|
||||
private void numUnk1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
brs[i].unknown1 = (ushort)numUnk1.Value;
|
||||
}
|
||||
private void numUnk2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
brs[i].unknown2 = (byte)numUnk2.Value;
|
||||
}
|
||||
private void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
brs[i].text = txtText.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
|
||||
private void btnWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Write();
|
||||
}
|
||||
}
|
||||
|
||||
public struct Blogres
|
||||
{
|
||||
public ushort unknown1;
|
||||
public byte unknown2;
|
||||
public string text;
|
||||
}
|
||||
}
|
120
Plugins/INAZUMA11/INAZUMA11/BlogresControl.resx
Normal file
120
Plugins/INAZUMA11/INAZUMA11/BlogresControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -38,13 +38,67 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BlogpostControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BlogpostControl.Designer.cs">
|
||||
<DependentUpon>BlogpostControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="BlogresControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BlogresControl.Designer.cs">
|
||||
<DependentUpon>BlogresControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="Packs.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SubtitlesControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SubtitlesControl.Designer.cs">
|
||||
<DependentUpon>SubtitlesControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="USearchControl.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="USearchControl.Designer.cs">
|
||||
<DependentUpon>USearchControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="BlogpostControl.resx">
|
||||
<DependentUpon>BlogpostControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="BlogresControl.resx">
|
||||
<DependentUpon>BlogresControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="SubtitlesControl.resx">
|
||||
<DependentUpon>SubtitlesControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="USearchControl.resx">
|
||||
<DependentUpon>USearchControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\page_white_edit.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Licence.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
621
Plugins/INAZUMA11/INAZUMA11/Licence.txt
Normal file
621
Plugins/INAZUMA11/INAZUMA11/Licence.txt
Normal file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
'This License' refers to version 3 of the GNU General Public License.
|
||||
|
||||
'Copyright' also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
'The Program' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as 'you'. 'Licensees' and
|
||||
'recipients' may be individuals or organizations.
|
||||
|
||||
To 'modify' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a 'modified version' of the
|
||||
earlier work or a work 'based on' the earlier work.
|
||||
|
||||
A 'covered work' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To 'propagate' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To 'convey' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays 'Appropriate Legal Notices'
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The 'source code' for a work means the preferred form of the work
|
||||
for making modifications to it. 'Object code' means any non-source
|
||||
form of a work.
|
||||
|
||||
A 'Standard Interface' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The 'System Libraries' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
'Major Component', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The 'Corresponding Source' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
'keep intact all notices'.
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
'aggregate' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A 'User Product' is either (1) a 'consumer product', which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, 'normally used' refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
'Installation Information' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
'Additional permissions' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered 'further
|
||||
restrictions' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An 'entity transaction' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A 'contributor' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's 'contributor version'.
|
||||
|
||||
A contributor's 'essential patent claims' are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, 'control' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a 'patent license' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To 'grant' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. 'Knowingly relying' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is 'discriminatory' if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License 'or any later version' applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
@ -1,22 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2011 pleoNeX
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* By: pleoNeX
|
||||
*
|
||||
*/
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Main.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>27/04/2012 23:53:48</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@ -50,6 +55,7 @@ namespace INAZUMA11
|
||||
{
|
||||
string ext = new string(Encoding.ASCII.GetChars(magic));
|
||||
|
||||
// Pack files
|
||||
if ((fileName.ToUpper().EndsWith(".PAC_") || fileName.ToUpper().EndsWith(".PAC")) && BitConverter.ToUInt32(magic, 0) < 0x100)
|
||||
return Format.Pack;
|
||||
else if (fileName.ToUpper().EndsWith(".PKB"))
|
||||
@ -63,6 +69,18 @@ namespace INAZUMA11
|
||||
else if (fileName.ToUpper().EndsWith(".SPL"))
|
||||
return Format.System;
|
||||
|
||||
// Text files
|
||||
// TODO: Include more gameCodes here and in Show_Info
|
||||
switch (gameCode)
|
||||
{
|
||||
case "BEBP":
|
||||
if (id >= 0x13F && id <= 0x161) return Format.Text;
|
||||
if (id == 0xD8) return Format.Text;
|
||||
if (id == 0x387) return Format.Text;
|
||||
if (id == 0x388) return Format.Text;
|
||||
break;
|
||||
}
|
||||
|
||||
return Format.Unknown;
|
||||
}
|
||||
|
||||
@ -112,6 +130,15 @@ namespace INAZUMA11
|
||||
}
|
||||
public Control Show_Info(string file, int id)
|
||||
{
|
||||
switch (gameCode)
|
||||
{
|
||||
case "BEBP":
|
||||
if (id >= 0x13F && id <= 0x161) return new SubtitlesControl(file, pluginHost, id);
|
||||
if (id == 0xD8) return new USearchControl(file, id, pluginHost);
|
||||
if (id == 0x387) return new BlogpostControl(file, id, pluginHost);
|
||||
if (id == 0x388) return new BlogresControl(file, id, pluginHost);
|
||||
break;
|
||||
}
|
||||
return new Control();
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2011 pleoNeX
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* By: pleoNeX
|
||||
*
|
||||
*/
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Packs.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>27/04/2012 23:54:44</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
70
Plugins/INAZUMA11/INAZUMA11/Properties/Resources.Designer.cs
generated
Normal file
70
Plugins/INAZUMA11/INAZUMA11/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Este código fue generado por una herramienta.
|
||||
// Versión de runtime:4.0.30319.261
|
||||
//
|
||||
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
// se vuelve a generar el código.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace INAZUMA11.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clase de recurso con establecimiento inflexible de tipos, para buscar cadenas traducidas, etc.
|
||||
/// </summary>
|
||||
// StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||
// a través de una herramienta como ResGen o Visual Studio.
|
||||
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||
// con la opción /str o vuelva a generar su proyecto de VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("INAZUMA11.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
|
||||
/// búsquedas de recursos mediante esta clase de recurso con establecimiento inflexible de tipos.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static System.Drawing.Bitmap page_white_edit {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_edit", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
124
Plugins/INAZUMA11/INAZUMA11/Properties/Resources.resx
Normal file
124
Plugins/INAZUMA11/INAZUMA11/Properties/Resources.resx
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="page_white_edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_edit.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Plugins/INAZUMA11/INAZUMA11/Resources/page_white_edit.png
Normal file
BIN
Plugins/INAZUMA11/INAZUMA11/Resources/page_white_edit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 618 B |
261
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.Designer.cs
generated
Normal file
261
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.Designer.cs
generated
Normal file
@ -0,0 +1,261 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SubtitlesControl.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 1:19:53</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace INAZUMA11
|
||||
{
|
||||
partial class SubtitlesControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable del diseñador requerida.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Limpiar los recursos que se estén utilizando.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Código generado por el Diseñador de componentes
|
||||
|
||||
/// <summary>
|
||||
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||
/// el contenido del método con el editor de código.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.txtOld = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.numStartTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.numEndTime = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnWrite = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.txtNew = new System.Windows.Forms.TextBox();
|
||||
this.numSub = new System.Windows.Forms.NumericUpDown();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numStartTime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numEndTime)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSub)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtOld
|
||||
//
|
||||
this.txtOld.Location = new System.Drawing.Point(3, 52);
|
||||
this.txtOld.Multiline = true;
|
||||
this.txtOld.Name = "txtOld";
|
||||
this.txtOld.ReadOnly = true;
|
||||
this.txtOld.Size = new System.Drawing.Size(250, 65);
|
||||
this.txtOld.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(0, 36);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(65, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Original text:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(0, 157);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(54, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Start time:";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(177, 157);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(79, 13);
|
||||
this.label3.TabIndex = 3;
|
||||
this.label3.Text = "3/100 seconds";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(0, 183);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(51, 13);
|
||||
this.label4.TabIndex = 4;
|
||||
this.label4.Text = "End time:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(177, 183);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(79, 13);
|
||||
this.label5.TabIndex = 5;
|
||||
this.label5.Text = "3/100 seconds";
|
||||
//
|
||||
// numStartTime
|
||||
//
|
||||
this.numStartTime.Location = new System.Drawing.Point(91, 155);
|
||||
this.numStartTime.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numStartTime.Name = "numStartTime";
|
||||
this.numStartTime.Size = new System.Drawing.Size(80, 20);
|
||||
this.numStartTime.TabIndex = 6;
|
||||
this.numStartTime.ValueChanged += new System.EventHandler(this.numStartTime_ValueChanged);
|
||||
//
|
||||
// numEndTime
|
||||
//
|
||||
this.numEndTime.Location = new System.Drawing.Point(91, 181);
|
||||
this.numEndTime.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numEndTime.Name = "numEndTime";
|
||||
this.numEndTime.Size = new System.Drawing.Size(80, 20);
|
||||
this.numEndTime.TabIndex = 7;
|
||||
this.numEndTime.ValueChanged += new System.EventHandler(this.numEndTime_ValueChanged);
|
||||
//
|
||||
// btnWrite
|
||||
//
|
||||
this.btnWrite.Image = global::INAZUMA11.Properties.Resources.page_white_edit;
|
||||
this.btnWrite.Location = new System.Drawing.Point(426, 169);
|
||||
this.btnWrite.Name = "btnWrite";
|
||||
this.btnWrite.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnWrite.TabIndex = 8;
|
||||
this.btnWrite.Text = "Write file";
|
||||
this.btnWrite.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnWrite.UseVisualStyleBackColor = true;
|
||||
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(253, 36);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(52, 13);
|
||||
this.label6.TabIndex = 9;
|
||||
this.label6.Text = "New text:";
|
||||
//
|
||||
// txtNew
|
||||
//
|
||||
this.txtNew.Location = new System.Drawing.Point(256, 52);
|
||||
this.txtNew.Multiline = true;
|
||||
this.txtNew.Name = "txtNew";
|
||||
this.txtNew.Size = new System.Drawing.Size(250, 65);
|
||||
this.txtNew.TabIndex = 10;
|
||||
this.txtNew.TextChanged += new System.EventHandler(this.txtNew_TextChanged);
|
||||
//
|
||||
// numSub
|
||||
//
|
||||
this.numSub.Location = new System.Drawing.Point(81, 3);
|
||||
this.numSub.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numSub.Name = "numSub";
|
||||
this.numSub.Size = new System.Drawing.Size(90, 20);
|
||||
this.numSub.TabIndex = 13;
|
||||
this.numSub.ValueChanged += new System.EventHandler(this.numSub_ValueChanged);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(3, 5);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(55, 13);
|
||||
this.label7.TabIndex = 14;
|
||||
this.label7.Text = "Num. sub:";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(177, 5);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(19, 13);
|
||||
this.label8.TabIndex = 15;
|
||||
this.label8.Text = "of ";
|
||||
//
|
||||
// SubtitlesControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.numSub);
|
||||
this.Controls.Add(this.txtNew);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.btnWrite);
|
||||
this.Controls.Add(this.numEndTime);
|
||||
this.Controls.Add(this.numStartTime);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtOld);
|
||||
this.Name = "SubtitlesControl";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numStartTime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numEndTime)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSub)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtOld;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.NumericUpDown numStartTime;
|
||||
private System.Windows.Forms.NumericUpDown numEndTime;
|
||||
private System.Windows.Forms.Button btnWrite;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox txtNew;
|
||||
private System.Windows.Forms.NumericUpDown numSub;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
164
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.cs
Normal file
164
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.cs
Normal file
@ -0,0 +1,164 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SubtitlesControl.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 0:28:33</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace INAZUMA11
|
||||
{
|
||||
public partial class SubtitlesControl : UserControl
|
||||
{
|
||||
int id;
|
||||
IPluginHost pluginHost;
|
||||
List<Subtitle> subs;
|
||||
List<Subtitle> subsNew;
|
||||
|
||||
public SubtitlesControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public SubtitlesControl(string fileIn, IPluginHost pluginHost, int id)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
|
||||
Read(fileIn);
|
||||
numSub.Maximum = subsNew.Count - 1;
|
||||
label8.Text = "of " + numSub.Maximum.ToString();
|
||||
numSub_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
public void Read(string fileIn)
|
||||
{
|
||||
subs = new List<Subtitle>();
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
|
||||
while (br.BaseStream.Length > br.BaseStream.Position)
|
||||
{
|
||||
Subtitle sub = new Subtitle();
|
||||
sub.time_start = br.ReadUInt32();
|
||||
if (sub.time_start == 0xFFFFFFFF)
|
||||
break;
|
||||
|
||||
sub.time_end = br.ReadUInt32();
|
||||
uint length = br.ReadUInt32(); // It isn't always correct
|
||||
|
||||
byte[] b = new byte[length];
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
b[i] = br.ReadByte();
|
||||
if (b[i] == 0x00)
|
||||
break;
|
||||
}
|
||||
if ((br.BaseStream.Position % 4) != 0)
|
||||
while ((br.BaseStream.Position % 4) != 0)
|
||||
br.ReadByte();
|
||||
sub.text = new String(Encoding.GetEncoding("shift_jis").GetChars(b));
|
||||
|
||||
subs.Add(sub);
|
||||
}
|
||||
|
||||
br.Close();
|
||||
subsNew = subs;
|
||||
}
|
||||
public void Write()
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
for (int i = 0; i < subsNew.Count; i++)
|
||||
{
|
||||
bw.Write(subsNew[i].time_start);
|
||||
bw.Write(subsNew[i].time_end);
|
||||
|
||||
uint length = (uint)Encoding.GetEncoding("shift_jis").GetByteCount(subsNew[i].text);
|
||||
length += 4 - (length % 4);
|
||||
bw.Write(length);
|
||||
bw.Write(Encoding.GetEncoding("shift_jis").GetBytes(subsNew[i].text));
|
||||
while (bw.BaseStream.Position % 4 != 0)
|
||||
bw.Write((byte)0x00);
|
||||
}
|
||||
bw.Write(0xFFFFFFFF);
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void numSub_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numSub.Value;
|
||||
|
||||
txtOld.Text = subs[i].text.Replace("\n", "\r\n");
|
||||
txtNew.Text = subsNew[i].text.Replace("\n", "\r\n");
|
||||
|
||||
numStartTime.Value = subsNew[i].time_start;
|
||||
numEndTime.Value = subsNew[i].time_end;
|
||||
}
|
||||
|
||||
private void btnWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Write();
|
||||
}
|
||||
|
||||
private void txtNew_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numSub.Value;
|
||||
|
||||
Subtitle sub = subsNew[i];
|
||||
sub.text = txtNew.Text.Replace("\r\n", "\n");
|
||||
subsNew[i] = sub;
|
||||
}
|
||||
private void numStartTime_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numSub.Value;
|
||||
|
||||
Subtitle sub = subsNew[i];
|
||||
sub.time_start = (uint)numStartTime.Value;
|
||||
subsNew[i] = sub;
|
||||
}
|
||||
private void numEndTime_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numSub.Value;
|
||||
|
||||
Subtitle sub = subsNew[i];
|
||||
sub.time_end = (uint)numEndTime.Value;
|
||||
subsNew[i] = sub;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public struct Subtitle
|
||||
{
|
||||
public uint time_start;
|
||||
public uint time_end;
|
||||
public string text;
|
||||
}
|
||||
}
|
120
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.resx
Normal file
120
Plugins/INAZUMA11/INAZUMA11/SubtitlesControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
217
Plugins/INAZUMA11/INAZUMA11/USearchControl.Designer.cs
generated
Normal file
217
Plugins/INAZUMA11/INAZUMA11/USearchControl.Designer.cs
generated
Normal file
@ -0,0 +1,217 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="USearchControl.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 10:20:12</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace INAZUMA11
|
||||
{
|
||||
partial class USearchControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Variable del diseñador requerida.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Limpiar los recursos que se estén utilizando.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Código generado por el Diseñador de componentes
|
||||
|
||||
/// <summary>
|
||||
/// Método necesario para admitir el Diseñador. No se puede modificar
|
||||
/// el contenido del método con el editor de código.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.numBlock = new System.Windows.Forms.NumericUpDown();
|
||||
this.txtText1 = new System.Windows.Forms.TextBox();
|
||||
this.txtUnk = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtText2 = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.btnWrite = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 5);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(76, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Num. of block:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(201, 5);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(19, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "of ";
|
||||
//
|
||||
// numBlock
|
||||
//
|
||||
this.numBlock.Location = new System.Drawing.Point(105, 3);
|
||||
this.numBlock.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numBlock.Name = "numBlock";
|
||||
this.numBlock.Size = new System.Drawing.Size(90, 20);
|
||||
this.numBlock.TabIndex = 2;
|
||||
this.numBlock.ValueChanged += new System.EventHandler(this.numBlock_ValueChanged);
|
||||
//
|
||||
// txtText1
|
||||
//
|
||||
this.txtText1.Location = new System.Drawing.Point(9, 38);
|
||||
this.txtText1.Multiline = true;
|
||||
this.txtText1.Name = "txtText1";
|
||||
this.txtText1.Size = new System.Drawing.Size(240, 40);
|
||||
this.txtText1.TabIndex = 3;
|
||||
this.txtText1.TextChanged += new System.EventHandler(this.txtText1_TextChanged);
|
||||
//
|
||||
// txtUnk
|
||||
//
|
||||
this.txtUnk.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.txtUnk.Location = new System.Drawing.Point(9, 112);
|
||||
this.txtUnk.Multiline = true;
|
||||
this.txtUnk.Name = "txtUnk";
|
||||
this.txtUnk.ReadOnly = true;
|
||||
this.txtUnk.Size = new System.Drawing.Size(486, 80);
|
||||
this.txtUnk.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 22);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(40, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Text 1:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(11, 96);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(80, 13);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Unknown data:";
|
||||
//
|
||||
// txtText2
|
||||
//
|
||||
this.txtText2.Location = new System.Drawing.Point(255, 38);
|
||||
this.txtText2.Multiline = true;
|
||||
this.txtText2.Name = "txtText2";
|
||||
this.txtText2.Size = new System.Drawing.Size(240, 40);
|
||||
this.txtText2.TabIndex = 7;
|
||||
this.txtText2.TextChanged += new System.EventHandler(this.txtText2_TextChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(252, 22);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(40, 13);
|
||||
this.label5.TabIndex = 8;
|
||||
this.label5.Text = "Text 2:";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.label3);
|
||||
this.groupBox1.Controls.Add(this.txtText1);
|
||||
this.groupBox1.Controls.Add(this.txtUnk);
|
||||
this.groupBox1.Controls.Add(this.label4);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.txtText2);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 29);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(503, 198);
|
||||
this.groupBox1.TabIndex = 9;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Block data:";
|
||||
//
|
||||
// btnWrite
|
||||
//
|
||||
this.btnWrite.Image = global::INAZUMA11.Properties.Resources.page_white_edit;
|
||||
this.btnWrite.Location = new System.Drawing.Point(6, 233);
|
||||
this.btnWrite.Name = "btnWrite";
|
||||
this.btnWrite.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnWrite.TabIndex = 10;
|
||||
this.btnWrite.Text = "Write";
|
||||
this.btnWrite.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnWrite.UseVisualStyleBackColor = true;
|
||||
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
|
||||
//
|
||||
// USearchControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.btnWrite);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.numBlock);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Name = "USearchControl";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown numBlock;
|
||||
private System.Windows.Forms.TextBox txtText1;
|
||||
private System.Windows.Forms.TextBox txtUnk;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtText2;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private System.Windows.Forms.Button btnWrite;
|
||||
}
|
||||
}
|
132
Plugins/INAZUMA11/INAZUMA11/USearchControl.cs
Normal file
132
Plugins/INAZUMA11/INAZUMA11/USearchControl.cs
Normal file
@ -0,0 +1,132 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="USearchControl.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 10:20:35</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace INAZUMA11
|
||||
{
|
||||
public partial class USearchControl : UserControl
|
||||
{
|
||||
IPluginHost pluginHost;
|
||||
int id;
|
||||
USearch[] us;
|
||||
|
||||
public USearchControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public USearchControl(string file, int id, IPluginHost pluginHost)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.id = id;
|
||||
this.pluginHost = pluginHost;
|
||||
|
||||
Read(file);
|
||||
numBlock.Maximum = us.Length - 1;
|
||||
label2.Text = "of " + numBlock.Maximum.ToString();
|
||||
numBlock_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
us = new USearch[br.BaseStream.Length / 0x38];
|
||||
|
||||
for (int i = 0; i < us.Length; i++)
|
||||
{
|
||||
us[i].text1 = new String(Encoding.GetEncoding("shift_jis").GetChars(br.ReadBytes(0x10)));
|
||||
us[i].text2 = new String(Encoding.GetEncoding("shift_jis").GetChars(br.ReadBytes(0x18)));
|
||||
us[i].unknown = br.ReadBytes(0x10);
|
||||
}
|
||||
|
||||
br.Close();
|
||||
}
|
||||
private void Write()
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
for (int i = 0; i < us.Length; i++)
|
||||
{
|
||||
int length = Encoding.GetEncoding("shift_jis").GetByteCount(us[i].text1);
|
||||
bw.Write(Encoding.GetEncoding("shift_jis").GetBytes(us[i].text1));
|
||||
while (length != 0x10)
|
||||
{
|
||||
bw.Write((byte)0x00);
|
||||
length++;
|
||||
}
|
||||
|
||||
length = Encoding.GetEncoding("shift_jis").GetByteCount(us[i].text2);
|
||||
bw.Write(Encoding.GetEncoding("shift_jis").GetBytes(us[i].text2));
|
||||
while (length != 0x18)
|
||||
{
|
||||
bw.Write((byte)0x00);
|
||||
length++;
|
||||
}
|
||||
|
||||
bw.Write(us[i].unknown);
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void btnWrite_Click(object sender, EventArgs e)
|
||||
{
|
||||
Write();
|
||||
}
|
||||
|
||||
private void numBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
|
||||
txtText1.Text = us[i].text1.Replace("\n", "\r\n");
|
||||
txtText2.Text = us[i].text2.Replace("\n", "\r\n");
|
||||
txtUnk.Text = BitConverter.ToString(us[i].unknown);
|
||||
}
|
||||
|
||||
private void txtText1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
us[i].text1 = txtText1.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
private void txtText2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
us[i].text2 = txtText2.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
}
|
||||
|
||||
public struct USearch
|
||||
{
|
||||
public string text1;
|
||||
public string text2;
|
||||
public byte[] unknown;
|
||||
}
|
||||
}
|
120
Plugins/INAZUMA11/INAZUMA11/USearchControl.resx
Normal file
120
Plugins/INAZUMA11/INAZUMA11/USearchControl.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
147
Plugins/Images/Images/Games/PCT.cs
Normal file
147
Plugins/Images/Images/Games/PCT.cs
Normal file
@ -0,0 +1,147 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="PCT.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>25/04/2012 20:10:58</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
using PluginInterface;
|
||||
using PluginInterface.Images;
|
||||
|
||||
namespace Images.Games
|
||||
{
|
||||
public class PCT : IGamePlugin
|
||||
{
|
||||
string gameCode;
|
||||
IPluginHost pluginHost;
|
||||
|
||||
public Format Get_Format(string fileName, byte[] magic, int id)
|
||||
{
|
||||
string ext = new string(System.Text.Encoding.ASCII.GetChars(magic));
|
||||
if (ext == "STD ")
|
||||
return Format.FullImage;
|
||||
|
||||
return Format.Unknown;
|
||||
}
|
||||
|
||||
public void Initialize(IPluginHost pluginHost, string gameCode)
|
||||
{
|
||||
this.gameCode = gameCode;
|
||||
this.pluginHost = pluginHost;
|
||||
}
|
||||
public bool IsCompatible()
|
||||
{
|
||||
if (gameCode == "TBWJ")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Read(string file, int id)
|
||||
{
|
||||
}
|
||||
public System.Windows.Forms.Control Show_Info(string file, int id)
|
||||
{
|
||||
// BTM only support STD files
|
||||
new STD(pluginHost, file, id);
|
||||
return new ImageControl(pluginHost, true);
|
||||
}
|
||||
|
||||
public sFolder Unpack(string file, int id)
|
||||
{
|
||||
return new sFolder();
|
||||
}
|
||||
public string Pack(ref sFolder unpacked, string file, int id)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class STD : MapBase
|
||||
{
|
||||
public STD(IPluginHost pluginHost, string file, int id) : base(pluginHost, file, id) { }
|
||||
|
||||
public override void Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
|
||||
// Header
|
||||
char[] type = br.ReadChars(4); // "STD "
|
||||
uint unknown_header = br.ReadUInt32();
|
||||
ushort clrformat = br.ReadUInt16();
|
||||
ColorFormat format = ColorFormat.colors256;
|
||||
if (clrformat == 0)
|
||||
format = ColorFormat.colors16;
|
||||
br.BaseStream.Position = 0x10; // Unknown values
|
||||
|
||||
// Palette
|
||||
ushort unknown_pal = br.ReadUInt16();
|
||||
ushort num_colors = br.ReadUInt16();
|
||||
Color[] colors = Actions.BGR555ToColor(br.ReadBytes(num_colors * 2));
|
||||
PaletteBase palette = new RawPalette(pluginHost, new Color[][] { colors }, false, format);
|
||||
|
||||
// Map
|
||||
int tile_width = br.ReadUInt16() * 8;
|
||||
int tile_height = br.ReadUInt16() * 8;
|
||||
int tile_size = tile_width * tile_height;
|
||||
if (tile_height != tile_width)
|
||||
System.Windows.Forms.MessageBox.Show("Different tile size; height != width");
|
||||
|
||||
int width = br.ReadUInt16() * tile_width;
|
||||
int height = br.ReadUInt16() * tile_height;
|
||||
uint unknown2_map = br.ReadUInt32(); // Padding ?
|
||||
NTFS[] map = new NTFS[width * height / tile_size];
|
||||
for (int i = 0; i < map.Length; i++)
|
||||
{
|
||||
map[i] = new NTFS();
|
||||
uint mapv = br.ReadUInt32();
|
||||
map[i].nTile = (ushort)(mapv & 0xFFFFFF);
|
||||
map[i].nTile /= (ushort)(tile_size / 0x40);
|
||||
map[i].nPalette = (byte)(mapv >> 28);
|
||||
}
|
||||
Set_Map(map, false, width, height);
|
||||
|
||||
// Image
|
||||
if (clrformat == 2)
|
||||
format = ColorFormat.A3I5;
|
||||
else if (clrformat == 3)
|
||||
format = ColorFormat.A5I3;
|
||||
else if (clrformat != 0 && clrformat != 1)
|
||||
System.Windows.Forms.MessageBox.Show("ClrFormat: " + clrformat.ToString());
|
||||
byte[] tiles = br.ReadBytes((int)(br.BaseStream.Length - br.BaseStream.Position));
|
||||
ImageBase image = new RawImage(pluginHost, tiles, TileForm.Horizontal, format, width, height, false);
|
||||
image.TileSize = tile_width;
|
||||
|
||||
br.Close();
|
||||
|
||||
pluginHost.Set_Palette(palette);
|
||||
pluginHost.Set_Image(image);
|
||||
pluginHost.Set_Map(this);
|
||||
}
|
||||
|
||||
public override void Write(string fileOut, ImageBase image, PaletteBase palette)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -112,6 +112,7 @@
|
||||
<Compile Include="AnimationControl.designer.cs">
|
||||
<DependentUpon>AnimationControl.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Games\PCT.cs" />
|
||||
<Compile Include="NANR.cs" />
|
||||
<Compile Include="NCCG.cs" />
|
||||
<Compile Include="NCCL.cs" />
|
||||
|
@ -124,11 +124,11 @@ namespace Images
|
||||
Size cellSize = pluginHost.Get_OAMSize(ncer.cebk.banks[i].oams[j].obj0.shape, ncer.cebk.banks[i].oams[j].obj1.size);
|
||||
ncer.cebk.banks[i].oams[j].height = (ushort)cellSize.Height;
|
||||
ncer.cebk.banks[i].oams[j].width = (ushort)cellSize.Width;
|
||||
if (ncer.cebk.banks[i].oams[j].obj0.doubleSize == 1)
|
||||
{
|
||||
ncer.cebk.banks[i].oams[j].width *= 2;
|
||||
ncer.cebk.banks[i].oams[j].height *= 2;
|
||||
}
|
||||
//if (ncer.cebk.banks[i].oams[j].obj0.doubleSize == 1)
|
||||
//{
|
||||
// ncer.cebk.banks[i].oams[j].width *= 2;
|
||||
// ncer.cebk.banks[i].oams[j].height *= 2;
|
||||
//}
|
||||
|
||||
//Console.WriteLine("|_" + xml.Element("S1C").Value + " {0}:", j.ToString());
|
||||
//Console.WriteLine(" " + xml.Element("S1D").Value + ": {0}", ncer.cebk.banks[i].cells[j].obj0.yOffset.ToString());
|
||||
|
119
Plugins/NINOKUNI/NINOKUNI/MQuestText.Designer.cs
generated
119
Plugins/NINOKUNI/NINOKUNI/MQuestText.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace NINOKUNI
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="MQuestText.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:38:24</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace NINOKUNI
|
||||
{
|
||||
partial class MQuestText
|
||||
{
|
||||
@ -36,15 +60,18 @@
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtID = new System.Windows.Forms.TextBox();
|
||||
this.txtTrans = new System.Windows.Forms.TextBox();
|
||||
this.txtOri = new System.Windows.Forms.TextBox();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.btnExport = new System.Windows.Forms.Button();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.lblBlockNum = new System.Windows.Forms.Label();
|
||||
this.numBlock = new System.Windows.Forms.NumericUpDown();
|
||||
this.btnImport = new System.Windows.Forms.Button();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.numBlockID = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numElement)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlockID)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lblSizeTrans
|
||||
@ -68,7 +95,7 @@
|
||||
// lblNum
|
||||
//
|
||||
this.lblNum.AutoSize = true;
|
||||
this.lblNum.Location = new System.Drawing.Point(199, 436);
|
||||
this.lblNum.Location = new System.Drawing.Point(199, 461);
|
||||
this.lblNum.Name = "lblNum";
|
||||
this.lblNum.Size = new System.Drawing.Size(19, 13);
|
||||
this.lblNum.TabIndex = 21;
|
||||
@ -76,7 +103,7 @@
|
||||
//
|
||||
// numElement
|
||||
//
|
||||
this.numElement.Location = new System.Drawing.Point(93, 432);
|
||||
this.numElement.Location = new System.Drawing.Point(93, 458);
|
||||
this.numElement.Name = "numElement";
|
||||
this.numElement.Size = new System.Drawing.Size(100, 20);
|
||||
this.numElement.TabIndex = 20;
|
||||
@ -103,29 +130,21 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(18, 436);
|
||||
this.label2.Location = new System.Drawing.Point(18, 461);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(48, 13);
|
||||
this.label2.Size = new System.Drawing.Size(37, 13);
|
||||
this.label2.TabIndex = 17;
|
||||
this.label2.Text = "Element:";
|
||||
this.label2.Text = "String:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(18, 461);
|
||||
this.label1.Location = new System.Drawing.Point(18, 434);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(21, 13);
|
||||
this.label1.TabIndex = 16;
|
||||
this.label1.Text = "ID:";
|
||||
//
|
||||
// txtID
|
||||
//
|
||||
this.txtID.Location = new System.Drawing.Point(93, 458);
|
||||
this.txtID.Name = "txtID";
|
||||
this.txtID.ReadOnly = true;
|
||||
this.txtID.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtID.TabIndex = 15;
|
||||
//
|
||||
// txtTrans
|
||||
//
|
||||
this.txtTrans.Location = new System.Drawing.Point(8, 201);
|
||||
@ -134,6 +153,7 @@
|
||||
this.txtTrans.Name = "txtTrans";
|
||||
this.txtTrans.Size = new System.Drawing.Size(500, 125);
|
||||
this.txtTrans.TabIndex = 14;
|
||||
this.txtTrans.TextChanged += new System.EventHandler(this.txtTrans_TextChanged);
|
||||
//
|
||||
// txtOri
|
||||
//
|
||||
@ -145,16 +165,16 @@
|
||||
this.txtOri.Size = new System.Drawing.Size(500, 125);
|
||||
this.txtOri.TabIndex = 13;
|
||||
//
|
||||
// btnSave
|
||||
// btnExport
|
||||
//
|
||||
this.btnSave.Enabled = false;
|
||||
this.btnSave.Location = new System.Drawing.Point(429, 469);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnSave.TabIndex = 24;
|
||||
this.btnSave.Text = "Save changes";
|
||||
this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Location = new System.Drawing.Point(429, 469);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnExport.TabIndex = 24;
|
||||
this.btnExport.Text = "Export";
|
||||
this.btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnExport.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
@ -182,15 +202,52 @@
|
||||
this.numBlock.TabIndex = 27;
|
||||
this.numBlock.ValueChanged += new System.EventHandler(this.numBlock_ValueChanged);
|
||||
//
|
||||
// btnImport
|
||||
//
|
||||
this.btnImport.Location = new System.Drawing.Point(343, 469);
|
||||
this.btnImport.Name = "btnImport";
|
||||
this.btnImport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnImport.TabIndex = 28;
|
||||
this.btnImport.Text = "Import";
|
||||
this.btnImport.UseVisualStyleBackColor = true;
|
||||
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(429, 423);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnSave.TabIndex = 29;
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// numBlockID
|
||||
//
|
||||
this.numBlockID.Hexadecimal = true;
|
||||
this.numBlockID.Location = new System.Drawing.Point(93, 432);
|
||||
this.numBlockID.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numBlockID.Name = "numBlockID";
|
||||
this.numBlockID.Size = new System.Drawing.Size(100, 20);
|
||||
this.numBlockID.TabIndex = 30;
|
||||
this.numBlockID.ValueChanged += new System.EventHandler(this.numBlockID_ValueChanged);
|
||||
//
|
||||
// MQuestText
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.numBlockID);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.btnImport);
|
||||
this.Controls.Add(this.numBlock);
|
||||
this.Controls.Add(this.lblBlockNum);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.btnExport);
|
||||
this.Controls.Add(this.lblSizeTrans);
|
||||
this.Controls.Add(this.lblSizeOri);
|
||||
this.Controls.Add(this.lblNum);
|
||||
@ -199,13 +256,13 @@
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.txtID);
|
||||
this.Controls.Add(this.txtTrans);
|
||||
this.Controls.Add(this.txtOri);
|
||||
this.Name = "MQuestText";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numElement)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlock)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numBlockID)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -221,12 +278,14 @@
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtID;
|
||||
private System.Windows.Forms.TextBox txtTrans;
|
||||
private System.Windows.Forms.TextBox txtOri;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.Button btnExport;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label lblBlockNum;
|
||||
private System.Windows.Forms.NumericUpDown numBlock;
|
||||
private System.Windows.Forms.Button btnImport;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.NumericUpDown numBlockID;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,32 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="MQuestText.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:38:10</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
@ -15,7 +36,10 @@ namespace NINOKUNI
|
||||
{
|
||||
int id;
|
||||
IPluginHost pluginHost;
|
||||
string fileName;
|
||||
MainQuest mq_old;
|
||||
MainQuest mq;
|
||||
Encoding enc;
|
||||
|
||||
public MQuestText()
|
||||
{
|
||||
@ -26,8 +50,11 @@ namespace NINOKUNI
|
||||
InitializeComponent();
|
||||
this.id = id;
|
||||
this.pluginHost = pluginHost;
|
||||
fileName = Path.GetFileNameWithoutExtension(file).Substring(12);
|
||||
enc = Encoding.GetEncoding("shift_jis");
|
||||
|
||||
mq = ReadFile(file);
|
||||
mq_old = ReadFile(file);
|
||||
numBlock.Maximum = mq.num_blocks - 1;
|
||||
lblBlockNum.Text = "of " + numBlock.Maximum;
|
||||
numBlock_ValueChanged(null, null);
|
||||
@ -67,46 +94,185 @@ namespace NINOKUNI
|
||||
br.Close();
|
||||
return mq;
|
||||
}
|
||||
|
||||
public struct MainQuest
|
||||
private void Write(string fileOut)
|
||||
{
|
||||
public ushort num_blocks;
|
||||
public Block[] blocks;
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
public struct Block
|
||||
bw.Write(mq.num_blocks);
|
||||
|
||||
for (int i = 0; i < mq.blocks.Length; i++)
|
||||
{
|
||||
public ushort size;
|
||||
public uint id;
|
||||
public Element[] elements;
|
||||
Update_Block(ref mq.blocks[i]);
|
||||
bw.Write(mq.blocks[i].size);
|
||||
bw.Write(mq.blocks[i].id);
|
||||
|
||||
public struct Element
|
||||
for (int e = 0; e < mq.blocks[i].elements.Length; e++)
|
||||
{
|
||||
public ushort size;
|
||||
public string text;
|
||||
bw.Write(mq.blocks[i].elements[e].size);
|
||||
bw.Write(enc.GetBytes(mq.blocks[i].elements[e].text));
|
||||
}
|
||||
bw.Write((byte)0x00);
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
}
|
||||
private void Update_Block(ref MainQuest.Block block)
|
||||
{
|
||||
ushort size = 0;
|
||||
for (int i = 0; i < block.elements.Length; i++)
|
||||
{
|
||||
MainQuest.Block.Element e = block.elements[i];
|
||||
e.size = (ushort)enc.GetByteCount(e.text);
|
||||
block.elements[i] = e;
|
||||
|
||||
size += (ushort)(e.size + 2);
|
||||
}
|
||||
size += 5; // ID + last 0 byte
|
||||
block.size = size;
|
||||
}
|
||||
|
||||
private void numBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
txtID.Text = mq.blocks[i].id.ToString("x");
|
||||
numBlockID.Value = mq.blocks[i].id;
|
||||
|
||||
numElement.Maximum = mq.blocks[i].elements.Length - 1;
|
||||
lblNum.Text = "of " + numElement.Maximum;
|
||||
numElement.Value = 0;
|
||||
numElement_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void numElement_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
int j = (int)numElement.Value;
|
||||
|
||||
txtOri.Text = mq.blocks[i].elements[j].text.Replace("\n", "\r\n");
|
||||
txtOri.Text = mq_old.blocks[i].elements[j].text.Replace("\n", "\r\n");
|
||||
lblSizeOri.Text = "Size: " + txtOri.Text.Length;
|
||||
txtTrans.Text = "";
|
||||
txtTrans.Text = mq.blocks[i].elements[j].text.Replace("\n", "\r\n"); ;
|
||||
lblSizeTrans.Text = "";
|
||||
}
|
||||
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog o = new SaveFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckPathExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
if (File.Exists(o.FileName))
|
||||
File.Delete(o.FileName);
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "utf-8", null));
|
||||
XmlElement root = doc.CreateElement("MainQuest");
|
||||
|
||||
for (int i = 0; i < mq.blocks.Length; i++)
|
||||
{
|
||||
XmlElement block = doc.CreateElement("Block");
|
||||
block.SetAttribute("ID", mq.blocks[i].id.ToString("x"));
|
||||
|
||||
for (int j = 0; j < mq.blocks[i].elements.Length; j++)
|
||||
{
|
||||
XmlElement el = doc.CreateElement("String");
|
||||
|
||||
// Format the text
|
||||
string text = mq.blocks[i].elements[j].text;
|
||||
text = text.Replace('<', '【');
|
||||
text = text.Replace('>', '】');
|
||||
text = text.Replace("\n", "\n ");
|
||||
if (text.Contains("\n"))
|
||||
text = "\n " + text + "\n ";
|
||||
|
||||
el.InnerText = text;
|
||||
block.AppendChild(el);
|
||||
}
|
||||
|
||||
root.AppendChild(block);
|
||||
}
|
||||
|
||||
doc.AppendChild(root);
|
||||
doc.Save(o.FileName);
|
||||
}
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog o = new OpenFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckFileExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(o.FileName);
|
||||
|
||||
XmlNode root = doc.ChildNodes[1];
|
||||
for (int i = 0; i < root.ChildNodes.Count; i++)
|
||||
{
|
||||
XmlNode block = root.ChildNodes[i];
|
||||
mq.blocks[i].id = Convert.ToUInt32(block.Attributes["ID"].Value, 16);
|
||||
|
||||
for (int j = 0; j < block.ChildNodes.Count; j++)
|
||||
{
|
||||
string text = block.ChildNodes[j].InnerText;
|
||||
if (text.Contains("\n"))
|
||||
{
|
||||
text = text.Remove(0, 7);
|
||||
text = text.Remove(text.Length - 5);
|
||||
text = text.Replace("\n ", "\n");
|
||||
}
|
||||
text = text.Replace('【', '<');
|
||||
text = text.Replace('】', '>');
|
||||
|
||||
mq.blocks[i].elements[j].text = text;
|
||||
}
|
||||
}
|
||||
numBlock_ValueChanged(null, null);
|
||||
}
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
Write(fileOut);
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void txtTrans_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
int j = (int)numElement.Value;
|
||||
|
||||
MainQuest.Block.Element el = mq.blocks[i].elements[j];
|
||||
el.text = txtTrans.Text.Replace("\r\n", "\n");
|
||||
mq.blocks[i].elements[j] = el;
|
||||
}
|
||||
private void numBlockID_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numBlock.Value;
|
||||
mq.blocks[i].id = (uint)numBlockID.Value;
|
||||
}
|
||||
|
||||
}
|
||||
public struct MainQuest
|
||||
{
|
||||
public ushort num_blocks;
|
||||
public Block[] blocks;
|
||||
|
||||
public struct Block
|
||||
{
|
||||
public ushort size;
|
||||
public uint id;
|
||||
public Element[] elements;
|
||||
|
||||
public struct Element
|
||||
{
|
||||
public ushort size;
|
||||
public string text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Main.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:41:18</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
@ -57,7 +81,7 @@ namespace NINOKUNI
|
||||
else if (Path.GetFileName(file).Contains("eddn"))
|
||||
return new BMPControl(file, id, pluginHost);
|
||||
else if (id == 0xFF2)
|
||||
return new ScenarioText(file);
|
||||
return new ScenarioText(pluginHost, file, id);
|
||||
else if (id == 0xFF4)
|
||||
return new SystemText(file, id, pluginHost);
|
||||
else if (id == 0xF76)
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="NPCK.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:38:54</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión
|
||||
// mediante el asterisco ('*'), como se muestra a continuación:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("4.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("4.0.0.0")]
|
||||
[assembly: AssemblyVersion("5.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.0.0")]
|
||||
|
177
Plugins/NINOKUNI/NINOKUNI/SQcontrol.Designer.cs
generated
177
Plugins/NINOKUNI/NINOKUNI/SQcontrol.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace NINOKUNI
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SQcontrol.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:40:26</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace NINOKUNI
|
||||
{
|
||||
partial class SQcontrol
|
||||
{
|
||||
@ -33,10 +57,16 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtTranslated = new System.Windows.Forms.TextBox();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.listsBlock = new System.Windows.Forms.ListBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.listfBlock = new System.Windows.Forms.ListBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.btnExport = new System.Windows.Forms.Button();
|
||||
this.btnImport = new System.Windows.Forms.Button();
|
||||
this.radioStart = new System.Windows.Forms.RadioButton();
|
||||
this.radioEnd = new System.Windows.Forms.RadioButton();
|
||||
this.numString = new System.Windows.Forms.NumericUpDown();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numString)).BeginInit();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtOriginal
|
||||
@ -60,7 +90,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(7, 162);
|
||||
this.label2.Location = new System.Drawing.Point(7, 135);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(26, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
@ -68,67 +98,117 @@
|
||||
//
|
||||
// txtTranslated
|
||||
//
|
||||
this.txtTranslated.Location = new System.Drawing.Point(7, 179);
|
||||
this.txtTranslated.Location = new System.Drawing.Point(7, 152);
|
||||
this.txtTranslated.Multiline = true;
|
||||
this.txtTranslated.Name = "txtTranslated";
|
||||
this.txtTranslated.Size = new System.Drawing.Size(500, 100);
|
||||
this.txtTranslated.TabIndex = 3;
|
||||
this.txtTranslated.TextChanged += new System.EventHandler(this.txtTranslated_TextChanged);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Image = global::NINOKUNI.Properties.Resources.page_white_edit;
|
||||
this.btnSave.Location = new System.Drawing.Point(415, 475);
|
||||
this.btnSave.Location = new System.Drawing.Point(429, 423);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(90, 35);
|
||||
this.btnSave.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnSave.TabIndex = 4;
|
||||
this.btnSave.Text = "S03";
|
||||
this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// listsBlock
|
||||
// btnExport
|
||||
//
|
||||
this.listsBlock.FormattingEnabled = true;
|
||||
this.listsBlock.Location = new System.Drawing.Point(10, 322);
|
||||
this.listsBlock.Name = "listsBlock";
|
||||
this.listsBlock.Size = new System.Drawing.Size(130, 69);
|
||||
this.listsBlock.TabIndex = 5;
|
||||
this.listsBlock.SelectedIndexChanged += new System.EventHandler(this.listBlock_SelectedIndexChanged);
|
||||
this.btnExport.Location = new System.Drawing.Point(343, 469);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnExport.TabIndex = 9;
|
||||
this.btnExport.Text = "Export";
|
||||
this.btnExport.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||
//
|
||||
// label3
|
||||
// btnImport
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(10, 303);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(26, 13);
|
||||
this.label3.TabIndex = 6;
|
||||
this.label3.Text = "S02";
|
||||
this.btnImport.Location = new System.Drawing.Point(429, 469);
|
||||
this.btnImport.Name = "btnImport";
|
||||
this.btnImport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnImport.TabIndex = 10;
|
||||
this.btnImport.Text = "Import";
|
||||
this.btnImport.UseVisualStyleBackColor = true;
|
||||
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||
//
|
||||
// listfBlock
|
||||
// radioStart
|
||||
//
|
||||
this.listfBlock.FormattingEnabled = true;
|
||||
this.listfBlock.Location = new System.Drawing.Point(10, 427);
|
||||
this.listfBlock.Name = "listfBlock";
|
||||
this.listfBlock.Size = new System.Drawing.Size(130, 82);
|
||||
this.listfBlock.TabIndex = 7;
|
||||
this.listfBlock.SelectedIndexChanged += new System.EventHandler(this.listfBlocks_SelectedIndexChanged);
|
||||
this.radioStart.AutoSize = true;
|
||||
this.radioStart.Checked = true;
|
||||
this.radioStart.Location = new System.Drawing.Point(6, 23);
|
||||
this.radioStart.Name = "radioStart";
|
||||
this.radioStart.Size = new System.Drawing.Size(76, 17);
|
||||
this.radioStart.TabIndex = 11;
|
||||
this.radioStart.TabStop = true;
|
||||
this.radioStart.Text = "Start block";
|
||||
this.radioStart.UseVisualStyleBackColor = true;
|
||||
this.radioStart.CheckedChanged += new System.EventHandler(this.radio_CheckedChanged);
|
||||
//
|
||||
// label4
|
||||
// radioEnd
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(10, 411);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(66, 13);
|
||||
this.label4.TabIndex = 8;
|
||||
this.label4.Text = "Final blocks:";
|
||||
this.radioEnd.AutoSize = true;
|
||||
this.radioEnd.Location = new System.Drawing.Point(6, 47);
|
||||
this.radioEnd.Name = "radioEnd";
|
||||
this.radioEnd.Size = new System.Drawing.Size(73, 17);
|
||||
this.radioEnd.TabIndex = 12;
|
||||
this.radioEnd.TabStop = true;
|
||||
this.radioEnd.Text = "End block";
|
||||
this.radioEnd.UseVisualStyleBackColor = true;
|
||||
this.radioEnd.CheckedChanged += new System.EventHandler(this.radio_CheckedChanged);
|
||||
//
|
||||
// numString
|
||||
//
|
||||
this.numString.Location = new System.Drawing.Point(66, 80);
|
||||
this.numString.Name = "numString";
|
||||
this.numString.Size = new System.Drawing.Size(60, 20);
|
||||
this.numString.TabIndex = 13;
|
||||
this.numString.ValueChanged += new System.EventHandler(this.numString_ValueChanged);
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(132, 82);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(19, 13);
|
||||
this.label5.TabIndex = 14;
|
||||
this.label5.Text = "of ";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(6, 82);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(40, 13);
|
||||
this.label6.TabIndex = 15;
|
||||
this.label6.Text = "String: ";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.radioStart);
|
||||
this.groupBox1.Controls.Add(this.label5);
|
||||
this.groupBox1.Controls.Add(this.label6);
|
||||
this.groupBox1.Controls.Add(this.numString);
|
||||
this.groupBox1.Controls.Add(this.radioEnd);
|
||||
this.groupBox1.Location = new System.Drawing.Point(7, 275);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(185, 111);
|
||||
this.groupBox1.TabIndex = 16;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Select string";
|
||||
//
|
||||
// SQcontrol
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.listfBlock);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.listsBlock);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.btnImport);
|
||||
this.Controls.Add(this.btnExport);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.txtTranslated);
|
||||
this.Controls.Add(this.label2);
|
||||
@ -136,6 +216,9 @@
|
||||
this.Controls.Add(this.txtOriginal);
|
||||
this.Name = "SQcontrol";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numString)).EndInit();
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -148,9 +231,13 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtTranslated;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.ListBox listsBlock;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ListBox listfBlock;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Button btnExport;
|
||||
private System.Windows.Forms.Button btnImport;
|
||||
private System.Windows.Forms.RadioButton radioStart;
|
||||
private System.Windows.Forms.RadioButton radioEnd;
|
||||
private System.Windows.Forms.NumericUpDown numString;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SQcontrol.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:40:16</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace NINOKUNI
|
||||
@ -14,9 +34,11 @@ namespace NINOKUNI
|
||||
public partial class SQcontrol : UserControl
|
||||
{
|
||||
IPluginHost pluginHost;
|
||||
string fileName;
|
||||
int id;
|
||||
SQ original;
|
||||
SQ translated;
|
||||
Encoding enc;
|
||||
|
||||
public SQcontrol()
|
||||
{
|
||||
@ -25,14 +47,54 @@ namespace NINOKUNI
|
||||
public SQcontrol(IPluginHost pluginHost, string file, int id)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.fileName = Path.GetFileName(file).Substring(12);
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
Read(file);
|
||||
translated = original;
|
||||
listsBlock.SelectedIndex = 0;
|
||||
enc = Encoding.GetEncoding(932);
|
||||
|
||||
original = Read(file);
|
||||
translated = Read(file);
|
||||
|
||||
ReadLanguage();
|
||||
radio_CheckedChanged(null, null);
|
||||
TEST();
|
||||
}
|
||||
|
||||
private void TEST()
|
||||
{
|
||||
// Test method to know if it's working with all the files
|
||||
// it could be useful later to import all of them in one time (batch mode)
|
||||
string folder = @"G:\projects\ninokuni\Quest\";
|
||||
string[] files = Directory.GetFiles(folder);
|
||||
|
||||
for (int i = 0; i < files.Length; i++)
|
||||
{
|
||||
SQ temp = Read(files[i]);
|
||||
string temp_xml = files[i] + ".xml";
|
||||
Export_XML(temp_xml, temp);
|
||||
Import_XML(temp_xml, ref temp);
|
||||
string temp_sq = files[i] + ".nSQ";
|
||||
Write(temp_sq, temp);
|
||||
|
||||
if (!Compare(files[i], temp_sq))
|
||||
MessageBox.Show("Test");
|
||||
File.Delete(temp_sq);
|
||||
}
|
||||
MessageBox.Show("Final");
|
||||
}
|
||||
private bool Compare(string f1, string f2)
|
||||
{
|
||||
byte[] b1 = File.ReadAllBytes(f1);
|
||||
byte[] b2 = File.ReadAllBytes(f2);
|
||||
|
||||
if (b1.Length != b2.Length)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < b1.Length; i++)
|
||||
if (b1[i] != b2[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void ReadLanguage()
|
||||
@ -45,16 +107,16 @@ namespace NINOKUNI
|
||||
|
||||
label1.Text = xml.Element("S00").Value;
|
||||
label2.Text = xml.Element("S01").Value;
|
||||
label3.Text = xml.Element("S02").Value;
|
||||
//label3.Text = xml.Element("S02").Value;
|
||||
btnSave.Text = xml.Element("S03").Value;
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
|
||||
private void Read(string file)
|
||||
private SQ Read(string file)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
original = new SQ();
|
||||
SQ original = new SQ();
|
||||
original.sblocks = new SQ.Block[4];
|
||||
|
||||
original.id = br.ReadUInt32(); // File ID
|
||||
@ -63,10 +125,7 @@ namespace NINOKUNI
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
original.sblocks[i].size = br.ReadUInt16();
|
||||
original.sblocks[i].text = new String(Encoding.GetEncoding(932).GetChars(
|
||||
br.ReadBytes((int)original.sblocks[i].size)));
|
||||
|
||||
listsBlock.Items.Add("Block " + i.ToString());
|
||||
original.sblocks[i].text = new String(enc.GetChars(br.ReadBytes((int)original.sblocks[i].size)));
|
||||
}
|
||||
|
||||
original.unknown = br.ReadBytes(0xD); // Unknown data
|
||||
@ -76,10 +135,7 @@ namespace NINOKUNI
|
||||
for (int i = 0; i < original.num_fblocks; i++)
|
||||
{
|
||||
original.fblocks[i].size = br.ReadUInt16();
|
||||
original.fblocks[i].text = new String(Encoding.GetEncoding(932).GetChars(
|
||||
br.ReadBytes((int)original.fblocks[i].size)));
|
||||
|
||||
listfBlock.Items.Add("Block " + i.ToString());
|
||||
original.fblocks[i].text = new String(enc.GetChars(br.ReadBytes((int)original.fblocks[i].size)));
|
||||
}
|
||||
|
||||
original.num_final = br.ReadByte();
|
||||
@ -91,27 +147,200 @@ namespace NINOKUNI
|
||||
}
|
||||
|
||||
br.Close();
|
||||
return original;
|
||||
}
|
||||
private void Write()
|
||||
private void Write(string fileOut, SQ translated)
|
||||
{
|
||||
String fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + "newSQ_" + Path.GetRandomFileName();
|
||||
|
||||
Update_Blocks();
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
bw.Write(translated.id);
|
||||
|
||||
// First 4 blocks
|
||||
for (int i = 0; i < translated.sblocks.Length; i++)
|
||||
{
|
||||
bw.Write(translated.sblocks[i].size);
|
||||
bw.Write(enc.GetBytes(translated.sblocks[i].text));
|
||||
}
|
||||
|
||||
bw.Write(translated.unknown);
|
||||
bw.Write(translated.num_fblocks);
|
||||
|
||||
// Write final blocks
|
||||
for (int i = 0; i < translated.fblocks.Length; i++)
|
||||
{
|
||||
bw.Write(translated.fblocks[i].size);
|
||||
bw.Write(enc.GetBytes(translated.fblocks[i].text));
|
||||
}
|
||||
|
||||
bw.Write(translated.num_final);
|
||||
for (int i = 0; i < translated.final.Length; i++)
|
||||
{
|
||||
bw.Write((byte)(translated.final[i].Length - 4));
|
||||
bw.Write(translated.final[i]);
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
}
|
||||
private void Update_Blocks()
|
||||
{
|
||||
for (int i = 0; i < translated.sblocks.Length; i++)
|
||||
translated.sblocks[i].size = (ushort)enc.GetByteCount(translated.sblocks[i].text);
|
||||
for (int i = 0; i < translated.fblocks.Length; i++)
|
||||
translated.fblocks[i].size = (ushort)enc.GetByteCount(translated.fblocks[i].text);
|
||||
}
|
||||
|
||||
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog o = new SaveFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckPathExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
Export_XML(o.FileName, translated);
|
||||
}
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog o = new OpenFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckFileExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
Import_XML(o.FileName, ref translated);
|
||||
|
||||
numString_ValueChanged(null, null);
|
||||
}
|
||||
private void Export_XML(string fileOut, SQ translated)
|
||||
{
|
||||
if (File.Exists(fileOut))
|
||||
File.Delete(fileOut);
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "utf-8", null));
|
||||
XmlElement root = doc.CreateElement("SubQuest");
|
||||
|
||||
XmlElement sBlocks = doc.CreateElement("StartBlocks");
|
||||
for (int i = 0; i < translated.sblocks.Length; i++)
|
||||
{
|
||||
XmlElement s = doc.CreateElement("String");
|
||||
|
||||
string text = translated.sblocks[i].text;
|
||||
text = text.Replace('<', '【');
|
||||
text = text.Replace('>', '】');
|
||||
text = text.Replace("\n", "\n ");
|
||||
if (text.Contains("\n"))
|
||||
text = "\n " + text + "\n ";
|
||||
|
||||
s.InnerText = text;
|
||||
sBlocks.AppendChild(s);
|
||||
}
|
||||
root.AppendChild(sBlocks);
|
||||
|
||||
XmlElement fBlocks = doc.CreateElement("FinalBlocks");
|
||||
for (int i = 0; i < translated.fblocks.Length; i++)
|
||||
{
|
||||
XmlElement s = doc.CreateElement("String");
|
||||
|
||||
string text = translated.fblocks[i].text;
|
||||
text = text.Replace('<', '【');
|
||||
text = text.Replace('>', '】');
|
||||
text = text.Replace("\n", "\n ");
|
||||
if (text.Contains("\n"))
|
||||
text = "\n " + text + "\n ";
|
||||
|
||||
s.InnerText = text;
|
||||
fBlocks.AppendChild(s);
|
||||
}
|
||||
root.AppendChild(fBlocks);
|
||||
|
||||
doc.AppendChild(root);
|
||||
doc.Save(fileOut);
|
||||
}
|
||||
private void Import_XML(string fileIn, ref SQ translated)
|
||||
{
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(fileIn);
|
||||
|
||||
XmlNode root = doc.ChildNodes[1];
|
||||
|
||||
XmlNode sBlocks = root.ChildNodes[0];
|
||||
for (int i = 0; i < sBlocks.ChildNodes.Count; i++)
|
||||
{
|
||||
string text = sBlocks.ChildNodes[i].InnerText;
|
||||
if (text.Contains("\n"))
|
||||
{
|
||||
text = text.Remove(0, 7);
|
||||
text = text.Remove(text.Length - 5);
|
||||
text = text.Replace("\n ", "\n");
|
||||
}
|
||||
text = text.Replace('【', '<');
|
||||
text = text.Replace('】', '>');
|
||||
|
||||
translated.sblocks[i].text = text;
|
||||
}
|
||||
|
||||
XmlNode fBlocks = root.ChildNodes[1];
|
||||
for (int i = 0; i < fBlocks.ChildNodes.Count; i++)
|
||||
{
|
||||
string text = fBlocks.ChildNodes[i].InnerText;
|
||||
if (text.Contains("\n"))
|
||||
{
|
||||
text = text.Remove(0, 7);
|
||||
text = text.Remove(text.Length - 5);
|
||||
text = text.Replace("\n ", "\n");
|
||||
}
|
||||
text = text.Replace('【', '<');
|
||||
text = text.Replace('】', '>');
|
||||
|
||||
translated.fblocks[i].text = text;
|
||||
}
|
||||
}
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
String fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName() + ".SQ";
|
||||
Write(fileOut, translated);
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
private void listBlock_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void numString_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtOriginal.Text = original.sblocks[listsBlock.SelectedIndex].text.Replace("\n", "\r\n");
|
||||
txtTranslated.Text = translated.sblocks[listsBlock.SelectedIndex].text.Replace("\n", "\r\n");
|
||||
int i = (int)numString.Value;
|
||||
if (radioStart.Checked)
|
||||
{
|
||||
txtOriginal.Text = original.sblocks[i].text.Replace("\n", "\r\n");
|
||||
txtTranslated.Text = translated.sblocks[i].text.Replace("\n", "\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
txtOriginal.Text = original.fblocks[i].text.Replace("\n", "\r\n");
|
||||
txtTranslated.Text = translated.fblocks[i].text.Replace("\n", "\r\n");
|
||||
}
|
||||
}
|
||||
private void listfBlocks_SelectedIndexChanged(object sender, EventArgs e)
|
||||
private void radio_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
txtOriginal.Text = original.fblocks[listfBlock.SelectedIndex].text.Replace("\n", "\r\n");
|
||||
txtTranslated.Text = translated.fblocks[listfBlock.SelectedIndex].text.Replace("\n", "\r\n");
|
||||
if (radioStart.Checked)
|
||||
numString.Maximum = translated.sblocks.Length - 1;
|
||||
else
|
||||
numString.Maximum = translated.fblocks.Length - 1;
|
||||
|
||||
label5.Text = "of " + numString.Maximum;
|
||||
numString_ValueChanged(null, null);
|
||||
}
|
||||
private void txtTranslated_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numString.Value;
|
||||
if (radioStart.Checked)
|
||||
translated.sblocks[i].text = txtTranslated.Text.Replace("\r\n", "\n");
|
||||
else
|
||||
translated.fblocks[i].text = txtTranslated.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
|
||||
}
|
||||
@ -135,5 +364,5 @@ namespace NINOKUNI
|
||||
public ushort size;
|
||||
public string text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
264
Plugins/NINOKUNI/NINOKUNI/ScenarioText.Designer.cs
generated
264
Plugins/NINOKUNI/NINOKUNI/ScenarioText.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace NINOKUNI
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="ScenarioText.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:39:40</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace NINOKUNI
|
||||
{
|
||||
partial class ScenarioText
|
||||
{
|
||||
@ -34,27 +58,39 @@
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.numericElement = new System.Windows.Forms.NumericUpDown();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtID = new System.Windows.Forms.TextBox();
|
||||
this.txtSize = new System.Windows.Forms.TextBox();
|
||||
this.txtUnk = new System.Windows.Forms.TextBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.btnExport = new System.Windows.Forms.Button();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.btnImport = new System.Windows.Forms.Button();
|
||||
this.numID = new System.Windows.Forms.NumericUpDown();
|
||||
this.numUnk1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.numUnk2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.txtNew = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericBlock)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericElement)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numID)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk2)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtOri
|
||||
//
|
||||
this.txtOri.Location = new System.Drawing.Point(4, 4);
|
||||
this.txtOri.Location = new System.Drawing.Point(0, 20);
|
||||
this.txtOri.MaxLength = 256;
|
||||
this.txtOri.Multiline = true;
|
||||
this.txtOri.Name = "txtOri";
|
||||
this.txtOri.ReadOnly = true;
|
||||
this.txtOri.Size = new System.Drawing.Size(492, 251);
|
||||
this.txtOri.Size = new System.Drawing.Size(496, 100);
|
||||
this.txtOri.TabIndex = 0;
|
||||
//
|
||||
// numericBlock
|
||||
//
|
||||
this.numericBlock.Location = new System.Drawing.Point(67, 294);
|
||||
this.numericBlock.Location = new System.Drawing.Point(67, 259);
|
||||
this.numericBlock.Name = "numericBlock";
|
||||
this.numericBlock.Size = new System.Drawing.Size(70, 20);
|
||||
this.numericBlock.TabIndex = 1;
|
||||
@ -63,7 +99,7 @@
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(3, 296);
|
||||
this.label1.Location = new System.Drawing.Point(4, 261);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(37, 13);
|
||||
this.label1.TabIndex = 2;
|
||||
@ -72,7 +108,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(3, 323);
|
||||
this.label2.Location = new System.Drawing.Point(3, 287);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(45, 13);
|
||||
this.label2.TabIndex = 3;
|
||||
@ -80,7 +116,7 @@
|
||||
//
|
||||
// numericElement
|
||||
//
|
||||
this.numericElement.Location = new System.Drawing.Point(67, 320);
|
||||
this.numericElement.Location = new System.Drawing.Point(67, 285);
|
||||
this.numericElement.Maximum = new decimal(new int[] {
|
||||
1000,
|
||||
0,
|
||||
@ -94,64 +130,169 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(255, 296);
|
||||
this.label3.Location = new System.Drawing.Point(253, 261);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(21, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "ID:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(255, 323);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(30, 13);
|
||||
this.label4.TabIndex = 6;
|
||||
this.label4.Text = "Size:";
|
||||
//
|
||||
// txtID
|
||||
//
|
||||
this.txtID.Location = new System.Drawing.Point(317, 294);
|
||||
this.txtID.Name = "txtID";
|
||||
this.txtID.ReadOnly = true;
|
||||
this.txtID.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtID.TabIndex = 7;
|
||||
//
|
||||
// txtSize
|
||||
//
|
||||
this.txtSize.Location = new System.Drawing.Point(317, 320);
|
||||
this.txtSize.Name = "txtSize";
|
||||
this.txtSize.ReadOnly = true;
|
||||
this.txtSize.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtSize.TabIndex = 8;
|
||||
//
|
||||
// txtUnk
|
||||
//
|
||||
this.txtUnk.Location = new System.Drawing.Point(317, 347);
|
||||
this.txtUnk.Name = "txtUnk";
|
||||
this.txtUnk.ReadOnly = true;
|
||||
this.txtUnk.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtUnk.TabIndex = 9;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(255, 350);
|
||||
this.label5.Location = new System.Drawing.Point(253, 313);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(56, 13);
|
||||
this.label5.Size = new System.Drawing.Size(65, 13);
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "Unknown:";
|
||||
this.label5.Text = "Unknown 2:";
|
||||
//
|
||||
// btnExport
|
||||
//
|
||||
this.btnExport.Location = new System.Drawing.Point(416, 469);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnExport.TabIndex = 11;
|
||||
this.btnExport.Text = "Export";
|
||||
this.btnExport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnExport.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Location = new System.Drawing.Point(416, 423);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnSave.TabIndex = 12;
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// btnImport
|
||||
//
|
||||
this.btnImport.Location = new System.Drawing.Point(330, 469);
|
||||
this.btnImport.Name = "btnImport";
|
||||
this.btnImport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnImport.TabIndex = 13;
|
||||
this.btnImport.Text = "Import";
|
||||
this.btnImport.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnImport.UseVisualStyleBackColor = true;
|
||||
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||
//
|
||||
// numID
|
||||
//
|
||||
this.numID.Hexadecimal = true;
|
||||
this.numID.Location = new System.Drawing.Point(376, 259);
|
||||
this.numID.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numID.Name = "numID";
|
||||
this.numID.Size = new System.Drawing.Size(120, 20);
|
||||
this.numID.TabIndex = 14;
|
||||
this.numID.ValueChanged += new System.EventHandler(this.numID_ValueChanged);
|
||||
//
|
||||
// numUnk1
|
||||
//
|
||||
this.numUnk1.Hexadecimal = true;
|
||||
this.numUnk1.Location = new System.Drawing.Point(376, 285);
|
||||
this.numUnk1.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numUnk1.Name = "numUnk1";
|
||||
this.numUnk1.Size = new System.Drawing.Size(120, 20);
|
||||
this.numUnk1.TabIndex = 15;
|
||||
this.numUnk1.ValueChanged += new System.EventHandler(this.numUnk1_ValueChanged);
|
||||
//
|
||||
// numUnk2
|
||||
//
|
||||
this.numUnk2.Hexadecimal = true;
|
||||
this.numUnk2.Location = new System.Drawing.Point(376, 311);
|
||||
this.numUnk2.Maximum = new decimal(new int[] {
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numUnk2.Name = "numUnk2";
|
||||
this.numUnk2.Size = new System.Drawing.Size(120, 20);
|
||||
this.numUnk2.TabIndex = 16;
|
||||
this.numUnk2.ValueChanged += new System.EventHandler(this.numUnk2_ValueChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(253, 287);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(65, 13);
|
||||
this.label4.TabIndex = 17;
|
||||
this.label4.Text = "Unknown 1:";
|
||||
//
|
||||
// txtNew
|
||||
//
|
||||
this.txtNew.Location = new System.Drawing.Point(0, 145);
|
||||
this.txtNew.MaxLength = 256;
|
||||
this.txtNew.Multiline = true;
|
||||
this.txtNew.Name = "txtNew";
|
||||
this.txtNew.Size = new System.Drawing.Size(496, 100);
|
||||
this.txtNew.TabIndex = 18;
|
||||
this.txtNew.TextChanged += new System.EventHandler(this.txtNew_TextChanged);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(3, 129);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(80, 13);
|
||||
this.label6.TabIndex = 19;
|
||||
this.label6.Text = "Translated text:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Location = new System.Drawing.Point(4, 4);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(65, 13);
|
||||
this.label7.TabIndex = 20;
|
||||
this.label7.Text = "Original text:";
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(143, 261);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(25, 13);
|
||||
this.label8.TabIndex = 21;
|
||||
this.label8.Text = "of 2";
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Location = new System.Drawing.Point(143, 287);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(19, 13);
|
||||
this.label9.TabIndex = 22;
|
||||
this.label9.Text = "of ";
|
||||
//
|
||||
// ScenarioText
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.txtUnk);
|
||||
this.Controls.Add(this.txtSize);
|
||||
this.Controls.Add(this.txtID);
|
||||
this.Controls.Add(this.label9);
|
||||
this.Controls.Add(this.label8);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.txtNew);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.numUnk2);
|
||||
this.Controls.Add(this.numUnk1);
|
||||
this.Controls.Add(this.numID);
|
||||
this.Controls.Add(this.btnImport);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.btnExport);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.numericElement);
|
||||
this.Controls.Add(this.label2);
|
||||
@ -162,6 +303,9 @@
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericBlock)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericElement)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numID)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numUnk2)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -175,10 +319,18 @@
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.NumericUpDown numericElement;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtID;
|
||||
private System.Windows.Forms.TextBox txtSize;
|
||||
private System.Windows.Forms.TextBox txtUnk;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Button btnExport;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.Button btnImport;
|
||||
private System.Windows.Forms.NumericUpDown numID;
|
||||
private System.Windows.Forms.NumericUpDown numUnk1;
|
||||
private System.Windows.Forms.NumericUpDown numUnk2;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.TextBox txtNew;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.Label label9;
|
||||
}
|
||||
}
|
||||
|
@ -1,118 +1,377 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="ScenarioText.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:38:40</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace NINOKUNI
|
||||
{
|
||||
public partial class ScenarioText : UserControl
|
||||
{
|
||||
string file;
|
||||
Sceneario sce;
|
||||
bool stop;
|
||||
string fileName;
|
||||
int id;
|
||||
IPluginHost pluginHost;
|
||||
Scenario sce;
|
||||
Scenario sce_old;
|
||||
Encoding enc;
|
||||
|
||||
public ScenarioText()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
public ScenarioText(string file)
|
||||
public ScenarioText(IPluginHost pluginHost, string file, int id)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.file = file;
|
||||
ReadFile();
|
||||
this.fileName = Path.GetFileNameWithoutExtension(file).Substring(12);
|
||||
this.pluginHost = pluginHost;
|
||||
this.id = id;
|
||||
enc = Encoding.GetEncoding("shift_jis");
|
||||
|
||||
numericBlock.Maximum = sce.blocks.Length;
|
||||
numericBlock.Value = 0;
|
||||
sce = Read(file);
|
||||
sce_old = Read(file);
|
||||
|
||||
numericBlock.Maximum = 2;
|
||||
numericBlock_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void ReadFile()
|
||||
private Scenario Read(string fileIn)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(fileIn));
|
||||
|
||||
sce = new Sceneario();
|
||||
sce.id = br.ReadUInt32();
|
||||
Scenario sce = new Scenario();
|
||||
sce.type = br.ReadUInt32(); // Must be 0x0006050A
|
||||
|
||||
if (sce.id != 0x0006050A)
|
||||
sce.blocks = new Scenario.Block[3];
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
MessageBox.Show("Wrong ID!");
|
||||
br.Close();
|
||||
return;
|
||||
}
|
||||
sce.blocks[i].size = br.ReadUInt32();
|
||||
|
||||
List<Block> blocks = new List<Block>();
|
||||
int i = 1;
|
||||
while (br.BaseStream.Position != br.BaseStream.Length)
|
||||
{
|
||||
Block block = new Block();
|
||||
block.size = br.ReadUInt32();
|
||||
|
||||
List<Element> elements = new List<Element>();
|
||||
|
||||
uint id = br.ReadUInt32();
|
||||
while (id != 0xFFFFFFFF)
|
||||
List<Scenario.Element> elements = new List<Scenario.Element>();
|
||||
for (; ; )
|
||||
{
|
||||
Element e = new Element();
|
||||
e.id = id;
|
||||
Scenario.Element e = new Scenario.Element();
|
||||
e.id = br.ReadUInt32();
|
||||
if (e.id == 0xFFFFFFFF)
|
||||
break;
|
||||
e.size = br.ReadByte();
|
||||
e.text = new String(Encoding.GetEncoding(932).GetChars(br.ReadBytes(e.size)));
|
||||
if (i == 2)
|
||||
e.unk = br.ReadUInt16();
|
||||
elements.Add(e);
|
||||
|
||||
id = br.ReadUInt32();
|
||||
if (i == 0)
|
||||
e.text = Get_Furigana(Encoding.GetEncoding(932).GetChars(br.ReadBytes(e.size)));
|
||||
else if (i == 1)
|
||||
{
|
||||
e.text = Get_Furigana(Encoding.GetEncoding(932).GetChars(br.ReadBytes(e.size)));
|
||||
e.unk = br.ReadUInt16();
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
e.unk = br.ReadUInt16();
|
||||
e.text = Get_Furigana(Encoding.GetEncoding(932).GetChars(br.ReadBytes(e.size - 4)));
|
||||
e.unk2 = br.ReadUInt16();
|
||||
}
|
||||
|
||||
elements.Add(e);
|
||||
}
|
||||
|
||||
block.elements = elements.ToArray();
|
||||
blocks.Add(block);
|
||||
i++;
|
||||
sce.blocks[i].elements = elements.ToArray();
|
||||
}
|
||||
sce.blocks = blocks.ToArray();
|
||||
|
||||
br.Close();
|
||||
return sce;
|
||||
}
|
||||
private void Write(string fileOut)
|
||||
{
|
||||
Update_Block();
|
||||
if (File.Exists(fileOut))
|
||||
File.Delete(fileOut);
|
||||
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
bw.Write(0x0006050A); // Header
|
||||
|
||||
for (int i = 0; i < sce.blocks.Length; i++)
|
||||
{
|
||||
bw.Write(sce.blocks[i].size);
|
||||
for (int j = 0; j < sce.blocks[i].elements.Length; j++)
|
||||
{
|
||||
bw.Write(sce.blocks[i].elements[j].id);
|
||||
bw.Write(sce.blocks[i].elements[j].size);
|
||||
|
||||
if (i == 2)
|
||||
bw.Write(sce.blocks[i].elements[j].unk);
|
||||
|
||||
bw.Write(enc.GetBytes(Set_Furigana(sce.blocks[i].elements[j].text)));
|
||||
|
||||
if (i == 1)
|
||||
bw.Write(sce.blocks[i].elements[j].unk);
|
||||
else if (i == 2)
|
||||
bw.Write(sce.blocks[i].elements[j].unk2);
|
||||
}
|
||||
bw.Write(0xFFFFFFFF);
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
}
|
||||
private void Update_Block()
|
||||
{
|
||||
Scenario.Block block;
|
||||
int size = 0;
|
||||
|
||||
// Block 0
|
||||
block = sce.blocks[0];
|
||||
for (int i = 0; i < block.elements.Length; i++)
|
||||
{
|
||||
block.elements[i].size = (byte)enc.GetByteCount(Set_Furigana(block.elements[i].text));
|
||||
size += block.elements[i].size + 5; // Text + ID + Size
|
||||
}
|
||||
size += 4; // 0xFFFFFFFF
|
||||
block.size = (uint)size;
|
||||
sce.blocks[0] = block;
|
||||
|
||||
// Block 1
|
||||
block = sce.blocks[1];
|
||||
size = 0;
|
||||
for (int i = 0; i < block.elements.Length; i++)
|
||||
{
|
||||
block.elements[i].size = (byte)enc.GetByteCount(Set_Furigana(block.elements[i].text));
|
||||
size += block.elements[i].size + 7; // Text + ID + Size + Unknown
|
||||
}
|
||||
size += 4; // 0xFFFFFFFF
|
||||
block.size = (uint)size;
|
||||
sce.blocks[1] = block;
|
||||
|
||||
// Block 2
|
||||
block = sce.blocks[2];
|
||||
size = 0;
|
||||
for (int i = 0; i < block.elements.Length; i++)
|
||||
{
|
||||
block.elements[i].size = (byte)(enc.GetByteCount(Set_Furigana(block.elements[i].text)) + 4);
|
||||
size += block.elements[i].size + 5; // Text + ID + Size
|
||||
}
|
||||
size += 4; // 0xFFFFFFFF
|
||||
block.size = (uint)size;
|
||||
sce.blocks[2] = block;
|
||||
}
|
||||
private string Get_Furigana(char[] text)
|
||||
{
|
||||
bool furigana = false;
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
if (text[i] == '\x01')
|
||||
{
|
||||
text[i] = '【';
|
||||
furigana = true;
|
||||
}
|
||||
else if (text[i] == '\n')
|
||||
{
|
||||
if (furigana)
|
||||
{
|
||||
text[i] = ':';
|
||||
furigana = false;
|
||||
}
|
||||
else
|
||||
text[i] = '】';
|
||||
}
|
||||
}
|
||||
|
||||
return new string(text);
|
||||
}
|
||||
private string Set_Furigana(string s)
|
||||
{
|
||||
char[] text = s.ToCharArray();
|
||||
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
if (text[i] == '【')
|
||||
text[i] = '\x01';
|
||||
else if (text[i] == ':')
|
||||
text[i] = '\n';
|
||||
else if (text[i] == '】')
|
||||
text[i] = '\n';
|
||||
}
|
||||
|
||||
return new string(text);
|
||||
}
|
||||
|
||||
struct Sceneario
|
||||
private void numericElement_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
public uint id;
|
||||
public Block[] blocks;
|
||||
int i = (int)numericBlock.Value;
|
||||
int j = (int)numericElement.Value;
|
||||
|
||||
txtOri.Text = sce_old.blocks[i].elements[j].text.Replace("\n", "\r\n");
|
||||
txtNew.Text = sce.blocks[i].elements[j].text.Replace("\n", "\r\n");
|
||||
numID.Value = sce.blocks[i].elements[j].id;
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
numUnk1.Enabled = false;
|
||||
numUnk2.Enabled = false;
|
||||
}
|
||||
else if (i == 1)
|
||||
{
|
||||
numUnk1.Enabled = true;
|
||||
numUnk1.Value = sce.blocks[i].elements[j].unk;
|
||||
numUnk2.Enabled = false;
|
||||
}
|
||||
else if (i == 2)
|
||||
{
|
||||
numUnk1.Enabled = true;
|
||||
numUnk1.Value = sce.blocks[i].elements[j].unk;
|
||||
numUnk2.Enabled = true;
|
||||
numUnk2.Value = sce.blocks[i].elements[j].unk2;
|
||||
}
|
||||
}
|
||||
struct Block
|
||||
private void numericBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numericBlock.Value;
|
||||
|
||||
numericElement.Maximum = sce.blocks[i].elements.Length - 1;
|
||||
label9.Text = "of " + numericElement.Maximum.ToString();
|
||||
numericElement_ValueChanged(null, null);
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
Write(fileOut);
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog o = new OpenFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckFileExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(o.FileName);
|
||||
|
||||
XmlNode root = doc.ChildNodes[1];
|
||||
for (int i = 0; i < root.ChildNodes.Count; i++)
|
||||
{
|
||||
string text = root.ChildNodes[i].InnerText;
|
||||
if (text.Contains("\n"))
|
||||
{
|
||||
text = text.Remove(0, 5);
|
||||
text = text.Remove(text.Length - 3);
|
||||
text = text.Replace("\n ", "\n");
|
||||
}
|
||||
|
||||
sce.blocks[0].elements[i].id = Convert.ToUInt32(root.ChildNodes[i].Attributes["ID"].Value, 16);
|
||||
sce.blocks[0].elements[i].text = text;
|
||||
}
|
||||
numericBlock_ValueChanged(null, null);
|
||||
}
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog o = new SaveFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckPathExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
if (File.Exists(o.FileName))
|
||||
File.Delete(o.FileName);
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "utf-8", null));
|
||||
|
||||
XmlElement root = doc.CreateElement("Scenario");
|
||||
|
||||
for (int i = 0; i < sce.blocks[0].elements.Length; i++)
|
||||
{
|
||||
XmlElement el = doc.CreateElement("String");
|
||||
el.SetAttribute("ID", sce.blocks[0].elements[i].id.ToString("x"));
|
||||
|
||||
// Format the text
|
||||
string text = sce.blocks[0].elements[i].text;
|
||||
text = text.Replace("\n", "\n ");
|
||||
if (text.Contains("\n"))
|
||||
text = "\n " + text + "\n ";
|
||||
|
||||
el.InnerText = text;
|
||||
root.AppendChild(el);
|
||||
}
|
||||
|
||||
doc.AppendChild(root);
|
||||
doc.Save(o.FileName);
|
||||
}
|
||||
|
||||
private void txtNew_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numericBlock.Value;
|
||||
int j = (int)numericElement.Value;
|
||||
sce.blocks[i].elements[j].text = txtNew.Text.Replace("\r\n", "\n");
|
||||
}
|
||||
private void numUnk1_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numericBlock.Value;
|
||||
int j = (int)numericElement.Value;
|
||||
sce.blocks[i].elements[j].unk = (ushort)numUnk1.Value;
|
||||
}
|
||||
private void numID_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numericBlock.Value;
|
||||
int j = (int)numericElement.Value;
|
||||
sce.blocks[i].elements[j].id = (uint)numID.Value;
|
||||
}
|
||||
private void numUnk2_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numericBlock.Value;
|
||||
int j = (int)numericElement.Value;
|
||||
sce.blocks[i].elements[j].unk2 = (ushort)numUnk2.Value;
|
||||
}
|
||||
}
|
||||
|
||||
struct Scenario
|
||||
{
|
||||
public uint type;
|
||||
public Block[] blocks;
|
||||
|
||||
public struct Block
|
||||
{
|
||||
public uint size;
|
||||
public Element[] elements;
|
||||
}
|
||||
struct Element
|
||||
public struct Element
|
||||
{
|
||||
public uint id;
|
||||
public byte size;
|
||||
public string text;
|
||||
public ushort unk;
|
||||
}
|
||||
|
||||
private void numericElement_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (stop)
|
||||
return;
|
||||
|
||||
txtOri.Text = sce.blocks[(int)numericBlock.Value].elements[(int)numericElement.Value].text.Replace("\n", "\r\n");
|
||||
txtID.Text = sce.blocks[(int)numericBlock.Value].elements[(int)numericElement.Value].id.ToString("x");
|
||||
txtSize.Text = sce.blocks[(int)numericBlock.Value].elements[(int)numericElement.Value].size.ToString("x");
|
||||
if (numericBlock.Value == 1)
|
||||
txtUnk.Text = sce.blocks[(int)numericBlock.Value].elements[(int)numericElement.Value].unk.ToString("x");
|
||||
}
|
||||
|
||||
private void numericBlock_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
stop = true;
|
||||
numericElement.Maximum = sce.blocks[(int)numericBlock.Value].elements.Length;
|
||||
stop = false;
|
||||
numericElement.Value = 0;
|
||||
public ushort unk2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
108
Plugins/NINOKUNI/NINOKUNI/SystemText.Designer.cs
generated
108
Plugins/NINOKUNI/NINOKUNI/SystemText.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace NINOKUNI
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SystemText.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:40:55</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace NINOKUNI
|
||||
{
|
||||
partial class SystemText
|
||||
{
|
||||
@ -30,7 +54,6 @@
|
||||
{
|
||||
this.txtOri = new System.Windows.Forms.TextBox();
|
||||
this.txtTrans = new System.Windows.Forms.TextBox();
|
||||
this.txtID = new System.Windows.Forms.TextBox();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
@ -38,9 +61,11 @@
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.numElement = new System.Windows.Forms.NumericUpDown();
|
||||
this.lblNum = new System.Windows.Forms.Label();
|
||||
this.lblSizeOri = new System.Windows.Forms.Label();
|
||||
this.lblSizeTrans = new System.Windows.Forms.Label();
|
||||
this.btnImport = new System.Windows.Forms.Button();
|
||||
this.btnExport = new System.Windows.Forms.Button();
|
||||
this.numID = new System.Windows.Forms.NumericUpDown();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numElement)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numID)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtOri
|
||||
@ -55,7 +80,7 @@
|
||||
//
|
||||
// txtTrans
|
||||
//
|
||||
this.txtTrans.Location = new System.Drawing.Point(9, 206);
|
||||
this.txtTrans.Location = new System.Drawing.Point(9, 179);
|
||||
this.txtTrans.MaxLength = 65535;
|
||||
this.txtTrans.Multiline = true;
|
||||
this.txtTrans.Name = "txtTrans";
|
||||
@ -63,24 +88,16 @@
|
||||
this.txtTrans.TabIndex = 1;
|
||||
this.txtTrans.TextChanged += new System.EventHandler(this.txtTrans_TextChanged);
|
||||
//
|
||||
// txtID
|
||||
//
|
||||
this.txtID.Location = new System.Drawing.Point(87, 463);
|
||||
this.txtID.Name = "txtID";
|
||||
this.txtID.ReadOnly = true;
|
||||
this.txtID.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtID.TabIndex = 2;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Enabled = false;
|
||||
this.btnSave.Location = new System.Drawing.Point(429, 469);
|
||||
this.btnSave.Location = new System.Drawing.Point(429, 420);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnSave.TabIndex = 4;
|
||||
this.btnSave.Text = "Save changes";
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@ -103,7 +120,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(6, 190);
|
||||
this.label3.Location = new System.Drawing.Point(6, 163);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(60, 13);
|
||||
this.label3.TabIndex = 7;
|
||||
@ -135,31 +152,48 @@
|
||||
this.lblNum.TabIndex = 10;
|
||||
this.lblNum.Text = "of ";
|
||||
//
|
||||
// lblSizeOri
|
||||
// btnImport
|
||||
//
|
||||
this.lblSizeOri.AutoSize = true;
|
||||
this.lblSizeOri.Location = new System.Drawing.Point(40, 157);
|
||||
this.lblSizeOri.Name = "lblSizeOri";
|
||||
this.lblSizeOri.Size = new System.Drawing.Size(33, 13);
|
||||
this.lblSizeOri.TabIndex = 11;
|
||||
this.lblSizeOri.Text = "Size: ";
|
||||
this.btnImport.Location = new System.Drawing.Point(429, 466);
|
||||
this.btnImport.Name = "btnImport";
|
||||
this.btnImport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnImport.TabIndex = 13;
|
||||
this.btnImport.Text = "Import";
|
||||
this.btnImport.UseVisualStyleBackColor = true;
|
||||
this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
|
||||
//
|
||||
// lblSizeTrans
|
||||
// btnExport
|
||||
//
|
||||
this.lblSizeTrans.AutoSize = true;
|
||||
this.lblSizeTrans.Location = new System.Drawing.Point(43, 338);
|
||||
this.lblSizeTrans.Name = "lblSizeTrans";
|
||||
this.lblSizeTrans.Size = new System.Drawing.Size(33, 13);
|
||||
this.lblSizeTrans.TabIndex = 12;
|
||||
this.lblSizeTrans.Text = "Size: ";
|
||||
this.btnExport.Location = new System.Drawing.Point(343, 466);
|
||||
this.btnExport.Name = "btnExport";
|
||||
this.btnExport.Size = new System.Drawing.Size(80, 40);
|
||||
this.btnExport.TabIndex = 14;
|
||||
this.btnExport.Text = "Export";
|
||||
this.btnExport.UseVisualStyleBackColor = true;
|
||||
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
|
||||
//
|
||||
// numID
|
||||
//
|
||||
this.numID.Hexadecimal = true;
|
||||
this.numID.Location = new System.Drawing.Point(87, 463);
|
||||
this.numID.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numID.Name = "numID";
|
||||
this.numID.Size = new System.Drawing.Size(100, 20);
|
||||
this.numID.TabIndex = 15;
|
||||
this.numID.ValueChanged += new System.EventHandler(this.numID_ValueChanged);
|
||||
//
|
||||
// SystemText
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Controls.Add(this.lblSizeTrans);
|
||||
this.Controls.Add(this.lblSizeOri);
|
||||
this.Controls.Add(this.numID);
|
||||
this.Controls.Add(this.btnExport);
|
||||
this.Controls.Add(this.btnImport);
|
||||
this.Controls.Add(this.lblNum);
|
||||
this.Controls.Add(this.numElement);
|
||||
this.Controls.Add(this.label4);
|
||||
@ -167,12 +201,12 @@
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnSave);
|
||||
this.Controls.Add(this.txtID);
|
||||
this.Controls.Add(this.txtTrans);
|
||||
this.Controls.Add(this.txtOri);
|
||||
this.Name = "SystemText";
|
||||
this.Size = new System.Drawing.Size(512, 512);
|
||||
((System.ComponentModel.ISupportInitialize)(this.numElement)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numID)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -182,7 +216,6 @@
|
||||
|
||||
private System.Windows.Forms.TextBox txtOri;
|
||||
private System.Windows.Forms.TextBox txtTrans;
|
||||
private System.Windows.Forms.TextBox txtID;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
@ -190,7 +223,8 @@
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.NumericUpDown numElement;
|
||||
private System.Windows.Forms.Label lblNum;
|
||||
private System.Windows.Forms.Label lblSizeOri;
|
||||
private System.Windows.Forms.Label lblSizeTrans;
|
||||
private System.Windows.Forms.Button btnImport;
|
||||
private System.Windows.Forms.Button btnExport;
|
||||
private System.Windows.Forms.NumericUpDown numID;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SystemText.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>29/04/2012 13:40:46</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
@ -15,7 +35,10 @@ namespace NINOKUNI
|
||||
{
|
||||
int id;
|
||||
IPluginHost pluginHost;
|
||||
string fileName;
|
||||
SysText systext;
|
||||
SysText systext_old;
|
||||
Encoding enc;
|
||||
|
||||
public SystemText()
|
||||
{
|
||||
@ -27,15 +50,18 @@ namespace NINOKUNI
|
||||
|
||||
this.id = id;
|
||||
this.pluginHost = pluginHost;
|
||||
this.fileName = Path.GetFileNameWithoutExtension(file).Substring(12);
|
||||
enc = Encoding.GetEncoding("shift_jis");
|
||||
|
||||
systext = Read(file);
|
||||
systext_old = Read(file);
|
||||
|
||||
systext = ReadFile(file);
|
||||
lblNum.Text = "of " + systext.elements.Length.ToString();
|
||||
numElement.Maximum = systext.elements.Length - 1;
|
||||
|
||||
lblNum.Text = "of " + numElement.Maximum.ToString();
|
||||
numElement_ValueChanged(numElement, null);
|
||||
}
|
||||
|
||||
private SysText ReadFile(string file)
|
||||
private SysText Read(string file)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
SysText s = new SysText();
|
||||
@ -53,44 +79,133 @@ namespace NINOKUNI
|
||||
br.Close();
|
||||
return s;
|
||||
}
|
||||
private void Write(string fileOut)
|
||||
{
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileOut));
|
||||
|
||||
bw.Write(systext.num_element);
|
||||
|
||||
for (int i = 0; i < systext.num_element; i++)
|
||||
{
|
||||
bw.Write(systext.elements[i].id);
|
||||
bw.Write(systext.elements[i].size);
|
||||
bw.Write(enc.GetBytes(systext.elements[i].text));
|
||||
}
|
||||
|
||||
bw.Flush();
|
||||
bw.Close();
|
||||
}
|
||||
|
||||
private void numElement_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numElement.Value;
|
||||
|
||||
txtID.Text = systext.elements[i].id.ToString("x");
|
||||
txtOri.Text = systext.elements[i].text.Replace("\n", "\r\n");
|
||||
lblSizeOri.Text = "Size: " + txtOri.Text.Length.ToString();
|
||||
|
||||
if (txtTrans.Text != "")
|
||||
{
|
||||
SysText.Element el = systext.elements[i];
|
||||
el.text = txtTrans.Text;
|
||||
el.size = (ushort)Encoding.GetEncoding(932).GetByteCount(el.text);
|
||||
systext.elements[i] = el;
|
||||
}
|
||||
|
||||
txtTrans.Text = "";
|
||||
lblSizeTrans.Text = "Size: 0";
|
||||
numID.Value = systext.elements[i].id;
|
||||
txtOri.Text = systext_old.elements[i].text.Replace("\n", "\r\n");
|
||||
txtTrans.Text = systext.elements[i].text.Replace("\n", "\r\n");
|
||||
}
|
||||
|
||||
private void txtTrans_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
lblSizeTrans.Text = "Size: " + txtTrans.Text.Length.ToString();
|
||||
int i = (int)numElement.Value;
|
||||
systext.elements[i].text = txtTrans.Text.Replace("\r\n", "\n");
|
||||
systext.elements[i].size = (ushort)enc.GetByteCount(systext.elements[i].text);
|
||||
}
|
||||
private void numID_ValueChanged(object sender, EventArgs e)
|
||||
{
|
||||
int i = (int)numElement.Value;
|
||||
systext.elements[i].id = (uint)numID.Value;
|
||||
}
|
||||
|
||||
public struct SysText
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
public ushort num_element;
|
||||
public Element[] elements;
|
||||
OpenFileDialog o = new OpenFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckFileExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
public struct Element
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(o.FileName);
|
||||
|
||||
XmlNode root = doc.ChildNodes[1];
|
||||
for (int i = 0; i < root.ChildNodes.Count; i++)
|
||||
{
|
||||
public uint id;
|
||||
public ushort size;
|
||||
public string text;
|
||||
XmlNode el = root.ChildNodes[i];
|
||||
systext.elements[i].id = Convert.ToUInt32(el.Attributes["ID"].Value, 16);
|
||||
|
||||
string text = el.InnerText;
|
||||
if (text.Contains("\n"))
|
||||
{
|
||||
text = text.Remove(0, 5);
|
||||
text = text.Remove(text.Length - 3);
|
||||
text = text.Replace("\n ", "\n");
|
||||
}
|
||||
text = text.Replace('【', '<');
|
||||
text = text.Replace('】', '>');
|
||||
|
||||
systext.elements[i].text = text;
|
||||
systext.elements[i].size = (ushort)enc.GetByteCount(text);
|
||||
}
|
||||
numElement_ValueChanged(null, null);
|
||||
}
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveFileDialog o = new SaveFileDialog();
|
||||
o.AddExtension = true;
|
||||
o.CheckPathExists = true;
|
||||
o.DefaultExt = ".xml";
|
||||
o.FileName = fileName + ".xml";
|
||||
if (o.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
|
||||
if (File.Exists(o.FileName))
|
||||
File.Delete(o.FileName);
|
||||
|
||||
XmlDocument doc = new XmlDocument();
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "utf-8", null));
|
||||
XmlElement root = doc.CreateElement("System");
|
||||
|
||||
for (int i = 0; i < systext.elements.Length; i++)
|
||||
{
|
||||
XmlElement el = doc.CreateElement("String");
|
||||
el.SetAttribute("ID", systext.elements[i].id.ToString("x"));
|
||||
|
||||
string text = systext.elements[i].text;
|
||||
text = text.Replace('<', '【');
|
||||
text = text.Replace('>', '】');
|
||||
text = text.Replace("\n", "\n ");
|
||||
if (text.Contains("\n"))
|
||||
text = "\n " + text + "\n ";
|
||||
|
||||
el.InnerText = text;
|
||||
root.AppendChild(el);
|
||||
}
|
||||
|
||||
doc.AppendChild(root);
|
||||
doc.Save(o.FileName);
|
||||
}
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
string fileOut = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + Path.GetRandomFileName();
|
||||
Write(fileOut);
|
||||
pluginHost.ChangeFile(id, fileOut);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public struct SysText
|
||||
{
|
||||
public ushort num_element;
|
||||
public Element[] elements;
|
||||
|
||||
public struct Element
|
||||
{
|
||||
public uint id;
|
||||
public ushort size;
|
||||
public string text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
621
Plugins/PSL/PSL/Licence.txt
Normal file
621
Plugins/PSL/PSL/Licence.txt
Normal file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
'This License' refers to version 3 of the GNU General Public License.
|
||||
|
||||
'Copyright' also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
'The Program' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as 'you'. 'Licensees' and
|
||||
'recipients' may be individuals or organizations.
|
||||
|
||||
To 'modify' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a 'modified version' of the
|
||||
earlier work or a work 'based on' the earlier work.
|
||||
|
||||
A 'covered work' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To 'propagate' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To 'convey' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays 'Appropriate Legal Notices'
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The 'source code' for a work means the preferred form of the work
|
||||
for making modifications to it. 'Object code' means any non-source
|
||||
form of a work.
|
||||
|
||||
A 'Standard Interface' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The 'System Libraries' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
'Major Component', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The 'Corresponding Source' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
'keep intact all notices'.
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
'aggregate' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A 'User Product' is either (1) a 'consumer product', which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, 'normally used' refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
'Installation Information' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
'Additional permissions' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered 'further
|
||||
restrictions' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An 'entity transaction' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A 'contributor' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's 'contributor version'.
|
||||
|
||||
A contributor's 'essential patent claims' are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, 'control' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a 'patent license' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To 'grant' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. 'Knowingly relying' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is 'discriminatory' if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License 'or any later version' applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
@ -133,5 +133,8 @@
|
||||
<DependentUpon>TexSprites.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Licence.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
|
||||
</Project>
|
26
Plugins/PSL/PSL/TexSprites.Designer.cs
generated
26
Plugins/PSL/PSL/TexSprites.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace PSL
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="TexSprites.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 15:01:11</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace PSL
|
||||
{
|
||||
partial class TexSprites
|
||||
{
|
||||
|
143
Plugins/Pack/Pack/Games/GENSUIKODS.cs
Normal file
143
Plugins/Pack/Pack/Games/GENSUIKODS.cs
Normal file
@ -0,0 +1,143 @@
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="GENSUIKODS.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>30/04/2012 20:02:06</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using PluginInterface;
|
||||
|
||||
namespace Pack.Games
|
||||
{
|
||||
public class GENSUIKODS : IGamePlugin
|
||||
{
|
||||
IPluginHost pluginHost;
|
||||
string gameCode;
|
||||
|
||||
public void Initialize(IPluginHost pluginHost, string gameCode)
|
||||
{
|
||||
this.pluginHost = pluginHost;
|
||||
this.gameCode = gameCode;
|
||||
}
|
||||
public bool IsCompatible()
|
||||
{
|
||||
if (gameCode == "YG4E")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Format Get_Format(string fileName, byte[] magic, int id)
|
||||
{
|
||||
if (BitConverter.ToUInt32(magic, 0) == 0x00015618)
|
||||
return Format.Pack;
|
||||
if (id == 0x16)
|
||||
return Format.Pack;
|
||||
|
||||
return Format.Unknown;
|
||||
}
|
||||
|
||||
|
||||
public string Pack(ref sFolder unpacked, string file, int id)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public sFolder Unpack(string file, int id)
|
||||
{
|
||||
if (id == 0x16)
|
||||
return Unpack_Sound(file);
|
||||
|
||||
return Unpack_Images(file);
|
||||
return new sFolder();
|
||||
}
|
||||
|
||||
public void Read(string file, int id)
|
||||
{
|
||||
}
|
||||
public System.Windows.Forms.Control Show_Info(string file, int id)
|
||||
{
|
||||
return new System.Windows.Forms.Control();
|
||||
}
|
||||
|
||||
private sFolder Unpack_Images(string file)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
sFolder unpacked = new sFolder();
|
||||
unpacked.files = new List<sFile>();
|
||||
|
||||
uint unknown = br.ReadUInt32(); // Constant? 0x00015618
|
||||
ushort num_files = br.ReadUInt16();
|
||||
ushort header_size = br.ReadUInt16();
|
||||
uint unknown2 = br.ReadUInt32(); // Type of pack file
|
||||
if (unknown2 != 0)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("File not supported");
|
||||
return new sFolder();
|
||||
}
|
||||
|
||||
for (int i = 0; i < num_files; i++)
|
||||
{
|
||||
sFile newFile = new sFile();
|
||||
newFile.path = file;
|
||||
newFile.offset = br.ReadUInt32();
|
||||
newFile.size = br.ReadUInt32();
|
||||
uint decompressed_size = br.ReadUInt32();
|
||||
newFile.name = new String(br.ReadChars(0x20)).Replace("\0", "");
|
||||
|
||||
unpacked.files.Add(newFile);
|
||||
}
|
||||
|
||||
br.Close();
|
||||
return unpacked;
|
||||
}
|
||||
private sFolder Unpack_Sound(string file)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
sFolder unpacked = new sFolder();
|
||||
unpacked.files = new List<sFile>();
|
||||
|
||||
uint fat_size = br.ReadUInt32();
|
||||
uint num_files = fat_size / 0x08;
|
||||
|
||||
for (int i = 0; i < num_files; i++)
|
||||
{
|
||||
sFile newFile = new sFile();
|
||||
newFile.name = "Sound" + i.ToString() + ".bin";
|
||||
newFile.offset = br.ReadUInt32();
|
||||
|
||||
if (i + 1 != num_files)
|
||||
newFile.size = br.ReadUInt32() - newFile.offset;
|
||||
newFile.offset += fat_size + 4;
|
||||
if (i + 1 == num_files)
|
||||
newFile.size = (uint)br.BaseStream.Length - newFile.offset;
|
||||
newFile.path = file;
|
||||
|
||||
unpacked.files.Add(newFile);
|
||||
}
|
||||
|
||||
br.Close();
|
||||
return unpacked;
|
||||
}
|
||||
}
|
||||
}
|
@ -46,6 +46,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Games\4HEROSLIGHT.cs" />
|
||||
<Compile Include="Games\GENSUIKODS.cs" />
|
||||
<Compile Include="Games\RR3BACE.cs" />
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="NARC.cs" />
|
||||
|
@ -42,7 +42,7 @@ namespace SDAT
|
||||
nombre = nombre.ToUpper();
|
||||
string ext = new String(System.Text.Encoding.ASCII.GetChars(magic));
|
||||
|
||||
if (ext == "SDAT" || ext == "SWAV")
|
||||
if (ext == "SDAT" || ext == "SWAV" || ext == "STRM")
|
||||
return Format.Sound;
|
||||
|
||||
return Format.Unknown;
|
||||
@ -69,8 +69,9 @@ namespace SDAT
|
||||
sdat.archivo = Path.GetTempFileName();
|
||||
File.Copy(archivo, sdat.archivo, true);
|
||||
BinaryReader br = new BinaryReader(new FileStream(archivo, FileMode.Open));
|
||||
string h = new String(br.ReadChars(4));
|
||||
|
||||
if (new String(br.ReadChars(4)) == "SWAV")
|
||||
if (h == "SWAV")
|
||||
{
|
||||
sdat.files.root.id = 0x0F000;
|
||||
sdat.files.root.name = "SWAV";
|
||||
@ -87,6 +88,24 @@ namespace SDAT
|
||||
br.Close();
|
||||
return sdat;
|
||||
}
|
||||
if (h == "STRM") // Quick fix
|
||||
{
|
||||
sdat.files.root.id = 0x0F000;
|
||||
sdat.files.root.name = "STRM";
|
||||
sdat.files.root.files = new List<Sound>();
|
||||
Sound swavFile = new Sound();
|
||||
swavFile.id = 0x00;
|
||||
swavFile.name = new FileInfo(archivo).Name;
|
||||
swavFile.offset = 0x00;
|
||||
swavFile.size = (uint)new FileInfo(archivo).Length;
|
||||
swavFile.type = FormatSound.STRM;
|
||||
swavFile.path = sdat.archivo;
|
||||
sdat.files.root.files.Add(swavFile);
|
||||
|
||||
br.Close();
|
||||
return sdat;
|
||||
}
|
||||
|
||||
|
||||
br.BaseStream.Position = 0x00;
|
||||
|
||||
|
@ -56,7 +56,10 @@ namespace SDAT
|
||||
this.pluginHost = pluginHost;
|
||||
ReadLanguage();
|
||||
|
||||
Add_Group();
|
||||
if (sdat.files.root.name == "SWAV" || sdat.files.root.name == "STRM")
|
||||
btnCreate.Enabled = false;
|
||||
else
|
||||
Add_Group();
|
||||
|
||||
treeFiles.Nodes.Add(CarpetaToNodo(sdat.files.root));
|
||||
treeFiles.Nodes[0].Expand();
|
||||
@ -65,9 +68,6 @@ namespace SDAT
|
||||
Set_LastFolderID(sdat.files.root);
|
||||
lastFileID++;
|
||||
lastFolderID++;
|
||||
|
||||
if (sdat.files.root.name == "SWAV")
|
||||
btnCreate.Enabled = false;
|
||||
}
|
||||
private void ReadLanguage()
|
||||
{
|
||||
|
621
Plugins/TC UTK/TC UTK/Licence.txt
Normal file
621
Plugins/TC UTK/TC UTK/Licence.txt
Normal file
@ -0,0 +1,621 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
'This License' refers to version 3 of the GNU General Public License.
|
||||
|
||||
'Copyright' also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
'The Program' refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as 'you'. 'Licensees' and
|
||||
'recipients' may be individuals or organizations.
|
||||
|
||||
To 'modify' a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a 'modified version' of the
|
||||
earlier work or a work 'based on' the earlier work.
|
||||
|
||||
A 'covered work' means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To 'propagate' a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To 'convey' a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays 'Appropriate Legal Notices'
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The 'source code' for a work means the preferred form of the work
|
||||
for making modifications to it. 'Object code' means any non-source
|
||||
form of a work.
|
||||
|
||||
A 'Standard Interface' means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The 'System Libraries' of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
'Major Component', in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The 'Corresponding Source' for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
'keep intact all notices'.
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
'aggregate' if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A 'User Product' is either (1) a 'consumer product', which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, 'normally used' refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
'Installation Information' for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
'Additional permissions' are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered 'further
|
||||
restrictions' within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An 'entity transaction' is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A 'contributor' is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's 'contributor version'.
|
||||
|
||||
A contributor's 'essential patent claims' are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, 'control' includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a 'patent license' is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To 'grant' such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. 'Knowingly relying' means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is 'discriminatory' if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License 'or any later version' applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
@ -65,6 +65,9 @@
|
||||
<DependentUpon>TextControl.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Licence.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
26
Tinke/Debug.Designer.cs
generated
26
Tinke/Debug.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Debug.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:25:41</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke
|
||||
{
|
||||
partial class Debug
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Debug.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:25:31</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
161
Tinke/Dialog/FATExtract.Designer.cs
generated
161
Tinke/Dialog/FATExtract.Designer.cs
generated
@ -49,6 +49,11 @@ namespace Tinke.Dialog
|
||||
{
|
||||
this.groupOptions = new System.Windows.Forms.GroupBox();
|
||||
this.groupOffset = new System.Windows.Forms.GroupBox();
|
||||
this.numSize = new System.Windows.Forms.NumericUpDown();
|
||||
this.numOffset = new System.Windows.Forms.NumericUpDown();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnAddOffset = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.numericOffsetLen = new System.Windows.Forms.NumericUpDown();
|
||||
this.checkOffsetBigEndian = new System.Windows.Forms.CheckBox();
|
||||
@ -77,13 +82,12 @@ namespace Tinke.Dialog
|
||||
this.listBoxFiles = new System.Windows.Forms.ListBox();
|
||||
this.btnHex = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.btnAddOffset = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.numOffset = new System.Windows.Forms.NumericUpDown();
|
||||
this.numSize = new System.Windows.Forms.NumericUpDown();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.numericOffsetMult = new System.Windows.Forms.NumericUpDown();
|
||||
this.groupOptions.SuspendLayout();
|
||||
this.groupOffset.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSize)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numOffset)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericOffsetLen)).BeginInit();
|
||||
this.groupOffsetRelative.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericRelativeOffset)).BeginInit();
|
||||
@ -93,8 +97,7 @@ namespace Tinke.Dialog
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumFiles)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumOffset)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumLen)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numOffset)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSize)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericOffsetMult)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupOptions
|
||||
@ -103,13 +106,15 @@ namespace Tinke.Dialog
|
||||
this.groupOptions.Controls.Add(this.groupNumFiles);
|
||||
this.groupOptions.Location = new System.Drawing.Point(13, 13);
|
||||
this.groupOptions.Name = "groupOptions";
|
||||
this.groupOptions.Size = new System.Drawing.Size(492, 300);
|
||||
this.groupOptions.Size = new System.Drawing.Size(529, 300);
|
||||
this.groupOptions.TabIndex = 0;
|
||||
this.groupOptions.TabStop = false;
|
||||
this.groupOptions.Text = "S07";
|
||||
//
|
||||
// groupOffset
|
||||
//
|
||||
this.groupOffset.Controls.Add(this.numericOffsetMult);
|
||||
this.groupOffset.Controls.Add(this.label8);
|
||||
this.groupOffset.Controls.Add(this.numSize);
|
||||
this.groupOffset.Controls.Add(this.numOffset);
|
||||
this.groupOffset.Controls.Add(this.label5);
|
||||
@ -125,11 +130,65 @@ namespace Tinke.Dialog
|
||||
this.groupOffset.Controls.Add(this.numericOffsetStart);
|
||||
this.groupOffset.Location = new System.Drawing.Point(6, 105);
|
||||
this.groupOffset.Name = "groupOffset";
|
||||
this.groupOffset.Size = new System.Drawing.Size(477, 192);
|
||||
this.groupOffset.Size = new System.Drawing.Size(517, 192);
|
||||
this.groupOffset.TabIndex = 1;
|
||||
this.groupOffset.TabStop = false;
|
||||
this.groupOffset.Text = "S0E";
|
||||
//
|
||||
// numSize
|
||||
//
|
||||
this.numSize.Hexadecimal = true;
|
||||
this.numSize.Location = new System.Drawing.Point(347, 166);
|
||||
this.numSize.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numSize.Name = "numSize";
|
||||
this.numSize.Size = new System.Drawing.Size(76, 20);
|
||||
this.numSize.TabIndex = 12;
|
||||
//
|
||||
// numOffset
|
||||
//
|
||||
this.numOffset.Hexadecimal = true;
|
||||
this.numOffset.Location = new System.Drawing.Point(347, 143);
|
||||
this.numOffset.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numOffset.Name = "numOffset";
|
||||
this.numOffset.Size = new System.Drawing.Size(76, 20);
|
||||
this.numOffset.TabIndex = 11;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(289, 145);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(38, 13);
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "Offset:";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(289, 168);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.label1.TabIndex = 9;
|
||||
this.label1.Text = "Size:";
|
||||
//
|
||||
// btnAddOffset
|
||||
//
|
||||
this.btnAddOffset.Location = new System.Drawing.Point(429, 145);
|
||||
this.btnAddOffset.Name = "btnAddOffset";
|
||||
this.btnAddOffset.Size = new System.Drawing.Size(80, 35);
|
||||
this.btnAddOffset.TabIndex = 8;
|
||||
this.btnAddOffset.Text = "Add offset";
|
||||
this.btnAddOffset.UseVisualStyleBackColor = true;
|
||||
this.btnAddOffset.Click += new System.EventHandler(this.btnAddOffset_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
@ -184,7 +243,7 @@ namespace Tinke.Dialog
|
||||
this.groupOffsetRelative.Controls.Add(this.radioRelativeOffset);
|
||||
this.groupOffsetRelative.Location = new System.Drawing.Point(9, 65);
|
||||
this.groupOffsetRelative.Name = "groupOffsetRelative";
|
||||
this.groupOffsetRelative.Size = new System.Drawing.Size(256, 74);
|
||||
this.groupOffsetRelative.Size = new System.Drawing.Size(272, 74);
|
||||
this.groupOffsetRelative.TabIndex = 1;
|
||||
this.groupOffsetRelative.TabStop = false;
|
||||
this.groupOffsetRelative.Text = "S17";
|
||||
@ -231,9 +290,9 @@ namespace Tinke.Dialog
|
||||
this.groupOffsetType.Controls.Add(this.radioOffsetStartEnd);
|
||||
this.groupOffsetType.Controls.Add(this.radioOffsetStartSize);
|
||||
this.groupOffsetType.Controls.Add(this.radioOffsetStart);
|
||||
this.groupOffsetType.Location = new System.Drawing.Point(271, 19);
|
||||
this.groupOffsetType.Location = new System.Drawing.Point(292, 19);
|
||||
this.groupOffsetType.Name = "groupOffsetType";
|
||||
this.groupOffsetType.Size = new System.Drawing.Size(200, 120);
|
||||
this.groupOffsetType.Size = new System.Drawing.Size(217, 120);
|
||||
this.groupOffsetType.TabIndex = 2;
|
||||
this.groupOffsetType.TabStop = false;
|
||||
this.groupOffsetType.Text = "S12";
|
||||
@ -320,7 +379,7 @@ namespace Tinke.Dialog
|
||||
this.groupNumFiles.Controls.Add(this.numericNumLen);
|
||||
this.groupNumFiles.Location = new System.Drawing.Point(6, 19);
|
||||
this.groupNumFiles.Name = "groupNumFiles";
|
||||
this.groupNumFiles.Size = new System.Drawing.Size(477, 80);
|
||||
this.groupNumFiles.Size = new System.Drawing.Size(517, 80);
|
||||
this.groupNumFiles.TabIndex = 0;
|
||||
this.groupNumFiles.TabStop = false;
|
||||
this.groupNumFiles.Text = "S08";
|
||||
@ -440,7 +499,7 @@ namespace Tinke.Dialog
|
||||
//
|
||||
this.listBoxFiles.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.listBoxFiles.FormattingEnabled = true;
|
||||
this.listBoxFiles.Location = new System.Drawing.Point(512, 20);
|
||||
this.listBoxFiles.Location = new System.Drawing.Point(548, 20);
|
||||
this.listBoxFiles.Name = "listBoxFiles";
|
||||
this.listBoxFiles.Size = new System.Drawing.Size(192, 290);
|
||||
this.listBoxFiles.TabIndex = 2;
|
||||
@ -448,7 +507,7 @@ namespace Tinke.Dialog
|
||||
// btnHex
|
||||
//
|
||||
this.btnHex.Image = global::Tinke.Properties.Resources.calculator;
|
||||
this.btnHex.Location = new System.Drawing.Point(512, 319);
|
||||
this.btnHex.Location = new System.Drawing.Point(548, 319);
|
||||
this.btnHex.Name = "btnHex";
|
||||
this.btnHex.Size = new System.Drawing.Size(192, 31);
|
||||
this.btnHex.TabIndex = 3;
|
||||
@ -470,66 +529,29 @@ namespace Tinke.Dialog
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnAddOffset
|
||||
// label8
|
||||
//
|
||||
this.btnAddOffset.Location = new System.Drawing.Point(391, 145);
|
||||
this.btnAddOffset.Name = "btnAddOffset";
|
||||
this.btnAddOffset.Size = new System.Drawing.Size(80, 35);
|
||||
this.btnAddOffset.TabIndex = 8;
|
||||
this.btnAddOffset.Text = "Add offset";
|
||||
this.btnAddOffset.UseVisualStyleBackColor = true;
|
||||
this.btnAddOffset.Click += new System.EventHandler(this.btnAddOffset_Click);
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Location = new System.Drawing.Point(193, 49);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(12, 13);
|
||||
this.label8.TabIndex = 13;
|
||||
this.label8.Text = "x";
|
||||
//
|
||||
// label1
|
||||
// numericOffsetMult
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(251, 168);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(30, 13);
|
||||
this.label1.TabIndex = 9;
|
||||
this.label1.Text = "Size:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(251, 145);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(38, 13);
|
||||
this.label5.TabIndex = 10;
|
||||
this.label5.Text = "Offset:";
|
||||
//
|
||||
// numOffset
|
||||
//
|
||||
this.numOffset.Hexadecimal = true;
|
||||
this.numOffset.Location = new System.Drawing.Point(309, 143);
|
||||
this.numOffset.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numOffset.Name = "numOffset";
|
||||
this.numOffset.Size = new System.Drawing.Size(76, 20);
|
||||
this.numOffset.TabIndex = 11;
|
||||
//
|
||||
// numSize
|
||||
//
|
||||
this.numSize.Hexadecimal = true;
|
||||
this.numSize.Location = new System.Drawing.Point(309, 166);
|
||||
this.numSize.Maximum = new decimal(new int[] {
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.numSize.Name = "numSize";
|
||||
this.numSize.Size = new System.Drawing.Size(76, 20);
|
||||
this.numSize.TabIndex = 12;
|
||||
this.numericOffsetMult.Hexadecimal = true;
|
||||
this.numericOffsetMult.Location = new System.Drawing.Point(205, 46);
|
||||
this.numericOffsetMult.Name = "numericOffsetMult";
|
||||
this.numericOffsetMult.Size = new System.Drawing.Size(76, 20);
|
||||
this.numericOffsetMult.TabIndex = 14;
|
||||
//
|
||||
// FATExtract
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
|
||||
this.ClientSize = new System.Drawing.Size(716, 365);
|
||||
this.ClientSize = new System.Drawing.Size(752, 365);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnHex);
|
||||
this.Controls.Add(this.listBoxFiles);
|
||||
@ -545,6 +567,8 @@ namespace Tinke.Dialog
|
||||
this.groupOptions.ResumeLayout(false);
|
||||
this.groupOffset.ResumeLayout(false);
|
||||
this.groupOffset.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSize)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numOffset)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericOffsetLen)).EndInit();
|
||||
this.groupOffsetRelative.ResumeLayout(false);
|
||||
this.groupOffsetRelative.PerformLayout();
|
||||
@ -557,8 +581,7 @@ namespace Tinke.Dialog
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumFiles)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumOffset)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericNumLen)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numOffset)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numSize)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericOffsetMult)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -600,5 +623,7 @@ namespace Tinke.Dialog
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnAddOffset;
|
||||
private System.Windows.Forms.NumericUpDown numericOffsetMult;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
@ -281,13 +281,13 @@ namespace Tinke.Dialog
|
||||
switch ((int)numericOffsetLen.Value)
|
||||
{
|
||||
case 1:
|
||||
return br.ReadByte();
|
||||
return (uint)(br.ReadByte() * numericOffsetMult.Value);
|
||||
case 2:
|
||||
return BitConverter.ToUInt16(br.ReadBytes(2).Reverse().ToArray(), 0);
|
||||
return BitConverter.ToUInt16(br.ReadBytes(2).Reverse().ToArray(), 0) * (uint)numericOffsetMult.Value;
|
||||
case 4:
|
||||
return BitConverter.ToUInt32(br.ReadBytes(4).Reverse().ToArray(), 0);
|
||||
return BitConverter.ToUInt32(br.ReadBytes(4).Reverse().ToArray(), 0) * (uint)numericOffsetMult.Value;
|
||||
case 8:
|
||||
return (uint)BitConverter.ToUInt64(br.ReadBytes(8).Reverse().ToArray(), 0);
|
||||
return (uint)(BitConverter.ToUInt64(br.ReadBytes(8).Reverse().ToArray(), 0) * numericOffsetMult.Value);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -295,13 +295,13 @@ namespace Tinke.Dialog
|
||||
switch ((int)numericOffsetLen.Value)
|
||||
{
|
||||
case 1:
|
||||
return br.ReadByte();
|
||||
return br.ReadByte() * (uint)numericOffsetMult.Value;
|
||||
case 2:
|
||||
return br.ReadUInt16();
|
||||
return br.ReadUInt16() * (uint)numericOffsetMult.Value;
|
||||
case 4:
|
||||
return br.ReadUInt32();
|
||||
return br.ReadUInt32() * (uint)numericOffsetMult.Value;
|
||||
case 8:
|
||||
return (uint)br.ReadUInt64();
|
||||
return (uint)(br.ReadUInt64() * numericOffsetMult.Value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ namespace Tinke.Dialog
|
||||
sFile newFile = new sFile();
|
||||
newFile.path = file;
|
||||
newFile.name = "File " + (fat.files.Count - 1).ToString();
|
||||
newFile.offset = (uint)numOffset.Value;
|
||||
newFile.offset = (uint)(numOffset.Value * numericOffsetMult.Value);
|
||||
if (numSize.Value == 0)
|
||||
newFile.size = (uint)(new FileInfo(file).Length - newFile.offset);
|
||||
else
|
||||
|
26
Tinke/Dialog/MapOptions.Designer.cs
generated
26
Tinke/Dialog/MapOptions.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke.Dialog
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="MapOptions.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:27:25</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke.Dialog
|
||||
{
|
||||
partial class MapOptions
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="MapOptions.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:27:14</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
26
Tinke/Dialog/SelectFile.Designer.cs
generated
26
Tinke/Dialog/SelectFile.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke.Dialog
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectFile.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:27:36</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke.Dialog
|
||||
{
|
||||
partial class SelectFile
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectFile.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:27:46</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
26
Tinke/Dialog/SelectModeColor.Designer.cs
generated
26
Tinke/Dialog/SelectModeColor.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke.Dialog
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectModeColor.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:28:04</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke.Dialog
|
||||
{
|
||||
partial class SelectModeColor
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectModeColor.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:27:56</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
26
Tinke/Dialog/SelectOffset.Designer.cs
generated
26
Tinke/Dialog/SelectOffset.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke.Dialog
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectOffset.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:28:21</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke.Dialog
|
||||
{
|
||||
partial class SelectOffset
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="SelectOffset.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:28:13</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
26
Tinke/EditRomInfo.Designer.cs
generated
26
Tinke/EditRomInfo.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="EditRomInfo.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:25:02</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke
|
||||
{
|
||||
partial class EditRomInfo
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="EditRomInfo.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:25:12</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
26
Tinke/Espera.Designer.cs
generated
26
Tinke/Espera.Designer.cs
generated
@ -1,4 +1,28 @@
|
||||
namespace Tinke
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Espera.Designer.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:24:40</date>
|
||||
// -----------------------------------------------------------------------
|
||||
namespace Tinke
|
||||
{
|
||||
partial class Espera
|
||||
{
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Espera.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:24:51</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="NCGR.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:26:51</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using PluginInterface;
|
||||
|
||||
namespace Tinke
|
||||
{
|
||||
public static class Imagen_NCLR
|
||||
{
|
||||
public static Color[][] Read_WinPal2(string file, ColorDepth depth)
|
||||
{
|
||||
BinaryReader br = new BinaryReader(File.OpenRead(file));
|
||||
|
||||
br.ReadChars(4); // RIFF
|
||||
br.ReadUInt32();
|
||||
br.ReadChars(4); // PAL
|
||||
br.ReadChars(4); // data
|
||||
br.ReadUInt32(); // unknown, always 0x00
|
||||
br.ReadUInt16(); // unknown, always 0x0300
|
||||
ushort nColors = br.ReadUInt16();
|
||||
uint num_color_per_palette = (depth == ColorDepth.Depth4Bit ? (uint)0x10 : nColors);
|
||||
uint paletteLength = num_color_per_palette * 2;
|
||||
|
||||
Color[][] colors = new Color[(depth == ColorDepth.Depth4Bit ? nColors / 0x10 : 1)][];
|
||||
for (int i = 0; i < colors.Length; i++)
|
||||
{
|
||||
colors[i] = new Color[num_color_per_palette];
|
||||
for (int j = 0; j < num_color_per_palette; j++)
|
||||
{
|
||||
Color newColor = Color.FromArgb(br.ReadByte(), br.ReadByte(), br.ReadByte());
|
||||
br.ReadByte(); // always 0x00
|
||||
colors[i][j] = newColor;
|
||||
}
|
||||
}
|
||||
|
||||
br.Close();
|
||||
return colors;
|
||||
}
|
||||
public static void Write_WinPal(string fileout, Color[] palette)
|
||||
{
|
||||
if (File.Exists(fileout))
|
||||
File.Delete(fileout);
|
||||
|
||||
BinaryWriter bw = new BinaryWriter(File.OpenWrite(fileout));
|
||||
|
||||
bw.Write(new char[] { 'R', 'I', 'F', 'F' }); // "RIFF"
|
||||
bw.Write((uint)(0x10 + palette.Length * 4)); // file_length - 8
|
||||
bw.Write(new char[] { 'P', 'A', 'L', ' ' }); // "PAL "
|
||||
bw.Write(new char[] { 'd', 'a', 't', 'a' }); // "data"
|
||||
bw.Write((uint)palette.Length * 4 + 4); // data_size = file_length - 0x14
|
||||
bw.Write((ushort)0x0300); // version = 00 03
|
||||
bw.Write((ushort)(palette.Length)); // num_colors
|
||||
for (int i = 0; i < palette.Length; i++)
|
||||
{
|
||||
bw.Write(palette[i].R);
|
||||
bw.Write(palette[i].G);
|
||||
bw.Write(palette[i].B);
|
||||
bw.Write((byte)0x00);
|
||||
bw.Flush();
|
||||
}
|
||||
|
||||
bw.Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="FNT.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:26:14</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="NDS.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:26:27</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -1,4 +1,28 @@
|
||||
using System;
|
||||
// ----------------------------------------------------------------------
|
||||
// <copyright file="Overlay.cs" company="none">
|
||||
|
||||
// Copyright (C) 2012
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// </copyright>
|
||||
|
||||
// <author>pleoNeX</author>
|
||||
// <email>benito356@gmail.com</email>
|
||||
// <date>28/04/2012 14:26:34</date>
|
||||
// -----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -170,8 +170,5 @@ namespace Tinke
|
||||
|
||||
public void Create_APNG(string fileout, Bitmap[] frames, int delay, int loops) { Tools.APNG.Crear_APNG(frames, fileout, delay, loops); }
|
||||
public void Create_APNG(string fileout, String[] frames, int delay, int loops) { Tools.APNG.Crear_APNG(frames, fileout, delay, loops); }
|
||||
|
||||
public Color[][] Read_WinPal2(string fileIn, ColorDepth depth) { return Imagen_NCLR.Read_WinPal2(fileIn, depth); }
|
||||
public void Write_WinPal(string fileOut, Color[] palette) { Imagen_NCLR.Write_WinPal(fileOut, palette); }
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("pleoNeX")]
|
||||
[assembly: AssemblyProduct("Tinke")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2011 pleoNeX")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012 pleoNeX")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ namespace Tinke
|
||||
{
|
||||
VisorHex hex = (VisorHex)sender;
|
||||
if (hex.Edited)
|
||||
accion.Change_File(hex.NewFile.id, hex.NewFile, accion.Root);
|
||||
accion.Change_File(hex.FileID, hex.NewFile);
|
||||
}
|
||||
|
||||
private void BtnSee(object sender, EventArgs e)
|
||||
|
@ -214,7 +214,6 @@
|
||||
<Compile Include="PluginHost.cs" />
|
||||
<Compile Include="Imagen\NCER.cs" />
|
||||
<Compile Include="Imagen\Convertir.cs" />
|
||||
<Compile Include="Imagen\NCLR.cs" />
|
||||
<Compile Include="Imagen\NCGR.cs" />
|
||||
<Compile Include="Nitro\Estructuras.cs" />
|
||||
<Compile Include="Nitro\FAT.cs" />
|
||||
|
@ -33,10 +33,10 @@ namespace Tinke
|
||||
{
|
||||
public partial class VisorHex : Form
|
||||
{
|
||||
sFile file;
|
||||
int id;
|
||||
string hexFile;
|
||||
bool fileEdited;
|
||||
IByteCharConverter bcc;
|
||||
string hexFile;
|
||||
bool allowEdit;
|
||||
|
||||
int last_search;
|
||||
@ -45,10 +45,10 @@ namespace Tinke
|
||||
{
|
||||
InitializeComponent();
|
||||
ReadLanguage();
|
||||
this.id = file.id;
|
||||
|
||||
saveToolStripMenuItem.Enabled = edit;
|
||||
|
||||
this.file = file;
|
||||
allowEdit = edit;
|
||||
|
||||
hexFile = Path.GetDirectoryName(file.path) + Path.DirectorySeparatorChar + "hex_" + Path.GetRandomFileName();
|
||||
@ -107,20 +107,19 @@ namespace Tinke
|
||||
|
||||
fileEdited = true;
|
||||
((DynamicFileByteProvider)hexBox1.ByteProvider).ApplyChanges();
|
||||
String newFilePath = Path.GetDirectoryName(hexFile) + Path.DirectorySeparatorChar + "new_" + Path.GetRandomFileName();
|
||||
File.Copy(hexFile, newFilePath, true);
|
||||
file.offset = 0x00;
|
||||
file.path = newFilePath;
|
||||
file.size = (uint)new FileInfo(newFilePath).Length;
|
||||
}
|
||||
|
||||
public Boolean Edited
|
||||
{
|
||||
get { return fileEdited; }
|
||||
}
|
||||
public sFile NewFile
|
||||
public string NewFile
|
||||
{
|
||||
get { return file; }
|
||||
get { return hexFile; }
|
||||
}
|
||||
public int FileID
|
||||
{
|
||||
get { return id; }
|
||||
}
|
||||
|
||||
private void VisorHex_Resize(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user