mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 00:57:44 -04:00
7053090541
Some checks failed
Build / 🖥️ Windows (push) Has been cancelled
Build / 🐧 Linux (push) Has been cancelled
Build / 🍎 MacOS (push) Has been cancelled
Inform Pages Repo / Generate Documentation (push) Has been cancelled
Lint / 📝 Formatting (push) Has been cancelled
Lint / 📝 Required Checks (push) Has been cancelled
Lint / 📝 Optional Checks (push) Has been cancelled
`bigmap` and `blit-displays` mostly work. `blit-displays` is still missing all of the special effects that were added in Jak 3 (brightness and contrast settings, screen blur effect, etc.). `bigmap` is missing the player marker texture (`hud-target-marker`) for some reason, it's part of `tpage-17` which is coming from `progress-minimap` and should already be included. The icons also currently stretch when using aspect ratios other than 4:3. The progress menu now also works for the most part. The draw order is a bit messed up because some code was initially drawing things with the ocean bucket, which was changed to use `hud-draw-hud-alpha` instead for now. The texture for the volume and brightness/contrast sliders still looks wrong. Fixes #3653 Fixes #3656
61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
#pragma once
|
|
|
|
/*!
|
|
* @file StrFileReader.h
|
|
* Utility class to read a .STR file and extract the full file name.
|
|
*/
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
#include "common/util/Assert.h"
|
|
#include "common/util/FileUtil.h"
|
|
#include "common/versions/versions.h"
|
|
|
|
namespace decompiler {
|
|
class StrFileReader {
|
|
public:
|
|
explicit StrFileReader(const fs::path& file_path, GameVersion version);
|
|
int chunk_count() const;
|
|
const std::vector<u8>& get_chunk(int idx) const;
|
|
std::string get_chunk_art_name(int idx) const;
|
|
|
|
std::string get_full_name(const std::string& short_name) const;
|
|
std::string get_chunk_texture_name(int idx) const;
|
|
|
|
private:
|
|
void init_jak1(const fs::path& file_path);
|
|
void init_jak2(const fs::path& file_path);
|
|
|
|
GameVersion m_version;
|
|
std::string get_art_group_file_info_string() const {
|
|
switch (m_version) {
|
|
case GameVersion::Jak1:
|
|
return "/src/next/data/art-group6/";
|
|
case GameVersion::Jak2:
|
|
return "/src/jak2/final/art-group7/";
|
|
case GameVersion::Jak3:
|
|
return "/src/jak3/final/art-group8/";
|
|
default:
|
|
ASSERT_MSG(false, "NYI get_file_info_string version");
|
|
break;
|
|
}
|
|
}
|
|
|
|
std::string get_texture_page_file_info_string() const {
|
|
switch (m_version) {
|
|
case GameVersion::Jak2:
|
|
return "/src/jak2/final/texture-page8/";
|
|
case GameVersion::Jak3:
|
|
return "/src/jak3/final/texture-page8/";
|
|
default:
|
|
ASSERT_MSG(false, "NYI get_file_info_string version");
|
|
break;
|
|
}
|
|
}
|
|
|
|
std::vector<std::vector<u8>> m_chunks;
|
|
};
|
|
} // namespace decompiler
|