mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Incomplete work on extracting banners from Wii images without savefiles. Please finish my work.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3336 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -43,6 +43,22 @@ CARCFile::CARCFile(const std::string& _rFilename)
|
||||
}
|
||||
}
|
||||
|
||||
CARCFile::CARCFile(const std::string& _rFilename, u32 offset)
|
||||
: m_pBuffer(NULL)
|
||||
, m_Initialized(false)
|
||||
{
|
||||
DiscIO::IBlobReader* pReader = DiscIO::CreateBlobReader(_rFilename.c_str());
|
||||
if (pReader != NULL)
|
||||
{
|
||||
u64 FileSize = pReader->GetDataSize() - offset;
|
||||
m_pBuffer = new u8[(u32)FileSize];
|
||||
pReader->Read(offset, FileSize, m_pBuffer);
|
||||
delete pReader;
|
||||
|
||||
m_Initialized = ParseBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
CARCFile::CARCFile(const u8* _pBuffer, size_t _BufferSize)
|
||||
: m_pBuffer(NULL)
|
||||
, m_Initialized(false)
|
||||
@ -156,9 +172,7 @@ CARCFile::ParseBuffer()
|
||||
u32 ID = Common::swap32(*(u32*)(m_pBuffer));
|
||||
|
||||
if (ID != ARC_ID)
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
return false;
|
||||
|
||||
// read header
|
||||
u32 FSTOffset = Common::swap32(*(u32*)(m_pBuffer + 0x4));
|
||||
|
Reference in New Issue
Block a user