diff options
| author | bunnei <bunneidev@gmail.com> | 2018-09-25 16:59:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-25 16:59:44 -0400 |
| commit | 7b81e1e52565ee867c285e2b0c2526f8d4b82581 (patch) | |
| tree | 718decad5aae4153d8acaa444058914a1c12f147 /src/core/file_sys/romfs.h | |
| parent | b67c1fdf38655638d746b4cb252f16bd298da017 (diff) | |
| parent | b3c2ec362bbbdd89da9c0aa84b425717f5e3d351 (diff) | |
Merge pull request #1365 from DarkLordZach/lfs
file_sys: Add support for LayeredFS mods
Diffstat (limited to 'src/core/file_sys/romfs.h')
| -rw-r--r-- | src/core/file_sys/romfs.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/file_sys/romfs.h b/src/core/file_sys/romfs.h index e54a7d7a9..ecd1eb725 100644 --- a/src/core/file_sys/romfs.h +++ b/src/core/file_sys/romfs.h @@ -5,6 +5,7 @@ #pragma once #include <array> +#include <map> #include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" @@ -12,6 +13,8 @@ namespace FileSys { +struct RomFSHeader; + struct IVFCLevel { u64_le offset; u64_le size; @@ -29,8 +32,18 @@ struct IVFCHeader { }; static_assert(sizeof(IVFCHeader) == 0xE0, "IVFCHeader has incorrect size."); +enum class RomFSExtractionType { + Full, // Includes data directory + Truncated, // Traverses into data directory +}; + // Converts a RomFS binary blob to VFS Filesystem // Returns nullptr on failure -VirtualDir ExtractRomFS(VirtualFile file); +VirtualDir ExtractRomFS(VirtualFile file, + RomFSExtractionType type = RomFSExtractionType::Truncated); + +// Converts a VFS filesystem into a RomFS binary +// Returns nullptr on failure +VirtualFile CreateRomFS(VirtualDir dir); } // namespace FileSys |
