libnedit
Lightweight C++ library for Nintendo DS(i) formats
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ntr::fmt::ROM Struct Reference
Inheritance diagram for ntr::fmt::ROM:
ntr::fmt::nfs::NitroFsFileFormat ntr::fs::ExternalFsFileFormat ntr::fs::FileFormat

Classes

struct  Banner
 
struct  Header
 

Public Types

enum class  NDSRegion : u8 { Normal = 0x00 , Korea = 0x40 , China = 0x80 }
 
enum class  UnitCode : u8 { NDS = 0x00 , NDS_NDSi = 0x02 , NDSi = 0x03 }
 

Public Member Functions

 ROM (const ROM &)=delete
 
bool GetAlignmentBetweenFileData (size_t &out_align) override
 
size_t GetFatEntriesOffset () override
 
size_t GetFatEntryCount () override
 
Result OnFileSystemWrite (fs::BinaryFile &w_bf, const ssize_t size_diff) override
 
Result ValidateImpl (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle, const fs::FileCompression comp) override
 
Result ReadImpl (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle, const fs::FileCompression comp) override
 
- Public Member Functions inherited from ntr::fmt::nfs::NitroFsFileFormat
virtual size_t GetBaseOffset ()
 
Result LookupFile (const std::string &path, NitroFile &out_file) const
 
Result GetName (const NitroEntryBase &entry, std::string &out_name) const
 
Result DoWithReadFile (std::function< Result(fs::BinaryFile &)> fn) const
 
Result SaveFileSystem () override
 
- Public Member Functions inherited from ntr::fs::ExternalFsFileFormat
std::string GetExternalFsPath (const std::string &path)
 
std::string GetBasePath (const std::string &ext_fs_path)
 
Result WriteImpl (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle, const fs::FileCompression comp) override
 
- Public Member Functions inherited from ntr::fs::FileFormat
Result Validate (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle, const fs::FileCompression comp=fs::FileCompression::None)
 
Result ReadFrom (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle, const fs::FileCompression comp=fs::FileCompression::None)
 
Result ReadCompressedFrom (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle)
 
Result WriteTo (const std::string &path, std::shared_ptr< fs::FileHandle > file_handle)
 
Result WriteTo (std::shared_ptr< fs::FileHandle > file_handle)
 

Public Attributes

Header header
 
Banner banner
 
- Public Attributes inherited from ntr::fmt::nfs::NitroFsFileFormat
nfs::NitroDirectory nitro_fs
 
- Public Attributes inherited from ntr::fs::ExternalFsFileFormat
u32 ext_fs_id
 
std::string ext_fs_root_path
 
- Public Attributes inherited from ntr::fs::FileFormat
std::string read_path
 
std::shared_ptr< fs::FileHandleread_file_handle
 
std::string write_path
 
std::shared_ptr< fs::FileHandlewrite_file_handle
 
fs::FileCompression comp
 

Static Public Attributes

static constexpr u32 GameTitleLength = 128
 

Member Function Documentation

◆ GetAlignmentBetweenFileData()

bool ntr::fmt::ROM::GetAlignmentBetweenFileData ( size_t & out_align)
inlineoverridevirtual

Reimplemented from ntr::fmt::nfs::NitroFsFileFormat.

◆ GetFatEntriesOffset()

size_t ntr::fmt::ROM::GetFatEntriesOffset ( )
inlineoverridevirtual

◆ GetFatEntryCount()

size_t ntr::fmt::ROM::GetFatEntryCount ( )
inlineoverridevirtual

◆ OnFileSystemWrite()

Result ntr::fmt::ROM::OnFileSystemWrite ( fs::BinaryFile & w_bf,
const ssize_t size_diff )
inlineoverridevirtual

◆ ReadImpl()

Result ntr::fmt::ROM::ReadImpl ( const std::string & path,
std::shared_ptr< fs::FileHandle > file_handle,
const fs::FileCompression comp )
overridevirtual

Implements ntr::fs::FileFormat.

◆ ValidateImpl()

Result ntr::fmt::ROM::ValidateImpl ( const std::string & path,
std::shared_ptr< fs::FileHandle > file_handle,
const fs::FileCompression comp )
overridevirtual

Implements ntr::fs::FileFormat.


The documentation for this struct was generated from the following files: