CustomizeMii 3.1

git-svn-id: svn://localhost/Users/andi/Downloads/code/trunk@36 eddbe33b-e435-4246-ac25-f5eb65f9a13c
This commit is contained in:
Leathl 2010-04-20 19:54:36 +00:00
parent 153acfac45
commit 96598a70cc
22 changed files with 943 additions and 249 deletions

View File

@ -1,6 +1,6 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2008 # Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomizeMii", "CustomizeMii\CustomizeMii.csproj", "{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomizeMii", "CustomizeMii\CustomizeMii.csproj", "{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForwardMii", "ForwardMii\ForwardMii.csproj", "{20CB2CA7-6767-4758-97FA-97395F47CD6B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForwardMii", "ForwardMii\ForwardMii.csproj", "{20CB2CA7-6767-4758-97FA-97395F47CD6B}"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,8 +12,6 @@
<AssemblyName>CustomizeMii</AssemblyName> <AssemblyName>CustomizeMii</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
<ApplicationIcon>Resources\CustomizeMii.ico</ApplicationIcon> <ApplicationIcon>Resources\CustomizeMii.ico</ApplicationIcon>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
@ -30,6 +28,10 @@
<ApplicationVersion>2.1.0.%2a</ApplicationVersion> <ApplicationVersion>2.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -39,6 +41,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -47,6 +50,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -56,6 +60,7 @@
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<UseVSHostingProcess>true</UseVSHostingProcess> <UseVSHostingProcess>true</UseVSHostingProcess>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath> <OutputPath>bin\x86\Release\</OutputPath>
@ -64,8 +69,12 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="lControls">
<HintPath>.\lControls.dll</HintPath>
</Reference>
<Reference Include="libWiiSharp, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="libWiiSharp, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>.\libWiiSharp.dll</HintPath> <HintPath>.\libWiiSharp.dll</HintPath>
@ -74,6 +83,7 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CustomizeMii_BackgroundWorkers.cs"> <Compile Include="CustomizeMii_BackgroundWorkers.cs">
@ -107,16 +117,21 @@
<Compile Include="CustomizeMii_InputBox.Designer.cs"> <Compile Include="CustomizeMii_InputBox.Designer.cs">
<DependentUpon>CustomizeMii_InputBox.cs</DependentUpon> <DependentUpon>CustomizeMii_InputBox.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="CustomizeMii_PaletteFormatBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CustomizeMii_PaletteFormatBox.Designer.cs">
<DependentUpon>CustomizeMii_PaletteFormatBox.cs</DependentUpon>
</Compile>
<Compile Include="CustomizeMii_PrivateFunctions.cs"> <Compile Include="CustomizeMii_PrivateFunctions.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="CustomizeMii_Transmit.cs"> <Compile Include="CustomizeMii_Transmit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="CustomizeMii_Transmit.Designer.cs"> <Compile Include="CustomizeMii_Transmit.designer.cs">
<DependentUpon>CustomizeMii_Transmit.cs</DependentUpon> <DependentUpon>CustomizeMii_Transmit.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="CustomizeMii_zlib.cs" />
<Compile Include="MP3Info.cs" /> <Compile Include="MP3Info.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
@ -132,6 +147,9 @@
<EmbeddedResource Include="CustomizeMii_Main.resx"> <EmbeddedResource Include="CustomizeMii_Main.resx">
<DependentUpon>CustomizeMii_Main.cs</DependentUpon> <DependentUpon>CustomizeMii_Main.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="CustomizeMii_PaletteFormatBox.resx">
<DependentUpon>CustomizeMii_PaletteFormatBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CustomizeMii_Transmit.resx"> <EmbeddedResource Include="CustomizeMii_Transmit.resx">
<DependentUpon>CustomizeMii_Transmit.cs</DependentUpon> <DependentUpon>CustomizeMii_Transmit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -176,7 +194,6 @@
<None Include="Resources\btnCreate.png" /> <None Include="Resources\btnCreate.png" />
<None Include="Resources\CustomizeMii.ico" /> <None Include="Resources\CustomizeMii.ico" />
<None Include="Resources\Instructions.rtf" /> <None Include="Resources\Instructions.rtf" />
<None Include="Resources\WaninkokoLeathl.app" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View File

@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<PublishUrlHistory>publish\</PublishUrlHistory> <PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory> <InstallUrlHistory>

View File

@ -227,7 +227,7 @@ namespace CustomizeMii
else else
{ wave = new Wave((string)e.Argument); } { wave = new Wave((string)e.Argument); }
try { this.sampleCount = wave.SampleCount; } try { this.sampleCount = wave.NumSamples; }
catch { } catch { }
try { bitDepth = wave.BitDepth; } try { bitDepth = wave.BitDepth; }
@ -236,13 +236,13 @@ namespace CustomizeMii
try { sampleRate = wave.SampleRate; } try { sampleRate = wave.SampleRate; }
catch { sampleRate = -1; } catch { sampleRate = -1; }
try { channelCount = wave.ChannelCount; } try { channelCount = wave.NumChannels; }
catch { channelCount = -1; } catch { channelCount = -1; }
try { dataFormat = wave.DataFormat; } try { dataFormat = wave.DataFormat; }
catch { dataFormat = -1; } catch { dataFormat = -1; }
try { loopCount = wave.LoopCount; } try { loopCount = wave.NumLoops; }
catch { loopCount = -1; } catch { loopCount = -1; }
try { loopStart = wave.LoopStart; } try { loopStart = wave.LoopStart; }
@ -389,12 +389,17 @@ namespace CustomizeMii
Wave wave; Wave wave;
if (cbSourceSound.Checked) if (cbSourceSound.Checked)
{
wave = new Wave(sourceSound); wave = new Wave(sourceSound);
} else
else wave = new Wave(tbAudioFile.Text); wave = new Wave(tbAudioFile.Text);
sPlayer = new SoundPlayer(wave.TrimStart(loopStart)); wave.TrimStart(loopStart);
MemoryStream waveFile = wave.ToMemoryStream();
wave.Dispose();
waveFile.Seek(0, SeekOrigin.Begin);
sPlayer = new SoundPlayer(waveFile);
sPlayer.PlayLooping(); sPlayer.PlayLooping();
btnPlay.Text = "Stop"; btnPlay.Text = "Stop";

View File

@ -45,7 +45,6 @@ namespace CustomizeMii
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CustomizeMii_Main)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CustomizeMii_Main));
this.btnCreateWad = new System.Windows.Forms.Button(); this.btnCreateWad = new System.Windows.Forms.Button();
this.tabControl = new System.Windows.Forms.TabControl(); this.tabControl = new System.Windows.Forms.TabControl();
@ -84,10 +83,9 @@ namespace CustomizeMii
this.tbAllLanguages = new System.Windows.Forms.TextBox(); this.tbAllLanguages = new System.Windows.Forms.TextBox();
this.lbAllLanguages = new System.Windows.Forms.Label(); this.lbAllLanguages = new System.Windows.Forms.Label();
this.tabOptions = new System.Windows.Forms.TabPage(); this.tabOptions = new System.Windows.Forms.TabPage();
this.cbSecurityChecksOff = new lControls.CheckLED();
this.btnOptionsExtract = new System.Windows.Forms.Button(); this.btnOptionsExtract = new System.Windows.Forms.Button();
this.btnForwarder = new System.Windows.Forms.Button(); this.btnForwarder = new System.Windows.Forms.Button();
this.cbSecurityChecksOff = new System.Windows.Forms.CheckBox();
this.cbLz77 = new System.Windows.Forms.CheckBox();
this.lbOptionsOptional = new System.Windows.Forms.Label(); this.lbOptionsOptional = new System.Windows.Forms.Label();
this.btnBrowseSound = new System.Windows.Forms.Button(); this.btnBrowseSound = new System.Windows.Forms.Button();
this.tbSound = new System.Windows.Forms.TextBox(); this.tbSound = new System.Windows.Forms.TextBox();
@ -103,7 +101,6 @@ namespace CustomizeMii
this.lbTitleID = new System.Windows.Forms.Label(); this.lbTitleID = new System.Windows.Forms.Label();
this.tabBanner = new System.Windows.Forms.TabPage(); this.tabBanner = new System.Windows.Forms.TabPage();
this.llbBannerMultiReplace = new System.Windows.Forms.LinkLabel(); this.llbBannerMultiReplace = new System.Windows.Forms.LinkLabel();
this.cbBannerMakeTransparent = new System.Windows.Forms.CheckBox();
this.cmbFormatBanner = new System.Windows.Forms.ComboBox(); this.cmbFormatBanner = new System.Windows.Forms.ComboBox();
this.lbFormatBanner = new System.Windows.Forms.Label(); this.lbFormatBanner = new System.Windows.Forms.Label();
this.btnPreviewBanner = new System.Windows.Forms.Button(); this.btnPreviewBanner = new System.Windows.Forms.Button();
@ -114,7 +111,6 @@ namespace CustomizeMii
this.lbxBannerTpls = new System.Windows.Forms.ListBox(); this.lbxBannerTpls = new System.Windows.Forms.ListBox();
this.tabIcon = new System.Windows.Forms.TabPage(); this.tabIcon = new System.Windows.Forms.TabPage();
this.llbIconMultiReplace = new System.Windows.Forms.LinkLabel(); this.llbIconMultiReplace = new System.Windows.Forms.LinkLabel();
this.cbIconMakeTransparent = new System.Windows.Forms.CheckBox();
this.cmbFormatIcon = new System.Windows.Forms.ComboBox(); this.cmbFormatIcon = new System.Windows.Forms.ComboBox();
this.lbFormatIcon = new System.Windows.Forms.Label(); this.lbFormatIcon = new System.Windows.Forms.Label();
this.btnPreviewIcon = new System.Windows.Forms.Button(); this.btnPreviewIcon = new System.Windows.Forms.Button();
@ -154,16 +150,17 @@ namespace CustomizeMii
this.llbUpdateAvailable = new System.Windows.Forms.LinkLabel(); this.llbUpdateAvailable = new System.Windows.Forms.LinkLabel();
this.llbSite = new System.Windows.Forms.LinkLabel(); this.llbSite = new System.Windows.Forms.LinkLabel();
this.lbCreditVersion = new System.Windows.Forms.Label(); this.lbCreditVersion = new System.Windows.Forms.Label();
this.cmTpls = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmTpls = new System.Windows.Forms.ContextMenuStrip();
this.cmRename = new System.Windows.Forms.ToolStripMenuItem(); this.cmRename = new System.Windows.Forms.ToolStripMenuItem();
this.cmResize = new System.Windows.Forms.ToolStripMenuItem();
this.ssMain = new System.Windows.Forms.StatusStrip(); this.ssMain = new System.Windows.Forms.StatusStrip();
this.lbStatus = new System.Windows.Forms.ToolStripStatusLabel(); this.lbStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.lbStatusText = new System.Windows.Forms.ToolStripStatusLabel(); this.lbStatusText = new System.Windows.Forms.ToolStripStatusLabel();
this.pbProgress = new System.Windows.Forms.ToolStripProgressBar(); this.pbProgress = new System.Windows.Forms.ToolStripProgressBar();
this.cmForwarder = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmForwarder = new System.Windows.Forms.ContextMenuStrip();
this.cmSimpleForwarder = new System.Windows.Forms.ToolStripMenuItem(); this.cmSimpleForwarder = new System.Windows.Forms.ToolStripMenuItem();
this.cmComplexForwarder = new System.Windows.Forms.ToolStripMenuItem(); this.cmComplexForwarder = new System.Windows.Forms.ToolStripMenuItem();
this.cmOptionsExtract = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmOptionsExtract = new System.Windows.Forms.ContextMenuStrip();
this.cmExtractWad = new System.Windows.Forms.ToolStripMenuItem(); this.cmExtractWad = new System.Windows.Forms.ToolStripMenuItem();
this.cmExtractDol = new System.Windows.Forms.ToolStripMenuItem(); this.cmExtractDol = new System.Windows.Forms.ToolStripMenuItem();
this.tsExtractSound = new System.Windows.Forms.ToolStripMenuItem(); this.tsExtractSound = new System.Windows.Forms.ToolStripMenuItem();
@ -177,13 +174,16 @@ namespace CustomizeMii
this.cmExtractBrlyt = new System.Windows.Forms.ToolStripMenuItem(); this.cmExtractBrlyt = new System.Windows.Forms.ToolStripMenuItem();
this.cmExtractBrlan = new System.Windows.Forms.ToolStripMenuItem(); this.cmExtractBrlan = new System.Windows.Forms.ToolStripMenuItem();
this.cmExtractBothBrl = new System.Windows.Forms.ToolStripMenuItem(); this.cmExtractBothBrl = new System.Windows.Forms.ToolStripMenuItem();
this.cmSound = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmSound = new System.Windows.Forms.ContextMenuStrip();
this.cmLoadAudioFile = new System.Windows.Forms.ToolStripMenuItem(); this.cmLoadAudioFile = new System.Windows.Forms.ToolStripMenuItem();
this.cmConvertToBns = new System.Windows.Forms.ToolStripMenuItem(); this.cmConvertToBns = new System.Windows.Forms.ToolStripMenuItem();
this.cmDol = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmMakeSilent = new System.Windows.Forms.ToolStripMenuItem();
this.cmDol = new System.Windows.Forms.ContextMenuStrip();
this.cmLoadDol = new System.Windows.Forms.ToolStripMenuItem(); this.cmLoadDol = new System.Windows.Forms.ToolStripMenuItem();
this.cmDolFromSource = new System.Windows.Forms.ToolStripMenuItem(); this.cmDolFromSource = new System.Windows.Forms.ToolStripMenuItem();
this.cmResize = new System.Windows.Forms.ToolStripMenuItem(); this.cbLz77 = new lControls.CheckLED();
this.cbBannerMakeTransparent = new lControls.CheckLED();
this.cbIconMakeTransparent = new lControls.CheckLED();
this.tabControl.SuspendLayout(); this.tabControl.SuspendLayout();
this.tabSource.SuspendLayout(); this.tabSource.SuspendLayout();
this.tabTitle.SuspendLayout(); this.tabTitle.SuspendLayout();
@ -597,10 +597,10 @@ namespace CustomizeMii
// //
// tabOptions // tabOptions
// //
this.tabOptions.Controls.Add(this.cbLz77);
this.tabOptions.Controls.Add(this.cbSecurityChecksOff);
this.tabOptions.Controls.Add(this.btnOptionsExtract); this.tabOptions.Controls.Add(this.btnOptionsExtract);
this.tabOptions.Controls.Add(this.btnForwarder); this.tabOptions.Controls.Add(this.btnForwarder);
this.tabOptions.Controls.Add(this.cbSecurityChecksOff);
this.tabOptions.Controls.Add(this.cbLz77);
this.tabOptions.Controls.Add(this.lbOptionsOptional); this.tabOptions.Controls.Add(this.lbOptionsOptional);
this.tabOptions.Controls.Add(this.btnBrowseSound); this.tabOptions.Controls.Add(this.btnBrowseSound);
this.tabOptions.Controls.Add(this.tbSound); this.tabOptions.Controls.Add(this.tbSound);
@ -622,6 +622,19 @@ namespace CustomizeMii
this.tabOptions.Text = "Options"; this.tabOptions.Text = "Options";
this.tabOptions.UseVisualStyleBackColor = true; this.tabOptions.UseVisualStyleBackColor = true;
// //
// cbSecurityChecksOff
//
this.cbSecurityChecksOff.AutoSize = true;
this.cbSecurityChecksOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbSecurityChecksOff.LedColor = lControls.CheckLED.LEDColor.Green;
this.cbSecurityChecksOff.Location = new System.Drawing.Point(266, 180);
this.cbSecurityChecksOff.Name = "cbSecurityChecksOff";
this.cbSecurityChecksOff.Size = new System.Drawing.Size(169, 17);
this.cbSecurityChecksOff.TabIndex = 15;
this.cbSecurityChecksOff.Tag = "Independent";
this.cbSecurityChecksOff.Text = "/!\\ Turn off security checks /!\\";
this.cbSecurityChecksOff.UseVisualStyleBackColor = true;
//
// btnOptionsExtract // btnOptionsExtract
// //
this.btnOptionsExtract.Location = new System.Drawing.Point(360, 47); this.btnOptionsExtract.Location = new System.Drawing.Point(360, 47);
@ -642,29 +655,6 @@ namespace CustomizeMii
this.btnForwarder.UseVisualStyleBackColor = true; this.btnForwarder.UseVisualStyleBackColor = true;
this.btnForwarder.Click += new System.EventHandler(this.btnForwarder_Click); this.btnForwarder.Click += new System.EventHandler(this.btnForwarder_Click);
// //
// cbSecurityChecksOff
//
this.cbSecurityChecksOff.AutoSize = true;
this.cbSecurityChecksOff.Location = new System.Drawing.Point(263, 180);
this.cbSecurityChecksOff.Name = "cbSecurityChecksOff";
this.cbSecurityChecksOff.Size = new System.Drawing.Size(172, 17);
this.cbSecurityChecksOff.TabIndex = 12;
this.cbSecurityChecksOff.Tag = "Independent";
this.cbSecurityChecksOff.Text = "/!\\ Turn off security checks /!\\";
this.cbSecurityChecksOff.UseVisualStyleBackColor = true;
//
// cbLz77
//
this.cbLz77.AutoSize = true;
this.cbLz77.Checked = true;
this.cbLz77.CheckState = System.Windows.Forms.CheckState.Checked;
this.cbLz77.Location = new System.Drawing.Point(11, 180);
this.cbLz77.Name = "cbLz77";
this.cbLz77.Size = new System.Drawing.Size(134, 17);
this.cbLz77.TabIndex = 11;
this.cbLz77.Text = "Use Lz77 Compression";
this.cbLz77.UseVisualStyleBackColor = true;
//
// lbOptionsOptional // lbOptionsOptional
// //
this.lbOptionsOptional.Location = new System.Drawing.Point(-7, 8); this.lbOptionsOptional.Location = new System.Drawing.Point(-7, 8);
@ -797,8 +787,8 @@ namespace CustomizeMii
// //
// tabBanner // tabBanner
// //
this.tabBanner.Controls.Add(this.llbBannerMultiReplace);
this.tabBanner.Controls.Add(this.cbBannerMakeTransparent); this.tabBanner.Controls.Add(this.cbBannerMakeTransparent);
this.tabBanner.Controls.Add(this.llbBannerMultiReplace);
this.tabBanner.Controls.Add(this.cmbFormatBanner); this.tabBanner.Controls.Add(this.cmbFormatBanner);
this.tabBanner.Controls.Add(this.lbFormatBanner); this.tabBanner.Controls.Add(this.lbFormatBanner);
this.tabBanner.Controls.Add(this.btnPreviewBanner); this.tabBanner.Controls.Add(this.btnPreviewBanner);
@ -826,17 +816,6 @@ namespace CustomizeMii
this.llbBannerMultiReplace.Text = "Multi Replace"; this.llbBannerMultiReplace.Text = "Multi Replace";
this.llbBannerMultiReplace.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llbMultiReplace_LinkClicked); this.llbBannerMultiReplace.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llbMultiReplace_LinkClicked);
// //
// cbBannerMakeTransparent
//
this.cbBannerMakeTransparent.AutoSize = true;
this.cbBannerMakeTransparent.Location = new System.Drawing.Point(11, 189);
this.cbBannerMakeTransparent.Name = "cbBannerMakeTransparent";
this.cbBannerMakeTransparent.Size = new System.Drawing.Size(113, 17);
this.cbBannerMakeTransparent.TabIndex = 6;
this.cbBannerMakeTransparent.Text = "Make Transparent";
this.cbBannerMakeTransparent.UseVisualStyleBackColor = true;
this.cbBannerMakeTransparent.CheckedChanged += new System.EventHandler(this.cbBannerMakeTransparent_CheckedChanged);
//
// cmbFormatBanner // cmbFormatBanner
// //
this.cmbFormatBanner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbFormatBanner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -926,15 +905,15 @@ namespace CustomizeMii
this.lbxBannerTpls.Size = new System.Drawing.Size(343, 173); this.lbxBannerTpls.Size = new System.Drawing.Size(343, 173);
this.lbxBannerTpls.Sorted = true; this.lbxBannerTpls.Sorted = true;
this.lbxBannerTpls.TabIndex = 0; this.lbxBannerTpls.TabIndex = 0;
this.lbxBannerTpls.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbxBannerTpls_MouseUp);
this.lbxBannerTpls.SelectedIndexChanged += new System.EventHandler(this.lbxBannerTpls_SelectedIndexChanged); this.lbxBannerTpls.SelectedIndexChanged += new System.EventHandler(this.lbxBannerTpls_SelectedIndexChanged);
this.lbxBannerTpls.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbxBannerTpls_DragDrop); this.lbxBannerTpls.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbxBannerTpls_DragDrop);
this.lbxBannerTpls.DragEnter += new System.Windows.Forms.DragEventHandler(this.lbxBannerTpls_DragEnter); this.lbxBannerTpls.DragEnter += new System.Windows.Forms.DragEventHandler(this.lbxBannerTpls_DragEnter);
this.lbxBannerTpls.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbxBannerTpls_MouseUp);
// //
// tabIcon // tabIcon
// //
this.tabIcon.Controls.Add(this.llbIconMultiReplace);
this.tabIcon.Controls.Add(this.cbIconMakeTransparent); this.tabIcon.Controls.Add(this.cbIconMakeTransparent);
this.tabIcon.Controls.Add(this.llbIconMultiReplace);
this.tabIcon.Controls.Add(this.cmbFormatIcon); this.tabIcon.Controls.Add(this.cmbFormatIcon);
this.tabIcon.Controls.Add(this.lbFormatIcon); this.tabIcon.Controls.Add(this.lbFormatIcon);
this.tabIcon.Controls.Add(this.btnPreviewIcon); this.tabIcon.Controls.Add(this.btnPreviewIcon);
@ -962,17 +941,6 @@ namespace CustomizeMii
this.llbIconMultiReplace.Text = "Multi Replace"; this.llbIconMultiReplace.Text = "Multi Replace";
this.llbIconMultiReplace.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llbMultiReplace_LinkClicked); this.llbIconMultiReplace.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llbMultiReplace_LinkClicked);
// //
// cbIconMakeTransparent
//
this.cbIconMakeTransparent.AutoSize = true;
this.cbIconMakeTransparent.Location = new System.Drawing.Point(11, 189);
this.cbIconMakeTransparent.Name = "cbIconMakeTransparent";
this.cbIconMakeTransparent.Size = new System.Drawing.Size(113, 17);
this.cbIconMakeTransparent.TabIndex = 12;
this.cbIconMakeTransparent.Text = "Make Transparent";
this.cbIconMakeTransparent.UseVisualStyleBackColor = true;
this.cbIconMakeTransparent.CheckedChanged += new System.EventHandler(this.cbIconMakeTransparent_CheckedChanged);
//
// cmbFormatIcon // cmbFormatIcon
// //
this.cmbFormatIcon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbFormatIcon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -1062,10 +1030,10 @@ namespace CustomizeMii
this.lbxIconTpls.Size = new System.Drawing.Size(343, 173); this.lbxIconTpls.Size = new System.Drawing.Size(343, 173);
this.lbxIconTpls.Sorted = true; this.lbxIconTpls.Sorted = true;
this.lbxIconTpls.TabIndex = 6; this.lbxIconTpls.TabIndex = 6;
this.lbxIconTpls.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbxIconTpls_MouseUp);
this.lbxIconTpls.SelectedIndexChanged += new System.EventHandler(this.lbxIconTpls_SelectedIndexChanged); this.lbxIconTpls.SelectedIndexChanged += new System.EventHandler(this.lbxIconTpls_SelectedIndexChanged);
this.lbxIconTpls.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbxIconTpls_DragDrop); this.lbxIconTpls.DragDrop += new System.Windows.Forms.DragEventHandler(this.lbxIconTpls_DragDrop);
this.lbxIconTpls.DragEnter += new System.Windows.Forms.DragEventHandler(this.lbxIconTpls_DragEnter); this.lbxIconTpls.DragEnter += new System.Windows.Forms.DragEventHandler(this.lbxIconTpls_DragEnter);
this.lbxIconTpls.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbxIconTpls_MouseUp);
// //
// tabBrlyt // tabBrlyt
// //
@ -1405,7 +1373,7 @@ namespace CustomizeMii
this.cmRename, this.cmRename,
this.cmResize}); this.cmResize});
this.cmTpls.Name = "cmTpls"; this.cmTpls.Name = "cmTpls";
this.cmTpls.Size = new System.Drawing.Size(153, 70); this.cmTpls.Size = new System.Drawing.Size(118, 48);
// //
// cmRename // cmRename
// //
@ -1414,6 +1382,13 @@ namespace CustomizeMii
this.cmRename.Text = "Rename"; this.cmRename.Text = "Rename";
this.cmRename.Click += new System.EventHandler(this.cmRename_Click); this.cmRename.Click += new System.EventHandler(this.cmRename_Click);
// //
// cmResize
//
this.cmResize.Name = "cmResize";
this.cmResize.Size = new System.Drawing.Size(117, 22);
this.cmResize.Text = "Resize";
this.cmResize.Click += new System.EventHandler(this.cmResize_Click);
//
// ssMain // ssMain
// //
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1584,9 +1559,10 @@ namespace CustomizeMii
// //
this.cmSound.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmSound.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmLoadAudioFile, this.cmLoadAudioFile,
this.cmConvertToBns}); this.cmConvertToBns,
this.cmMakeSilent});
this.cmSound.Name = "cmSound"; this.cmSound.Name = "cmSound";
this.cmSound.Size = new System.Drawing.Size(159, 48); this.cmSound.Size = new System.Drawing.Size(159, 92);
// //
// cmLoadAudioFile // cmLoadAudioFile
// //
@ -1602,6 +1578,13 @@ namespace CustomizeMii
this.cmConvertToBns.Text = "Convert To BNS"; this.cmConvertToBns.Text = "Convert To BNS";
this.cmConvertToBns.Click += new System.EventHandler(this.cmConvertToBns_Click); this.cmConvertToBns.Click += new System.EventHandler(this.cmConvertToBns_Click);
// //
// cmMakeSilent
//
this.cmMakeSilent.Name = "cmMakeSilent";
this.cmMakeSilent.Size = new System.Drawing.Size(158, 22);
this.cmMakeSilent.Text = "Make Silent";
this.cmMakeSilent.Click += new System.EventHandler(this.cmMakeSilent_Click);
//
// cmDol // cmDol
// //
this.cmDol.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmDol.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1624,12 +1607,45 @@ namespace CustomizeMii
this.cmDolFromSource.Text = "Take From Source WAD"; this.cmDolFromSource.Text = "Take From Source WAD";
this.cmDolFromSource.Click += new System.EventHandler(this.cmDolFromSource_Click); this.cmDolFromSource.Click += new System.EventHandler(this.cmDolFromSource_Click);
// //
// cmResize // cbLz77
// //
this.cmResize.Name = "cmResize"; this.cbLz77.AutoSize = true;
this.cmResize.Size = new System.Drawing.Size(152, 22); this.cbLz77.Checked = true;
this.cmResize.Text = "Resize"; this.cbLz77.CheckState = System.Windows.Forms.CheckState.Checked;
this.cmResize.Click += new System.EventHandler(this.cmResize_Click); this.cbLz77.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbLz77.LedColor = lControls.CheckLED.LEDColor.Green;
this.cbLz77.Location = new System.Drawing.Point(11, 180);
this.cbLz77.Name = "cbLz77";
this.cbLz77.Size = new System.Drawing.Size(131, 17);
this.cbLz77.TabIndex = 16;
this.cbLz77.Text = "Use Lz77 Compression";
this.cbLz77.UseVisualStyleBackColor = true;
//
// cbBannerMakeTransparent
//
this.cbBannerMakeTransparent.AutoSize = true;
this.cbBannerMakeTransparent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbBannerMakeTransparent.LedColor = lControls.CheckLED.LEDColor.Green;
this.cbBannerMakeTransparent.Location = new System.Drawing.Point(11, 189);
this.cbBannerMakeTransparent.Name = "cbBannerMakeTransparent";
this.cbBannerMakeTransparent.Size = new System.Drawing.Size(110, 17);
this.cbBannerMakeTransparent.TabIndex = 8;
this.cbBannerMakeTransparent.Text = "Make Transparent";
this.cbBannerMakeTransparent.UseVisualStyleBackColor = true;
this.cbBannerMakeTransparent.CheckedChanged += new System.EventHandler(this.cbBannerMakeTransparent_CheckedChanged);
//
// cbIconMakeTransparent
//
this.cbIconMakeTransparent.AutoSize = true;
this.cbIconMakeTransparent.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cbIconMakeTransparent.LedColor = lControls.CheckLED.LEDColor.Green;
this.cbIconMakeTransparent.Location = new System.Drawing.Point(11, 189);
this.cbIconMakeTransparent.Name = "cbIconMakeTransparent";
this.cbIconMakeTransparent.Size = new System.Drawing.Size(110, 17);
this.cbIconMakeTransparent.TabIndex = 14;
this.cbIconMakeTransparent.Text = "Make Transparent";
this.cbIconMakeTransparent.UseVisualStyleBackColor = true;
this.cbIconMakeTransparent.CheckedChanged += new System.EventHandler(this.cbIconMakeTransparent_CheckedChanged);
// //
// CustomizeMii_Main // CustomizeMii_Main
// //
@ -1645,10 +1661,10 @@ namespace CustomizeMii
this.Name = "CustomizeMii_Main"; this.Name = "CustomizeMii_Main";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "CustomizeMii X by Leathl"; this.Text = "CustomizeMii X by Leathl";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CustomizeMii_Main_FormClosing);
this.Load += new System.EventHandler(this.CustomizeMii_Main_Load); this.Load += new System.EventHandler(this.CustomizeMii_Main_Load);
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.CustomizeMii_Main_DragDrop); this.DragDrop += new System.Windows.Forms.DragEventHandler(this.CustomizeMii_Main_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.CustomizeMii_Main_DragEnter); this.DragEnter += new System.Windows.Forms.DragEventHandler(this.CustomizeMii_Main_DragEnter);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CustomizeMii_Main_FormClosing);
this.tabControl.ResumeLayout(false); this.tabControl.ResumeLayout(false);
this.tabSource.ResumeLayout(false); this.tabSource.ResumeLayout(false);
this.tabSource.PerformLayout(); this.tabSource.PerformLayout();
@ -1745,7 +1761,6 @@ namespace CustomizeMii
private System.Windows.Forms.ComboBox cmbReplace; private System.Windows.Forms.ComboBox cmbReplace;
private System.Windows.Forms.TextBox tbReplace; private System.Windows.Forms.TextBox tbReplace;
private System.Windows.Forms.Button btnBrowseReplace; private System.Windows.Forms.Button btnBrowseReplace;
private System.Windows.Forms.CheckBox cbLz77;
private System.Windows.Forms.LinkLabel llbSite; private System.Windows.Forms.LinkLabel llbSite;
private System.Windows.Forms.TabPage tabBrlyt; private System.Windows.Forms.TabPage tabBrlyt;
private System.Windows.Forms.TabPage tabBrlan; private System.Windows.Forms.TabPage tabBrlan;
@ -1773,11 +1788,8 @@ namespace CustomizeMii
private System.Windows.Forms.Button btnAddIcon; private System.Windows.Forms.Button btnAddIcon;
private System.Windows.Forms.Button btnDeleteIcon; private System.Windows.Forms.Button btnDeleteIcon;
private System.Windows.Forms.Button btnBrlytListTpls; private System.Windows.Forms.Button btnBrlytListTpls;
private System.Windows.Forms.CheckBox cbBannerMakeTransparent;
private System.Windows.Forms.CheckBox cbIconMakeTransparent;
private System.Windows.Forms.TabPage tabInstructions; private System.Windows.Forms.TabPage tabInstructions;
private System.Windows.Forms.RichTextBox rtbInstructions; private System.Windows.Forms.RichTextBox rtbInstructions;
private System.Windows.Forms.CheckBox cbSecurityChecksOff;
private System.Windows.Forms.Button btnForwarder; private System.Windows.Forms.Button btnForwarder;
private System.Windows.Forms.ContextMenuStrip cmForwarder; private System.Windows.Forms.ContextMenuStrip cmForwarder;
private System.Windows.Forms.ToolStripMenuItem cmSimpleForwarder; private System.Windows.Forms.ToolStripMenuItem cmSimpleForwarder;
@ -1818,6 +1830,11 @@ namespace CustomizeMii
private System.Windows.Forms.ContextMenuStrip cmTpls; private System.Windows.Forms.ContextMenuStrip cmTpls;
private System.Windows.Forms.ToolStripMenuItem cmRename; private System.Windows.Forms.ToolStripMenuItem cmRename;
private System.Windows.Forms.ToolStripMenuItem cmResize; private System.Windows.Forms.ToolStripMenuItem cmResize;
private System.Windows.Forms.ToolStripMenuItem cmMakeSilent;
private lControls.CheckLED cbSecurityChecksOff;
private lControls.CheckLED cbLz77;
private lControls.CheckLED cbBannerMakeTransparent;
private lControls.CheckLED cbIconMakeTransparent;
} }
} }

