g/jak1: Extract ambient data to json (#3945)

I added extraction of ambients to json files when extracting the levels.
All of the ambient json files are written to the same folder as actors
are. Ambients aren't used in jak2 and 3 so it only is used on jak1.


![image](https://github.com/user-attachments/assets/26e5d655-6a31-49eb-8514-3374b41f72dd)

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
This commit is contained in:
Soggy_Pancake
2025-07-02 20:19:21 -07:00
committed by GitHub
parent 012ff7bb16
commit 7320bfc068
5 changed files with 246 additions and 1 deletions
@@ -389,6 +389,10 @@ void extract_from_level(const ObjectFileDB& db,
}
file_util::write_text_file(entities_folder / fmt::format("{}-actors.json", level_data.level_name),
extract_actors_to_json(bsp_header.actors));
if (config.game_version == GameVersion::Jak1)
file_util::write_text_file(
entities_folder / fmt::format("{}-ambients.json", level_data.level_name),
extract_ambients_to_json(bsp_header.ambients));
}
void extract_all_levels(const ObjectFileDB& db,