Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/coolgirl-multicart/coolgirl-multirom-builder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-08-16 03:34:06 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2021-08-16 03:34:06 +0300
commit294838fd2cd9ab4b5e6bb2a2c6b99b2fcd8ea3b3 (patch)
tree8d7a62a64f0c112665b009352a40e6e18e2ac96a /tools_sources
parentcba42e973f9db55ced48fc67a4aab37201a7ae74 (diff)
Game naming fixes
Diffstat (limited to 'tools_sources')
-rw-r--r--tools_sources/CoolgirlCombiner/Game.cs19
-rw-r--r--tools_sources/CoolgirlCombiner/Program.cs4
2 files changed, 4 insertions, 19 deletions
diff --git a/tools_sources/CoolgirlCombiner/Game.cs b/tools_sources/CoolgirlCombiner/Game.cs
index 43592d1..90e7aa4 100644
--- a/tools_sources/CoolgirlCombiner/Game.cs
+++ b/tools_sources/CoolgirlCombiner/Game.cs
@@ -92,7 +92,7 @@ namespace com.clusterrr.Famicom.CoolGirl
if (string.IsNullOrWhiteSpace(menuName))
{
// Menu name based on filename
- MenuName = Regex.Replace(Path.GetFileNameWithoutExtension(fileName), @"( ?\[.*?\])|( \(.\))", string.Empty).Replace("_", " ").ToUpper().Replace(", THE", "").Trim();
+ MenuName = Limit(Regex.Replace(Path.GetFileNameWithoutExtension(fileName), @"( ?\[.*?\])|( \(.\))", string.Empty).Replace("_", " ").ToUpper().Replace(", THE", "").Trim());
}
else
{
@@ -221,22 +221,7 @@ namespace com.clusterrr.Famicom.CoolGirl
public bool IsSeparator { get => (Flags & GameFlags.Separator) != 0; }
- public override string ToString()
- {
- string name;
- if (MenuName != null)
- {
- if (MenuName.StartsWith("+"))
- name = MenuName.Substring(1).Trim();
- else
- name = MenuName.Trim();
- }
- else
- {
- name = Regex.Replace(Regex.Replace(Path.GetFileNameWithoutExtension(FileName), @" ?\(.{1,3}[0-9]?\)", string.Empty), @" ?\[.*?\]", string.Empty).Trim().Replace("_", " ").Replace(", The", "");
- }
- return Limit(name);
- }
+ public override string ToString() => MenuName;
public static string Limit(string name)
{
diff --git a/tools_sources/CoolgirlCombiner/Program.cs b/tools_sources/CoolgirlCombiner/Program.cs
index ac9a806..a01c1ff 100644
--- a/tools_sources/CoolgirlCombiner/Program.cs
+++ b/tools_sources/CoolgirlCombiner/Program.cs
@@ -433,7 +433,7 @@ namespace com.clusterrr.Famicom.CoolGirl
{
totalSize += game.PrgSize;
totalSize += game.ChrSize;
- report.Add(string.Format("{0,-33} {1,-15} {2,-10} {3,-10} {4,0}", FirstCharToUpper(game.ToString().Replace("_", " ").Replace("+", "")), game.Mapper, game.SaveId == 0 ? "-" : game.SaveId.ToString(),
+ report.Add(string.Format("{0,-33} {1,-15} {2,-10} {3,-10} {4,0}", FirstCharToUpper(game.ToString().Replace("_", " ")), game.Mapper, game.SaveId == 0 ? "-" : game.SaveId.ToString(),
$"{(game.PrgSize + game.ChrSize) / 1024}KB", $"{totalSize / 1024}KB total"));
if (!string.IsNullOrEmpty(game.Mapper))
{
@@ -991,7 +991,7 @@ namespace com.clusterrr.Famicom.CoolGirl
static string FirstCharToUpper(string input)
{
- if (String.IsNullOrEmpty(input)) return "";
+ if (string.IsNullOrEmpty(input)) return "";
return input.First().ToString().ToUpper() + input.Substring(1);
}
}