Decompile fn_05116 (?ReadAuxiliaryIdentifier@?A0xaee75dd0@@YA_KPBXI@Z)
Batch #13811 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_05116 ?ReadAuxiliaryIdentifier@?A0xaee75dd0@@YA_KPBXI@Z: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev, SapitoSucio Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
6e2a179d0a
commit
82e16cbb58
1 changed files with 5 additions and 5 deletions
|
|
@ -99,6 +99,7 @@ namespace {
|
|||
/* 0000 */ std::uint8_t version;
|
||||
/* 0001 */ std::uint8_t unknown_0001[3];
|
||||
/* 0004 */ std::uint64_t identifier;
|
||||
/* 000C */ std::uint32_t unknown_000C;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
|
@ -123,7 +124,7 @@ namespace {
|
|||
static_assert(sizeof(PakEntryFileV3) == 21);
|
||||
static_assert(offsetof(PakEntryFileV3, flags) == 12);
|
||||
static_assert(offsetof(PakEntryFileV3, dataOffset) == 13);
|
||||
static_assert(sizeof(PakAuxiliaryFile) == 12);
|
||||
static_assert(sizeof(PakAuxiliaryFile) == 16);
|
||||
static_assert(offsetof(PakAuxiliaryFile, identifier) == 4);
|
||||
|
||||
// INLINED
|
||||
|
|
@ -137,10 +138,9 @@ namespace {
|
|||
// FUNCTION: fn_05116
|
||||
std::uint64_t ReadAuxiliaryIdentifier(const void* data, std::size_t size) {
|
||||
if (size != 0) {
|
||||
const auto* bytes = static_cast<const std::uint8_t*>(data);
|
||||
if (bytes[0] <= 1) {
|
||||
PakAuxiliaryFile header;
|
||||
std::memcpy(&header, data, sizeof(header));
|
||||
PakAuxiliaryFile header;
|
||||
std::memcpy(&header, data, sizeof(header));
|
||||
if (header.version <= 1) {
|
||||
return header.identifier;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue