streamline newbie decomp/run process, update readme and gallery with new/updated information and pictures (#1132)

* streamline newbie decomp/run process, update readme and gallery with new/updated information and pictures

* and of course

* Fix errors

* fix gallery
This commit is contained in:
ManDude
2022-02-04 23:37:48 +00:00
committed by GitHub
parent 0816a1bf25
commit 32d8ae9b6e
20 changed files with 76 additions and 62 deletions
+3 -1
View File
@@ -29,6 +29,7 @@ Config read_config_file(const std::string& path_to_config_file) {
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>();
auto inputs_json = read_json_file_from_config(cfg, "inputs_file");
config.dgo_names = inputs_json.at("dgo_names").get<std::vector<std::string>>();
@@ -211,7 +212,8 @@ Config read_config_file(const std::string& path_to_config_file) {
config.merged_objects.insert(x);
}
config.levels_to_extract = cfg.at("levels_to_extract").get<std::vector<std::string>>();
config.levels_to_extract = inputs_json.at("levels_to_extract").get<std::vector<std::string>>();
config.levels_extract = cfg.at("levels_extract").get<bool>();
return config;
}
+2 -1
View File
@@ -111,7 +111,7 @@ struct Config {
bool generate_symbol_definition_map = false;
bool is_pal = false;
std::string game_name;
GameTextVersion text_version = GameTextVersion::JAK1_V1;
std::unordered_set<std::string> allowed_objects;
@@ -133,6 +133,7 @@ struct Config {
std::unordered_map<std::string, int> bad_format_strings;
std::vector<std::string> levels_to_extract;
bool levels_extract;
DecompileHacks hacks;
};
+4 -28
View File
@@ -1,6 +1,7 @@
{
"game_version": 1,
"text_version": 10,
"game_name": "jak1",
// if you want to filter to only some object names.
// it will make the decompiler much faster.
@@ -84,33 +85,8 @@
// LEVEL EXTRACTION
////////////////////////////
// turn this on to extract level background graphics data
"levels_extract": true,
// turn this on if you want extracted levels to be saved out as .obj files
"levels_convert_to_obj": false,
// list of level DGOs to extract background graphics for
"levels_to_extract":[
"BEA.DGO",
"CIT.DGO",
"DAR.DGO",
"DEM.DGO",
"FIN.DGO",
"INT.DGO",
"JUB.DGO",
"JUN.DGO",
"FIC.DGO",
"LAV.DGO",
"MAI.DGO",
"MIS.DGO",
"OGR.DGO",
"ROB.DGO",
"ROL.DGO",
"SNO.DGO",
"SUB.DGO",
"SUN.DGO",
"SWA.DGO",
"TIT.DGO",
"TRA.DGO",
"VI1.DGO",
"VI2.DGO",
"VI3.DGO"
]
"levels_convert_to_obj": false
}
@@ -262,5 +262,32 @@
//"audio_dir_file_name": "jak1/VAG",
"audio_dir_file_name": "",
"streamed_audio_file_names": ["VAGWAD.ENG", "VAGWAD.JAP"]
"streamed_audio_file_names": ["VAGWAD.ENG", "VAGWAD.JAP"],
"levels_to_extract":[
"BEA.DGO",
"CIT.DGO",
"DAR.DGO",
"DEM.DGO",
"FIN.DGO",
"INT.DGO",
"JUB.DGO",
"JUN.DGO",
"FIC.DGO",
"LAV.DGO",
"MAI.DGO",
"MIS.DGO",
"OGR.DGO",
"ROB.DGO",
"ROL.DGO",
"SNO.DGO",
"SUB.DGO",
"SUN.DGO",
"SWA.DGO",
"TIT.DGO",
"TRA.DGO",
"VI1.DGO",
"VI2.DGO",
"VI3.DGO"
]
}
+6 -4
View File
@@ -40,8 +40,8 @@ int main(int argc, char** argv) {
return 1;
}
std::string in_folder = argv[2];
std::string out_folder = argv[3];
std::string in_folder = file_util::combine_path(argv[2], config.game_name);
std::string out_folder = file_util::combine_path(argv[3], config.game_name);
std::vector<std::string> dgos, objs, strs;
for (const auto& dgo_name : config.dgo_names) {
@@ -149,8 +149,10 @@ int main(int argc, char** argv) {
}
}
for (auto& lev : config.levels_to_extract) {
extract_from_level(db, tex_db, lev, config.hacks, config.rip_levels);
if (config.levels_extract) {
for (auto& lev : config.levels_to_extract) {
extract_from_level(db, tex_db, lev, config.hacks, config.rip_levels);
}
}
fmt::print("[Mem] After extraction: {} MB\n", get_peak_rss() / (1024 * 1024));