Files
dolphin/Source/Core/DiscIO/VolumeWad.h
T

73 lines
2.2 KiB
C++
Raw Normal View History

// Copyright 2008 Dolphin Emulator Project
2015-05-18 01:08:10 +02:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include "Common/CommonTypes.h"
2017-02-11 08:57:47 +01:00
#include "Core/IOS/ES/Formats.h"
2014-02-17 05:18:15 -05:00
#include "DiscIO/Volume.h"
namespace DiscIO
{
class BlobReader;
2016-07-06 20:33:05 +02:00
enum class BlobType;
enum class Country;
class FileSystem;
2016-07-06 20:33:05 +02:00
enum class Language;
enum class Region;
2016-07-06 20:33:05 +02:00
enum class Platform;
class VolumeWAD : public Volume
{
public:
VolumeWAD(std::unique_ptr<BlobReader> reader);
~VolumeWAD();
bool Read(u64 offset, u64 length, u8* buffer,
const Partition& partition = PARTITION_NONE) const override;
const FileSystem* GetFileSystem(const Partition& partition = PARTITION_NONE) const override;
std::optional<u64> GetTitleID(const Partition& partition = PARTITION_NONE) const override;
2017-05-20 18:33:36 +02:00
const IOS::ES::TMDReader& GetTMD(const Partition& partition = PARTITION_NONE) const override;
std::string GetGameID(const Partition& partition = PARTITION_NONE) const override;
std::string GetMakerID(const Partition& partition = PARTITION_NONE) const override;
std::optional<u16> GetRevision(const Partition& partition = PARTITION_NONE) const override;
std::string GetInternalName(const Partition& partition = PARTITION_NONE) const override
{
return "";
}
2016-07-06 20:33:05 +02:00
std::map<Language, std::string> GetLongNames() const override;
2018-03-10 22:41:49 +01:00
std::vector<u32> GetBanner(u32* width, u32* height) const override;
std::string GetApploaderDate(const Partition& partition = PARTITION_NONE) const override
{
return "";
}
2016-07-06 20:33:05 +02:00
Platform GetVolumeType() const override;
// Provides a best guess for the region. Might be inaccurate or Region::Unknown.
Region GetRegion() const override;
Country GetCountry(const Partition& partition = PARTITION_NONE) const override;
2015-02-24 00:03:59 -05:00
BlobType GetBlobType() const override;
u64 GetSize() const override;
u64 GetRawSize() const override;
private:
std::unique_ptr<BlobReader> m_reader;
2017-02-11 08:57:47 +01:00
IOS::ES::TMDReader m_tmd;
u32 m_offset = 0;
u32 m_tmd_offset = 0;
u32 m_opening_bnr_offset = 0;
u32 m_hdr_size = 0;
u32 m_cert_size = 0;
u32 m_tick_size = 0;
u32 m_tmd_size = 0;
u32 m_data_size = 0;
};
} // namespace