mirror of
https://github.com/open-goal/jak-project
synced 2026-05-23 06:54:31 -04:00
2969833b2d
- `speech` - `ambient` - `water-h` - `vol-h` - `generic-obs` - `carry-h` - `pilot-h` - `board-h` - `gun-h` - `flut-h` - `indax-h` - `lightjak-h` - `darkjak-h` - `target-util` - `history` - `collide-reaction-target` - `logic-target` - `sidekick` - `projectile` - `voicebox` - `ragdoll-edit` - most of `ragdoll` (not added to gsrc yet) - `curves` - `find-nearest` - `lightjak-wings` - `target-handler` - `target-anim` - `target` - `target2` - `target-swim` - `target-lightjak` - `target-invisible` - `target-death` - `target-gun` - `gun-util` - `board-util` - `target-board` - `board-states` - `mech-h` - `vol` - `vent` - `viewer` - `gem-pool` - `collectables` - `crates` - `secrets-menu` Additionally: - Detection of non-virtual state inheritance - Added a config file that allows overriding the process stack size set by `stack-size-set!` calls - Fix for integer multiplication with `r0` - Fixed detection for the following macros: - `static-attack-info` - `defpart` and `defpartgroup` (probably still needs adjustments, uses Jak 2 implementation at the moment) - `sound-play` (Jak 3 seems to always call `sound-play-by-name` with a `sound-group` of 0, so the macro has been temporarily defaulted to use that) One somewhat significant change made here that should be noted is that the return type of `process::init-from-entity!` was changed to `object`. I've been thinking about this for a while, since it looks a bit nicer without the `(none)` at the end and I have recently encountered init methods that early return `0`.
58 lines
1.5 KiB
C++
58 lines
1.5 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_full_name(const std::string& short_name) const;
|
|
std::string get_texture_name() 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:
|
|
case GameVersion::Jak3:
|
|
return "/src/jak2/final/texture-page8/";
|
|
default:
|
|
ASSERT_MSG(false, "NYI get_file_info_string version");
|
|
break;
|
|
}
|
|
}
|
|
|
|
std::vector<std::vector<u8>> m_chunks;
|
|
};
|
|
} // namespace decompiler
|