Пример #1
0
void FATRecord::Read(PseudoFile &file)
{
	this->offset = file.ReadLE<uint32_t>();
	file.ReadLE<uint32_t>(); // size
	uint32_t reserved[2];
	file.ReadLE(reserved);
}
Пример #2
0
void NDSStdHeader::Read(PseudoFile &file)
{
	file.ReadLE(this->type);
	this->magic = file.ReadLE<uint32_t>();
	file.ReadLE<uint32_t>(); // file size
	file.ReadLE<uint16_t>(); // structure size
	file.ReadLE<uint16_t>(); // # of blocks
}
Пример #3
0
void FATSection::Read(PseudoFile &file)
{
	int8_t type[4];
	file.ReadLE(type);
	if (!VerifyHeader(type, "FAT "))
		throw std::runtime_error("SDAT FAT Section invalid");
	file.ReadLE<uint32_t>(); // size
	uint32_t count = file.ReadLE<uint32_t>();
	this->records.resize(count);
	for (uint32_t i = 0; i < count; ++i)
		this->records[i].Read(file);
}