Skip to content

Commit a8075a9

Browse files
author
Henry
committed
Updated Info Text
1 parent 04b7375 commit a8075a9

File tree

7 files changed

+57
-28
lines changed

7 files changed

+57
-28
lines changed

GPK_RePack/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<value>False</value>
5151
</setting>
5252
<setting name="GenerateMipMaps" serializeAs="String">
53-
<value>True</value>
53+
<value>False</value>
5454
</setting>
5555
<setting name="ScaleFactorHack" serializeAs="String">
5656
<value>1</value>

GPK_RePack/Forms/GUI.Designer.cs

Lines changed: 21 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GPK_RePack/Forms/GUI.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,18 @@ private void replaceSaveToolStripMenuItem_Click(object sender, EventArgs e)
293293
}
294294
}
295295

296+
private void savepaddingStripMenuItem1_Click(object sender, EventArgs e)
297+
{
298+
saveToolStripMenuItem_Click(sender, e);
299+
}
300+
296301

297302
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
298303
{
299304
DateTime start = DateTime.Now;
300305
List<IProgress> runningSavers = new List<IProgress>();
301306
List<Task> runningTasks = new List<Task>();
307+
bool usePadding = sender == savepaddingStripMenuItem1;
302308

303309
if (loadedGpkPackages.Count == 0)
304310
return;
@@ -311,7 +317,7 @@ private void saveToolStripMenuItem_Click(object sender, EventArgs e)
311317
Task newTask = new Task(delegate ()
312318
{
313319
string savepath = package.Path + "_rebuild";
314-
tmpS.SaveGpkPackage(package, savepath);
320+
tmpS.SaveGpkPackage(package, savepath, usePadding);
315321
});
316322
newTask.Start();
317323
runningTasks.Add(newTask);
@@ -1747,9 +1753,11 @@ private void selectContextAction(object sender, ToolStripItemClickedEventArgs e)
17471753

17481754

17491755

1750-
#endregion
17511756

17521757

1758+
#endregion
1759+
1760+
17531761
}
17541762
}
17551763

GPK_RePack/Forms/GUI.resx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,27 +124,29 @@
124124
<value>17, 17</value>
125125
</metadata>
126126
<data name="boxInfo.Text" xml:space="preserve">
127-
<value>Source Code: https://github.com/GoneUp/GPK_RePack/
128-
129-
130-
Quick Guide:
127+
<value>Quick Guide:
131128
1. Open a *.gpk file via Main -&gt; Open
132129
2. Select a Object you want to edit on the treeview
133130
3 - Editing
134131
3a) Use the buttons Export/Replace raw data for editing any object data
135-
3b) Use the buttons Export/Import/Empty ogg for editing audio (Soundnodewave) files
132+
3b) Use the buttons Import/Export/Empty ogg for editing audio (SoundNodeWave) files
133+
3c) Use the buttons Import/Export DDS for editing images (Texture2D)
136134
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,
137135
4 - Saving
138-
4a) The normal way to save is Main -&gt; Save. The program will rebuild a new Gpk file from scratch.
136+
4a) The normal way to save is Main -&gt; Save. The program will rebuild the GPK file from scratch.
139137
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.
140138

141139

142-
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.
140+
About Padding:
141+
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
142+
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.
143143
If you want to change the maximum size manually select a the package and use the Misc -&gt; Set Filesize function.
144144

145145

146-
Have Fun &amp; Always Backup
147-
-- GoneUp</value>
146+
hfgl
147+
-- GoneUp (hstrobel.dev@gmail.com)
148+
149+
Source Code is available on Github: https://github.com/GoneUp/GPK_RePack/ </value>
148150
</data>
149151
<metadata name="name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
150152
<value>True</value>

GPK_RePack/IO/Writer.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void SaveReplacedExport(GpkPackage package, string savepath, List<GpkExpo
4646
File.WriteAllBytes(savepath, buffer);
4747
}
4848

49-
public void SaveGpkPackage(GpkPackage package, string savepath)
49+
public void SaveGpkPackage(GpkPackage package, string savepath, bool addPadding)
5050
{
5151
//Header
5252
//Namelist
@@ -73,8 +73,16 @@ public void SaveGpkPackage(GpkPackage package, string savepath)
7373
WriteImports(writer, package);
7474
WriteExports(writer, package);
7575
WriteExportsData(writer, package);
76-
//WriteFilePadding(writer, package, compuSize);
77-
WriteFileEnding(writer, package, compuSize);
76+
if (addPadding)
77+
{
78+
WriteFilePadding(writer, package, compuSize);
79+
}
80+
else
81+
{
82+
WriteFileEnding(writer, package, compuSize);
83+
}
84+
85+
7886
}
7987

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

361369

362-
370+
363371

364372
}
365373

GPK_RePack/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GPK_RePack/Properties/Settings.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<Value Profile="(Default)">False</Value>
3434
</Setting>
3535
<Setting Name="GenerateMipMaps" Type="System.Boolean" Scope="User">
36-
<Value Profile="(Default)">True</Value>
36+
<Value Profile="(Default)">False</Value>
3737
</Setting>
3838
<Setting Name="ScaleFactorHack" Type="System.Single" Scope="User">
3939
<Value Profile="(Default)">1</Value>

0 commit comments

Comments
 (0)