mirror of
https://github.com/R-YaTian/TinkeDSi.git
synced 2025-06-18 16:45:43 -04:00
** Version 0.8.2 **
* Fixed problem reading floating point in BMD0 * Multilanguage in Hexadecimal editor and BTX
This commit is contained in:
parent
d5c779dcfc
commit
3c75165fd0
@ -57,6 +57,7 @@
|
||||
<S34>Display-> offset: {0}, size: {1}, unknown1: {2}, unknown2: {3}</S34>
|
||||
<S35>Geometry commands:</S35>
|
||||
<S36>Parameters: </S36>
|
||||
<S37>End of section</S37>
|
||||
</BMD0>
|
||||
<BTX0>
|
||||
<S00>Read BTX0 file</S00>
|
||||
@ -168,6 +169,7 @@
|
||||
<S34>Lista de visualización-> posición: {0}, tamaño: {1}, desconocido1: {2}, desconocido2: {3}</S34>
|
||||
<S35>Comandos geométricos:</S35>
|
||||
<S36>Parámetros:</S36>
|
||||
<S37>Fin de sección</S37>
|
||||
</BMD0>
|
||||
<BTX0>
|
||||
<S00>Leyendo archivo BTX0</S00>
|
||||
@ -279,6 +281,7 @@
|
||||
<S34>Display-> offset: {0}, size: {1}, unknown1: {2}, unknown2: {3}</S34>
|
||||
<S35>Geometry commands:</S35>
|
||||
<S36>Parameters: </S36>
|
||||
<S37>End of section</S37>
|
||||
</BMD0>
|
||||
<BTX0>
|
||||
<S00>Lecture des archives BTX0</S00>
|
||||
|
@ -565,7 +565,7 @@ namespace _3DModels
|
||||
if (bmd.header.numSect == 2) // There is a Tex0 section
|
||||
{
|
||||
br.BaseStream.Position = bmd.header.offset[1];
|
||||
bmd.texture = BTX0.Read_Section(ref br, bmd.header.offset[1]);
|
||||
bmd.texture = BTX0.Read_Section(ref br, bmd.header.offset[1], pluginHost.Get_Language());
|
||||
}
|
||||
|
||||
br.Close();
|
||||
@ -707,7 +707,7 @@ namespace _3DModels
|
||||
|
||||
}
|
||||
|
||||
Console.WriteLine("<br>End Of Section</pre>");
|
||||
Console.WriteLine("<br>" + xml.Element("S37").Value + "</pre>");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
@ -716,7 +716,7 @@ namespace _3DModels
|
||||
{
|
||||
double point = ((value >> 12) & 7);
|
||||
|
||||
point += (double)(value & 0xFFF) / 10000;
|
||||
point += (double)(value & 0xFFF) / 0x1000;
|
||||
|
||||
// sign
|
||||
if ((value >> 15) == 1)
|
||||
|
@ -203,96 +203,7 @@ namespace _3DModels
|
||||
br.Close();
|
||||
return btx;
|
||||
}
|
||||
private static void Write_Info(sBTX0 btx0, string lang)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + Path.DirectorySeparatorChar +
|
||||
"Plugins" + Path.DirectorySeparatorChar + "3DModelsLang.xml");
|
||||
xml = xml.Element(lang).Element("BTX0");
|
||||
|
||||
Console.WriteLine("<pre><b>" + xml.Element("S00").Value + "</b>");
|
||||
Console.WriteLine(xml.Element("S01").Value);
|
||||
Console.WriteLine("<u>" + xml.Element("S02").Value + "</u>");
|
||||
Console.WriteLine(xml.Element("S03").Value, btx0.texture.header.textInfo_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S04").Value, btx0.texture.header.textData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S05").Value, btx0.texture.header.textData_size.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S06").Value, btx0.texture.header.textCompressedData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S07").Value, btx0.texture.header.textCompressedData_size.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S08").Value, btx0.texture.header.textCompressedInfo_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S09").Value, btx0.texture.header.textCompressedInfoData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0A").Value, btx0.texture.header.paletteData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0B").Value, btx0.texture.header.paletteData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0C").Value, btx0.texture.header.paletteInfo_offset.ToString("x"));
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S0D").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texture.texInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.TextInfo texInfo = (sBTX0.Texture.TextInfo)btx0.texture.texInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S0E").Value, i.ToString(), btx0.texture.texInfo.names[i].Trim('\x0'));
|
||||
Console.WriteLine(xml.Element("S0F").Value, texInfo.tex_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S10").Value, texInfo.parameters.ToString("x"));
|
||||
Console.Write(xml.Element("S11").Value, texInfo.repeat_X.ToString(), texInfo.repeat_Y.ToString());
|
||||
Console.Write(xml.Element("S12").Value, texInfo.flip_X.ToString(), texInfo.flip_Y.ToString());
|
||||
Console.Write(xml.Element("S13").Value, texInfo.width.ToString(), texInfo.height.ToString());
|
||||
Console.Write(xml.Element("S14").Value, texInfo.format.ToString(), (TextureFormat)texInfo.format);
|
||||
Console.WriteLine(xml.Element("S15").Value, texInfo.color0.ToString());
|
||||
Console.Write(xml.Element("S16").Value, texInfo.coord_transf.ToString(), (TextureCoordTransf)texInfo.coord_transf);
|
||||
Console.WriteLine(xml.Element("S17").Value, texInfo.unknown.ToString(), texInfo.unknown2.ToString(), texInfo.unknown3.ToString());
|
||||
}
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S18").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texture.palInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.PalInfo palInfo = (sBTX0.Texture.PalInfo)btx0.texture.palInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S19").Value, i.ToString(), btx0.texture.palInfo.names[i].Trim('\x0'));
|
||||
Console.Write(xml.Element("S1A").Value, palInfo.palette_offset.ToString("x"));
|
||||
Console.WriteLine();
|
||||
}
|
||||
Console.WriteLine(xml.Element("S1B").Value + "</pre>");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
private static void Write_Info(sBTX0.Texture btx0, string lang)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + Path.DirectorySeparatorChar +
|
||||
"Plugins" + Path.DirectorySeparatorChar + "3DModelsLang.xml");
|
||||
xml = xml.Element(lang).Element("BTX0");
|
||||
|
||||
Console.WriteLine("<pre><b>" + xml.Element("S01").Value + "</b>");
|
||||
Console.WriteLine("<u>" + xml.Element("S0D").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.TextInfo texInfo = (sBTX0.Texture.TextInfo)btx0.texInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S0E").Value, i.ToString(), btx0.texInfo.names[i].Trim('\x0'));
|
||||
Console.WriteLine(xml.Element("S0F").Value, texInfo.tex_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S10").Value, texInfo.parameters.ToString("x"));
|
||||
Console.Write(xml.Element("S11").Value, texInfo.repeat_X.ToString(), texInfo.repeat_Y.ToString());
|
||||
Console.Write(xml.Element("S12").Value, texInfo.flip_X.ToString(), texInfo.flip_Y.ToString());
|
||||
Console.Write(xml.Element("S13").Value, texInfo.width.ToString(), texInfo.height.ToString());
|
||||
Console.Write(xml.Element("S14").Value, texInfo.format.ToString(), (TextureFormat)texInfo.format);
|
||||
Console.WriteLine(xml.Element("S15").Value, texInfo.color0.ToString());
|
||||
Console.Write(xml.Element("S16").Value, texInfo.coord_transf.ToString(), (TextureCoordTransf)texInfo.coord_transf);
|
||||
Console.WriteLine(xml.Element("S17").Value, texInfo.unknown.ToString(), texInfo.unknown2.ToString(), texInfo.unknown3.ToString());
|
||||
}
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S18").Value + "</u>");
|
||||
for (int i = 0; i < btx0.palInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.PalInfo palInfo = (sBTX0.Texture.PalInfo)btx0.palInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S19").Value, i.ToString(), btx0.palInfo.names[i].Trim('\x0'));
|
||||
Console.Write(xml.Element("S1A").Value, palInfo.palette_offset.ToString("x"));
|
||||
Console.WriteLine();
|
||||
}
|
||||
Console.WriteLine(xml.Element("S1B").Value + "</pre>");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
|
||||
|
||||
public static sBTX0.Texture Read_Section(ref BinaryReader br, uint texOffset)
|
||||
public static sBTX0.Texture Read_Section(ref BinaryReader br, uint texOffset, string lang)
|
||||
{
|
||||
sBTX0.Texture tex = new sBTX0.Texture();
|
||||
|
||||
@ -432,11 +343,101 @@ namespace _3DModels
|
||||
tex.palInfo.names[i] = new String(br.ReadChars(0x10)).Replace("\0", "");
|
||||
#endregion
|
||||
|
||||
Write_Info(tex, "English");
|
||||
Write_Info(tex, lang);
|
||||
|
||||
return tex;
|
||||
}
|
||||
|
||||
private static void Write_Info(sBTX0 btx0, string lang)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + Path.DirectorySeparatorChar +
|
||||
"Plugins" + Path.DirectorySeparatorChar + "3DModelsLang.xml");
|
||||
xml = xml.Element(lang).Element("BTX0");
|
||||
|
||||
Console.WriteLine("<pre><b>" + xml.Element("S00").Value + "</b>");
|
||||
Console.WriteLine(xml.Element("S01").Value);
|
||||
Console.WriteLine("<u>" + xml.Element("S02").Value + "</u>");
|
||||
Console.WriteLine(xml.Element("S03").Value, btx0.texture.header.textInfo_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S04").Value, btx0.texture.header.textData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S05").Value, btx0.texture.header.textData_size.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S06").Value, btx0.texture.header.textCompressedData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S07").Value, btx0.texture.header.textCompressedData_size.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S08").Value, btx0.texture.header.textCompressedInfo_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S09").Value, btx0.texture.header.textCompressedInfoData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0A").Value, btx0.texture.header.paletteData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0B").Value, btx0.texture.header.paletteData_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S0C").Value, btx0.texture.header.paletteInfo_offset.ToString("x"));
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S0D").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texture.texInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.TextInfo texInfo = (sBTX0.Texture.TextInfo)btx0.texture.texInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S0E").Value, i.ToString(), btx0.texture.texInfo.names[i].Trim('\x0'));
|
||||
Console.WriteLine(xml.Element("S0F").Value, texInfo.tex_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S10").Value, texInfo.parameters.ToString("x"));
|
||||
Console.Write(xml.Element("S11").Value, texInfo.repeat_X.ToString(), texInfo.repeat_Y.ToString());
|
||||
Console.Write(xml.Element("S12").Value, texInfo.flip_X.ToString(), texInfo.flip_Y.ToString());
|
||||
Console.Write(xml.Element("S13").Value, texInfo.width.ToString(), texInfo.height.ToString());
|
||||
Console.Write(xml.Element("S14").Value, texInfo.format.ToString(), (TextureFormat)texInfo.format);
|
||||
Console.WriteLine(xml.Element("S15").Value, texInfo.color0.ToString());
|
||||
Console.Write(xml.Element("S16").Value, texInfo.coord_transf.ToString(), (TextureCoordTransf)texInfo.coord_transf);
|
||||
Console.WriteLine(xml.Element("S17").Value, texInfo.unknown.ToString(), texInfo.unknown2.ToString(), texInfo.unknown3.ToString());
|
||||
}
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S18").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texture.palInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.PalInfo palInfo = (sBTX0.Texture.PalInfo)btx0.texture.palInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S19").Value, i.ToString(), btx0.texture.palInfo.names[i].Trim('\x0'));
|
||||
Console.Write(xml.Element("S1A").Value, palInfo.palette_offset.ToString("x"));
|
||||
Console.WriteLine();
|
||||
}
|
||||
Console.WriteLine(xml.Element("S1B").Value + "</pre>");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
private static void Write_Info(sBTX0.Texture btx0, string lang)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = System.Xml.Linq.XElement.Load(Application.StartupPath + Path.DirectorySeparatorChar +
|
||||
"Plugins" + Path.DirectorySeparatorChar + "3DModelsLang.xml");
|
||||
xml = xml.Element(lang).Element("BTX0");
|
||||
|
||||
Console.WriteLine("<pre><b>" + xml.Element("S01").Value + "</b>");
|
||||
Console.WriteLine("<u>" + xml.Element("S0D").Value + "</u>");
|
||||
for (int i = 0; i < btx0.texInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.TextInfo texInfo = (sBTX0.Texture.TextInfo)btx0.texInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S0E").Value, i.ToString(), btx0.texInfo.names[i].Trim('\x0'));
|
||||
Console.WriteLine(xml.Element("S0F").Value, texInfo.tex_offset.ToString("x"));
|
||||
Console.WriteLine(xml.Element("S10").Value, texInfo.parameters.ToString("x"));
|
||||
Console.Write(xml.Element("S11").Value, texInfo.repeat_X.ToString(), texInfo.repeat_Y.ToString());
|
||||
Console.Write(xml.Element("S12").Value, texInfo.flip_X.ToString(), texInfo.flip_Y.ToString());
|
||||
Console.Write(xml.Element("S13").Value, texInfo.width.ToString(), texInfo.height.ToString());
|
||||
Console.Write(xml.Element("S14").Value, texInfo.format.ToString(), (TextureFormat)texInfo.format);
|
||||
Console.WriteLine(xml.Element("S15").Value, texInfo.color0.ToString());
|
||||
Console.Write(xml.Element("S16").Value, texInfo.coord_transf.ToString(), (TextureCoordTransf)texInfo.coord_transf);
|
||||
Console.WriteLine(xml.Element("S17").Value, texInfo.unknown.ToString(), texInfo.unknown2.ToString(), texInfo.unknown3.ToString());
|
||||
}
|
||||
|
||||
Console.WriteLine("<u>" + xml.Element("S18").Value + "</u>");
|
||||
for (int i = 0; i < btx0.palInfo.num_objs; i++)
|
||||
{
|
||||
sBTX0.Texture.PalInfo palInfo = (sBTX0.Texture.PalInfo)btx0.palInfo.infoBlock.infoData[i];
|
||||
Console.WriteLine(xml.Element("S19").Value, i.ToString(), btx0.palInfo.names[i].Trim('\x0'));
|
||||
Console.Write(xml.Element("S1A").Value, palInfo.palette_offset.ToString("x"));
|
||||
Console.WriteLine();
|
||||
}
|
||||
Console.WriteLine(xml.Element("S1B").Value + "</pre>");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 0 1 2 3 4 5 6 7
|
||||
public static byte[] FormatDepth = new byte[] { 0, 8, 2, 4, 8, 2, 8, 16 };
|
||||
}
|
||||
|
@ -88,25 +88,29 @@ namespace Tinke
|
||||
|
||||
private void LeerIdioma()
|
||||
{
|
||||
System.Xml.Linq.XElement xml = Tools.Helper.ObtenerTraduccion("Autores");
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = Tools.Helper.ObtenerTraduccion("Autores");
|
||||
|
||||
this.Text = xml.Element("S01").Value + ' ' + AssemblyTitle;
|
||||
this.Text = xml.Element("S01").Value + ' ' + AssemblyTitle;
|
||||
|
||||
label1.Text = "Tinke " + xml.Element("S02").Value + ' ' + AssemblyVersion;
|
||||
label2.Text = xml.Element("S03").Value;
|
||||
label4.Text = xml.Element("S04").Value;
|
||||
lblTrad.Text = xml.Element("S0C").Value;
|
||||
label5.Text = xml.Element("S06").Value;
|
||||
label6.Text = xml.Element("S05").Value;
|
||||
lblDescription.Text = xml.Element("S07").Value;
|
||||
lblDSDecmp2.Text = xml.Element("S08").Value + " LZ77 (0x10), LZSS (0x11)," +
|
||||
"\nLZSS (0x40), Huffman (0x20), RLE (0x30), 'overlays'." +
|
||||
"\nBy: barubary";
|
||||
lblGBATEK.Text = xml.Element("S09").Value;
|
||||
lblLowLines.Text = xml.Element("S0A").Value;
|
||||
lblfamfamfam.Text = xml.Element("S0B").Value;
|
||||
label7.Text = xml.Element("S0D").Value;
|
||||
label9.Text = String.Format(xml.Element("S0E").Value, "Bernhard Elbl");
|
||||
label1.Text = "Tinke " + xml.Element("S02").Value + ' ' + AssemblyVersion;
|
||||
label2.Text = xml.Element("S03").Value;
|
||||
label4.Text = xml.Element("S04").Value;
|
||||
lblTrad.Text = xml.Element("S0C").Value;
|
||||
label5.Text = xml.Element("S06").Value;
|
||||
label6.Text = xml.Element("S05").Value;
|
||||
lblDescription.Text = xml.Element("S07").Value;
|
||||
lblDSDecmp2.Text = xml.Element("S08").Value + " LZ77 (0x10), LZSS (0x11)," +
|
||||
"\nLZSS (0x40), Huffman (0x20), RLE (0x30), 'overlays'." +
|
||||
"\nBy: barubary";
|
||||
lblGBATEK.Text = xml.Element("S09").Value;
|
||||
lblLowLines.Text = xml.Element("S0A").Value;
|
||||
lblfamfamfam.Text = xml.Element("S0B").Value;
|
||||
label7.Text = xml.Element("S0D").Value;
|
||||
label9.Text = String.Format(xml.Element("S0E").Value, "Bernhard Elbl");
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
}
|
||||
private void ReadPlugins()
|
||||
{
|
||||
|
21
Tinke/Visor.Designer.cs
generated
21
Tinke/Visor.Designer.cs
generated
@ -1,4 +1,23 @@
|
||||
namespace Tinke
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
namespace Tinke
|
||||
{
|
||||
partial class Visor
|
||||
{
|
||||
|
@ -1,4 +1,23 @@
|
||||
using System;
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
|
73
Tinke/VisorHex.Designer.cs
generated
73
Tinke/VisorHex.Designer.cs
generated
@ -1,4 +1,23 @@
|
||||
namespace Tinke
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
namespace Tinke
|
||||
{
|
||||
partial class VisorHex
|
||||
{
|
||||
@ -95,14 +114,14 @@
|
||||
this.saveToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "File";
|
||||
this.fileToolStripMenuItem.Text = "S00";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::Tinke.Properties.Resources.disk;
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(98, 22);
|
||||
this.saveToolStripMenuItem.Text = "Save";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveToolStripMenuItem.Text = "S01";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// toolsToolStripMenuItem
|
||||
@ -112,8 +131,8 @@
|
||||
this.selectRangeToolStripMenuItem,
|
||||
this.searchToolStripMenuItem});
|
||||
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
|
||||
this.toolsToolStripMenuItem.Text = "Tools";
|
||||
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.toolsToolStripMenuItem.Text = "S02";
|
||||
//
|
||||
// gotoToolStripMenuItem
|
||||
//
|
||||
@ -122,8 +141,8 @@
|
||||
this.goToolStripMenuItem});
|
||||
this.gotoToolStripMenuItem.Name = "gotoToolStripMenuItem";
|
||||
this.gotoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
|
||||
this.gotoToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
|
||||
this.gotoToolStripMenuItem.Text = "Goto (0x)";
|
||||
this.gotoToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.gotoToolStripMenuItem.Text = "S03";
|
||||
//
|
||||
// toolStripTextBox1
|
||||
//
|
||||
@ -138,7 +157,7 @@
|
||||
this.goToolStripMenuItem.Image = global::Tinke.Properties.Resources.accept;
|
||||
this.goToolStripMenuItem.Name = "goToolStripMenuItem";
|
||||
this.goToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
|
||||
this.goToolStripMenuItem.Text = "Go";
|
||||
this.goToolStripMenuItem.Text = "S05";
|
||||
this.goToolStripMenuItem.Click += new System.EventHandler(this.numericOffset_ValueChanged);
|
||||
//
|
||||
// selectRangeToolStripMenuItem
|
||||
@ -150,16 +169,16 @@
|
||||
this.goToolStripMenuItem1});
|
||||
this.selectRangeToolStripMenuItem.Name = "selectRangeToolStripMenuItem";
|
||||
this.selectRangeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
|
||||
this.selectRangeToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
|
||||
this.selectRangeToolStripMenuItem.Text = "Select range";
|
||||
this.selectRangeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.selectRangeToolStripMenuItem.Text = "S04";
|
||||
//
|
||||
// startOffsetToolStripMenuItem
|
||||
//
|
||||
this.startOffsetToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.startOffsetSelect});
|
||||
this.startOffsetToolStripMenuItem.Name = "startOffsetToolStripMenuItem";
|
||||
this.startOffsetToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.startOffsetToolStripMenuItem.Text = "Start offset (0x)";
|
||||
this.startOffsetToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.startOffsetToolStripMenuItem.Text = "S06";
|
||||
//
|
||||
// startOffsetSelect
|
||||
//
|
||||
@ -174,8 +193,8 @@
|
||||
this.endOffsetToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.endOffsetSelect});
|
||||
this.endOffsetToolStripMenuItem.Name = "endOffsetToolStripMenuItem";
|
||||
this.endOffsetToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.endOffsetToolStripMenuItem.Text = "End offset (0x)";
|
||||
this.endOffsetToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.endOffsetToolStripMenuItem.Text = "S07";
|
||||
//
|
||||
// endOffsetSelect
|
||||
//
|
||||
@ -189,15 +208,15 @@
|
||||
//
|
||||
this.relativeToolStripMenuItem.CheckOnClick = true;
|
||||
this.relativeToolStripMenuItem.Name = "relativeToolStripMenuItem";
|
||||
this.relativeToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
|
||||
this.relativeToolStripMenuItem.Text = "Relative";
|
||||
this.relativeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.relativeToolStripMenuItem.Text = "S08";
|
||||
//
|
||||
// goToolStripMenuItem1
|
||||
//
|
||||
this.goToolStripMenuItem1.Image = global::Tinke.Properties.Resources.accept;
|
||||
this.goToolStripMenuItem1.Name = "goToolStripMenuItem1";
|
||||
this.goToolStripMenuItem1.Size = new System.Drawing.Size(153, 22);
|
||||
this.goToolStripMenuItem1.Text = "Go";
|
||||
this.goToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
|
||||
this.goToolStripMenuItem1.Text = "S05";
|
||||
this.goToolStripMenuItem1.Click += new System.EventHandler(this.goToolStripMenuItem1_Click);
|
||||
//
|
||||
// searchToolStripMenuItem
|
||||
@ -210,8 +229,8 @@
|
||||
this.unicodeBigEndianToolStripMenuItem,
|
||||
this.defaultCharsToolStripMenuItem});
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(179, 22);
|
||||
this.searchToolStripMenuItem.Text = "Search";
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.searchToolStripMenuItem.Text = "S09";
|
||||
//
|
||||
// toolStripSearchBox
|
||||
//
|
||||
@ -260,16 +279,16 @@
|
||||
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.encodingToolStripMenuItem});
|
||||
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
|
||||
this.optionsToolStripMenuItem.Text = "Options";
|
||||
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.optionsToolStripMenuItem.Text = "S0A";
|
||||
//
|
||||
// encodingToolStripMenuItem
|
||||
//
|
||||
this.encodingToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.encodingCombo});
|
||||
this.encodingToolStripMenuItem.Name = "encodingToolStripMenuItem";
|
||||
this.encodingToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
|
||||
this.encodingToolStripMenuItem.Text = "Encoding";
|
||||
this.encodingToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.encodingToolStripMenuItem.Text = "S0B";
|
||||
//
|
||||
// encodingCombo
|
||||
//
|
||||
@ -298,8 +317,8 @@
|
||||
//
|
||||
this.toolStripSelect.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.toolStripSelect.Name = "toolStripSelect";
|
||||
this.toolStripSelect.Size = new System.Drawing.Size(57, 17);
|
||||
this.toolStripSelect.Text = "Selected: ";
|
||||
this.toolStripSelect.Size = new System.Drawing.Size(27, 17);
|
||||
this.toolStripSelect.Text = "S0C";
|
||||
//
|
||||
// VisorHex
|
||||
//
|
||||
|
@ -1,4 +1,23 @@
|
||||
using System;
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@ -23,7 +42,8 @@ namespace Tinke
|
||||
public VisorHex(sFile file, bool edit)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = Tools.Helper.ObtenerTraduccion("Sistema", "S41");
|
||||
ReadLanguage();
|
||||
|
||||
saveToolStripMenuItem.Enabled = edit;
|
||||
|
||||
this.file = file;
|
||||
@ -53,6 +73,31 @@ namespace Tinke
|
||||
File.Delete(hexFile);
|
||||
}
|
||||
|
||||
private void ReadLanguage()
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Xml.Linq.XElement xml = Tools.Helper.ObtenerTraduccion("VisorHex");
|
||||
|
||||
this.Text = Tools.Helper.ObtenerTraduccion("Sistema", "S41");
|
||||
fileToolStripMenuItem.Text = xml.Element("S00").Value;
|
||||
saveToolStripMenuItem.Text = xml.Element("S01").Value;
|
||||
toolsToolStripMenuItem.Text = xml.Element("S02").Value;
|
||||
gotoToolStripMenuItem.Text = xml.Element("S03").Value;
|
||||
goToolStripMenuItem.Text = xml.Element("S05").Value;
|
||||
goToolStripMenuItem1.Text = xml.Element("S05").Value;
|
||||
selectRangeToolStripMenuItem.Text = xml.Element("S04").Value;
|
||||
startOffsetToolStripMenuItem.Text = xml.Element("S06").Value;
|
||||
endOffsetToolStripMenuItem.Text = xml.Element("S07").Value;
|
||||
relativeToolStripMenuItem.Text = xml.Element("S08").Value;
|
||||
searchToolStripMenuItem.Text = xml.Element("S09").Value;
|
||||
optionsToolStripMenuItem.Text = xml.Element("S0A").Value;
|
||||
encodingToolStripMenuItem.Text = xml.Element("S0B").Value;
|
||||
}
|
||||
catch { throw new NotSupportedException("There was an error reading the language file"); }
|
||||
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!allowEdit)
|
||||
@ -97,7 +142,7 @@ namespace Tinke
|
||||
}
|
||||
private void hexBox1_SelectionLengthChanged(object sender, EventArgs e)
|
||||
{
|
||||
toolStripSelect.Text = String.Format("Selected at 0x{0} with length 0x{1}",
|
||||
toolStripSelect.Text = String.Format(Tools.Helper.ObtenerTraduccion("VisorHex", "S0C"),
|
||||
hexBox1.SelectionStart.ToString("x"), hexBox1.SelectionLength.ToString("x"));
|
||||
}
|
||||
private void goToolStripMenuItem1_Click(object sender, EventArgs e)
|
||||
|
@ -543,4 +543,19 @@
|
||||
<S1B>Hexadecimal</S1B>
|
||||
<S1C>Accept</S1C>
|
||||
</Dialog>
|
||||
<VisorHex>
|
||||
<S00>File</S00>
|
||||
<S01>Save</S01>
|
||||
<S02>Tools</S02>
|
||||
<S03>Goto (0x)</S03>
|
||||
<S04>Select range</S04>
|
||||
<S05>Go</S05>
|
||||
<S06>Start offset (0x)</S06>
|
||||
<S07>End offset (0x)</S07>
|
||||
<S08>Relative</S08>
|
||||
<S09>Search</S09>
|
||||
<S0A>Options</S0A>
|
||||
<S0B>Encoding</S0B>
|
||||
<S0C>Selected at 0x{0} with length 0x{1}</S0C>
|
||||
</VisorHex>
|
||||
</Language>
|
@ -559,4 +559,19 @@
|
||||
<S1B>Visor hexadecimal</S1B>
|
||||
<S1C>Aceptar</S1C>
|
||||
</Dialog>
|
||||
<VisorHex>
|
||||
<S00>Archivo</S00>
|
||||
<S01>Guardar</S01>
|
||||
<S02>Herramientas</S02>
|
||||
<S03>Ir a (0x)</S03>
|
||||
<S04>Seleccionar bloque (0x)</S04>
|
||||
<S05>Ir</S05>
|
||||
<S06>Posición inicial (0x)</S06>
|
||||
<S07>Posición final (0x)</S07>
|
||||
<S08>Relativo</S08>
|
||||
<S09>Buscar</S09>
|
||||
<S0A>Opciones</S0A>
|
||||
<S0B>Codificación</S0B>
|
||||
<S0C>Seleccionado desde 0x{0} con longitud 0x{1}</S0C>
|
||||
</VisorHex>
|
||||
</Language>
|
@ -549,4 +549,19 @@
|
||||
<S1B>Hexadécimal</S1B>
|
||||
<S1C>Accepter</S1C>
|
||||
</Dialog>
|
||||
<VisorHex>
|
||||
<S00>File</S00>
|
||||
<S01>Save</S01>
|
||||
<S02>Tools</S02>
|
||||
<S03>Goto (0x)</S03>
|
||||
<S04>Select range</S04>
|
||||
<S05>Go</S05>
|
||||
<S06>Start offset (0x)</S06>
|
||||
<S07>End offset (0x)</S07>
|
||||
<S08>Relative</S08>
|
||||
<S09>Search</S09>
|
||||
<S0A>Options</S0A>
|
||||
<S0B>Encoding</S0B>
|
||||
<S0C>Selected at 0x{0} with length 0x{1}</S0C>
|
||||
</VisorHex>
|
||||
</Language>
|
@ -543,4 +543,19 @@
|
||||
<S1B>Esadecimale</S1B>
|
||||
<S1C>Accetta</S1C>
|
||||
</Dialog>
|
||||
<VisorHex>
|
||||
<S00>File</S00>
|
||||
<S01>Save</S01>
|
||||
<S02>Tools</S02>
|
||||
<S03>Goto (0x)</S03>
|
||||
<S04>Select range</S04>
|
||||
<S05>Go</S05>
|
||||
<S06>Start offset (0x)</S06>
|
||||
<S07>End offset (0x)</S07>
|
||||
<S08>Relative</S08>
|
||||
<S09>Search</S09>
|
||||
<S0A>Options</S0A>
|
||||
<S0B>Encoding</S0B>
|
||||
<S0C>Selected at 0x{0} with length 0x{1}</S0C>
|
||||
</VisorHex>
|
||||
</Language>
|
@ -1,4 +1,4 @@
|
||||
0.8.2
|
||||
0.8.2 public release (rev117)
|
||||
*** Improved Hexadecimal editor -> Now using Be.HexEditor (by Bernhard Elbl)
|
||||
*** Read BMD0 files and show the textures (if any)
|
||||
** Game GYAKUKEN (Gyajuten kenji 2) - Unpacker
|
||||
@ -24,8 +24,8 @@
|
||||
** Added new method to set the transparency color.
|
||||
** Added method to create NSCR files of NCGR subimages
|
||||
** Add button Pack (instead of using controls from button "View")
|
||||
* Improved speed reading ROMs
|
||||
* Supported SRL files (wifi download files)
|
||||
** Improved perfomance reading ROMs
|
||||
** Supported SRL files (wifi download files)
|
||||
* Fixed problem with textures with format 2
|
||||
* Fixed problems in SDAT plugin
|
||||
* Added support for PMCP section in NCLR
|
||||
|
Loading…
Reference in New Issue
Block a user