Adds a new column to the game control list that shows what platform the game is.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3288 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid
2009-05-27 06:41:01 +00:00
parent d195dbbe8d
commit f752853009
8 changed files with 839 additions and 2 deletions
+1
View File
@@ -120,6 +120,7 @@ bool IsVolumeWiiDisc(const IVolume *_rVolume)
_rVolume->Read(0x18, 4, (u8*)&MagicWord);
return (Common::swap32(MagicWord) == 0x5D1C9EA3);
//Gamecube 0xc2339f3d
}
IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _PartitionGroup, u32 _VolumeType, u32 _VolumeNum, bool Korean)
+8
View File
@@ -952,6 +952,14 @@
RelativePath=".\resources\Flag_USA.xpm"
>
</File>
<File
RelativePath=".\resources\Platform_Gamecube.xpm"
>
</File>
<File
RelativePath=".\resources\Platform_Wii.xpm"
>
</File>
<File
RelativePath=".\resource.h"
>
+18 -2
View File
@@ -39,6 +39,8 @@
#include "../resources/Flag_Italy.xpm"
#include "../resources/Flag_Japan.xpm"
#include "../resources/Flag_USA.xpm"
#include "../resources/Platform_Wii.xpm"
#include "../resources/Platform_Gamecube.xpm"
#endif // USE_XPM_BITMAPS
// ugly that this lib included code from the main
@@ -76,6 +78,7 @@ bool operator < (const GameListItem &one, const GameListItem &other)
case CGameListCtrl::COLUMN_NOTES: return strcasecmp(one.GetDescription(indexOne).c_str(), other.GetDescription(indexOther).c_str()) < 0;
case CGameListCtrl::COLUMN_COUNTRY: return (one.GetCountry() < other.GetCountry());
case CGameListCtrl::COLUMN_SIZE: return (one.GetFileSize() < other.GetFileSize());
case CGameListCtrl::COLUMN_PLATFORM: return (one.GetPlatform() < other.GetPlatform());
default: return strcasecmp(one.GetName(indexOne).c_str(), other.GetName(indexOther).c_str()) < 0;
}
}
@@ -125,6 +128,12 @@ void CGameListCtrl::InitBitmaps()
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_JAP] = m_imageListSmall->Add(iconTemp);
iconTemp.CopyFromBitmap(wxBitmap(Flag_Europe_xpm));
m_FlagImageIndex[DiscIO::IVolume::COUNTRY_UNKNOWN] = m_imageListSmall->Add(iconTemp);
m_PlatformImageIndex.resize(2);
iconTemp.CopyFromBitmap(wxBitmap(Platform_Gamecube_xpm));
m_PlatformImageIndex[0] = m_imageListSmall->Add(iconTemp);
iconTemp.CopyFromBitmap(wxBitmap(Platform_Wii_xpm));
m_PlatformImageIndex[1] = m_imageListSmall->Add(iconTemp);
}
void CGameListCtrl::BrowseForDirectory()
@@ -186,15 +195,16 @@ void CGameListCtrl::Update()
InsertColumn(COLUMN_COUNTRY, _(""));
InsertColumn(COLUMN_SIZE, _("Size"));
InsertColumn(COLUMN_EMULATION_STATE, _("Emulation"));
InsertColumn(COLUMN_PLATFORM, _("Platform"));
// set initial sizes for columns
SetColumnWidth(COLUMN_BANNER, 106);
SetColumnWidth(COLUMN_TITLE, 150);
SetColumnWidth(COLUMN_COMPANY, 100);
SetColumnWidth(COLUMN_COMPANY, 130);
SetColumnWidth(COLUMN_NOTES, 150);
SetColumnWidth(COLUMN_COUNTRY, 32);
SetColumnWidth(COLUMN_EMULATION_STATE, 130);
SetColumnWidth(COLUMN_PLATFORM, 90);
// add all items
for (int i = 0; i < (int)m_ISOFiles.size(); i++)
@@ -361,6 +371,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
// Country
SetItemColumnImage(_Index, COLUMN_COUNTRY, m_FlagImageIndex[rISOFile.GetCountry()]);
SetItemColumnImage(_Index, COLUMN_PLATFORM, m_PlatformImageIndex[rISOFile.GetPlatform()]);
// Background color
SetBackgroundColor();
@@ -568,6 +579,10 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
if (iso1->GetFileSize() > iso2->GetFileSize()) return 1 *t;
if (iso1->GetFileSize() < iso2->GetFileSize()) return -1 *t;
return 0;
case CGameListCtrl::COLUMN_PLATFORM:
if(iso1->GetPlatform() > iso2->GetPlatform()) return 1 *t;
if(iso1->GetPlatform() < iso2->GetPlatform()) return -1 *t;
return 0;
}
return 0;
@@ -942,6 +957,7 @@ void CGameListCtrl::AutomaticColumnWidth()
+ GetColumnWidth(COLUMN_COUNTRY)
+ GetColumnWidth(COLUMN_SIZE)
+ GetColumnWidth(COLUMN_EMULATION_STATE)
+ GetColumnWidth(COLUMN_PLATFORM)
+ 5); // some pad to keep the horizontal scrollbar away :)
SetColumnWidth(COLUMN_TITLE, wxMax(0.3*resizable, 100));
+2
View File
@@ -50,12 +50,14 @@ public:
COLUMN_COUNTRY,
COLUMN_SIZE,
COLUMN_EMULATION_STATE,
COLUMN_PLATFORM,
NUMBER_OF_COLUMN
};
private:
std::vector<int> m_FlagImageIndex;
std::vector<int> m_PlatformImageIndex;
std::vector<GameListItem> m_ISOFiles;
// NetPlay string for the gamelist
+4
View File
@@ -47,6 +47,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
, m_pImage(NULL)
, m_ImageSize(0)
, m_IsWii(false)
, m_Platform(false)
{
if (LoadFromCache())
@@ -60,6 +61,8 @@ GameListItem::GameListItem(const std::string& _rFileName)
if (pVolume != NULL)
{
m_IsWii = DiscIO::IsVolumeWiiDisc(pVolume);
m_Platform = DiscIO::IsVolumeWiiDisc(pVolume);
m_Company = "N/A";
for (int i = 0; i < 6; i++)
{
@@ -169,6 +172,7 @@ void GameListItem::DoState(PointerWrap &p)
p.Do(m_BlobCompressed);
p.DoBuffer(&m_pImage, m_ImageSize);
p.Do(m_IsWii);
p.Do(m_Platform);
}
std::string GameListItem::CreateCacheFilename()
+2
View File
@@ -38,6 +38,7 @@ public:
const std::string& GetIssues() const {return m_Issues;}
bool IsCompressed() const {return m_BlobCompressed;}
bool IsWii() const {return m_IsWii;}
bool GetPlatform() const {return m_Platform;}
u64 GetFileSize() const {return m_FileSize;}
u64 GetVolumeSize() const {return m_VolumeSize;}
#if defined(HAVE_WX) && HAVE_WX
@@ -66,6 +67,7 @@ private:
u8* m_pImage;
u32 m_ImageSize;
bool m_IsWii;
bool m_Platform;
bool LoadFromCache();
void SaveToCache();
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,122 @@
/* XPM */
static const char * Platform_Wii_xpm[] = {
/* width height num_colors chars_per_pixel */
"96 32 83 1",
/* colors */
" c #ffffff",
". c #fefefe",
"X c #f0f0f0",
"o c #d8d8d8",
"O c #cfcfcf",
"+ c #d2d2d2",
"@ c #e3e3e3",
"# c #f7f7f7",
"$ c #eaeaea",
"% c #d5d5d5",
"& c #cecece",
"* c #e4e4e4",
"= c #f9f9f9",
"- c #f1f1f1",
"; c #e9e9e9",
": c #ebebeb",
"> c #ececec",
", c #ededed",
"< c #e1e1e1",
"1 c #f6f6f6",
"2 c #f8f8f8",
"3 c #eeeeee",
"4 c #fdfdfd",
"5 c #fcfcfc",
"6 c #cacaca",
"7 c #afafaf",
"8 c #aeaeae",
"9 c #b1b1b1",
"0 c #e2e2e2",
"q c #fbfbfb",
"w c #c6c6c6",
"e c #b0b0b0",
"r c #b3b3b3",
"t c #e8e8e8",
"y c #e6e6e6",
"u c #dcdcdc",
"i c #b4b4b4",
"p c #adadad",
"a c #d1d1d1",
"s c #cbcbcb",
"d c #d0d0d0",
"f c #acacac",
"g c #c9c9c9",
"h c #efefef",
"j c #bdbdbd",
"k c #d7d7d7",
"l c #ababab",
"z c #fafafa",
"x c #f5f5f5",
"c c #c3c3c3",
"v c #e7e7e7",
"b c #e5e5e5",
"n c #bbbbbb",
"m c #bababa",
"M c #dddddd",
"N c #b5b5b5",
"B c #d6d6d6",
"V c #c4c4c4",
"C c #f4f4f4",
"Z c #b8b8b8",
"A c #b6b6b6",
"S c #c5c5c5",
"D c #e0e0e0",
"F c #b7b7b7",
"G c #d9d9d9",
"H c #bcbcbc",
"J c #bfbfbf",
"K c #dedede",
"L c #c7c7c7",
"P c #c2c2c2",
"I c #d3d3d3",
"U c #f3f3f3",
"Y c #b2b2b2",
"T c #cccccc",
"R c #d4d4d4",
"E c #dfdfdf",
"W c #f2f2f2",
"Q c #cdcdcd",
"! c #dbdbdb",
"~ c #b9b9b9",
"^ c #c8c8c8",
"/ c #c0c0c0",
"( c #dadada",
/* pixels */
" ",
" ",
" ",
" .XoO+@# .$%&+*= ",
"-;:::::$>. =,<*;1 2>33333,34 567787890 qw877e8rt ",
"y89999997- .ui77p77a4 s7999998a df99999ep> .gp99999eph ",
"5je999998d kle99999pjz xe9999998> .c7999999l@ 4j7999999fv ",
" bp99999e92 X899999999po k899999en5 -e8e99epc5 ,e8e9e7p64 ",
" qme99999pM d799999999eNz =Ne99999p< #BnrNV04 COZiASb. ",
" D899999emq 1999999999998D @899999eFq 52z. q2z. ",
" =Ae999998$ G89999999999eH5 5Je99999pK ",
" Kp999997S. zZe99999r999998t ,899999ei= .qqqqqqqq .qqqqqqq5 ",
" 2re999997X 0899997Lt799997c. .68999998G ;NZZZZZFHq yrZZZZZAP5 ",
" o8999998I 4Je9999pt S799997h Ue99999eY1 v7eeeee7Nq @8eeeee7nq ",
" 19e9999er# $899997j5 ;899997T %8999998% ve99999eAq *799999eHq ",
" R8999998M .L79999pb 5je9999ex 2Ne999999x ve99999eAq *799999eHq ",
" xe99999em5 -79999emq *899998R E8999998a ve99999eAq *799999eHq ",
" O8999998t d899998K qme999er= 4He99999eW ve99999eAq *799999eHq ",
" W7999997S. 199999eA= u899998u ;8999997Q ve99999eAq *799999eHq ",
" .67999997- G899998! U89999e~q w7999997X ve99999eAq *799999eHq ",
" h8999998G5Fe999er# 4c799998:x7999997L. ve99999eAq *799999eHq ",
" qFe9999ewu899997Q ;p99997+I79999983 ve99999eAq *799999eHq ",
" G8999999999999p$ 5j7999999999997S. ve99999eAq *799999eHq ",
" #Ye9999999999eH5 *p9999999999980 ve99999eAq *799999eHq ",
" %89999999999p* zZe999999999e91 ve99999eAq *799999eHq ",
" 1ee999999997Fq Ef999999999f% ve99999eAq *799999eHq ",
" *p799999977: 4^pe999999fw4 ve99999eAq *799999eHq ",
" ,j7eee78/- 4GN7e9e7iu. y7eeeee7Nz @8eeeee7nq ",
" 5XEB%EX4 =t(Iot2 xE<<<<<D04 CK<<<<<Db4 ",
" ",
" ",
" "
};