View File

@ -31,7 +31,7 @@ namespace CustomizeMii
public partial class CustomizeMii_Main : Form public partial class CustomizeMii_Main : Form
{ {
#region Constants #region Constants
private const string version = "3.0"; //Hint for myself: Never use a char in the Version (UpdateCheck)! private const string version = "3.1"; //Hint for myself: Never use a char in the Version (UpdateCheck)!
private const int soundMaxLength = 40; //In seconds private const int soundMaxLength = 40; //In seconds
private const int soundWarningLength = 25; //In seconds private const int soundWarningLength = 25; //In seconds
private const int bnsWarningLength = 45; //In seconds private const int bnsWarningLength = 45; //In seconds
@ -768,7 +768,7 @@ namespace CustomizeMii
{ {
int format = cmbFormatBanner.SelectedIndex; int format = cmbFormatBanner.SelectedIndex;
if (format < 7) if (format < 9)
{ {
OpenFileDialog ofd = new OpenFileDialog(); OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|TPL|*.tpl|All|*.png;*.jpg;*.gif;*.bmp;*.tpl"; ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|TPL|*.tpl|All|*.png;*.jpg;*.gif;*.bmp;*.tpl";
@ -797,33 +797,59 @@ namespace CustomizeMii
img.Height != tmpTpl.GetTextureSize(0).Height) img.Height != tmpTpl.GetTextureSize(0).Height)
img = resizeImage(img, tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height); img = resizeImage(img, tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height);
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
switch (format) switch (format)
{ {
case 6: //I4 case 6:
format = 0; format = (int)TPL_TextureFormat.I4;
break; break;
case 5: //I8 case 5:
format = 1; format = (int)TPL_TextureFormat.I8;
break; break;
case 4: //IA4 case 4:
format = 2; format = (int)TPL_TextureFormat.IA4;
break; break;
case 3: //IA8 case 3:
format = 3; format = (int)TPL_TextureFormat.IA8;
break; break;
case 1: case 1:
format = 4; format = (int)TPL_TextureFormat.RGB565;
break; break;
case 2: case 2:
format = 5; format = (int)TPL_TextureFormat.RGB5A3;
break;
case 7:
format = (int)TPL_TextureFormat.CI4;
CustomizeMii_PaletteFormatBox pfb = new CustomizeMii_PaletteFormatBox();
pfb.ShowDialog();
pFormat = pfb.PaletteFormat;
break;
case 8:
format = (int)TPL_TextureFormat.CI8;
CustomizeMii_PaletteFormatBox pfb2 = new CustomizeMii_PaletteFormatBox();
pfb2.ShowDialog();
pFormat = pfb2.PaletteFormat;
break;
case 9:
format = (int)TPL_TextureFormat.CI14X2;
CustomizeMii_PaletteFormatBox pfb3 = new CustomizeMii_PaletteFormatBox();
pfb3.ShowDialog();
pFormat = pfb3.PaletteFormat;
break; break;
default: default:
format = 6; format = (int)TPL_TextureFormat.RGBA8;
break; break;
} }
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(img, (TPL_Format)format); tmpTpl.AddTexture(img, (TPL_TextureFormat)format, pFormat);
if (string.IsNullOrEmpty(replacedBanner)) if (string.IsNullOrEmpty(replacedBanner))
bannerBin.ReplaceFile(bannerBin.GetNodeIndex(tplName), tmpTpl.ToByteArray()); bannerBin.ReplaceFile(bannerBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
@ -918,7 +944,7 @@ namespace CustomizeMii
{ {
int format = cmbFormatIcon.SelectedIndex; int format = cmbFormatIcon.SelectedIndex;
if (format < 7) if (format < 9)
{ {
OpenFileDialog ofd = new OpenFileDialog(); OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|TPL|*.tpl|All|*.png;*.jpg;*.gif;*.bmp;*.tpl"; ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|TPL|*.tpl|All|*.png;*.jpg;*.gif;*.bmp;*.tpl";
@ -947,33 +973,59 @@ namespace CustomizeMii
img.Height != tmpTpl.GetTextureSize(0).Height) img.Height != tmpTpl.GetTextureSize(0).Height)
img = resizeImage(img, tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height); img = resizeImage(img, tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height);
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
switch (format) switch (format)
{ {
case 6: //I4 case 6:
format = 0; format = (int)TPL_TextureFormat.I4;
break; break;
case 5: //I8 case 5:
format = 1; format = (int)TPL_TextureFormat.I8;
break; break;
case 4: //IA4 case 4:
format = 2; format = (int)TPL_TextureFormat.IA4;
break; break;
case 3: //IA8 case 3:
format = 3; format = (int)TPL_TextureFormat.IA8;
break; break;
case 1: case 1:
format = 4; format = (int)TPL_TextureFormat.RGB565;
break; break;
case 2: case 2:
format = 5; format = (int)TPL_TextureFormat.RGB5A3;
break;
case 7:
format = (int)TPL_TextureFormat.CI4;
CustomizeMii_PaletteFormatBox pfb = new CustomizeMii_PaletteFormatBox();
pfb.ShowDialog();
pFormat = pfb.PaletteFormat;
break;
case 8:
format = (int)TPL_TextureFormat.CI8;
CustomizeMii_PaletteFormatBox pfb2 = new CustomizeMii_PaletteFormatBox();
pfb2.ShowDialog();
pFormat = pfb2.PaletteFormat;
break;
case 9:
format = (int)TPL_TextureFormat.CI14X2;
CustomizeMii_PaletteFormatBox pfb3 = new CustomizeMii_PaletteFormatBox();
pfb3.ShowDialog();
pFormat = pfb3.PaletteFormat;
break; break;
default: default:
format = 6; format = (int)TPL_TextureFormat.RGBA8;
break; break;
} }
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(img, (TPL_Format)format); tmpTpl.AddTexture(img, (TPL_TextureFormat)format, pFormat);
if (string.IsNullOrEmpty(replacedIcon)) if (string.IsNullOrEmpty(replacedIcon))
iconBin.ReplaceFile(iconBin.GetNodeIndex(tplName), tmpTpl.ToByteArray()); iconBin.ReplaceFile(iconBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
@ -1902,19 +1954,19 @@ namespace CustomizeMii
if (cmSender.Name.ToLower() == "cmextractsoundasbin") { sfd.Filter = "BIN|*.bin"; sfd.FileName = "sound.bin"; } if (cmSender.Name.ToLower() == "cmextractsoundasbin") { sfd.Filter = "BIN|*.bin"; sfd.FileName = "sound.bin"; }
else if (cmSender.Name.ToLower() == "cmextractsoundasaudio") else if (cmSender.Name.ToLower() == "cmextractsoundasaudio")
{ {
if (soundFile[0] == 'R' && soundFile[1] == 'I' && soundFile[2] == 'F' && soundFile[3] == 'F') if (soundFile[32] == 'R' && soundFile[33] == 'I' && soundFile[34] == 'F' && soundFile[35] == 'F')
{ sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wav"; } { sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wav"; }
else if (soundFile[0] == 'B' && soundFile[1] == 'N' && soundFile[2] == 'S' && soundFile[3] == ' ') else if (soundFile[32] == 'B' && soundFile[33] == 'N' && soundFile[34] == 'S' && soundFile[35] == ' ')
{ sfd.Filter = "BNS|*.bns"; sfd.FileName = "sound.bns"; } { sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wav"; }
else if (soundFile[0] == 'F' && soundFile[1] == 'O' && soundFile[2] == 'R' && soundFile[3] == 'M') else if (soundFile[32] == 'F' && soundFile[33] == 'O' && soundFile[34] == 'R' && soundFile[35] == 'M')
{ sfd.Filter = "AIFF|*.aif;*.aiff"; sfd.FileName = "sound.aif"; } { sfd.Filter = "AIFF|*.aif;*.aiff"; sfd.FileName = "sound.aif"; }
else if (soundFile[0] == 'L' && soundFile[1] == 'Z' && soundFile[2] == '7' && soundFile[3] == '7') else if (soundFile[32] == 'L' && soundFile[33] == 'Z' && soundFile[34] == '7' && soundFile[35] == '7')
{ {
if (soundFile[9] == 'R' && soundFile[10] == 'I' && soundFile[11] == 'F' && soundFile[12] == 'F') if (soundFile[41] == 'R' && soundFile[42] == 'I' && soundFile[43] == 'F' && soundFile[44] == 'F')
{ sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wav"; } { sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wav"; }
else if (soundFile[9] == 'B' && soundFile[10] == 'N' && soundFile[11] == 'S' && soundFile[12] == ' ') else if (soundFile[41] == 'B' && soundFile[42] == 'N' && soundFile[43] == 'S' && soundFile[44] == ' ')
{ sfd.Filter = "BNS|*.bns"; sfd.FileName = "sound.bns"; } { sfd.Filter = "Wave|*.wav"; sfd.FileName = "sound.wave"; }
else if (soundFile[9] == 'F' && soundFile[10] == 'O' && soundFile[11] == 'R' && soundFile[12] == 'M') else if (soundFile[41] == 'F' && soundFile[42] == 'O' && soundFile[43] == 'R' && soundFile[44] == 'M')
{ sfd.Filter = "AIFF|*.aif;*.aiff"; sfd.FileName = "sound.aif"; } { sfd.Filter = "AIFF|*.aif;*.aiff"; sfd.FileName = "sound.aif"; }
else throw new Exception("Unsupported Audio Format!"); else throw new Exception("Unsupported Audio Format!");
} }
@ -1937,7 +1989,15 @@ namespace CustomizeMii
if (Lz77.IsLz77Compressed(soundFile)) if (Lz77.IsLz77Compressed(soundFile))
{ Lz77 l = new Lz77(); soundFile = l.Decompress(soundFile); } { Lz77 l = new Lz77(); soundFile = l.Decompress(soundFile); }
File.WriteAllBytes(sfd.FileName, soundFile); if (soundFile[0] == 'B' && soundFile[1] == 'N' && soundFile[2] == 'S' && soundFile[3] == ' ')
{
Wave w = BNS.BnsToWave(soundFile);
w.Save(sfd.FileName);
w.Dispose();
}
else
File.WriteAllBytes(sfd.FileName, soundFile);
infoBox(string.Format("The sound.bin was successfully converted to {0}!", Path.GetFileName(sfd.FileName))); infoBox(string.Format("The sound.bin was successfully converted to {0}!", Path.GetFileName(sfd.FileName)));
} }
} }
@ -2421,7 +2481,7 @@ namespace CustomizeMii
else else
tmpTpl = TPL.Load(newIconBin.Data[newIconBin.GetNodeIndex(tplName)]); tmpTpl = TPL.Load(newIconBin.Data[newIconBin.GetNodeIndex(tplName)]);
TPL_Format tplFormat = tmpTpl.GetTextureFormat(0); TPL_TextureFormat tplFormat = tmpTpl.GetTextureFormat(0);
Image newImg = resizeImage(tmpTpl.ExtractTexture(0), newSize.Width, newSize.Height); Image newImg = resizeImage(tmpTpl.ExtractTexture(0), newSize.Width, newSize.Height);
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
@ -2446,5 +2506,18 @@ namespace CustomizeMii
} }
catch (Exception ex) { errorBox(ex.Message); } catch (Exception ex) { errorBox(ex.Message); }
} }
private void cmMakeSilent_Click(object sender, EventArgs e)
{
Wave w = new Wave(1, 8, 500, new byte[] { 0x80, 0x80, 0x80, 0x80, 0x80 });
newSoundBin = Headers.IMD5.AddHeader(w.ToByteArray());
w.Dispose();
replacedSound = "Silence";
setControlText(tbSound, "Silence");
btnBrowseSound.Text = "Clear";
if (cmbReplace.SelectedIndex == 2) setControlText(tbReplace, string.Empty);
}
} }
} }

