mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-18 06:07:52 +00:00
bktr: Implement IVFC offset shifting
Fixes base game read errors
This commit is contained in:
parent
e88835cd40
commit
b8f8b0fa47
8 changed files with 36 additions and 8 deletions
|
@ -79,7 +79,8 @@ bool IsValidNCA(const NCAHeader& header);
|
|||
// After construction, use GetStatus to determine if the file is valid and ready to be used.
|
||||
class NCA : public ReadOnlyVfsDirectory {
|
||||
public:
|
||||
explicit NCA(VirtualFile file, VirtualFile bktr_base_romfs = nullptr);
|
||||
explicit NCA(VirtualFile file, VirtualFile bktr_base_romfs = nullptr,
|
||||
u64 bktr_base_ivfc_offset = 0);
|
||||
Loader::ResultStatus GetStatus() const;
|
||||
|
||||
std::vector<std::shared_ptr<VfsFile>> GetFiles() const override;
|
||||
|
@ -96,6 +97,9 @@ public:
|
|||
|
||||
VirtualFile GetBaseFile() const;
|
||||
|
||||
// Returns the base ivfc offset used in BKTR patching.
|
||||
u64 GetBaseIVFCOffset() const;
|
||||
|
||||
protected:
|
||||
bool ReplaceFileWithSubdirectory(VirtualFile file, VirtualDir dir) override;
|
||||
|
||||
|
@ -112,6 +116,7 @@ private:
|
|||
VirtualDir exefs = nullptr;
|
||||
VirtualFile file;
|
||||
VirtualFile bktr_base_romfs;
|
||||
u64 ivfc_offset;
|
||||
|
||||
NCAHeader header{};
|
||||
bool has_rights_id{};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue