GCMemcard: DEntry: Move code out of header.
This commit is contained in:
parent
17da22a84f
commit
6e04e4dd6a
|
@ -1470,6 +1470,20 @@ void Header::CalculateSerial(u32* serial1, u32* serial2) const
|
|||
*serial2 = serial[1] ^ serial[3] ^ serial[5] ^ serial[7];
|
||||
}
|
||||
|
||||
DEntry::DEntry()
|
||||
{
|
||||
memset(this, 0xFF, DENTRY_SIZE);
|
||||
}
|
||||
|
||||
std::string DEntry::GCI_FileName() const
|
||||
{
|
||||
std::string filename =
|
||||
std::string(reinterpret_cast<const char*>(m_makercode.data()), m_makercode.size()) + '-' +
|
||||
std::string(reinterpret_cast<const char*>(m_gamecode.data()), m_gamecode.size()) + '-' +
|
||||
reinterpret_cast<const char*>(m_filename.data()) + ".gci";
|
||||
return Common::EscapeFileName(filename);
|
||||
}
|
||||
|
||||
Directory::Directory()
|
||||
{
|
||||
memset(this, 0xFF, BLOCK_SIZE);
|
||||
|
|
|
@ -154,15 +154,10 @@ static_assert(sizeof(Header) == BLOCK_SIZE);
|
|||
|
||||
struct DEntry
|
||||
{
|
||||
DEntry() { memset(this, 0xFF, DENTRY_SIZE); }
|
||||
std::string GCI_FileName() const
|
||||
{
|
||||
std::string filename =
|
||||
std::string(reinterpret_cast<const char*>(m_makercode.data()), m_makercode.size()) + '-' +
|
||||
std::string(reinterpret_cast<const char*>(m_gamecode.data()), m_gamecode.size()) + '-' +
|
||||
reinterpret_cast<const char*>(m_filename.data()) + ".gci";
|
||||
return Common::EscapeFileName(filename);
|
||||
}
|
||||
DEntry();
|
||||
|
||||
// TODO: This probably shouldn't be here at all?
|
||||
std::string GCI_FileName() const;
|
||||
|
||||
static constexpr std::array<u8, 4> UNINITIALIZED_GAMECODE{{0xFF, 0xFF, 0xFF, 0xFF}};
|
||||
|
||||
|
|
Loading…
Reference in New Issue