diff --git a/.github/workflows/linux-build-gcc.yaml b/.github/workflows/linux-build-gcc.yaml index 61ab9befdb..35b4cf29d6 100644 --- a/.github/workflows/linux-build-gcc.yaml +++ b/.github/workflows/linux-build-gcc.yaml @@ -52,7 +52,7 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - name: Build Project - run: cmake --build build --parallel $((`nproc`)) -- -w dupbuild=warn + run: cmake --build build --parallel $((`nproc`)) - name: Run Tests run: ./test.sh diff --git a/Taskfile.yml b/Taskfile.yml index 6b664ae760..33ab978d9d 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -144,6 +144,9 @@ tasks: rip-collision: cmds: - "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"extract_collision\": true, \"rip_collision\": true}'" + rip-audio: + cmds: + - "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler \"./decompiler/config/{{.DECOMP_CONFIG}}\" \"./iso_data\" \"./decompiler_out\" --version \"{{.DECOMP_CONFIG_VERSION}}\" --config-override '{\"decompile_code\": false, \"levels_extract\": true, \"rip_streamed_audio\": true}'" # TOOLS analyze-ee-memory: cmds: diff --git a/decompiler/config/jak1/jak1_config.jsonc b/decompiler/config/jak1/jak1_config.jsonc index ed1be81595..8d44e668be 100644 --- a/decompiler/config/jak1/jak1_config.jsonc +++ b/decompiler/config/jak1/jak1_config.jsonc @@ -112,12 +112,12 @@ // turn this on to extract level background graphics data as .fr3 files in out//fr3 "levels_extract": true, - // turn this on if you want extracted levels to be saved out as .glb files in glb_out/ + // turn this on if you want extracted levels to be saved out as .glb files in decompiler_out//levels "rip_levels": false, // should we also extract collision meshes to the .fr3 files? // these can be displayed in-game with the OpenGOAL collision renderer "extract_collision": true, - // turn this on if you want extracted level collision to be saved as .obj files in debug_out/ + // turn this on if you want extracted level collision to be saved as .obj files in decompiler_out//collision "rip_collision": false, // save game textures as .png files to decompiler_out//textures "save_texture_pngs": false, diff --git a/decompiler/config/jak2/jak2_config.jsonc b/decompiler/config/jak2/jak2_config.jsonc index 2cab439dce..fb300393c3 100644 --- a/decompiler/config/jak2/jak2_config.jsonc +++ b/decompiler/config/jak2/jak2_config.jsonc @@ -118,12 +118,12 @@ // turn this on to extract level background graphics data as .fr3 files in out//fr3 "levels_extract": true, - // turn this on if you want extracted levels to be saved out as .glb files in glb_out/ + // turn this on if you want extracted levels to be saved out as .glb files in decompiler_out//levels "rip_levels": false, // should we also extract collision meshes to the .fr3 files? // these can be displayed in-game with the OpenGOAL collision renderer "extract_collision": true, - // turn this on if you want extracted level collision to be saved as .obj files in debug_out/ + // turn this on if you want extracted level collision to be saved as .obj files in decompiler_out//collision "rip_collision": false, // save game textures as .png files to decompiler_out//textures "save_texture_pngs": false, diff --git a/decompiler/config/jak3/jak3_config.jsonc b/decompiler/config/jak3/jak3_config.jsonc index 7551fcfddc..f2b66d39ef 100644 --- a/decompiler/config/jak3/jak3_config.jsonc +++ b/decompiler/config/jak3/jak3_config.jsonc @@ -117,12 +117,12 @@ // turn this on to extract level background graphics data as .fr3 files in out//fr3 "levels_extract": false, - // turn this on if you want extracted levels to be saved out as .glb files in glb_out/ + // turn this on if you want extracted levels to be saved out as .glb files in decompiler_out//levels "rip_levels": false, // should we also extract collision meshes to the .fr3 files? // these can be displayed in-game with the OpenGOAL collision renderer "extract_collision": true, - // turn this on if you want extracted level collision to be saved as .obj files in debug_out/ + // turn this on if you want extracted level collision to be saved as .obj files in decompiler_out//collision "rip_collision": false, // save game textures as .png files to decompiler_out//textures "save_texture_pngs": false, diff --git a/decompiler/level_extractor/extract_collide_frags.cpp b/decompiler/level_extractor/extract_collide_frags.cpp index 24c5ca55f8..901683a782 100644 --- a/decompiler/level_extractor/extract_collide_frags.cpp +++ b/decompiler/level_extractor/extract_collide_frags.cpp @@ -195,7 +195,7 @@ std::string debug_dump_to_obj(const std::vector& list) { faces.emplace_back(f.verts[0] + f_off, f.verts[1] + f_off, f.verts[2] + f_off); } for (u32 t = 0; t < item.unpacked.vu0_buffer.size(); t++) { - verts.push_back(item.unpacked.vu0_buffer[t] / 65536); + verts.push_back(item.unpacked.vu0_buffer[t] / 4096); } } @@ -261,8 +261,9 @@ void extract_collide_frags(const level_tools::DrawableTreeCollideFragment* tree, if (config.rip_collision) { auto debug_out = debug_dump_to_obj(all_frags); - auto file_path = file_util::get_file_path( - {fmt::format("debug_out/{}", config.game_name), fmt::format("collide-{}.obj", debug_name)}); + auto file_path = + file_util::get_file_path({fmt::format("decompiler_out/{}/collision", config.game_name), + fmt::format("collide-{}.obj", debug_name)}); file_util::create_dir_if_needed_for_file(file_path); file_util::write_text_file(file_path, debug_out); } @@ -509,8 +510,9 @@ void extract_collide_frags(const level_tools::CollideHash& chash, // out.collision.vertices every 3 vertices make a face, so it duplicates vertices in many cases // for now debug_dump_to_obj isn't smart and doesn't hash these to save space or anything auto debug_out = debug_dump_to_obj(out.collision.vertices); - auto file_path = file_util::get_file_path( - {fmt::format("debug_out/{}", config.game_name), fmt::format("collide-{}.obj", debug_name)}); + auto file_path = + file_util::get_file_path({fmt::format("decompiler_out/{}/collision", config.game_name), + fmt::format("collide-{}.obj", debug_name)}); file_util::create_dir_if_needed_for_file(file_path); file_util::write_text_file(file_path, debug_out); } diff --git a/decompiler/level_extractor/extract_level.cpp b/decompiler/level_extractor/extract_level.cpp index 4cb5d8ae18..43e792dcbd 100644 --- a/decompiler/level_extractor/extract_level.cpp +++ b/decompiler/level_extractor/extract_level.cpp @@ -339,8 +339,8 @@ void extract_common(const ObjectFileDB& db, compressed.data(), compressed.size()); if (config.rip_levels) { - auto file_path = file_util::get_jak_project_dir() / "glb_out" / - game_version_names[config.game_version] / "common"; + auto file_path = file_util::get_jak_project_dir() / "decompiler_out" / + game_version_names[config.game_version] / "levels" / "common"; save_level_foreground_as_gltf(tfrag_level, art_group_data, file_path); } } @@ -376,13 +376,15 @@ void extract_from_level(const ObjectFileDB& db, compressed.data(), compressed.size()); if (config.rip_levels) { - auto back_file_path = file_util::get_jak_project_dir() / "glb_out" / - game_version_names[config.game_version] / level_data.level_name / + auto back_file_path = file_util::get_jak_project_dir() / "decompiler_out" / + game_version_names[config.game_version] / "levels" / + level_data.level_name / fmt::format("{}-background.glb", level_data.level_name); file_util::create_dir_if_needed_for_file(back_file_path); save_level_background_as_gltf(level_data, back_file_path); - auto fore_file_path = file_util::get_jak_project_dir() / "glb_out" / - game_version_names[config.game_version] / level_data.level_name; + auto fore_file_path = file_util::get_jak_project_dir() / "decompiler_out" / + game_version_names[config.game_version] / "levels" / + level_data.level_name; save_level_foreground_as_gltf(level_data, art_group_data, fore_file_path); } file_util::write_text_file(entities_folder / fmt::format("{}-actors.json", level_data.level_name),