We hate pointer games, don't we?

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@597 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY 2008-09-21 15:04:22 +00:00
parent 60a4630324
commit 369a6d2883
13 changed files with 21 additions and 21 deletions

View File

@ -479,7 +479,7 @@ bool CBoot::BootUp(const SCoreStartupParameter& _StartupPara)
if (pVolume == NULL)
break;
bool isoWii = DiscIO::IsVolumeWiiDisc(*pVolume);
bool isoWii = DiscIO::IsVolumeWiiDisc(pVolume);
if (isoWii != Core::GetStartupParameter().bWii)
{
PanicAlert("Warning - starting ISO in wrong console mode!");

View File

@ -65,7 +65,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios)
return false;
}
m_strUniqueID = pVolume->GetUniqueID();
bWii = DiscIO::IsVolumeWiiDisc(*pVolume);
bWii = DiscIO::IsVolumeWiiDisc(pVolume);
switch (pVolume->GetCountry())
{

View File

@ -38,7 +38,7 @@ CWII_IPC_HLE_Device_di::CWII_IPC_HLE_Device_di(u32 _DeviceID, const std::string&
m_pVolume = DiscIO::CreateVolumeFromFilename(Core::GetStartupParameter().m_strFilename);
if (m_pVolume)
m_pFileSystem = DiscIO::CreateFileSystem(*m_pVolume);
m_pFileSystem = DiscIO::CreateFileSystem(m_pVolume);
}
// __________________________________________________________________________________________________

View File

@ -69,7 +69,7 @@ bool IsValid()
bool IsWii()
{
if (g_pVolume)
return IsVolumeWiiDisc(*g_pVolume);
return IsVolumeWiiDisc(g_pVolume);
return false;
}

View File

@ -64,7 +64,7 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem)
}
m_Name = std::string("Wii: ") + _rFileSystem.GetVolume().GetName();
m_Name = std::string("Wii: ") + _rFileSystem.GetVolume()->GetName();
}

View File

@ -25,7 +25,7 @@
namespace DiscIO
{
CFileSystemGCWii::CFileSystemGCWii(const IVolume& _rVolume)
CFileSystemGCWii::CFileSystemGCWii(const IVolume *_rVolume)
: IFileSystem(_rVolume),
m_Initialized(false),
m_OffsetShift(0)
@ -106,7 +106,7 @@ CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _MaxBuff
return(0);
}
m_rVolume.Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer);
m_rVolume->Read(pFileInfo->m_Offset, pFileInfo->m_FileSize, _pBuffer);
return(pFileInfo->m_FileSize);
}
@ -155,14 +155,14 @@ u32
CFileSystemGCWii::Read32(u64 _Offset) const
{
u32 Temp = 0;
m_rVolume.Read(_Offset, 4, (u8*)&Temp);
m_rVolume->Read(_Offset, 4, (u8*)&Temp);
return(Common::swap32(Temp));
}
void CFileSystemGCWii::GetStringFromOffset(u64 _Offset, char* Filename) const
{
m_rVolume.Read(_Offset, 255, (u8*)Filename);
m_rVolume->Read(_Offset, 255, (u8*)Filename);
}
size_t CFileSystemGCWii::GetFileList(std::vector<SFileInfo *> &_rFilenames)

View File

@ -29,7 +29,7 @@ class CFileSystemGCWii
{
public:
CFileSystemGCWii(const IVolume& _rVolume);
CFileSystemGCWii(const IVolume *_rVolume);
virtual ~CFileSystemGCWii();

View File

@ -23,7 +23,7 @@
namespace DiscIO
{
IFileSystem::IFileSystem(const IVolume& _rVolume)
IFileSystem::IFileSystem(const IVolume *_rVolume)
: m_rVolume(_rVolume)
{}
@ -32,7 +32,7 @@ IFileSystem::~IFileSystem()
{}
IFileSystem* CreateFileSystem(const IVolume& _rVolume)
IFileSystem* CreateFileSystem(const IVolume* _rVolume)
{
IFileSystem* pFileSystem = new CFileSystemGCWii(_rVolume);

View File

@ -46,7 +46,7 @@ class IFileSystem
{
public:
IFileSystem(const IVolume& _rVolume);
IFileSystem(const IVolume *_rVolume);
virtual ~IFileSystem();
@ -66,15 +66,15 @@ class IFileSystem
virtual const char* GetFileName(u64 _Address) = 0;
virtual const IVolume& GetVolume() {return(m_rVolume);}
virtual const IVolume *GetVolume() {return(m_rVolume);}
protected:
const IVolume& m_rVolume;
const IVolume *m_rVolume;
};
IFileSystem* CreateFileSystem(const IVolume& _rVolume);
IFileSystem* CreateFileSystem(const IVolume *_rVolume);
} // namespace
#endif

View File

@ -103,10 +103,10 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename)
return NULL;
}
bool IsVolumeWiiDisc(const IVolume& _rVolume)
bool IsVolumeWiiDisc(const IVolume *_rVolume)
{
u32 MagicWord = 0;
_rVolume.Read(0x18, 4, (u8*)&MagicWord);
_rVolume->Read(0x18, 4, (u8*)&MagicWord);
return (Common::swap32(MagicWord) == 0x5D1C9EA3);
}

View File

@ -23,7 +23,7 @@
namespace DiscIO
{
IVolume* CreateVolumeFromFilename(const std::string& _rFilename);
bool IsVolumeWiiDisc(const IVolume& _rVolume);
bool IsVolumeWiiDisc(const IVolume *_rVolume);
} // namespace
#endif

View File

@ -42,7 +42,7 @@ CFilesystemViewer::CFilesystemViewer(const std::string fileName, wxWindow* paren
std::vector<DiscIO::SFileInfo *> Our_Files;
OpenIso = DiscIO::CreateVolumeFromFilename(fileName);
pFileSystem = DiscIO::CreateFileSystem(*OpenIso);
pFileSystem = DiscIO::CreateFileSystem(OpenIso);
pFileSystem->GetFileList(Our_Files);
CreateGUIControls();

View File

@ -50,7 +50,7 @@ CISOFile::CISOFile(const std::string& _rFileName)
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
// check if we can get some infos from the banner file too
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(*pVolume);
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
if (pFileSystem != NULL)
{