Added support for dumped dream town

This commit is contained in:
Mega-Mew 2017-09-16 11:53:07 +02:00
parent 37c0ad8c84
commit 0d5671a397
2 changed files with 14 additions and 13 deletions

View File

@ -66,9 +66,9 @@ private void InitializeComponent()
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(34, 13);
this.label1.Size = new System.Drawing.Size(112, 13);
this.label1.TabIndex = 4;
this.label1.Text = "Input:";
this.label1.Text = "garden_plus.dat input:";
//
// DreamPatcher
//

View File

@ -50,19 +50,20 @@ public void checkGarden()
{
Reader read = new Reader(filepath, Endian.Big);
long length = new FileInfo(filepath).Length;
if (length != 0x89B00)
read.Close();
if (length == 0x89A80)
{
MessageBox.Show("Not a valid ACNL savegame !");
return;
byte[] array = new Byte[0x80];
Array.Clear(array, 0, array.Length);
using (BinaryWriter file = new BinaryWriter(File.Open(filepath, FileMode.Open)))
{
file.Seek(0, SeekOrigin.End);
file.Write(array);
file.Close();
}
}
else if (length == 0x89A80)
{
MessageBox.Show("Not a valid ACNL savegame dump !\nPlease use the beta 3 (or higher) of the NTR Plugin !");
return;
}
read.Seek(0x80);
int check = read.ReadInt32();
if (check != 859492422)
else if (length != 0x89B00)
{
MessageBox.Show("Not a valid ACNL savegame !");
return;