diff --git a/lib/libnx/include/nx/pfs.h b/lib/libnx/include/nx/pfs.h index d0d79d0..2375d44 100644 --- a/lib/libnx/include/nx/pfs.h +++ b/lib/libnx/include/nx/pfs.h @@ -17,7 +17,8 @@ namespace nx { char signature[4]; le_uint32_t file_num; - le_uint64_t name_table_size; + le_uint32_t name_table_size; + byte_t padding[4]; }; struct sPfsFile diff --git a/lib/libnx/include/nx/romfs.h b/lib/libnx/include/nx/romfs.h new file mode 100644 index 0000000..ab34c01 --- /dev/null +++ b/lib/libnx/include/nx/romfs.h @@ -0,0 +1,35 @@ +#pragma once +#include +#include +#include +#include +#include + +namespace nx +{ + namespace romfs + { + enum HeaderSectionIndex + { + DIR_HASHMAP_TABLE, + DIR_NODE_TABLE, + FILE_HASHMAP_TABLE, + FILE_NODE_TABLE, + + SECTION_NUM + }; + } + +#pragma pack(push,1) + struct sRomfsHeader + { + le_uint64_t header_size; + struct sSection + { + le_uint64_t offset; + le_uint64_t size; + } sections[romfs::SECTION_NUM]; + le_uint64_t data_offset; + }; +#pragma pack(pop) +}