Unified NPD header in unedat.h

This commit is contained in:
NicknineTheEagle 2022-03-20 15:12:59 +03:00 committed by Megamouse
parent d03fcad9bd
commit 8065dbc2e7
4 changed files with 42 additions and 48 deletions

View file

@ -647,8 +647,8 @@ void read_npd_edat_header(const fs::file* input, NPD_HEADER& NPD, EDAT_HEADER& E
memcpy(NPD.digest, &npd_header[64], 0x10);
memcpy(NPD.title_hash, &npd_header[80], 0x10);
memcpy(NPD.dev_hash, &npd_header[96], 0x10);
NPD.unk1 = swap64(*reinterpret_cast<u64*>(&npd_header[112]));
NPD.unk2 = swap64(*reinterpret_cast<u64*>(&npd_header[120]));
NPD.activate_time = swap64(*reinterpret_cast<s64*>(&npd_header[112]));
NPD.expire_time = swap64(*reinterpret_cast<s64*>(&npd_header[120]));
EDAT.flags = swap32(*reinterpret_cast<s32*>(&edat_header[0]));
EDAT.block_size = swap32(*reinterpret_cast<s32*>(&edat_header[4]));