Skip to content

Commit

Permalink
v2.2 snowball
Browse files Browse the repository at this point in the history
  • Loading branch information
bbepis committed May 17, 2016
1 parent 76fa227 commit 28d0b14
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 2,612 deletions.
12 changes: 10 additions & 2 deletions AA2Data/AA2Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ public static byte[] ResizeByteArray(byte[] array, int length)
Array.Copy(array, b, length);
return b;
}

public static string TrimBytes(this string input, int maxLength)
{
return new string(input
.TakeWhile((c, i) =>
ShiftJIS.GetByteCount(input.Substring(0, i + 1)) <= maxLength)
.ToArray());
}
}

public class BaseData
Expand Down Expand Up @@ -190,11 +198,11 @@ public string PROFILE_BIO
{
get
{
return (string)readValue(0x21D, AA2DataType.StringEx, 512);
return ((string)readValue(0x21D, AA2DataType.StringEx, 512)).TrimEnd(new char[] { '\0' });
}
set
{
writeValue(value, 0x21D, AA2DataType.StringEx);
writeValue(value.TrimBytes(512), 0x21D, AA2DataType.StringEx);
}
}

Expand Down
3 changes: 0 additions & 3 deletions AA2Data/CardReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class AA2Reader : IDisposable
{
private BinaryReader br;

public static implicit operator AA2Reader (byte[] x) => new AA2Reader(x);
public static implicit operator AA2Reader (Stream x) => new AA2Reader(x);

public AA2Reader(Stream stream)
{
br = new BinaryReader(stream);
Expand Down
32 changes: 31 additions & 1 deletion AA2Snowflake/AA2Snowflake.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -57,6 +72,10 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Magick.NET-Q16-AnyCPU, Version=7.0.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec, processorArchitecture=MSIL">
<HintPath>..\packages\Magick.NET-Q16-AnyCPU.7.0.1.101\lib\net40-client\Magick.NET-Q16-AnyCPU.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
Expand Down Expand Up @@ -115,7 +134,6 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ResPatcher.cs" />
<Compile Include="TGAFormat.cs" />
<Compile Include="Tools.cs" />
<EmbeddedResource Include="formAbout.resx">
<DependentUpon>formAbout.cs</DependentUpon>
Expand Down Expand Up @@ -329,6 +347,18 @@
<Name>SB3UtilityPP</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
6 changes: 5 additions & 1 deletion AA2Snowflake/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
v2.1
v2.2
+ Changed TGA handler to something more stable
+ Increased the limits of pose numbers again

v2.1
+ Fixed setting pose for male personalities
+ Added personality label blanking
+ Fixed LST editing with custom/append personalities
Expand Down
4 changes: 2 additions & 2 deletions AA2Snowflake/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
Loading

0 comments on commit 28d0b14

Please sign in to comment.