Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
cleanup UI, license, add icon, release v1.0.0
Browse files Browse the repository at this point in the history
README and preview image
  • Loading branch information
dreamsyntax committed May 21, 2021
1 parent 0861179 commit 4aaff48
Show file tree
Hide file tree
Showing 7 changed files with 755 additions and 27 deletions.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# ShadowMotionSwapper
<div align="center"><h1>Shadow The Hedgehog Motion Swapper</h1>
<img src="https://raw.githubusercontent.com/ShadowTheHedgehogHacking/ShadowMotionSwapper/main/res/preview.png" align="center" />
</div>





Simple program to accelerate making "Custom BON" type Character Mods from swapping

## Dependencies:
* Requires .NET 5 (or higher).

## Features:
* Ability to keep original properties of a MTN or replace props with the replacement MTN. This can be toggled per MTN.
* No files are modified until Export is pressed- This acts as "Save As".

## Credits:
* dreamsyntax for main program, fixing ShadowMTPSharp to produce 1:1 game readable MTPs
* Sewer56 for initial work on ShadowMTPSharp & ShadowMTP
76 changes: 51 additions & 25 deletions ShadowMotionSwapper/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,58 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ShadowMotionSwapper"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="500">
Title="Shadow Motion Swapper v1.0.0" Height="400" Width="433" ResizeMode="CanMinimize">
<Grid>
<Button x:Name="buttonOpenTarget" Content="Open Target" HorizontalAlignment="Left" Margin="51,358,0,0" VerticalAlignment="Top" Height="28" Width="103" Click="buttonOpenTarget_Click"/>
<Button x:Name="buttonOpenDonor" Content="Open Donor" HorizontalAlignment="Left" Margin="333,358,0,0" VerticalAlignment="Top" Height="29" Width="109" Click="buttonOpenDonor_Click"/>
<Button x:Name="buttonMap" Content="Map" HorizontalAlignment="Left" Margin="217,152,0,0" VerticalAlignment="Top" Height="27" Width="66" Click="buttonMap_Click" Grid.ColumnSpan="2"/>
<Button x:Name="buttonExport" Content="Export" HorizontalAlignment="Left" Margin="217,330,0,0" VerticalAlignment="Top" Height="40" Width="66" Click="buttonExport_Click" Grid.ColumnSpan="2"/>
<ListBox x:Name="listBoxTarget" Margin="14,13,305,88">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
</ListBox>
<ListBox x:Name="listBoxDonor" Margin="292,14,17,87">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
</ListBox>
<CheckBox x:Name="checkboxCopyProps" Content="CopyProps" HorizontalAlignment="Left" Margin="200,184,0,0" VerticalAlignment="Top" Height="26" Width="87" Grid.ColumnSpan="2"/>
<Grid.Resources >
<Style TargetType="Border" >
<Setter Property="Padding" Value="5,5,5,5" />
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="320" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="43.968" />
<ColumnDefinition Width="126.032"/>
</Grid.ColumnDefinitions>

<Border Grid.Row="0" Grid.Column="0">
<ListBox x:Name="listBoxTarget" Height="300" Width="160">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
</ListBox>
</Border>
<Button x:Name="buttonOpenTarget" Grid.Row="1" Grid.Column="0" Content="Open Target" Height="30" Width="100" Click="buttonOpenTarget_Click" Margin="35,0,35,0"/>

<StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center">
<Button x:Name="buttonMap" Content="Map" Height="30" Width="66" Click="buttonMap_Click" />
<CheckBox x:Name="checkboxCopyProps" Content="CopyProps" Margin="0,10,0,0" />
<CheckBox x:Name="checkboxInfoPopup" Content="InfoPopup" Margin="0,10,0,0" />

</StackPanel>
<Button x:Name="buttonExport" Grid.Row="1" Grid.Column="1" Content="Export" Height="30" Width="66" Click="buttonExport_Click" Margin="6,0,5,0" />

<Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Margin="77,0,0,0">
<ListBox x:Name="listBoxDonor" Height="300" Width="160">
<ListBox.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<TranslateTransform/>
</TransformGroup>
</ListBox.RenderTransform>
</ListBox>
</Border>
<Button x:Name="buttonOpenDonor" Grid.Row="1" Grid.Column="2" Content="Open Donor" Height="30" Width="100" Click="buttonOpenDonor_Click" Grid.ColumnSpan="2" Margin="35,0,35,0"/>
</Grid>
</Window>
8 changes: 7 additions & 1 deletion ShadowMotionSwapper/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ private void buttonMap_Click(object sender, RoutedEventArgs e) {
// TODO: Add additional conditionals to allow:
// - Copy name from donor (generally bad idea)


if (checkboxCopyProps.IsChecked == true) {
if (checkboxInfoPopup.IsChecked == true) {
MessageBox.Show("REPLACED " + targetEntry.FileName + "\nWITH " + donorEntry.FileName + "\nAND used props from " + donorEntry.FileName);
}
targetPackage.Entries[listBoxTarget.SelectedIndex] = new ManagedAnimationEntry(targetEntry.FileName, donorEntry.FileData, donorEntry.Tuples);
} else {
if (checkboxInfoPopup.IsChecked == true) {
MessageBox.Show("REPLACED " + targetEntry.FileName + "\nWITH " + donorEntry.FileName + "\nAND kept props from " + targetEntry.FileName);
}
targetPackage.Entries[listBoxTarget.SelectedIndex] = new ManagedAnimationEntry(targetEntry.FileName, donorEntry.FileData, targetEntry.Tuples);
}


displayTargetPackage.Refresh();
}

Expand Down
4 changes: 4 additions & 0 deletions ShadowMotionSwapper/ShadowMotionSwapper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>icon.ico</ApplicationIcon>
<Authors>dreamsyntax</Authors>
<Company>ShadowTheHedgehogHacking</Company>
<Copyright>2021</Copyright>
</PropertyGroup>

<ItemGroup>
Expand Down
Binary file added ShadowMotionSwapper/icon.ico
Binary file not shown.
Binary file added res/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4aaff48

Please sign in to comment.