Log Dragon client function loading
This commit is contained in:
@@ -251,6 +251,9 @@ ClientFunctionIndex::ClientFunctionIndex(const std::string& root_dir, bool raise
|
|||||||
add_directory(item_path);
|
add_directory(item_path);
|
||||||
} else if (item_path.ends_with(".s") && std::filesystem::is_regular_file(item_path)) {
|
} else if (item_path.ends_with(".s") && std::filesystem::is_regular_file(item_path)) {
|
||||||
client_functions_log.debug_f("Adding {} from {}", item_name, item_path);
|
client_functions_log.debug_f("Adding {} from {}", item_name, item_path);
|
||||||
|
if (item_name.find("Dragon") != std::string::npos) {
|
||||||
|
client_functions_log.warning_f("Dragon source load debug: adding {} from {}", item_name, item_path);
|
||||||
|
}
|
||||||
if (!source_files.emplace(item_name, phosg::load_file(item_path)).second) {
|
if (!source_files.emplace(item_name, phosg::load_file(item_path)).second) {
|
||||||
throw std::runtime_error(std::format("Duplicate source filename: {}", item_name));
|
throw std::runtime_error(std::format("Duplicate source filename: {}", item_name));
|
||||||
}
|
}
|
||||||
@@ -285,6 +288,20 @@ ClientFunctionIndex::ClientFunctionIndex(const std::string& root_dir, bool raise
|
|||||||
throw std::runtime_error(std::format("({} preprocessing) {}", source_filename, e.what()));
|
throw std::runtime_error(std::format("({} preprocessing) {}", source_filename, e.what()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source_filename.find("Dragon") != std::string::npos) {
|
||||||
|
client_functions_log.warning_f(
|
||||||
|
"Dragon preprocess debug: source={} produced {} version chunk(s)",
|
||||||
|
source_filename,
|
||||||
|
preprocessed.size());
|
||||||
|
for (const auto& [debug_sv, debug_source] : preprocessed) {
|
||||||
|
client_functions_log.warning_f(
|
||||||
|
"Dragon preprocess debug: source={} sv={} chunk_size={}",
|
||||||
|
source_filename,
|
||||||
|
str_for_specific_version(debug_sv),
|
||||||
|
debug_source.size());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto& [specific_version, source] : preprocessed) {
|
for (const auto& [specific_version, source] : preprocessed) {
|
||||||
std::shared_ptr<Function> fn = std::make_shared<Function>();
|
std::shared_ptr<Function> fn = std::make_shared<Function>();
|
||||||
fn->short_name = source_filename.substr(0, source_filename.size() - 2);
|
fn->short_name = source_filename.substr(0, source_filename.size() - 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user