mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Add legacy menu dumping unlinker command line argument
This commit is contained in:
parent
68c29cc22f
commit
9184c0265e
@ -28,6 +28,7 @@ public:
|
||||
|
||||
ImageOutputFormat_e ImageOutputFormat = ImageOutputFormat_e::DDS;
|
||||
ModelOutputFormat_e ModelOutputFormat = ModelOutputFormat_e::XMODEL_EXPORT;
|
||||
bool MenuLegacyMode = false;
|
||||
|
||||
} Configuration;
|
||||
|
||||
|
@ -95,6 +95,12 @@ const CommandLineOption* const OPTION_INCLUDE_ASSETS =
|
||||
.Reusable()
|
||||
.Build();
|
||||
|
||||
const CommandLineOption* const OPTION_LEGACY_MENUS =
|
||||
CommandLineOption::Builder::Create()
|
||||
.WithLongName("legacy-menus")
|
||||
.WithDescription("Dumps menus with a compatibility mode to work with applications not compatible with the newer dumping mode.")
|
||||
.Build();
|
||||
|
||||
const CommandLineOption* const COMMAND_LINE_OPTIONS[]
|
||||
{
|
||||
OPTION_HELP,
|
||||
@ -108,11 +114,12 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]
|
||||
OPTION_MODEL_FORMAT,
|
||||
OPTION_GDT,
|
||||
OPTION_EXCLUDE_ASSETS,
|
||||
OPTION_INCLUDE_ASSETS
|
||||
OPTION_INCLUDE_ASSETS,
|
||||
OPTION_LEGACY_MENUS
|
||||
};
|
||||
|
||||
UnlinkerArgs::UnlinkerArgs()
|
||||
: m_argument_parser(COMMAND_LINE_OPTIONS, std::extent<decltype(COMMAND_LINE_OPTIONS)>::value),
|
||||
: m_argument_parser(COMMAND_LINE_OPTIONS, std::extent_v<decltype(COMMAND_LINE_OPTIONS)>),
|
||||
m_zone_pattern(R"(\?zone\?)"),
|
||||
m_task(ProcessingTask::DUMP),
|
||||
m_minimal_zone_def(false),
|
||||
@ -305,10 +312,14 @@ bool UnlinkerArgs::ParseArgs(const int argc, const char** argv)
|
||||
ParseCommaSeparatedAssetTypeString(include);
|
||||
}
|
||||
|
||||
// --legacy-menus
|
||||
if (m_argument_parser.IsOptionSpecified(OPTION_LEGACY_MENUS))
|
||||
ObjWriting::Configuration.MenuLegacyMode = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string UnlinkerArgs::GetOutputFolderPathForZone(Zone* zone) const
|
||||
std::string UnlinkerArgs::GetOutputFolderPathForZone(const Zone* zone) const
|
||||
{
|
||||
return std::regex_replace(m_output_folder, m_zone_pattern, zone->m_name);
|
||||
}
|
||||
|
@ -63,5 +63,5 @@ public:
|
||||
* \param zone The zone to resolve the path input for.
|
||||
* \return An output path for the zone based on the user input.
|
||||
*/
|
||||
std::string GetOutputFolderPathForZone(Zone* zone) const;
|
||||
std::string GetOutputFolderPathForZone(const Zone* zone) const;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user