this should be OK: display some default info when no save exist
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2133 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
d4c9a8a5fc
commit
d5bcb81872
|
@ -94,11 +94,6 @@ CBannerLoaderGC::GetBanner(u32* _pBannerImage)
|
|||
bool
|
||||
CBannerLoaderGC::GetName(std::string _rName[])
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
_rName[i] = "no name";
|
||||
}
|
||||
|
||||
bool returnCode = false;
|
||||
|
||||
if (!IsValid())
|
||||
|
@ -143,7 +138,7 @@ CBannerLoaderGC::GetName(std::string _rName[])
|
|||
bool
|
||||
CBannerLoaderGC::GetCompany(std::string& _rCompany)
|
||||
{
|
||||
_rCompany = "invalid images";
|
||||
_rCompany = "N/A";
|
||||
|
||||
if (!IsValid())
|
||||
{
|
||||
|
@ -164,11 +159,6 @@ CBannerLoaderGC::GetCompany(std::string& _rCompany)
|
|||
bool
|
||||
CBannerLoaderGC::GetDescription(std::string* _rDescription)
|
||||
{
|
||||
for (int i = 0; i< 6; i++)
|
||||
{
|
||||
_rDescription[i] = "";
|
||||
}
|
||||
|
||||
bool returnCode = false;
|
||||
|
||||
if (!IsValid())
|
||||
|
|
|
@ -73,53 +73,42 @@ CBannerLoaderWii::IsValid()
|
|||
bool
|
||||
CBannerLoaderWii::GetBanner(u32* _pBannerImage)
|
||||
{
|
||||
if (!IsValid())
|
||||
if (IsValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
static u32 Buffer[192 * 64];
|
||||
decode5A3image(Buffer, (u16*)pBanner->m_BannerTexture, 192, 64);
|
||||
|
||||
static u32 Buffer[192 * 64];
|
||||
decode5A3image(Buffer, (u16*)pBanner->m_BannerTexture, 192, 64);
|
||||
|
||||
// ugly scaling :)
|
||||
for (int y=0; y<32; y++)
|
||||
{
|
||||
for (int x=0; x<96; x++)
|
||||
// ugly scaling :)
|
||||
for (int y=0; y<32; y++)
|
||||
{
|
||||
_pBannerImage[y*96+x] = Buffer[(y*192*2)+(x*2)];
|
||||
}
|
||||
for (int x=0; x<96; x++)
|
||||
{
|
||||
_pBannerImage[y*96+x] = Buffer[(y*192*2)+(x*2)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CBannerLoaderWii::GetName(std::string* _rName)
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
if (IsValid())
|
||||
{
|
||||
_rName[i] = "no name";
|
||||
}
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
if (!IsValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
std::string name;
|
||||
if (CopyBeUnicodeToString(name, pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE))
|
||||
{
|
||||
for (int i = 0; i < 6; i++)
|
||||
std::string name;
|
||||
if (CopyBeUnicodeToString(name, pBanner->m_Comment[0], WII_BANNER_COMMENT_SIZE))
|
||||
{
|
||||
_rName[i] = name;
|
||||
}
|
||||
return true;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
_rName[i] = name;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -136,27 +125,20 @@ CBannerLoaderWii::GetCompany(std::string& _rCompany)
|
|||
bool
|
||||
CBannerLoaderWii::GetDescription(std::string* _rDescription)
|
||||
{
|
||||
for (int i = 0; i< 6; i++)
|
||||
if (IsValid())
|
||||
{
|
||||
_rDescription[i] = "";
|
||||
}
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
if (!IsValid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// find Banner type
|
||||
SWiiBanner* pBanner = (SWiiBanner*)m_pBannerFile;
|
||||
|
||||
std::string description;
|
||||
if (CopyBeUnicodeToString(description, pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE))
|
||||
{
|
||||
for (int i = 0; i< 6; i++)
|
||||
std::string description;
|
||||
if (CopyBeUnicodeToString(description, pBanner->m_Comment[1], WII_BANNER_COMMENT_SIZE))
|
||||
{
|
||||
_rDescription[i] = description;
|
||||
for (int i = 0; i< 6; i++)
|
||||
{
|
||||
_rDescription[i] = description;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -59,6 +59,8 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
|||
if (pVolume != NULL)
|
||||
{
|
||||
m_Name[0] = _rFileName;
|
||||
m_Company = "N/A";
|
||||
m_Description[0] = "No Description";
|
||||
m_Country = pVolume->GetCountry();
|
||||
m_FileSize = File::GetSize(_rFileName.c_str());
|
||||
m_VolumeSize = pVolume->GetSize();
|
||||
|
|
Loading…
Reference in New Issue