[VFS] Rename a couple STFSVolumeDescriptor fields

This commit is contained in:
Dr. Chat 2018-05-26 09:05:44 -05:00
parent 7df45bf590
commit 1def8cfc59
2 changed files with 6 additions and 5 deletions

View File

@ -271,7 +271,7 @@ uint32_t StfsContainerDevice::ComputeBlockNumber(uint32_t block_index) {
if (((header_.header_size + 0x0FFF) & 0xB000) == 0xB000) {
block_shift = 1;
} else {
if ((header_.volume_descriptor.block_separation & 0x1) == 0x1) {
if ((header_.volume_descriptor.flags & 0x1) == 0x1) {
block_shift = 0;
} else {
block_shift = 1;
@ -332,8 +332,8 @@ bool StfsVolumeDescriptor::Read(const uint8_t* p) {
descriptor_size);
return false;
}
reserved = xe::load_and_swap<uint8_t>(p + 0x01);
block_separation = xe::load_and_swap<uint8_t>(p + 0x02);
version = xe::load_and_swap<uint8_t>(p + 0x01);
flags = xe::load_and_swap<uint8_t>(p + 0x02);
file_table_block_count = xe::load_and_swap<uint16_t>(p + 0x03);
file_table_block_number = load_uint24_be(p + 0x05);
std::memcpy(top_hash_table_hash, p + 0x08, 0x14);

View File

@ -32,6 +32,7 @@ enum class StfsContentType : uint32_t {
kAvatarItem = 0x00009000,
kCacheFile = 0x00040000,
kCommunityGame = 0x02000000,
kGamesOnDemand = 0x00007000,
kGameDemo = 0x00080000,
kGamerPicture = 0x00020000,
kGameTitle = 0x000A0000,
@ -75,8 +76,8 @@ struct StfsVolumeDescriptor {
bool Read(const uint8_t* p);
uint8_t descriptor_size;
uint8_t reserved;
uint8_t block_separation;
uint8_t version;
uint8_t flags;
uint16_t file_table_block_count;
uint32_t file_table_block_number;
uint8_t top_hash_table_hash[0x14];