Skip to content

Commit 6739cc7

Browse files
SplitEvent: Added "VsyncWaitCount" to Event Extra split operations. Lighting information has been recategorized to separate the four arrays instead of combining them into one list. As a result, old event projects that use the Event Extra files will need to be updated to fit the new changes.
BuildEvent: Added the ability to save Event Extra files in DC Beta format. Files that are built in this way will only work with SA2: The Trial.
1 parent c3b4a68 commit 6739cc7

File tree

2 files changed

+253
-43
lines changed

2 files changed

+253
-43
lines changed

CommandLine/BuildEvent/Program.cs

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ private static void Main(string[] args)
115115

116116
bool? bigEndian = null;
117117
bool? lang = null;
118+
bool? beta = null;
118119
bool? compression = null;
119120

120121
var format = "default";
@@ -160,6 +161,23 @@ private static void Main(string[] args)
160161
Console.WriteLine("Invalid Event Extra data type setting. Using file's default setting.");
161162
}
162163

164+
a++;
165+
break;
166+
case "-dcbeta":
167+
var dcBeta = args[a + 1];
168+
169+
if (dcBeta.Equals("false", StringComparison.OrdinalIgnoreCase))
170+
{
171+
beta = false;
172+
}
173+
else if (dcBeta.Equals("true", StringComparison.OrdinalIgnoreCase))
174+
{
175+
beta = true;
176+
}
177+
else
178+
{
179+
Console.WriteLine("Invalid Event Extra data type setting. Using file's default setting.");
180+
}
163181
a++;
164182
break;
165183
case "-format":
@@ -230,16 +248,19 @@ private static void Main(string[] args)
230248
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
231249

232250
var endianGame = "";
251+
var endianType = "";
233252

234253
if (bigEndian.HasValue)
235254
{
236255
if (bigEndian == false)
237256
{
238257
endianGame = "Dreamcast";
258+
endianType = "Little Endian";
239259
}
240260
else
241261
{
242262
endianGame = "GameCube/PS3/X360/PC";
263+
endianType = "Big Endian";
243264
}
244265
}
245266
if (name.Contains("TAILSPLAIN", StringComparison.OrdinalIgnoreCase))
@@ -306,6 +327,14 @@ private static void Main(string[] args)
306327
else if (exfWCard.IsMatch(name))
307328
{
308329
var dataGame = "";
330+
var dataBeta = "";
331+
var ext = ".prs";
332+
if (beta.HasValue)
333+
{
334+
if (beta == true)
335+
ext = ".scr";
336+
}
337+
309338

310339
if (lang.HasValue)
311340
{
@@ -318,19 +347,45 @@ private static void Main(string[] args)
318347
dataGame = "File will only contain subtitle and audio timings.";
319348
}
320349
}
321-
322-
if (bigEndian.HasValue && lang.HasValue)
350+
if (beta.HasValue)
351+
{
352+
if (beta == true)
353+
{
354+
dataBeta = "This file will only work with SA2: The Trial if all Event Extra data is present.";
355+
}
356+
else
357+
{
358+
dataBeta = "";
359+
}
360+
}
361+
if (bigEndian.HasValue && lang.HasValue && beta.HasValue)
362+
{
363+
Console.WriteLine($"Building Event Extra file {name} for the {endianGame} version. {dataGame} \n{dataBeta}");
364+
}
365+
else if (bigEndian.HasValue && lang.HasValue)
323366
{
324367
Console.WriteLine($"Building Event Extra file {name} for the {endianGame} version. {dataGame}");
325368
}
369+
else if (bigEndian.HasValue && beta.HasValue)
370+
{
371+
Console.WriteLine($"Building Event Extra file {name} for the {endianGame} version.\n{dataBeta}");
372+
}
326373
else if (bigEndian.HasValue)
327374
{
328375
Console.WriteLine($"Building Event Extra file {name} for the {endianGame} version.");
329376
}
377+
else if (lang.HasValue && beta.HasValue)
378+
{
379+
Console.WriteLine($"Building Event Extra file {name}. {dataGame}\n{dataBeta}");
380+
}
330381
else if (lang.HasValue)
331382
{
332383
Console.WriteLine($"Building Event Extra file {name}. {dataGame}");
333384
}
385+
else if (beta.HasValue)
386+
{
387+
Console.WriteLine($"Building Event Extra file {name}. \n{dataBeta}");
388+
}
334389
else
335390
{
336391
Console.WriteLine($"Building Event Extra file {name}");
@@ -339,11 +394,11 @@ private static void Main(string[] args)
339394
if (fullPathBin.EndsWith(".prs", StringComparison.OrdinalIgnoreCase)
340395
|| fullPathBin.EndsWith(".scr", StringComparison.OrdinalIgnoreCase))
341396
{
342-
sa2EventExtra.Build(bigEndian, lang, fullPathBin, fullPathOut);
397+
sa2EventExtra.Build(bigEndian, lang, beta, fullPathBin, fullPathOut);
343398
}
344399
else
345400
{
346-
sa2EventExtra.Build(bigEndian, lang, fullPathBin + ".prs", fullPathOut);
401+
sa2EventExtra.Build(bigEndian, lang, beta, fullPathBin + ext, fullPathOut);
347402
}
348403
}
349404
else if (name.StartsWith("me", StringComparison.OrdinalIgnoreCase))

0 commit comments

Comments
 (0)