View File

@ -131,22 +131,22 @@ The USB Loader GX Team for their forwarder source
wilsoff for helping me debugging 3.0</value> wilsoff for helping me debugging 3.0</value>
</data> </data>
<metadata name="cmTpls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmTpls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>566, 7</value> <value>559, 14</value>
</metadata> </metadata>
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>16, 7</value> <value>17, 12</value>
</metadata> </metadata>
<metadata name="cmForwarder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmForwarder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>105, 7</value> <value>104, 12</value>
</metadata> </metadata>
<metadata name="cmOptionsExtract.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmOptionsExtract.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>228, 7</value> <value>230, 12</value>
</metadata> </metadata>
<metadata name="cmSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>376, 7</value> <value>369, 15</value>
</metadata> </metadata>
<metadata name="cmDol.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmDol.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>479, 7</value> <value>474, 13</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>42</value> <value>42</value>

View File

@ -0,0 +1,100 @@
namespace CustomizeMii
{
partial class CustomizeMii_PaletteFormatBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.btnIA8 = new System.Windows.Forms.Button();
this.btnRGB5A3 = new System.Windows.Forms.Button();
this.btnRGB565 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(307, 83);
this.label1.TabIndex = 0;
this.label1.Text = "You\'re converting to an indexed format, please choose a format\r\nfor the Palette:\r" +
"\n\r\nIA8: Black & White + Alpha\r\nRGB5A3: Color + Alpha\r\nRGB565: Color";
//
// btnIA8
//
this.btnIA8.Location = new System.Drawing.Point(12, 101);
this.btnIA8.Name = "btnIA8";
this.btnIA8.Size = new System.Drawing.Size(75, 23);
this.btnIA8.TabIndex = 1;
this.btnIA8.Text = "IA8";
this.btnIA8.UseVisualStyleBackColor = true;
this.btnIA8.Click += new System.EventHandler(this.btnIA8_Click);
//
// btnRGB5A3
//
this.btnRGB5A3.Location = new System.Drawing.Point(128, 101);
this.btnRGB5A3.Name = "btnRGB5A3";
this.btnRGB5A3.Size = new System.Drawing.Size(75, 23);
this.btnRGB5A3.TabIndex = 1;
this.btnRGB5A3.Text = "RGB5A3";
this.btnRGB5A3.UseVisualStyleBackColor = true;
this.btnRGB5A3.Click += new System.EventHandler(this.btnRGB5A3_Click);
//
// btnRGB565
//
this.btnRGB565.Location = new System.Drawing.Point(244, 101);
this.btnRGB565.Name = "btnRGB565";
this.btnRGB565.Size = new System.Drawing.Size(75, 23);
this.btnRGB565.TabIndex = 1;
this.btnRGB565.Text = "RGB565";
this.btnRGB565.UseVisualStyleBackColor = true;
this.btnRGB565.Click += new System.EventHandler(this.btnRGB565_Click);
//
// CustomizeMii_PaletteFormatBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(331, 137);
this.Controls.Add(this.btnRGB565);
this.Controls.Add(this.btnRGB5A3);
this.Controls.Add(this.btnIA8);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "CustomizeMii_PaletteFormatBox";
this.Text = "CustomizeMii_PaletteFormatBox";
this.Load += new System.EventHandler(this.CustomizeMii_PaletteFormatBox_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnIA8;
private System.Windows.Forms.Button btnRGB5A3;
private System.Windows.Forms.Button btnRGB565;
}
}

View File

