mirror of
https://github.com/open-goal/jak-project
synced 2026-05-28 08:25:56 -04:00
[jak3] Support jaextern.str, stub for blue fog fix (#3455)
This commit is contained in:
@@ -188,6 +188,21 @@ FullName extract_name(const std::string& file_info_name) {
|
||||
|
||||
} // namespace
|
||||
|
||||
std::string StrFileReader::get_chunk_art_name(int idx) const {
|
||||
const auto& file_info_string = get_art_group_file_info_string();
|
||||
const auto& chunk = m_chunks.at(idx);
|
||||
int offset;
|
||||
if (find_string_in_data(chunk.data(), int(chunk.size()), file_info_string, &offset)) {
|
||||
offset += file_info_string.length();
|
||||
} else {
|
||||
ASSERT_MSG(false, fmt::format("did not find string '{}'", file_info_string));
|
||||
}
|
||||
|
||||
// extract the name info as a "name" + "chunk id" + "-ag.go" format.
|
||||
return extract_name(get_string_of_max_length((const char*)(chunk.data() + offset), 128)).name +
|
||||
"-ag";
|
||||
}
|
||||
|
||||
/*!
|
||||
* Look inside the chunks to determine the source file name.
|
||||
* Does a lot of checking, might not work in future versions without some updating.
|
||||
|
||||
Reference in New Issue
Block a user