[SabreTools, DatFile, DatHeader] Remove 1G1R skeleton

This commit is contained in:
Matt Nadareski
2017-11-10 23:15:29 -08:00
parent 996c000bc0
commit 5ea3db2fe1
5 changed files with 2 additions and 119 deletions

View File

@@ -513,48 +513,6 @@ namespace SabreTools.Library.DatFiles
_datHeader.StripHash = value; _datHeader.StripHash = value;
} }
} }
public bool OneGameOneRegion
{
get
{
if (_datHeader == null)
{
_datHeader = new DatHeader();
}
return _datHeader.OneGameOneRegion;
}
set
{
if (_datHeader == null)
{
_datHeader = new DatHeader();
}
_datHeader.OneGameOneRegion = value;
}
}
public List<string> Regions
{
get
{
if (_datHeader == null)
{
_datHeader = new DatHeader();
}
return _datHeader.Regions;
}
set
{
if (_datHeader == null)
{
_datHeader = new DatHeader();
}
_datHeader.Regions = value;
}
}
public SortedBy SortedBy public SortedBy SortedBy
{ {
get { return _sortedBy; } get { return _sortedBy; }
@@ -5477,9 +5435,6 @@ namespace SabreTools.Library.DatFiles
// Output the number of items we're going to be writing // Output the number of items we're going to be writing
Globals.Logger.User("A total of {0} items will be written out to '{1}'", Count, FileName); Globals.Logger.User("A total of {0} items will be written out to '{1}'", Count, FileName);
// Filter the DAT by 1G1R rules, if we're supposed to
// TODO: Create 1G1R logic before write
// If we are removing hashes, do that now // If we are removing hashes, do that now
if (StripHash != 0x0) if (StripHash != 0x0)
{ {

View File

@@ -35,8 +35,6 @@ namespace SabreTools.Library.DatFiles
private bool _sceneDateStrip; private bool _sceneDateStrip;
private DedupeType _dedupeRoms; private DedupeType _dedupeRoms;
private Hash _stripHash; private Hash _stripHash;
private bool _oneGameOneRegion;
private List<string> _regions;
// Data specific to the Miss DAT type // Data specific to the Miss DAT type
private bool _useGame; private bool _useGame;
@@ -164,24 +162,6 @@ namespace SabreTools.Library.DatFiles
get { return _stripHash; } get { return _stripHash; }
set { _stripHash = value; } set { _stripHash = value; }
} }
public bool OneGameOneRegion
{
get { return _oneGameOneRegion; }
set { _oneGameOneRegion = value; }
}
public List<string> Regions
{
get
{
if (_regions == null)
{
_regions = new List<string>();
}
return _regions;
}
set { _regions = value; }
}
// Data specific to the Miss DAT type // Data specific to the Miss DAT type
public bool UseGame public bool UseGame
@@ -266,8 +246,6 @@ namespace SabreTools.Library.DatFiles
_sceneDateStrip = this._sceneDateStrip, _sceneDateStrip = this._sceneDateStrip,
_dedupeRoms = this._dedupeRoms, _dedupeRoms = this._dedupeRoms,
_stripHash = this._stripHash, _stripHash = this._stripHash,
_oneGameOneRegion = this._oneGameOneRegion,
_regions = this._regions,
_useGame = this._useGame, _useGame = this._useGame,
_prefix = this._prefix, _prefix = this._prefix,

View File

@@ -7,7 +7,6 @@ namespace SabreTools
{ {
public partial class SabreTools public partial class SabreTools
{ {
// TODO: Add 1G1R to the flags for update
public static Help RetrieveHelp() public static Help RetrieveHelp()
{ {
// Create and add the header to the Help object // Create and add the header to the Help object

View File

@@ -323,8 +323,6 @@ namespace SabreTools
/// <param name="bare">True if the date should not be appended to the default name, false otherwise [OBSOLETE]</param> /// <param name="bare">True if the date should not be appended to the default name, false otherwise [OBSOLETE]</param>
/// /* Filtering info */ /// /* Filtering info */
/// <param name="filter">Pre-populated filter object for DAT filtering</param> /// <param name="filter">Pre-populated filter object for DAT filtering</param>
/// <param name="oneGameOneRegion">True if the outputs should be created in 1G1R mode, false otherwise</param>
/// <param name="regions">List of regions in the order they should be used, blank for default</param>
/// /* Trimming info */ /// /* Trimming info */
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param> /// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
/// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param> /// <param name="trim">True if we are supposed to trim names to NTFS length, false otherwise</param>
@@ -383,8 +381,6 @@ namespace SabreTools
/* Filtering info */ /* Filtering info */
Filter filter, Filter filter,
bool oneGameOneRegion,
List<string> regions,
/* Trimming info */ /* Trimming info */
SplitType splitType, SplitType splitType,
@@ -464,35 +460,6 @@ namespace SabreTools
} }
} }
// Set the 1G1R regions alphabetically if not already set
if (regions == null || regions.Count == 0)
{
regions = new List<string>()
{
"australia",
"canada",
"china",
"denmark",
"europe",
"finland",
"france",
"germany",
"greece",
"italy",
"japan",
"korea",
"netherlands",
"norway",
"russia",
"spain",
"sweden",
"usa",
"usa, australia",
"usa, europe",
"world",
};
}
// Normalize the extensions // Normalize the extensions
addext = (addext == "" || addext.StartsWith(".") ? addext : "." + addext); addext = (addext == "" || addext.StartsWith(".") ? addext : "." + addext);
repext = (repext == "" || repext.StartsWith(".") ? repext : "." + repext); repext = (repext == "" || repext.StartsWith(".") ? repext : "." + repext);
@@ -552,8 +519,6 @@ namespace SabreTools
SceneDateStrip = sceneDateStrip, SceneDateStrip = sceneDateStrip,
DatFormat = datFormat, DatFormat = datFormat,
StripHash = stripHash, StripHash = stripHash,
OneGameOneRegion = oneGameOneRegion,
Regions = regions,
UseGame = usegame, UseGame = usegame,
Prefix = prefix, Prefix = prefix,

View File

@@ -100,7 +100,6 @@ namespace SabreTools
inverse = false, inverse = false,
merge = false, merge = false,
nostore = false, nostore = false,
oneGameOneRegion = false,
quickScan = false, quickScan = false,
quotes = false, quotes = false,
remext = false, remext = false,
@@ -162,7 +161,6 @@ namespace SabreTools
List<string> exta = new List<string>(); List<string> exta = new List<string>();
List<string> extb = new List<string>(); List<string> extb = new List<string>();
List<string> inputs = new List<string>(); List<string> inputs = new List<string>();
List<string> regions = new List<string>();
// Get the first argument as a feature flag // Get the first argument as a feature flag
string feature = args[0]; string feature = args[0];
@@ -254,10 +252,6 @@ namespace SabreTools
switch (args[i]) switch (args[i])
{ {
// User flags // User flags
case "-1g1r":
case "--1g1r":
oneGameOneRegion = true;
break;
case "-ab": case "-ab":
case "--add-blank": case "--add-blank":
addBlankFilesForEmptyFolder = true; addBlankFilesForEmptyFolder = true;
@@ -860,10 +854,6 @@ namespace SabreTools
case "--root-dir": case "--root-dir":
root = args[++i]; root = args[++i];
break; break;
case "-reg":
case "--region":
regions.Add(args[++i]);
break;
case "-rep": case "-rep":
case "--rep-ext": case "--rep-ext":
repext = args[++i]; repext = args[++i];
@@ -1150,10 +1140,6 @@ namespace SabreTools
case "--root-dir": case "--root-dir":
root = argsplit[1]; root = argsplit[1];
break; break;
case "-reg":
case "--region":
regions.Add(argsplit[1]);
break;
case "-rep": case "-rep":
case "--rep-ext": case "--rep-ext":
repext = argsplit[1]; repext = argsplit[1];
@@ -1316,8 +1302,8 @@ namespace SabreTools
{ {
InitUpdate(inputs, basePaths, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header, InitUpdate(inputs, basePaths, filename, name, description, rootdir, category, version, date, author, email, homepage, url, comment, header,
superdat, forcemerge, forcend, forcepack, excludeOf, sceneDateStrip, datFormat, usegame, prefix, postfix, quotes, repext, addext, remext, superdat, forcemerge, forcend, forcepack, excludeOf, sceneDateStrip, datFormat, usegame, prefix, postfix, quotes, repext, addext, remext,
datPrefix, romba, merge, updateMode, inplace, skip, removeDateFromAutomaticName, filter, oneGameOneRegion, regions, datPrefix, romba, merge, updateMode, inplace, skip, removeDateFromAutomaticName, filter, splitType, trim, single, root, outDir,
splitType, trim, single, root, outDir, cleanGameNames, removeUnicode, descAsName, dedup, stripHash); cleanGameNames, removeUnicode, descAsName, dedup, stripHash);
} }
// If we're using the verifier // If we're using the verifier