@ -0,0 +1,40 @@
using System.Windows.Forms;
using libWiiSharp;
namespace CustomizeMii
{
public partial class CustomizeMii_PaletteFormatBox : Form
{
private TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
public TPL_PaletteFormat PaletteFormat { get { return pFormat; } }
public CustomizeMii_PaletteFormatBox()
{
InitializeComponent();
}
private void btnIA8_Click(object sender, System.EventArgs e)
{
pFormat = TPL_PaletteFormat.IA8;
this.Close();
}
private void btnRGB5A3_Click(object sender, System.EventArgs e)
{
pFormat = TPL_PaletteFormat.RGB5A3;
this.Close();
}
private void btnRGB565_Click(object sender, System.EventArgs e)
{
pFormat = TPL_PaletteFormat.RGB565;
this.Close();
}
private void CustomizeMii_PaletteFormatBox_Load(object sender, System.EventArgs e)
{
CenterToParent();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=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>

View File

@ -45,7 +45,6 @@ namespace CustomizeMii
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.Panel = new System.Windows.Forms.Panel(); this.Panel = new System.Windows.Forms.Panel();
this.cbCheckerBoard = new System.Windows.Forms.CheckBox(); this.cbCheckerBoard = new System.Windows.Forms.CheckBox();
this.btnReplace = new System.Windows.Forms.Button(); this.btnReplace = new System.Windows.Forms.Button();
@ -60,7 +59,7 @@ namespace CustomizeMii
this.lbSize = new System.Windows.Forms.Label(); this.lbSize = new System.Windows.Forms.Label();
this.lbSizeText = new System.Windows.Forms.Label(); this.lbSizeText = new System.Windows.Forms.Label();
this.pbPic = new System.Windows.Forms.PictureBox(); this.pbPic = new System.Windows.Forms.PictureBox();
this.cmFormat = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmFormat = new System.Windows.Forms.ContextMenuStrip();
this.cmRGBA8 = new System.Windows.Forms.ToolStripMenuItem(); this.cmRGBA8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmRGB565 = new System.Windows.Forms.ToolStripMenuItem(); this.cmRGB565 = new System.Windows.Forms.ToolStripMenuItem();
this.cmRGB5A3 = new System.Windows.Forms.ToolStripMenuItem(); this.cmRGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
@ -78,6 +77,23 @@ namespace CustomizeMii
this.cmToI8 = new System.Windows.Forms.ToolStripMenuItem(); this.cmToI8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToI4 = new System.Windows.Forms.ToolStripMenuItem(); this.cmToI4 = new System.Windows.Forms.ToolStripMenuItem();
this.lbNoPreview = new System.Windows.Forms.Label(); this.lbNoPreview = new System.Windows.Forms.Label();
this.cmCI8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI4 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI8RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI8RGB565 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI8IA8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI4RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI4RGB565 = new System.Windows.Forms.ToolStripMenuItem();
this.cmCI4IA8 = new System.Windows.Forms.ToolStripMenuItem();
this.lbTip = new System.Windows.Forms.Label();
this.cmToCI8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI4 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI8RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI8RGB565 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI8IA8 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI4RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI4RGB565 = new System.Windows.Forms.ToolStripMenuItem();
this.cmToCI4IA8 = new System.Windows.Forms.ToolStripMenuItem();
this.Panel.SuspendLayout(); this.Panel.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbPic)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbPic)).BeginInit();
@ -182,6 +198,7 @@ namespace CustomizeMii
// //
// panel1 // panel1
// //
this.panel1.Controls.Add(this.lbTip);
this.panel1.Controls.Add(this.lbFormat); this.panel1.Controls.Add(this.lbFormat);
this.panel1.Controls.Add(this.lbFormatText); this.panel1.Controls.Add(this.lbFormatText);
this.panel1.Controls.Add(this.lbSize); this.panel1.Controls.Add(this.lbSize);
@ -196,7 +213,7 @@ namespace CustomizeMii
// //
this.lbFormat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lbFormat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lbFormat.AutoSize = true; this.lbFormat.AutoSize = true;
this.lbFormat.Location = new System.Drawing.Point(756, 5); this.lbFormat.Location = new System.Drawing.Point(729, 5);
this.lbFormat.Name = "lbFormat"; this.lbFormat.Name = "lbFormat";
this.lbFormat.Size = new System.Drawing.Size(43, 13); this.lbFormat.Size = new System.Drawing.Size(43, 13);
this.lbFormat.TabIndex = 3; this.lbFormat.TabIndex = 3;
@ -205,7 +222,7 @@ namespace CustomizeMii
// lbFormatText // lbFormatText
// //
this.lbFormatText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lbFormatText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lbFormatText.Location = new System.Drawing.Point(550, 5); this.lbFormatText.Location = new System.Drawing.Point(523, 5);
this.lbFormatText.Name = "lbFormatText"; this.lbFormatText.Name = "lbFormatText";
this.lbFormatText.RightToLeft = System.Windows.Forms.RightToLeft.No; this.lbFormatText.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.lbFormatText.Size = new System.Drawing.Size(205, 13); this.lbFormatText.Size = new System.Drawing.Size(205, 13);
@ -252,23 +269,25 @@ namespace CustomizeMii
this.cmIA4, this.cmIA4,
this.cmI8, this.cmI8,
this.cmI4, this.cmI4,
this.cmCI8,
this.cmCI4,
this.toolStripSeparator1, this.toolStripSeparator1,
this.cmChangeFormat}); this.cmChangeFormat});
this.cmFormat.Name = "cmFormat"; this.cmFormat.Name = "cmFormat";
this.cmFormat.Size = new System.Drawing.Size(234, 186); this.cmFormat.Size = new System.Drawing.Size(267, 252);
// //
// cmRGBA8 // cmRGBA8
// //
this.cmRGBA8.Name = "cmRGBA8"; this.cmRGBA8.Name = "cmRGBA8";
this.cmRGBA8.Size = new System.Drawing.Size(233, 22); this.cmRGBA8.Size = new System.Drawing.Size(266, 22);
this.cmRGBA8.Tag = "rgba8"; this.cmRGBA8.Tag = "rgba8";
this.cmRGBA8.Text = "As RGBA8 (High Quality)"; this.cmRGBA8.Text = "As RGBA8 (High Quality with Alpha)";
this.cmRGBA8.Click += new System.EventHandler(this.cmFormat_Click); this.cmRGBA8.Click += new System.EventHandler(this.cmFormat_Click);
// //
// cmRGB565 // cmRGB565
// //
this.cmRGB565.Name = "cmRGB565"; this.cmRGB565.Name = "cmRGB565";
this.cmRGB565.Size = new System.Drawing.Size(233, 22); this.cmRGB565.Size = new System.Drawing.Size(266, 22);
this.cmRGB565.Tag = "rgb565"; this.cmRGB565.Tag = "rgb565";
this.cmRGB565.Text = "As RGB565 (Moderate Quality)"; this.cmRGB565.Text = "As RGB565 (Moderate Quality)";
this.cmRGB565.Click += new System.EventHandler(this.cmFormat_Click); this.cmRGB565.Click += new System.EventHandler(this.cmFormat_Click);
@ -276,15 +295,15 @@ namespace CustomizeMii
// cmRGB5A3 // cmRGB5A3
// //
this.cmRGB5A3.Name = "cmRGB5A3"; this.cmRGB5A3.Name = "cmRGB5A3";
this.cmRGB5A3.Size = new System.Drawing.Size(233, 22); this.cmRGB5A3.Size = new System.Drawing.Size(266, 22);
this.cmRGB5A3.Tag = "rgb5a3"; this.cmRGB5A3.Tag = "rgb5a3";
this.cmRGB5A3.Text = "As RGB5A3 (Low Quality)"; this.cmRGB5A3.Text = "As RGB5A3 (Low Quality with Alpha)";
this.cmRGB5A3.Click += new System.EventHandler(this.cmFormat_Click); this.cmRGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
// //
// cmIA8 // cmIA8
// //
this.cmIA8.Name = "cmIA8"; this.cmIA8.Name = "cmIA8";
this.cmIA8.Size = new System.Drawing.Size(233, 22); this.cmIA8.Size = new System.Drawing.Size(266, 22);
this.cmIA8.Tag = "ia8"; this.cmIA8.Tag = "ia8";
this.cmIA8.Text = "As IA8 (B/W with Alpha)"; this.cmIA8.Text = "As IA8 (B/W with Alpha)";
this.cmIA8.Click += new System.EventHandler(this.cmFormat_Click); this.cmIA8.Click += new System.EventHandler(this.cmFormat_Click);
@ -292,7 +311,7 @@ namespace CustomizeMii
// cmIA4 // cmIA4
// //
this.cmIA4.Name = "cmIA4"; this.cmIA4.Name = "cmIA4";
this.cmIA4.Size = new System.Drawing.Size(233, 22); this.cmIA4.Size = new System.Drawing.Size(266, 22);
this.cmIA4.Tag = "ia4"; this.cmIA4.Tag = "ia4";
this.cmIA4.Text = "As IA4 (B/W with Alpha)"; this.cmIA4.Text = "As IA4 (B/W with Alpha)";
this.cmIA4.Click += new System.EventHandler(this.cmFormat_Click); this.cmIA4.Click += new System.EventHandler(this.cmFormat_Click);
@ -300,7 +319,7 @@ namespace CustomizeMii
// cmI8 // cmI8
// //
this.cmI8.Name = "cmI8"; this.cmI8.Name = "cmI8";
this.cmI8.Size = new System.Drawing.Size(233, 22); this.cmI8.Size = new System.Drawing.Size(266, 22);
this.cmI8.Tag = "i8"; this.cmI8.Tag = "i8";
this.cmI8.Text = "As I8 (B/W)"; this.cmI8.Text = "As I8 (B/W)";
this.cmI8.Click += new System.EventHandler(this.cmFormat_Click); this.cmI8.Click += new System.EventHandler(this.cmFormat_Click);
@ -308,7 +327,7 @@ namespace CustomizeMii
// cmI4 // cmI4
// //
this.cmI4.Name = "cmI4"; this.cmI4.Name = "cmI4";
this.cmI4.Size = new System.Drawing.Size(233, 22); this.cmI4.Size = new System.Drawing.Size(266, 22);
this.cmI4.Tag = "i4"; this.cmI4.Tag = "i4";
this.cmI4.Text = "As I4 (B/W)"; this.cmI4.Text = "As I4 (B/W)";
this.cmI4.Click += new System.EventHandler(this.cmFormat_Click); this.cmI4.Click += new System.EventHandler(this.cmFormat_Click);
@ -316,7 +335,7 @@ namespace CustomizeMii
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(230, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(263, 6);
// //
// cmChangeFormat // cmChangeFormat
// //
@ -327,23 +346,25 @@ namespace CustomizeMii
this.cmToIA8, this.cmToIA8,
this.cmToIA4, this.cmToIA4,
this.cmToI8, this.cmToI8,
this.cmToI4}); this.cmToI4,
this.cmToCI8,
this.cmToCI4});
this.cmChangeFormat.Name = "cmChangeFormat"; this.cmChangeFormat.Name = "cmChangeFormat";
this.cmChangeFormat.Size = new System.Drawing.Size(233, 22); this.cmChangeFormat.Size = new System.Drawing.Size(266, 22);
this.cmChangeFormat.Text = "Change Format"; this.cmChangeFormat.Text = "Change Format";
// //
// cmToRGBA8 // cmToRGBA8
// //
this.cmToRGBA8.Name = "cmToRGBA8"; this.cmToRGBA8.Name = "cmToRGBA8";
this.cmToRGBA8.Size = new System.Drawing.Size(234, 22); this.cmToRGBA8.Size = new System.Drawing.Size(267, 22);
this.cmToRGBA8.Tag = "rgba8"; this.cmToRGBA8.Tag = "rgba8";
this.cmToRGBA8.Text = "To RGBA8 (High Quality)"; this.cmToRGBA8.Text = "To RGBA8 (High Quality with Alpha)";
this.cmToRGBA8.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToRGBA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
// //
// cmToRGB565 // cmToRGB565
// //
this.cmToRGB565.Name = "cmToRGB565"; this.cmToRGB565.Name = "cmToRGB565";
this.cmToRGB565.Size = new System.Drawing.Size(234, 22); this.cmToRGB565.Size = new System.Drawing.Size(267, 22);
this.cmToRGB565.Tag = "rgb565"; this.cmToRGB565.Tag = "rgb565";
this.cmToRGB565.Text = "To RGB565 (Moderate Quality)"; this.cmToRGB565.Text = "To RGB565 (Moderate Quality)";
this.cmToRGB565.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToRGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
@ -351,15 +372,15 @@ namespace CustomizeMii
// cmToRGB5A3 // cmToRGB5A3
// //
this.cmToRGB5A3.Name = "cmToRGB5A3"; this.cmToRGB5A3.Name = "cmToRGB5A3";
this.cmToRGB5A3.Size = new System.Drawing.Size(234, 22); this.cmToRGB5A3.Size = new System.Drawing.Size(267, 22);
this.cmToRGB5A3.Tag = "rgb5a3"; this.cmToRGB5A3.Tag = "rgb5a3";
this.cmToRGB5A3.Text = "To RGB5A3 (Low Quality)"; this.cmToRGB5A3.Text = "To RGB5A3 (Low Quality with Alpha)";
this.cmToRGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToRGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
// //
// cmToIA8 // cmToIA8
// //
this.cmToIA8.Name = "cmToIA8"; this.cmToIA8.Name = "cmToIA8";
this.cmToIA8.Size = new System.Drawing.Size(234, 22); this.cmToIA8.Size = new System.Drawing.Size(267, 22);
this.cmToIA8.Tag = "ia8"; this.cmToIA8.Tag = "ia8";
this.cmToIA8.Text = "To IA8 (B/W with Alpha)"; this.cmToIA8.Text = "To IA8 (B/W with Alpha)";
this.cmToIA8.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToIA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
@ -367,7 +388,7 @@ namespace CustomizeMii
// cmToIA4 // cmToIA4
// //
this.cmToIA4.Name = "cmToIA4"; this.cmToIA4.Name = "cmToIA4";
this.cmToIA4.Size = new System.Drawing.Size(234, 22); this.cmToIA4.Size = new System.Drawing.Size(267, 22);
this.cmToIA4.Tag = "ia4"; this.cmToIA4.Tag = "ia4";
this.cmToIA4.Text = "To IA4 (B/W with Alpha)"; this.cmToIA4.Text = "To IA4 (B/W with Alpha)";
this.cmToIA4.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToIA4.Click += new System.EventHandler(this.cmChangeFormat_Click);
@ -375,7 +396,7 @@ namespace CustomizeMii
// cmToI8 // cmToI8
// //
this.cmToI8.Name = "cmToI8"; this.cmToI8.Name = "cmToI8";
this.cmToI8.Size = new System.Drawing.Size(234, 22); this.cmToI8.Size = new System.Drawing.Size(267, 22);
this.cmToI8.Tag = "i8"; this.cmToI8.Tag = "i8";
this.cmToI8.Text = "To I8 (B/W)"; this.cmToI8.Text = "To I8 (B/W)";
this.cmToI8.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToI8.Click += new System.EventHandler(this.cmChangeFormat_Click);
@ -383,7 +404,7 @@ namespace CustomizeMii
// cmToI4 // cmToI4
// //
this.cmToI4.Name = "cmToI4"; this.cmToI4.Name = "cmToI4";
this.cmToI4.Size = new System.Drawing.Size(234, 22); this.cmToI4.Size = new System.Drawing.Size(267, 22);
this.cmToI4.Tag = "i4"; this.cmToI4.Tag = "i4";
this.cmToI4.Text = "To I4 (B/W)"; this.cmToI4.Text = "To I4 (B/W)";
this.cmToI4.Click += new System.EventHandler(this.cmChangeFormat_Click); this.cmToI4.Click += new System.EventHandler(this.cmChangeFormat_Click);
@ -399,6 +420,154 @@ namespace CustomizeMii
this.lbNoPreview.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lbNoPreview.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lbNoPreview.Visible = false; this.lbNoPreview.Visible = false;
// //
// cmCI8
//
this.cmCI8.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmCI8RGB5A3,
this.cmCI8RGB565,
this.cmCI8IA8});
this.cmCI8.Name = "cmCI8";
this.cmCI8.Size = new System.Drawing.Size(266, 22);
this.cmCI8.Text = "As CI8 (Indexed, max. 256 Colors)";
//
// cmCI4
//
this.cmCI4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmCI4RGB5A3,
this.cmCI4RGB565,
this.cmCI4IA8});
this.cmCI4.Name = "cmCI4";
this.cmCI4.Size = new System.Drawing.Size(266, 22);
this.cmCI4.Text = "As CI4 (Indexed, max. 16 Colors)";
//
// cmCI8RGB5A3
//
this.cmCI8RGB5A3.Name = "cmCI8RGB5A3";
this.cmCI8RGB5A3.Size = new System.Drawing.Size(283, 22);
this.cmCI8RGB5A3.Tag = "ci8rgb5a3";
this.cmCI8RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
this.cmCI8RGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
//
// cmCI8RGB565
//
this.cmCI8RGB565.Name = "cmCI8RGB565";
this.cmCI8RGB565.Size = new System.Drawing.Size(283, 22);
this.cmCI8RGB565.Tag = "ci8rgb565";
this.cmCI8RGB565.Text = "With RGB565 Palette (Color)";
this.cmCI8RGB565.Click += new System.EventHandler(this.cmFormat_Click);
//
// cmCI8IA8
//
this.cmCI8IA8.Name = "cmCI8IA8";
this.cmCI8IA8.Size = new System.Drawing.Size(283, 22);
this.cmCI8IA8.Tag = "ci8ia8";
this.cmCI8IA8.Text = "With IA8 Palette (B/W with Alpha)";
this.cmCI8IA8.Click += new System.EventHandler(this.cmFormat_Click);
//
// cmCI4RGB5A3
//
this.cmCI4RGB5A3.Name = "cmCI4RGB5A3";
this.cmCI4RGB5A3.Size = new System.Drawing.Size(283, 22);
this.cmCI4RGB5A3.Tag = "ci4rgb5a3";
this.cmCI4RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
this.cmCI4RGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
//
// cmCI4RGB565
//
this.cmCI4RGB565.Name = "cmCI4RGB565";
this.cmCI4RGB565.Size = new System.Drawing.Size(283, 22);
this.cmCI4RGB565.Tag = "ci4rgb565";
this.cmCI4RGB565.Text = "With RGB565 Palette (Color)";
this.cmCI4RGB565.Click += new System.EventHandler(this.cmFormat_Click);
//
// cmCI4IA8
//
this.cmCI4IA8.Name = "cmCI4IA8";
this.cmCI4IA8.Size = new System.Drawing.Size(283, 22);
this.cmCI4IA8.Tag = "ci4ia8";
this.cmCI4IA8.Text = "With IA8 Palette (B/W with Alpha)";
this.cmCI4IA8.Click += new System.EventHandler(this.cmFormat_Click);
//
// lbTip
//
this.lbTip.AutoSize = true;
this.lbTip.ForeColor = System.Drawing.Color.Red;
this.lbTip.Location = new System.Drawing.Point(149, 6);
this.lbTip.Name = "lbTip";
this.lbTip.Size = new System.Drawing.Size(470, 13);
this.lbTip.TabIndex = 4;
this.lbTip.Text = "Tip: Reduce the colors of an image with Photoshop or GIMP to gain better results " +
"with CI formats...";
this.lbTip.Visible = false;
//
// cmToCI8
//
this.cmToCI8.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmToCI8RGB5A3,
this.cmToCI8RGB565,
this.cmToCI8IA8});
this.cmToCI8.Name = "cmToCI8";
this.cmToCI8.Size = new System.Drawing.Size(267, 22);
this.cmToCI8.Text = "To CI8 (Indexed, max. 256 Colors)";
//
// cmToCI4
//
this.cmToCI4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.cmToCI4RGB5A3,
this.cmToCI4RGB565,
this.cmToCI4IA8});
this.cmToCI4.Name = "cmToCI4";
this.cmToCI4.Size = new System.Drawing.Size(267, 22);
this.cmToCI4.Text = "To CI4 (Indexed, max. 16 Colors)";
//
// cmToCI8RGB5A3
//
this.cmToCI8RGB5A3.Name = "cmToCI8RGB5A3";
this.cmToCI8RGB5A3.Size = new System.Drawing.Size(283, 22);
this.cmToCI8RGB5A3.Tag = "ci8rgb5a3";
this.cmToCI8RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
this.cmToCI8RGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// cmToCI8RGB565
//
this.cmToCI8RGB565.Name = "cmToCI8RGB565";
this.cmToCI8RGB565.Size = new System.Drawing.Size(283, 22);
this.cmToCI8RGB565.Tag = "ci8rgb565";
this.cmToCI8RGB565.Text = "With RGB565 Palette (Color)";
this.cmToCI8RGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// cmToCI8IA8
//
this.cmToCI8IA8.Name = "cmToCI8IA8";
this.cmToCI8IA8.Size = new System.Drawing.Size(283, 22);
this.cmToCI8IA8.Tag = "ci8ia8";
this.cmToCI8IA8.Text = "With IA8 Palette (B/W with Alpha)";
this.cmToCI8IA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// cmToCI4RGB5A3
//
this.cmToCI4RGB5A3.Name = "cmToCI4RGB5A3";
this.cmToCI4RGB5A3.Size = new System.Drawing.Size(283, 22);
this.cmToCI4RGB5A3.Tag = "ci4rgb5a3";
this.cmToCI4RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
this.cmToCI4RGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// cmToCI4RGB565
//
this.cmToCI4RGB565.Name = "cmToCI4RGB565";
this.cmToCI4RGB565.Size = new System.Drawing.Size(283, 22);
this.cmToCI4RGB565.Tag = "ci4rgb565";
this.cmToCI4RGB565.Text = "With RGB565 Palette (Color)";
this.cmToCI4RGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// cmToCI4IA8
//
this.cmToCI4IA8.Name = "cmToCI4IA8";
this.cmToCI4IA8.Size = new System.Drawing.Size(283, 22);
this.cmToCI4IA8.Tag = "ci4ia8";
this.cmToCI4IA8.Text = "With IA8 Palette (B/W with Alpha)";
this.cmToCI4IA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
//
// CustomizeMii_Preview // CustomizeMii_Preview
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -414,8 +583,8 @@ namespace CustomizeMii
this.MinimumSize = new System.Drawing.Size(833, 500); this.MinimumSize = new System.Drawing.Size(833, 500);
this.Name = "CustomizeMii_Preview"; this.Name = "CustomizeMii_Preview";
this.Text = "Preview"; this.Text = "Preview";
this.Load += new System.EventHandler(this.Preview_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Preview_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Preview_FormClosing);
this.Load += new System.EventHandler(this.Preview_Load);
this.Panel.ResumeLayout(false); this.Panel.ResumeLayout(false);
this.Panel.PerformLayout(); this.Panel.PerformLayout();
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
@ -460,5 +629,22 @@ namespace CustomizeMii
private System.Windows.Forms.ToolStripMenuItem cmToI4; private System.Windows.Forms.ToolStripMenuItem cmToI4;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.CheckBox cbCheckerBoard; private System.Windows.Forms.CheckBox cbCheckerBoard;
private System.Windows.Forms.ToolStripMenuItem cmCI8;
private System.Windows.Forms.ToolStripMenuItem cmCI4;
private System.Windows.Forms.ToolStripMenuItem cmCI8RGB5A3;
private System.Windows.Forms.ToolStripMenuItem cmCI8RGB565;
private System.Windows.Forms.ToolStripMenuItem cmCI8IA8;
private System.Windows.Forms.ToolStripMenuItem cmCI4RGB5A3;
private System.Windows.Forms.ToolStripMenuItem cmCI4RGB565;
private System.Windows.Forms.ToolStripMenuItem cmCI4IA8;
private System.Windows.Forms.Label lbTip;
private System.Windows.Forms.ToolStripMenuItem cmToCI8;
private System.Windows.Forms.ToolStripMenuItem cmToCI4;
private System.Windows.Forms.ToolStripMenuItem cmToCI8RGB5A3;
private System.Windows.Forms.ToolStripMenuItem cmToCI8RGB565;
private System.Windows.Forms.ToolStripMenuItem cmToCI8IA8;
private System.Windows.Forms.ToolStripMenuItem cmToCI4RGB5A3;
private System.Windows.Forms.ToolStripMenuItem cmToCI4RGB565;
private System.Windows.Forms.ToolStripMenuItem cmToCI4IA8;
} }
} }

