Documentation cleanup and some feature improvements (#1155)

* ci: switch to codacy for coverage

* docs: update badges

* decomp: allow overriding config flags via CLI

* cleanup: top level file cleanup

* docs: big README overhaul

Attempt to close #1128 and #1086

* decomp: attempt to detect if `iso_data` is missing or wrongly extracted

* game: switch to `fpng` for screenshots, allow for compression

closes #1035

* game: switch vsync control to a checkbox

* lint: format cpp files

* lint: format json files

* docs/scripts: organize taskfile
This commit is contained in:
Tyler Wilding
2022-02-12 17:48:50 -05:00
committed by GitHub
parent 24578b64b9
commit ffb04ddd10
39 changed files with 4608 additions and 3170 deletions
+11 -1
View File
@@ -22,14 +22,24 @@ nlohmann::json read_json_file_from_config(const nlohmann::json& cfg, const std::
/*!
* Parse the main config file and return decompiler config.
*/
Config read_config_file(const std::string& path_to_config_file) {
Config read_config_file(const std::string& path_to_config_file,
const std::map<std::string, bool>& overrides) {
Config config;
auto config_str = file_util::read_text_file(path_to_config_file);
auto cfg = parse_commented_json(config_str, path_to_config_file);
// Override JSON
for (auto const& [key, val] : overrides) {
fmt::print("[Config] - Overwriting '{}' with '{}'\n", key, val);
cfg[key] = val;
}
config.game_version = cfg.at("game_version").get<int>();
config.text_version = cfg.at("text_version").get<GameTextVersion>();
config.game_name = cfg.at("game_name").get<std::string>();
if (cfg.contains("expected_elf_name")) {
config.expected_elf_name = cfg.at("expected_elf_name").get<std::string>();
}
auto inputs_json = read_json_file_from_config(cfg, "inputs_file");
config.dgo_names = inputs_json.at("dgo_names").get<std::vector<std::string>>();