[nx] Standardise const/enum ordering.

This commit is contained in:
jakcron 2018-06-29 15:09:05 +08:00
parent 38b93cb317
commit 22072399de
6 changed files with 22 additions and 22 deletions

View file

@ -5,6 +5,9 @@ namespace nx
{
namespace fac
{
static const uint32_t kFacFormatVersion = 1;
static const size_t kSectionAlignSize = 4;
enum FsAccessFlag
{
FSA_APPLICATION_INFO,
@ -30,9 +33,6 @@ namespace nx
FSA_DEBUG = 62,
FSA_FULL_PERMISSION = 63,
};
static const uint32_t kFacFormatVersion = 1;
static const size_t kSectionAlignSize = 4;
}
#pragma pack(push,1)

View file

@ -5,6 +5,18 @@ namespace nx
{
namespace nacp
{
static const size_t kNameLength = 0x200;
static const size_t kPublisherLength = 0x100;
static const size_t kMaxLanguageCount = 16;
static const size_t kIsbnLength = 37;
static const size_t kRatingAgeCount = 32;
static const size_t kDisplayVersionLength = 16;
static const size_t kApplicationErrorCodeCategoryLength = 8;
static const size_t kLocalCommunicationIdCount = 8;
static const size_t kBcatPassphraseLength = 65;
static const size_t kPlayLogQueryableApplicationIdCount = 16;
static const int8_t kUnusedAgeRating = -1;
enum AocRegistrationType
{
AOC_AllOnLaunch,
@ -142,18 +154,6 @@ namespace nx
VCAP_Manual,
VCAP_Enable
};
static const size_t kNameLength = 0x200;
static const size_t kPublisherLength = 0x100;
static const size_t kMaxLanguageCount = 16;
static const size_t kIsbnLength = 37;
static const size_t kRatingAgeCount = 32;
static const size_t kDisplayVersionLength = 16;
static const size_t kApplicationErrorCodeCategoryLength = 8;
static const size_t kLocalCommunicationIdCount = 8;
static const size_t kBcatPassphraseLength = 65;
static const size_t kPlayLogQueryableApplicationIdCount = 16;
static const int8_t kUnusedAgeRating = -1;
}

View file

@ -7,7 +7,6 @@ namespace nx
namespace nro
{
static const uint32_t kNroStructMagic = _MAKE_STRUCT_MAGIC("NRO0");
static const uint32_t kDefaultFormatVersion = 0;
static const size_t kRoCrtSize = 8;
static const size_t kModuleIdSize = 32;

View file

@ -8,6 +8,8 @@ namespace nx
namespace nso
{
static const uint32_t kNsoStructMagic = _MAKE_STRUCT_MAGIC("NSO0");
static const uint32_t kDefaultFormatVersion = 0;
static const size_t kModuleIdSize = 32;
enum HeaderFlags
{
@ -18,9 +20,6 @@ namespace nx
FLAG_RO_HASH,
FLAG_DATA_HASH
};
static const uint32_t kDefaultFormatVersion = 0;
static const size_t kModuleIdSize = 32;
}
#pragma pack(push,1)

View file

@ -5,6 +5,9 @@ namespace nx
{
namespace romfs
{
static const uint64_t kRomfsHeaderAlign = 0x200;
static const uint32_t kInvalidAddr = 0xffffffff;
enum HeaderSectionIndex
{
DIR_HASHMAP_TABLE,
@ -13,9 +16,6 @@ namespace nx
FILE_NODE_TABLE,
SECTION_NUM
};
static const uint64_t kRomfsHeaderAlign = 0x200;
static const uint32_t kInvalidAddr = 0xffffffff;
}
#pragma pack(push,1)

View file

@ -15,12 +15,14 @@ namespace nx
static const uint32_t kHeaderEncSize = 0x70;
static const uint32_t kPageSize = 0x200;
static const uint32_t kUppHashLen = 8;
/*
static const uint32_t kCardKeyAreaPageCount = 8;
static const uint32_t kCardHeaderPageCount = 1;
static const uint32_t kReservedAreaPageCount = 55;
static const uint32_t kCertAreaStartPageAddress = kCardHeaderPageCount + kReservedAreaPageCount + kCardKeyAreaPageCount;
static const uint32_t kCertAreaPageCount = 64;
static const uint32_t kNormalAreaStartPageAddress = kReservedAreaPageCount + kCertAreaPageCount + kCardHeaderPageCount + kCardKeyAreaPageCount;
*/
const std::string kUpdatePartitionStr = "update";
const std::string kLogoPartitionStr = "logo";