From 7455361ed2b22284947db89167977901af600d12 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Sat, 7 Mar 2009 18:03:53 +0000 Subject: [PATCH] Adds Italy country code git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2600 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/CoreParameter.cpp | 15 ++--- Source/Core/DiscIO/Src/Volume.h | 1 + Source/Core/DiscIO/Src/VolumeDirectory.cpp | 62 ++++++++++---------- Source/Core/DiscIO/Src/VolumeGC.cpp | 60 ++++++++++--------- Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp | 64 +++++++++++---------- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 1 + Source/Core/DolphinWX/Src/ISOProperties.cpp | 1 + 7 files changed, 110 insertions(+), 94 deletions(-) diff --git a/Source/Core/Core/Src/CoreParameter.cpp b/Source/Core/Core/Src/CoreParameter.cpp index 5a8a789839..91805277fe 100644 --- a/Source/Core/Core/Src/CoreParameter.cpp +++ b/Source/Core/Core/Src/CoreParameter.cpp @@ -109,6 +109,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios) case DiscIO::IVolume::COUNTRY_EUROPE: case DiscIO::IVolume::COUNTRY_FRANCE: + case DiscIO::IVolume::COUNTRY_ITALY: bNTSC = false; Region = EUR_DIR; break; @@ -134,13 +135,13 @@ bool SCoreStartupParameter::AutoSetup(EBootBios _BootBios) m_BootType = BOOT_DOL; bNTSC = true; } - else if (DiscIO::CNANDContentLoader(m_strFilename).IsValid()) - { - bWii = true; - Region = EUR_DIR; - m_BootType = BOOT_WII_NAND; - bNTSC = false; - } + else if (DiscIO::CNANDContentLoader(m_strFilename).IsValid()) + { + bWii = true; + Region = EUR_DIR; + m_BootType = BOOT_WII_NAND; + bNTSC = false; + } else { PanicAlert("Could not recognize ISO file %s", m_strFilename.c_str()); diff --git a/Source/Core/DiscIO/Src/Volume.h b/Source/Core/DiscIO/Src/Volume.h index d915f1f0a6..e5e2880d47 100644 --- a/Source/Core/DiscIO/Src/Volume.h +++ b/Source/Core/DiscIO/Src/Volume.h @@ -53,6 +53,7 @@ class IVolume COUNTRY_USA = 2, COUNTRY_JAP, COUNTRY_KOR, + COUNTRY_ITALY, COUNTRY_UNKNOWN, NUMBER_OF_COUNTRIES }; diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index e50feef14a..426e42ead4 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -167,41 +167,45 @@ IVolume::ECountry CVolumeDirectory::GetCountry() const switch (CountryCode) { - case 'S': - country = COUNTRY_EUROPE; - break; // PAL <- that is shitty :) zelda demo disc + case 'S': + country = COUNTRY_EUROPE; + break; // PAL <- that is shitty :) zelda demo disc - case 'P': - country = COUNTRY_EUROPE; - break; // PAL + case 'P': + country = COUNTRY_EUROPE; + break; // PAL - case 'D': - country = COUNTRY_EUROPE; - break; // PAL + case 'D': + country = COUNTRY_EUROPE; + break; // PAL - case 'F': - country = COUNTRY_FRANCE; - break; // PAL + case 'F': + country = COUNTRY_FRANCE; + break; // PAL + + case 'I': + country = COUNTRY_ITALY; + break; // PAL - case 'X': - country = COUNTRY_EUROPE; - break; // XIII <- uses X but is PAL rip + case 'X': + country = COUNTRY_EUROPE; + break; // XIII <- uses X but is PAL rip - case 'E': - country = COUNTRY_USA; - break; // USA + case 'E': + country = COUNTRY_USA; + break; // USA - case 'J': - country = COUNTRY_JAP; - break; // JAP + case 'J': + country = COUNTRY_JAP; + break; // JAP - case 'O': - country = COUNTRY_UNKNOWN; - break; // SDK + case 'O': + country = COUNTRY_UNKNOWN; + break; // SDK - default: - country = COUNTRY_UNKNOWN; - break; + default: + country = COUNTRY_UNKNOWN; + break; } return(country); @@ -262,8 +266,8 @@ std::string CVolumeDirectory::ExtractDirectoryName(const std::string& _rDirector if(lastSep != directoryName.size() - 1) { // TODO: This assumes that file names will always have a dot in them - // and directory names never will; both assumptions are often - // right but in general wrong. + // and directory names never will; both assumptions are often + // right but in general wrong. size_t extensionStart = directoryName.find_last_of('.'); if(extensionStart != std::string::npos && extensionStart > lastSep) { diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp index 93ff459b52..aca22480c9 100644 --- a/Source/Core/DiscIO/Src/VolumeGC.cpp +++ b/Source/Core/DiscIO/Src/VolumeGC.cpp @@ -88,42 +88,46 @@ IVolume::ECountry CVolumeGC::GetCountry() const switch (CountryCode) { - case 'S': - country = COUNTRY_EUROPE; - break; // PAL // <- that is shitty :) zelda demo disc + case 'S': + country = COUNTRY_EUROPE; + break; // PAL // <- that is shitty :) zelda demo disc - case 'P': - country = COUNTRY_EUROPE; - break; // PAL + case 'P': + country = COUNTRY_EUROPE; + break; // PAL - case 'D': - country = COUNTRY_EUROPE; - break; // PAL + case 'D': + country = COUNTRY_EUROPE; + break; // PAL - case 'F': - country = COUNTRY_FRANCE; - break; // PAL + case 'F': + country = COUNTRY_FRANCE; + break; // PAL - case 'X': - country = COUNTRY_EUROPE; - break; // XIII <- uses X but is PAL + case 'I': + country = COUNTRY_ITALY; + break; // PAL - case 'E': - country = COUNTRY_USA; - break; // USA + case 'X': + country = COUNTRY_EUROPE; + break; // XIII <- uses X but is PAL - case 'J': - country = COUNTRY_JAP; - break; // JAP + case 'E': + country = COUNTRY_USA; + break; // USA - case 'O': - country = COUNTRY_UNKNOWN; - break; // SDK + case 'J': + country = COUNTRY_JAP; + break; // JAP - default: - // PanicAlert(StringFromFormat("Unknown Country Code!").c_str()); - country = COUNTRY_UNKNOWN; - break; + case 'O': + country = COUNTRY_UNKNOWN; + break; // SDK + + default: + // PanicAlert(StringFromFormat("Unknown Country Code!").c_str()); + country = COUNTRY_UNKNOWN; + break; } return(country); diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp index dfbf49f0d2..ed9a9bcf8c 100644 --- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp @@ -90,7 +90,7 @@ CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const // increase buffers _Length -= CopySize; - _pBuffer += CopySize; + _pBuffer += CopySize; _ReadOffset += CopySize; } @@ -133,45 +133,49 @@ CVolumeWiiCrypted::GetCountry() const switch (CountryCode) { - case 'S': - country = COUNTRY_EUROPE; - break; // PAL // <- that is shitty :) zelda demo disc + case 'S': + country = COUNTRY_EUROPE; + break; // PAL // <- that is shitty :) zelda demo disc - case 'P': - country = COUNTRY_EUROPE; - break; // PAL + case 'P': + country = COUNTRY_EUROPE; + break; // PAL - case 'D': - country = COUNTRY_EUROPE; - break; // PAL + case 'D': + country = COUNTRY_EUROPE; + break; // PAL - case 'F': - country = COUNTRY_FRANCE; - break; // PAL + case 'F': + country = COUNTRY_FRANCE; + break; // PAL - case 'X': - country = COUNTRY_EUROPE; - break; // XIII <- uses X but is PAL rip + case 'I': + country = COUNTRY_ITALY; + break; // PAL - case 'E': - country = COUNTRY_USA; - break; // USA + case 'X': + country = COUNTRY_EUROPE; + break; // XIII <- uses X but is PAL rip - case 'J': - country = COUNTRY_JAP; - break; // JAP + case 'E': + country = COUNTRY_USA; + break; // USA + + case 'J': + country = COUNTRY_JAP; + break; // JAP case 'K': - country = COUNTRY_KOR; - break; // KOR + country = COUNTRY_KOR; + break; // KOR - case 'O': - country = COUNTRY_UNKNOWN; - break; // SDK + case 'O': + country = COUNTRY_UNKNOWN; + break; // SDK - default: - PanicAlert(StringFromFormat("Unknown Country Code!").c_str()); - break; + default: + PanicAlert(StringFromFormat("Unknown Country Code!").c_str()); + break; } return(country); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 9f3118b396..724c77026a 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -110,6 +110,7 @@ void CGameListCtrl::InitBitmaps() wxIcon iconTemp; iconTemp.CopyFromBitmap(wxBitmap(Flag_Europe_xpm)); m_FlagImageIndex[DiscIO::IVolume::COUNTRY_EUROPE] = m_imageListSmall->Add(iconTemp); + m_FlagImageIndex[DiscIO::IVolume::COUNTRY_ITALY] = m_imageListSmall->Add(iconTemp); iconTemp.CopyFromBitmap(wxBitmap(Flag_France_xpm)); m_FlagImageIndex[DiscIO::IVolume::COUNTRY_FRANCE] = m_imageListSmall->Add(iconTemp); iconTemp.CopyFromBitmap(wxBitmap(Flag_USA_xpm)); diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index c0a1eef102..0ac00945aa 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -92,6 +92,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW { case DiscIO::IVolume::COUNTRY_EUROPE: case DiscIO::IVolume::COUNTRY_FRANCE: + case DiscIO::IVolume::COUNTRY_ITALY: m_Country->SetValue(wxString::FromAscii("EUR")); break; case DiscIO::IVolume::COUNTRY_USA: