Skip to content

Commit

Permalink
Updated Info Text
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed Jun 4, 2018
1 parent 04b7375 commit a8075a9
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 28 deletions.
2 changes: 1 addition & 1 deletion GPK_RePack/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<value>False</value>
</setting>
<setting name="GenerateMipMaps" serializeAs="String">
<value>True</value>
<value>False</value>
</setting>
<setting name="ScaleFactorHack" serializeAs="String">
<value>1</value>
Expand Down
31 changes: 21 additions & 10 deletions GPK_RePack/Forms/GUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions GPK_RePack/Forms/GUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,18 @@ private void replaceSaveToolStripMenuItem_Click(object sender, EventArgs e)
}
}

private void savepaddingStripMenuItem1_Click(object sender, EventArgs e)
{
saveToolStripMenuItem_Click(sender, e);
}


private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
DateTime start = DateTime.Now;
List<IProgress> runningSavers = new List<IProgress>();
List<Task> runningTasks = new List<Task>();
bool usePadding = sender == savepaddingStripMenuItem1;

if (loadedGpkPackages.Count == 0)
return;
Expand All @@ -311,7 +317,7 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e)
Task newTask = new Task(delegate ()
{
string savepath = package.Path + "_rebuild";
tmpS.SaveGpkPackage(package, savepath);
tmpS.SaveGpkPackage(package, savepath, usePadding);
});
newTask.Start();
runningTasks.Add(newTask);
Expand Down Expand Up @@ -1747,9 +1753,11 @@ private void selectContextAction(object sender, ToolStripItemClickedEventArgs e)



#endregion


#endregion


}
}

Expand Down
20 changes: 11 additions & 9 deletions GPK_RePack/Forms/GUI.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,29 @@
<value>17, 17</value>
</metadata>
<data name="boxInfo.Text" xml:space="preserve">
<value>Source Code: https://github.com/GoneUp/GPK_RePack/


Quick Guide:
<value>Quick Guide:
1. Open a *.gpk file via Main -&gt; Open
2. Select a Object you want to edit on the treeview
3 - Editing
3a) Use the buttons Export/Replace raw data for editing any object data
3b) Use the buttons Export/Import/Empty ogg for editing audio (Soundnodewave) files
3b) Use the buttons Import/Export/Empty ogg for editing audio (SoundNodeWave) files
3c) Use the buttons Import/Export DDS for editing images (Texture2D)
3c) Use the buttons Copy/Paste (or Control-C, Control-V) on any object. You can choose in the settings what the parts of the object the program should copy,
4 - Saving
4a) The normal way to save is Main -&gt; Save. The program will rebuild a new Gpk file from scratch.
4a) The normal way to save is Main -&gt; Save. The program will rebuild the GPK file from scratch.
4b) If the normal way is failing switch select Patch Mode in settings and try to import the data again (only over raw import/export). Save afterwards via Main -&gt; Save patched.


Note: Tera accepts only files with the exact same file size as the orginal file. Terahelper will fill the file up if its too small and warn you if it is too big. In this case you need to reduce the file size to fit the maximum.
About Padding:
Tera accepts only files with the exact same file size as the orginal file in some cases, for example at soundfiles. I'm not entire sure what's the reason for this, calls for some reverse engineering xD
The save menu offers you the option to save as-is and a option with added padding. Terahelper will fill the file up if it's too small and warn you if it is too big.
If you want to change the maximum size manually select a the package and use the Misc -&gt; Set Filesize function.


Have Fun &amp; Always Backup
-- GoneUp</value>
hfgl
-- GoneUp ([email protected])

Source Code is available on Github: https://github.com/GoneUp/GPK_RePack/ </value>
</data>
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
Expand Down
16 changes: 12 additions & 4 deletions GPK_RePack/IO/Writer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void SaveReplacedExport(GpkPackage package, string savepath, List<GpkExpo
File.WriteAllBytes(savepath, buffer);
}

public void SaveGpkPackage(GpkPackage package, string savepath)
public void SaveGpkPackage(GpkPackage package, string savepath, bool addPadding)
{
//Header
//Namelist
Expand All @@ -73,8 +73,16 @@ public void SaveGpkPackage(GpkPackage package, string savepath)
WriteImports(writer, package);
WriteExports(writer, package);
WriteExportsData(writer, package);
//WriteFilePadding(writer, package, compuSize);
WriteFileEnding(writer, package, compuSize);
if (addPadding)
{
WriteFilePadding(writer, package, compuSize);
}
else
{
WriteFileEnding(writer, package, compuSize);
}


}

watch.Stop();
Expand Down Expand Up @@ -359,7 +367,7 @@ private void WriteFileEnding(BinaryWriter writer, GpkPackage package, int compuS
logger.Debug("Compu Size: {0}, Diff: {1} -", compuSize, final_size - compuSize);




}

Expand Down
2 changes: 1 addition & 1 deletion GPK_RePack/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion GPK_RePack/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="GenerateMipMaps" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ScaleFactorHack" Type="System.Single" Scope="User">
<Value Profile="(Default)">1</Value>
Expand Down

0 comments on commit a8075a9

Please sign in to comment.