mirror of
https://github.com/jakcron/nstool
synced 2024-11-22 21:49:30 +00:00
[nx] Rename macro _MAKE_STRUCT_MAGIC to _MAKE_STRUCT_MAGIC_U32
This commit is contained in:
parent
22072399de
commit
b9e86b21bc
11 changed files with 14 additions and 14 deletions
|
@ -6,7 +6,7 @@ namespace nx
|
|||
{
|
||||
namespace aset
|
||||
{
|
||||
static const uint32_t kAssetStructMagic = _MAKE_STRUCT_MAGIC("ASET");
|
||||
static const uint32_t kAssetStructMagic = _MAKE_STRUCT_MAGIC_U32("ASET");
|
||||
|
||||
static const uint32_t kDefaultAssetFormatVersion = 0;
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ namespace nx
|
|||
{
|
||||
namespace aci
|
||||
{
|
||||
static const uint32_t kAciStructMagic = _MAKE_STRUCT_MAGIC("ACI0");
|
||||
static const uint32_t kAciDescStructMagic = _MAKE_STRUCT_MAGIC("ACID");
|
||||
static const uint32_t kAciStructMagic = _MAKE_STRUCT_MAGIC_U32("ACI0");
|
||||
static const uint32_t kAciDescStructMagic = _MAKE_STRUCT_MAGIC_U32("ACID");
|
||||
static const size_t kSectionAlignSize = 0x10;
|
||||
|
||||
enum Flag
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace nx
|
|||
{
|
||||
namespace hierarchicalintegrity
|
||||
{
|
||||
static const uint32_t kStructMagic = _MAKE_STRUCT_MAGIC("IVFC");
|
||||
static const uint32_t kStructMagic = _MAKE_STRUCT_MAGIC_U32("IVFC");
|
||||
static const uint32_t kRomfsTypeId = 0x20000;
|
||||
static const size_t kDefaultLayerNum = 6;
|
||||
static const size_t kHeaderAlignLen = 0x20;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include <cstdint>
|
||||
|
||||
#define _MAKE_STRUCT_MAGIC(x) ((uint32_t)(x[3]) << 24 | (uint32_t)(x[2]) << 16 | (uint32_t)(x[1]) << 8 | (uint32_t)(x[0]))
|
||||
#define _MAKE_STRUCT_MAGIC_U32(x) ((uint32_t)(x[3]) << 24 | (uint32_t)(x[2]) << 16 | (uint32_t)(x[1]) << 8 | (uint32_t)(x[0]))
|
||||
#define _MAKE_STRUCT_MAGIC_U64(x) ((uint64_t)(x[7]) << 56 | (uint64_t)(x[6]) << 48 | (uint64_t)(x[5]) << 40 | (uint64_t)(x[4]) << 32 | (uint64_t)(x[3]) << 24 | (uint64_t)(x[2]) << 16 | (uint64_t)(x[1]) << 8 | (uint64_t)(x[0]))
|
||||
|
|
|
@ -9,8 +9,8 @@ namespace nx
|
|||
{
|
||||
namespace nca
|
||||
{
|
||||
static const uint32_t kNca2StructMagic = _MAKE_STRUCT_MAGIC("NCA2");
|
||||
static const uint32_t kNca3StructMagic = _MAKE_STRUCT_MAGIC("NCA3");
|
||||
static const uint32_t kNca2StructMagic = _MAKE_STRUCT_MAGIC_U32("NCA2");
|
||||
static const uint32_t kNca3StructMagic = _MAKE_STRUCT_MAGIC_U32("NCA3");
|
||||
static const size_t kSectorSize = 0x200;
|
||||
static const size_t kPartitionNum = 4;
|
||||
static const size_t kHeaderSectorNum = 6;
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace nx
|
|||
{
|
||||
namespace npdm
|
||||
{
|
||||
static const uint32_t kNpdmStructMagic = _MAKE_STRUCT_MAGIC("META");
|
||||
static const uint32_t kNpdmStructMagic = _MAKE_STRUCT_MAGIC_U32("META");
|
||||
static const size_t kNameMaxLen = 0x10;
|
||||
static const size_t kProductCodeMaxLen = 0x10;
|
||||
static const uint32_t kMaxPriority = BIT(6) - 1;
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace nx
|
|||
{
|
||||
namespace nro
|
||||
{
|
||||
static const uint32_t kNroStructMagic = _MAKE_STRUCT_MAGIC("NRO0");
|
||||
static const uint32_t kNroStructMagic = _MAKE_STRUCT_MAGIC_U32("NRO0");
|
||||
static const uint32_t kDefaultFormatVersion = 0;
|
||||
static const size_t kRoCrtSize = 8;
|
||||
static const size_t kModuleIdSize = 32;
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace nx
|
|||
{
|
||||
namespace nrr
|
||||
{
|
||||
static const uint32_t kNrrStructMagic = _MAKE_STRUCT_MAGIC("NRR0");
|
||||
static const uint32_t kNrrStructMagic = _MAKE_STRUCT_MAGIC_U32("NRR0");
|
||||
}
|
||||
|
||||
#pragma pack(push,1)
|
||||
|
|
|
@ -7,7 +7,7 @@ namespace nx
|
|||
{
|
||||
namespace nso
|
||||
{
|
||||
static const uint32_t kNsoStructMagic = _MAKE_STRUCT_MAGIC("NSO0");
|
||||
static const uint32_t kNsoStructMagic = _MAKE_STRUCT_MAGIC_U32("NSO0");
|
||||
static const uint32_t kDefaultFormatVersion = 0;
|
||||
static const size_t kModuleIdSize = 32;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ namespace nx
|
|||
{
|
||||
namespace pfs
|
||||
{
|
||||
static const uint32_t kPfsStructMagic = _MAKE_STRUCT_MAGIC("PFS0");
|
||||
static const uint32_t kHashedPfsStructMagic = _MAKE_STRUCT_MAGIC("HFS0");
|
||||
static const uint32_t kPfsStructMagic = _MAKE_STRUCT_MAGIC_U32("PFS0");
|
||||
static const uint32_t kHashedPfsStructMagic = _MAKE_STRUCT_MAGIC_U32("HFS0");
|
||||
static const size_t kHeaderAlign = 64;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace nx
|
|||
{
|
||||
namespace xci
|
||||
{
|
||||
static const uint32_t kXciStructMagic = _MAKE_STRUCT_MAGIC("HEAD");
|
||||
static const uint32_t kXciStructMagic = _MAKE_STRUCT_MAGIC_U32("HEAD");
|
||||
static const uint32_t kHeaderEncOffset = 0x90;
|
||||
static const uint32_t kHeaderEncSize = 0x70;
|
||||
static const uint32_t kPageSize = 0x200;
|
||||
|
|
Loading…
Reference in a new issue