Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VBLauncher/IntViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace VBLauncher;

public class IntViewer : DarkForm
{
// Loads and draws image fragments from files based on object data. It iterates through objects, filters fragments by dimensions, and renders textures using GDI+.
// Loads and draws image fragments from files based on object data. It iterates through objects, filters fragments by dimensions, and renders textures using GDI+.
public void LoadData(INT intFile)
{
var g = CreateGraphics();
Expand Down
16 changes: 8 additions & 8 deletions VBLauncher/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class ModLoader
{
private List<ModInfo> modList = [];
private string[] bArray;

public ModLoader()
{
InitializeComponent();
Expand Down Expand Up @@ -230,7 +230,7 @@ private void ListView1_DrawSubItem(object sender, DrawListViewSubItemEventArgs e
g.DrawLine(p, e.Bounds.Left + 5, e.Bounds.Top + 9, e.Bounds.Left + 7, e.Bounds.Top + 12);
g.DrawLine(p, e.Bounds.Left + 7, e.Bounds.Top + 12, e.Bounds.Left + 11, e.Bounds.Top + 6);
}

g.DrawString(e.Item.Name, e.Item.Font, txtbrsh, e.Bounds.Left + size + 4, e.Bounds.Top + 1);

using (var b = new SolidBrush(textColor))
Expand Down Expand Up @@ -502,7 +502,7 @@ private void IncSTFRefs(string fp, int incVal)
gwam.NameSR += incVal;
}
}

if ((dynamic)file is Map map)
{
foreach (var note in map.EMNO.Where(note => note.sr > 3281))
Expand All @@ -520,13 +520,13 @@ private void ToolStripLabel2_Click(object sender, EventArgs e)
File.Copy(Settings.Default.STFDir + ".bak", Settings.Default.STFDir, true);
else
File.Copy(Settings.Default.STFDir, Settings.Default.STFDir + ".bak");

var tmpDir = @"Mods\tmp";
if (Directory.Exists(tmpDir))
Directory.Delete(tmpDir, true);
if (Directory.Exists("Override\\Deployed"))
Directory.Delete("Override\\Deployed", true);

bArray = Extensions.STFToTXT(File.ReadAllBytes(Settings.Default.STFDir)).ToArray();
var originalStf = bArray;
foreach (int i in ListView1.CheckedIndices)
Expand All @@ -549,11 +549,11 @@ private void ToolStripLabel2_Click(object sender, EventArgs e)
modStf.Open().CopyTo(memoryStream);
var stfData = memoryStream.ToArray();
var stfArray = Extensions.STFToTXT(stfData).ToArray();

// merge the mod's english.stf with the original english.stf (or previously merged english.stf)
var tmp = MergeSTF(originalStf, stfArray);
originalStf = tmp.Item1;

// increase string references in all files by the number of new strings added by the current mod.
foreach (var entry in zip.Entries)
{
Expand All @@ -563,6 +563,6 @@ private void ToolStripLabel2_Click(object sender, EventArgs e)
}
}
if (Directory.Exists(tmpDir))
Directory.Move(tmpDir, "Override\\Deployed");
Directory.Move(tmpDir, "Override\\Deployed");
}
}
Loading