mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
1bdae0fe29
- Zero initialization here is useful for determinism.
31 lines
896 B
C++
31 lines
896 B
C++
// Copyright 2018 yuzu emulator team
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <map>
|
|
#include "common/common_funcs.h"
|
|
#include "common/common_types.h"
|
|
#include "common/swap.h"
|
|
#include "core/file_sys/vfs.h"
|
|
|
|
namespace FileSys {
|
|
|
|
enum class RomFSExtractionType {
|
|
Full, // Includes data directory
|
|
Truncated, // Traverses into data directory
|
|
SingleDiscard, // Traverses into the first subdirectory of root
|
|
};
|
|
|
|
// Converts a RomFS binary blob to VFS Filesystem
|
|
// Returns nullptr on failure
|
|
VirtualDir ExtractRomFS(VirtualFile file,
|
|
RomFSExtractionType type = RomFSExtractionType::Truncated);
|
|
|
|
// Converts a VFS filesystem into a RomFS binary
|
|
// Returns nullptr on failure
|
|
VirtualFile CreateRomFS(VirtualDir dir, VirtualDir ext = nullptr);
|
|
|
|
} // namespace FileSys
|