View File

@ -30,6 +30,7 @@ namespace CustomizeMii
private U8 iconBin; private U8 iconBin;
private string startTPL; private string startTPL;
private bool startIcon = false; private bool startIcon = false;
Timer tipTimer = new Timer();
public U8 BannerBin { get { return bannerBin; } set { bannerBin = value; } } public U8 BannerBin { get { return bannerBin; } set { bannerBin = value; } }
public U8 IconBin { get { return iconBin; } set { iconBin = value; } } public U8 IconBin { get { return iconBin; } set { iconBin = value; } }
@ -79,6 +80,9 @@ namespace CustomizeMii
tmpImage.tplImage = tmpTpl.ExtractTexture(); tmpImage.tplImage = tmpTpl.ExtractTexture();
tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height); tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height);
if (tmpImage.tplFormat.StartsWith("CI"))
tmpImage.tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
bannerImages.Add(tmpImage); bannerImages.Add(tmpImage);
} }
} }
@ -95,6 +99,9 @@ namespace CustomizeMii
tmpImage.tplImage = tmpTpl.ExtractTexture(); tmpImage.tplImage = tmpTpl.ExtractTexture();
tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height); tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height);
if (tmpImage.tplFormat.StartsWith("CI"))
tmpImage.tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
iconImages.Add(tmpImage); iconImages.Add(tmpImage);
} }
} }
@ -130,6 +137,16 @@ namespace CustomizeMii
if (cbBanner.SelectedIndex != -1) cbBanner.Select(); if (cbBanner.SelectedIndex != -1) cbBanner.Select();
else if (cbIcon.SelectedIndex != -1) cbIcon.Select(); else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
tipTimer.Interval = 7000;
tipTimer.Tag = 0;
tipTimer.Tick += new EventHandler(tipTimer_Tick);
}
void tipTimer_Tick(object sender, EventArgs e)
{
lbTip.Visible = false;
tipTimer.Stop();
} }
private void cbBanner_SelectedIndexChanged(object sender, EventArgs e) private void cbBanner_SelectedIndexChanged(object sender, EventArgs e)
@ -243,40 +260,66 @@ namespace CustomizeMii
} }
Size tplSize = tmpTpl.GetTextureSize(0); Size tplSize = tmpTpl.GetTextureSize(0);
TPL_Format tplFormat;
if (newImg.Width != tplSize.Width || if (newImg.Width != tplSize.Width ||
newImg.Height != tplSize.Height) newImg.Height != tplSize.Height)
newImg = resizeImage(newImg, tplSize.Width, tplSize.Height); newImg = resizeImage(newImg, tplSize.Width, tplSize.Height);
ToolStripMenuItem cmSender = sender as ToolStripMenuItem; ToolStripMenuItem cmSender = sender as ToolStripMenuItem;
TPL_TextureFormat tplFormat;
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
switch (cmSender.Tag.ToString().ToLower()) switch (cmSender.Tag.ToString().ToLower())
{ {
case "i4": case "i4":
tplFormat = TPL_Format.I4; tplFormat = TPL_TextureFormat.I4;
break; break;
case "i8": case "i8":
tplFormat = TPL_Format.I8; tplFormat = TPL_TextureFormat.I8;
break; break;
case "ia4": case "ia4":
tplFormat = TPL_Format.IA4; tplFormat = TPL_TextureFormat.IA4;
break; break;
case "ia8": case "ia8":
tplFormat = TPL_Format.IA8; tplFormat = TPL_TextureFormat.IA8;
break; break;
case "rgb565": case "rgb565":
tplFormat = TPL_Format.RGB565; tplFormat = TPL_TextureFormat.RGB565;
break; break;
case "rgb5a3": case "rgb5a3":
tplFormat = TPL_Format.RGB5A3; tplFormat = TPL_TextureFormat.RGB5A3;
break;
case "ci8rgb5a3":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.RGB5A3;
break;
case "ci8rgb565":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.RGB565;
break;
case "ci8ia8":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.IA8;
break;
case "ci4rgb5a3":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.RGB5A3;
break;
case "ci4rgb565":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.RGB565;
break;
case "ci4ia8":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.IA8;
break; break;
default: default:
tplFormat = TPL_Format.RGBA8; tplFormat = TPL_TextureFormat.RGBA8;
break; break;
} }
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(newImg, tplFormat); tmpTpl.AddTexture(newImg, tplFormat, pFormat);
if (cbBanner.SelectedIndex != -1) if (cbBanner.SelectedIndex != -1)
{ {
@ -284,6 +327,9 @@ namespace CustomizeMii
images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture(); images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString(); images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
if (images[0][cbBanner.SelectedIndex].tplFormat.StartsWith("CI"))
images[0][cbBanner.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage; pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage;
lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat; lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat;
lbSize.Text = string.Format("{0} x {1}", images[0][cbBanner.SelectedIndex].tplImage.Width, images[0][cbBanner.SelectedIndex].tplImage.Height); lbSize.Text = string.Format("{0} x {1}", images[0][cbBanner.SelectedIndex].tplImage.Width, images[0][cbBanner.SelectedIndex].tplImage.Height);
@ -294,6 +340,9 @@ namespace CustomizeMii
images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture(); images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString(); images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
if (images[1][cbIcon.SelectedIndex].tplFormat.StartsWith("CI"))
images[1][cbIcon.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage; pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage;
lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat; lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat;
lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height); lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height);
@ -301,6 +350,12 @@ namespace CustomizeMii
if (cbBanner.SelectedIndex != -1) cbBanner.Select(); if (cbBanner.SelectedIndex != -1) cbBanner.Select();
else if (cbIcon.SelectedIndex != -1) cbIcon.Select(); else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
if (tplFormat == TPL_TextureFormat.CI4 || tplFormat == TPL_TextureFormat.CI8)
{
lbTip.Visible = true;
tipTimer.Start();
}
} }
catch (Exception ex) catch (Exception ex)
{ MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
@ -327,38 +382,63 @@ namespace CustomizeMii
} }
newImg = tmpTpl.ExtractTexture(); newImg = tmpTpl.ExtractTexture();
TPL_Format tplFormat; TPL_TextureFormat tplFormat;
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
ToolStripMenuItem cmSender = sender as ToolStripMenuItem; ToolStripMenuItem cmSender = sender as ToolStripMenuItem;
switch (cmSender.Tag.ToString().ToLower()) switch (cmSender.Tag.ToString().ToLower())
{ {
case "i4": case "i4":
tplFormat = TPL_Format.I4; tplFormat = TPL_TextureFormat.I4;
break; break;
case "i8": case "i8":
tplFormat = TPL_Format.I8; tplFormat = TPL_TextureFormat.I8;
break; break;
case "ia4": case "ia4":
tplFormat = TPL_Format.IA4; tplFormat = TPL_TextureFormat.IA4;
break; break;
case "ia8": case "ia8":
tplFormat = TPL_Format.IA8; tplFormat = TPL_TextureFormat.IA8;
break; break;
case "rgb565": case "rgb565":
tplFormat = TPL_Format.RGB565; tplFormat = TPL_TextureFormat.RGB565;
break; break;
case "rgb5a3": case "rgb5a3":
tplFormat = TPL_Format.RGB5A3; tplFormat = TPL_TextureFormat.RGB5A3;
break;
case "ci8rgb5a3":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.RGB5A3;
break;
case "ci8rgb565":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.RGB565;
break;
case "ci8ia8":
tplFormat = TPL_TextureFormat.CI8;
pFormat = TPL_PaletteFormat.IA8;
break;
case "ci4rgb5a3":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.RGB5A3;
break;
case "ci4rgb565":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.RGB565;
break;
case "ci4ia8":
tplFormat = TPL_TextureFormat.CI4;
pFormat = TPL_PaletteFormat.IA8;
break; break;
default: default:
tplFormat = TPL_Format.RGBA8; tplFormat = TPL_TextureFormat.RGBA8;
break; break;
} }
if (tmpTpl.GetTextureFormat(0) == tplFormat) return; if (tmpTpl.GetTextureFormat(0) == tplFormat) return;
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(newImg, tplFormat); tmpTpl.AddTexture(newImg, tplFormat, pFormat);
if (cbBanner.SelectedIndex != -1) if (cbBanner.SelectedIndex != -1)
{ {
@ -366,6 +446,8 @@ namespace CustomizeMii
images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture(); images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString(); images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
if (images[0][cbBanner.SelectedIndex].tplFormat.StartsWith("CI"))
images[0][cbBanner.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage; pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage;
lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat; lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat;
@ -377,6 +459,9 @@ namespace CustomizeMii
images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture(); images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString(); images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
if (images[1][cbIcon.SelectedIndex].tplFormat.StartsWith("CI"))
images[1][cbIcon.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage; pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage;
lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat; lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat;
lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height); lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height);
@ -384,6 +469,12 @@ namespace CustomizeMii
if (cbBanner.SelectedIndex != -1) cbBanner.Select(); if (cbBanner.SelectedIndex != -1) cbBanner.Select();
else if (cbIcon.SelectedIndex != -1) cbIcon.Select(); else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
if (tplFormat == TPL_TextureFormat.CI4 || tplFormat == TPL_TextureFormat.CI8)
{
lbTip.Visible = true;
tipTimer.Start();
}
} }
catch (Exception ex) catch (Exception ex)
{ MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }

View File

@ -169,7 +169,7 @@ namespace CustomizeMii
if (!tbSound.Text.ToLower().EndsWith(".bns") && !tbSound.Text.StartsWith("BNS:")) if (!tbSound.Text.ToLower().EndsWith(".bns") && !tbSound.Text.StartsWith("BNS:"))
{ {
Wave w = new Wave(Headers.IMD5.RemoveHeader(newSoundBin)); Wave w = new Wave(Headers.IMD5.RemoveHeader(newSoundBin));
soundLength = w.GetWaveLength(); soundLength = w.PlayLength;
if (soundLength > soundMaxLength) if (soundLength > soundMaxLength)
{ {
errorBox(string.Format("Your wave sound is longer than {0} seconds and thus not supported.\nIt is recommended to use a sound shorter than {1} seconds, the maximum length is {0} seconds!\nThis limit doesn't affect BNS sounds!", soundMaxLength, soundWarningLength)); errorBox(string.Format("Your wave sound is longer than {0} seconds and thus not supported.\nIt is recommended to use a sound shorter than {1} seconds, the maximum length is {0} seconds!\nThis limit doesn't affect BNS sounds!", soundMaxLength, soundWarningLength));
@ -449,7 +449,14 @@ namespace CustomizeMii
try try
{ {
TPL tmpTpl = TPL.Load(bannerBin.Data[i]); TPL tmpTpl = TPL.Load(bannerBin.Data[i]);
bannerTpls.Add(string.Format("{0} ({3}, {1} x {2}, {4})", bannerBin.StringTable[i], tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height, tmpTpl.GetTextureFormat(0).ToString(), getSizeString(bannerBin.Data[i].Length)));
string formatString = tmpTpl.GetTextureFormat(0).ToString();
if (formatString.StartsWith("CI")) formatString += "+" + tmpTpl.GetPaletteFormat(0);
bannerTpls.Add(string.Format("{0} ({3}, {1} x {2}, {4})",
bannerBin.StringTable[i], tmpTpl.GetTextureSize(0).Width,
tmpTpl.GetTextureSize(0).Height, formatString,
getSizeString(bannerBin.Data[i].Length)));
} }
catch { } catch { }
} }
@ -462,7 +469,14 @@ namespace CustomizeMii
try try
{ {
TPL tmpTpl = TPL.Load(newBannerBin.Data[i]); TPL tmpTpl = TPL.Load(newBannerBin.Data[i]);
bannerTpls.Add(string.Format("{0} ({3}, {1} x {2}, {4})", newBannerBin.StringTable[i], tmpTpl.GetTextureSize(0).Width, tmpTpl.GetTextureSize(0).Height, tmpTpl.GetTextureFormat(0).ToString(), getSizeString(newBannerBin.Data[i].Length)));
string formatString = tmpTpl.GetTextureFormat(0).ToString();
if (formatString.StartsWith("CI")) formatString += "+" + tmpTpl.GetPaletteFormat(0);
bannerTpls.Add(string.Format("{0} ({3}, {1} x {2}, {4})",
newBannerBin.StringTable[i], tmpTpl.GetTextureSize(0).Width,
tmpTpl.GetTextureSize(0).Height, formatString,
getSizeString(newBannerBin.Data[i].Length)));
} }
catch { } catch { }
} }
@ -690,7 +704,7 @@ namespace CustomizeMii
Image tImg = new Bitmap(tSize.Width, tSize.Height); Image tImg = new Bitmap(tSize.Width, tSize.Height);
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(tImg, TPL_Format.IA4); tmpTpl.AddTexture(tImg, TPL_TextureFormat.IA4);
bannerBin.Data[i] = tmpTpl.ToByteArray(); bannerBin.Data[i] = tmpTpl.ToByteArray();
} }
@ -707,7 +721,7 @@ namespace CustomizeMii
Image tImg = new Bitmap(tSize.Width, tSize.Height); Image tImg = new Bitmap(tSize.Width, tSize.Height);
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(tImg, TPL_Format.IA4); tmpTpl.AddTexture(tImg, TPL_TextureFormat.IA4);
newBannerBin.Data[i] = tmpTpl.ToByteArray(); newBannerBin.Data[i] = tmpTpl.ToByteArray();
} }
@ -734,7 +748,7 @@ namespace CustomizeMii
Image tImg = new Bitmap(tSize.Width, tSize.Height); Image tImg = new Bitmap(tSize.Width, tSize.Height);
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(tImg, TPL_Format.IA4); tmpTpl.AddTexture(tImg, TPL_TextureFormat.IA4);
iconBin.Data[i] = tmpTpl.ToByteArray(); iconBin.Data[i] = tmpTpl.ToByteArray();
} }
@ -751,7 +765,7 @@ namespace CustomizeMii
Image tImg = new Bitmap(tSize.Width, tSize.Height); Image tImg = new Bitmap(tSize.Width, tSize.Height);
tmpTpl.RemoveTexture(0); tmpTpl.RemoveTexture(0);
tmpTpl.AddTexture(tImg, TPL_Format.IA4); tmpTpl.AddTexture(tImg, TPL_TextureFormat.IA4);
newIconBin.Data[i] = tmpTpl.ToByteArray(); newIconBin.Data[i] = tmpTpl.ToByteArray();
} }
@ -771,7 +785,7 @@ namespace CustomizeMii
try try
{ {
int switchVal = lbx == lbxBannerTpls ? cmbFormatBanner.SelectedIndex : cmbFormatIcon.SelectedIndex; int switchVal = lbx == lbxBannerTpls ? cmbFormatBanner.SelectedIndex : cmbFormatIcon.SelectedIndex;
if (switchVal > 6) if (switchVal > 9)
throw new Exception("This format is not supported, you must choose a different one!"); throw new Exception("This format is not supported, you must choose a different one!");
if (string.IsNullOrEmpty(inputFile)) if (string.IsNullOrEmpty(inputFile))
@ -880,28 +894,54 @@ namespace CustomizeMii
int tplFormat = 6; int tplFormat = 6;
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
switch (switchVal) switch (switchVal)
{ {
case 6: //I4 case 6:
tplFormat = 0; tplFormat = (int)TPL_TextureFormat.I4;
break; break;
case 5: //I8 case 5:
tplFormat = 1; tplFormat = (int)TPL_TextureFormat.I8;
break; break;
case 4: //IA4 case 4:
tplFormat = 2; tplFormat = (int)TPL_TextureFormat.IA4;
break; break;
case 3: //IA8 case 3:
tplFormat = 3; tplFormat = (int)TPL_TextureFormat.IA8;
break; break;
case 0: case 0:
tplFormat = 6; tplFormat = (int)TPL_TextureFormat.RGBA8;
break; break;
case 1: case 1:
tplFormat = 4; tplFormat = (int)TPL_TextureFormat.RGB565;
break; break;
case 2: case 2:
tplFormat = 5; tplFormat = (int)TPL_TextureFormat.RGB5A3;
break;
case 7:
tplFormat = (int)TPL_TextureFormat.CI4;
CustomizeMii_PaletteFormatBox pfb = new CustomizeMii_PaletteFormatBox();
pfb.ShowDialog();
pFormat = pfb.PaletteFormat;
break;
case 8:
tplFormat = (int)TPL_TextureFormat.CI8;
CustomizeMii_PaletteFormatBox pfb2 = new CustomizeMii_PaletteFormatBox();
pfb2.ShowDialog();
pFormat = pfb2.PaletteFormat;
break;
case 9:
tplFormat = (int)TPL_TextureFormat.CI14X2;
CustomizeMii_PaletteFormatBox pfb3 = new CustomizeMii_PaletteFormatBox();
pfb3.ShowDialog();
pFormat = pfb3.PaletteFormat;
break; break;
default: default:
if (!inputFile.ToLower().EndsWith(".tpl")) if (!inputFile.ToLower().EndsWith(".tpl"))
@ -913,7 +953,7 @@ namespace CustomizeMii
if (inputFile.ToLower().EndsWith(".tpl")) if (inputFile.ToLower().EndsWith(".tpl"))
newTpl = File.ReadAllBytes(inputFile); newTpl = File.ReadAllBytes(inputFile);
else else
newTpl = TPL.FromImage(inputFile, (TPL_Format)tplFormat).ToByteArray(); newTpl = TPL.FromImage(inputFile, (TPL_TextureFormat)tplFormat, pFormat).ToByteArray();
if (lbx == lbxBannerTpls) if (lbx == lbxBannerTpls)
{ {
@ -1187,7 +1227,7 @@ namespace CustomizeMii
TPL tmpTpl = TPL.Load(bannerBin.Data[bannerBin.GetNodeIndex(thisTpl)]); TPL tmpTpl = TPL.Load(bannerBin.Data[bannerBin.GetNodeIndex(thisTpl)]);
Image img = Image.FromFile(image); Image img = Image.FromFile(image);
TPL_Format tplFormat = tmpTpl.GetTextureFormat(0); TPL_TextureFormat tplFormat = tmpTpl.GetTextureFormat(0);
Size tplSize = tmpTpl.GetTextureSize(0); Size tplSize = tmpTpl.GetTextureSize(0);
if (tplSize.Width != img.Width || if (tplSize.Width != img.Width ||
@ -1205,7 +1245,7 @@ namespace CustomizeMii
TPL tmpTpl = TPL.Load(newBannerBin.Data[newBannerBin.GetNodeIndex(thisTpl)]); TPL tmpTpl = TPL.Load(newBannerBin.Data[newBannerBin.GetNodeIndex(thisTpl)]);
Image img = Image.FromFile(image); Image img = Image.FromFile(image);
TPL_Format tplFormat = tmpTpl.GetTextureFormat(0); TPL_TextureFormat tplFormat = tmpTpl.GetTextureFormat(0);
Size tplSize = tmpTpl.GetTextureSize(0); Size tplSize = tmpTpl.GetTextureSize(0);
if (tplSize.Width != img.Width || if (tplSize.Width != img.Width ||
@ -1226,7 +1266,7 @@ namespace CustomizeMii
TPL tmpTpl = TPL.Load(iconBin.Data[iconBin.GetNodeIndex(thisTpl)]); TPL tmpTpl = TPL.Load(iconBin.Data[iconBin.GetNodeIndex(thisTpl)]);
Image img = Image.FromFile(image); Image img = Image.FromFile(image);
TPL_Format tplFormat = tmpTpl.GetTextureFormat(0); TPL_TextureFormat tplFormat = tmpTpl.GetTextureFormat(0);
Size tplSize = tmpTpl.GetTextureSize(0); Size tplSize = tmpTpl.GetTextureSize(0);
if (tplSize.Width != img.Width || if (tplSize.Width != img.Width ||
@ -1244,7 +1284,7 @@ namespace CustomizeMii
TPL tmpTpl = TPL.Load(newIconBin.Data[newIconBin.GetNodeIndex(thisTpl)]); TPL tmpTpl = TPL.Load(newIconBin.Data[newIconBin.GetNodeIndex(thisTpl)]);
Image img = Image.FromFile(image); Image img = Image.FromFile(image);
TPL_Format tplFormat = tmpTpl.GetTextureFormat(0); TPL_TextureFormat tplFormat = tmpTpl.GetTextureFormat(0);
Size tplSize = tmpTpl.GetTextureSize(0); Size tplSize = tmpTpl.GetTextureSize(0);
if (tplSize.Width != img.Width || if (tplSize.Width != img.Width ||

View File

@ -50,6 +50,6 @@ using System.Resources;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.0.0.0")] [assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")] [assembly: AssemblyFileVersion("3.1.0.0")]
[assembly: NeutralResourcesLanguageAttribute("en")] [assembly: NeutralResourcesLanguageAttribute("en")]

View File

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // This code was generated by a tool.
// Laufzeitversion:2.0.50727.4927 // Runtime Version:4.0.30128.1
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Changes to this file may cause incorrect behavior and will be lost if
// der Code erneut generiert wird. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -13,13 +13,13 @@ namespace CustomizeMii.Properties {
/// <summary> /// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert // This class was auto-generated by the StronglyTypedResourceBuilder
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. // class via a tool like ResGen or Visual Studio.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
@ -33,7 +33,7 @@ namespace CustomizeMii.Properties {
} }
/// <summary> /// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
@ -47,8 +47,8 @@ namespace CustomizeMii.Properties {
} }
/// <summary> /// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle /// Overrides the current thread's CurrentUICulture property for all
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture {
@ -89,14 +89,14 @@ namespace CustomizeMii.Properties {
} }
/// <summary> /// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} /// Looks up a localized string similar to {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
///{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;} ///{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}
///{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sl276\slmult1\b\f0\fs17 These are some basic instructions for CustomizeMii.\b0\par ///{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sl276\slmult1\b\f0\fs17 These are some basic instructions for CustomizeMii.\b0\par
///\par ///\par
///\cf1 At the very beginning, let me say this again: Don&apos;t install any WADs without a proper brick protection!\cf0\par ///\cf1 At the very beginning, let me say this again: Don&apos;t install any WADs without a proper brick protection!\cf0\par
///\par ///\par
///Ok, so you want to create your own custom channels?\par ///Ok, so you want to create your own custom channels?\par
///First it is important to understand how [Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt. ///First it is important to understand how [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string Instructions { internal static string Instructions {
get { get {

View File

@ -117,7 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnCreate" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="btnCreate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\btnCreate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\btnCreate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>

View File

@ -1,27 +1,10 @@
/* This file is part of CustomizeMii //------------------------------------------------------------------------------
* Copyright (C) 2009 Leathl
*
* CustomizeMii 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.
*
* CustomizeMii 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/>.
*/
//------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // This code was generated by a tool.
// Laufzeitversion:2.0.50727.4927 // Runtime Version:4.0.30128.1
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Changes to this file may cause incorrect behavior and will be lost if
// der Code erneut generiert wird. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -29,7 +12,7 @@ namespace CustomizeMii.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View File

@ -9,6 +9,15 @@ Thanks to icefire / Xuzz for the basic idea of this application!
----------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------
Changelog: Changelog:
Version 3.1
- Updated libWiiSharp to 0.2
=> - Speed up in TPL conversion
=> - Fixed IA8 TPL code (from/to)
=> - Fixed CI14X2 TPL code (from)
=> - Added conversion to CI4 / CI8
=> - Added BNS to Wave conversion (Extract -> Sound -> As Audiofile)
- Added option to make the sound silent
Version 3.0 Version 3.0
- Switched backend to libWiiSharp (http://libwiisharp.googlecode.com) - Switched backend to libWiiSharp (http://libwiisharp.googlecode.com)
- Speed improvements through using RAM instead of temp files on HDD - Speed improvements through using RAM instead of temp files on HDD

BIN
CustomizeMii/lControls.dll Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,6 +12,10 @@
<AssemblyName>CustomizeMiiInstaller</AssemblyName> <AssemblyName>CustomizeMiiInstaller</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -21,6 +25,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -29,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,8 +12,10 @@
<AssemblyName>ForwardMii</AssemblyName> <AssemblyName>ForwardMii</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkSubset> <FileUpgradeFlags>
</TargetFrameworkSubset> </FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -23,6 +25,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
@ -31,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -39,6 +43,7 @@
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\x86\Release\</OutputPath> <OutputPath>bin\x86\Release\</OutputPath>
@ -47,6 +52,7 @@
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />