Added the Official No-Intro Nintendo Gameboy Advance Number (Date) file for the release numbering.

This commit is contained in:
skidau 2015-05-16 07:48:02 +00:00
parent 5b61aace22
commit 303a326ddd
5 changed files with 67 additions and 41 deletions

View File

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-16 14:01+1000\n" "POT-Creation-Date: 2015-05-16 17:45+1000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -367,7 +367,7 @@ msgstr ""
#: ../src/wx/cmdevents.cpp:2511 #: ../src/wx/cmdevents.cpp:2511
msgid "" msgid ""
"This will download and update two GBA No-Intro DAT files. Do you want to " "This will download and update three GBA No-Intro DAT files. Do you want to "
"continue?" "continue?"
msgstr "" msgstr ""
@ -375,18 +375,18 @@ msgstr ""
msgid "Confirm Update" msgid "Confirm Update"
msgstr "" msgstr ""
#: ../src/wx/cmdevents.cpp:2531 #: ../src/wx/cmdevents.cpp:2532
msgid "Nintendo GameBoy (+Color+Advance) emulator." msgid "Nintendo GameBoy (+Color+Advance) emulator."
msgstr "" msgstr ""
#: ../src/wx/cmdevents.cpp:2532 #: ../src/wx/cmdevents.cpp:2533
msgid "" msgid ""
"Copyright (C) 1999-2003 Forgotten\n" "Copyright (C) 1999-2003 Forgotten\n"
"Copyright (C) 2004-2006 VBA development team\n" "Copyright (C) 2004-2006 VBA development team\n"
"Copyright (C) 2007-2015 VBA-M development team" "Copyright (C) 2007-2015 VBA-M development team"
msgstr "" msgstr ""
#: ../src/wx/cmdevents.cpp:2533 #: ../src/wx/cmdevents.cpp:2534
msgid "" msgid ""
"This program is free software: you can redistribute it and/or modify\n" "This program is free software: you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n" "it under the terms of the GNU General Public License as published by\n"
@ -402,11 +402,11 @@ msgid ""
"along with this program. If not, see http://www.gnu.org/licenses ." "along with this program. If not, see http://www.gnu.org/licenses ."
msgstr "" msgstr ""
#: ../src/wx/cmdevents.cpp:2756 #: ../src/wx/cmdevents.cpp:2757
msgid "LAN link is already active. Disable link mode to disconnect." msgid "LAN link is already active. Disable link mode to disconnect."
msgstr "" msgstr ""
#: ../src/wx/cmdevents.cpp:2763 #: ../src/wx/cmdevents.cpp:2764
msgid "Network is not supported in local mode." msgid "Network is not supported in local mode."
msgstr "" msgstr ""
@ -994,51 +994,51 @@ msgstr ""
msgid "B:" msgid "B:"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:270 #: ../src/wx/wxvbam.cpp:276
msgid "Could not create main window" msgid "Could not create main window"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:302 #: ../src/wx/wxvbam.cpp:308
msgid "Save built-in XRC file and exit" msgid "Save built-in XRC file and exit"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:306 #: ../src/wx/wxvbam.cpp:312
msgid "Save built-in vba-over.ini and exit" msgid "Save built-in vba-over.ini and exit"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:310 #: ../src/wx/wxvbam.cpp:316
msgid "Print configuration path and exit" msgid "Print configuration path and exit"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:314 #: ../src/wx/wxvbam.cpp:320
msgid "Start in full-screen mode" msgid "Start in full-screen mode"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:319 #: ../src/wx/wxvbam.cpp:325
msgid "Delete shared link state first, if it exists" msgid "Delete shared link state first, if it exists"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:327 #: ../src/wx/wxvbam.cpp:333
msgid "List all settable options and exit" msgid "List all settable options and exit"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:331 #: ../src/wx/wxvbam.cpp:337
msgid "ROM file" msgid "ROM file"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:335 #: ../src/wx/wxvbam.cpp:341
msgid "<config>=<value>" msgid "<config>=<value>"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:359 #: ../src/wx/wxvbam.cpp:365
msgid "save-xrc" msgid "save-xrc"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:369 #: ../src/wx/wxvbam.cpp:375
msgid "Configuration/build error: can't find built-in xrc" msgid "Configuration/build error: can't find built-in xrc"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:377 #: ../src/wx/wxvbam.cpp:383
#, c-format #, c-format
msgid "" msgid ""
"Wrote built-in configuration to %s.\n" "Wrote built-in configuration to %s.\n"
@ -1047,19 +1047,19 @@ msgid ""
"built-in:" "built-in:"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:387 #: ../src/wx/wxvbam.cpp:393
msgid "print-cfg-path" msgid "print-cfg-path"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:392 #: ../src/wx/wxvbam.cpp:398
msgid "Configuration is read from, in order:" msgid "Configuration is read from, in order:"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:398 #: ../src/wx/wxvbam.cpp:404
msgid "save-over" msgid "save-over"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:406 #: ../src/wx/wxvbam.cpp:412
#, c-format #, c-format
msgid "" msgid ""
"Wrote built-in override file to %s\n" "Wrote built-in override file to %s\n"
@ -1067,13 +1067,13 @@ msgid ""
"from search path:" "from search path:"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:411 #: ../src/wx/wxvbam.cpp:417
msgid "" msgid ""
"\n" "\n"
"\tbuilt-in" "\tbuilt-in"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:423 #: ../src/wx/wxvbam.cpp:429
msgid "" msgid ""
"Options set from the command line are saved if any configuration changes are " "Options set from the command line are saved if any configuration changes are "
"made in the user interface.\n" "made in the user interface.\n"
@ -1082,31 +1082,31 @@ msgid ""
"\n" "\n"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:430 #: ../src/wx/wxvbam.cpp:436
msgid "flag" msgid "flag"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:431 ../src/wx/wxvbam.cpp:434 #: ../src/wx/wxvbam.cpp:437 ../src/wx/wxvbam.cpp:440
msgid "string" msgid "string"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:433 #: ../src/wx/wxvbam.cpp:439
msgid "int" msgid "int"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:450 #: ../src/wx/wxvbam.cpp:456
msgid "" msgid ""
"The commands available for the Keyboard/* option are:\n" "The commands available for the Keyboard/* option are:\n"
"\n" "\n"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:500 #: ../src/wx/wxvbam.cpp:506
msgid "Bad configuration option or multiple ROM files given:\n" msgid "Bad configuration option or multiple ROM files given:\n"
msgstr "" msgstr ""
#: ../src/wx/wxvbam.cpp:928 #: ../src/wx/wxvbam.cpp:932
#, c-format #, c-format
msgid "crc %08X" msgid "%08X"
msgstr "" msgstr ""
#: ../src/wx/xaudio2.cpp:32 #: ../src/wx/xaudio2.cpp:32

View File

@ -2508,13 +2508,14 @@ EVT_HANDLER(Translate, "Translations")
EVT_HANDLER(UpdateRDB, "Update ROM database") EVT_HANDLER(UpdateRDB, "Update ROM database")
{ {
int ret = wxMessageBox(_("This will download and update two GBA No-Intro DAT files. Do you want to continue?"), int ret = wxMessageBox(_("This will download and update three GBA No-Intro DAT files. Do you want to continue?"),
_("Confirm Update"), wxYES_NO | wxICON_EXCLAMATION); _("Confirm Update"), wxYES_NO | wxICON_EXCLAMATION);
if (ret == wxYES) if (ret == wxYES)
{ {
DownloadFile(_T("sourceforge.net"), _T("/p/vbam/code/HEAD/tree/trunk/data/Nintendo%20-%20Game%20Boy%20Advance.zip?format=raw")); DownloadFile(_T("sourceforge.net"), _T("/p/vbam/code/HEAD/tree/trunk/data/Nintendo%20-%20Game%20Boy%20Advance.zip?format=raw"));
DownloadFile(_T("sourceforge.net"), _T("/p/vbam/code/HEAD/tree/trunk/data/Nintendo%20-%20Game%20Boy%20Advance%20%28Scene%29.zip?format=raw")); DownloadFile(_T("sourceforge.net"), _T("/p/vbam/code/HEAD/tree/trunk/data/Nintendo%20-%20Game%20Boy%20Advance%20%28Scene%29.zip?format=raw"));
DownloadFile(_T("sourceforge.net"), _T("/p/vbam/code/HEAD/tree/trunk/data/Official%20No-Intro%20Nintendo%20Gameboy%20Advance%20Number%20%28Date%29.zip?format=raw"));
} }
} }

View File

@ -200,7 +200,13 @@ bool wxvbamApp::OnInit()
wxFileName fn(config_path[i], wxT("vba-over.ini")); wxFileName fn(config_path[i], wxT("vba-over.ini"));
wxFileName rdb(config_path[i], wxT("Nintendo - Game Boy Advance*.dat")); wxFileName rdb(config_path[i], wxT("Nintendo - Game Boy Advance*.dat"));
wxFileName scene_rdb(config_path[i], wxT("Nintendo - Game Boy Advance (Scene)*.dat")); wxFileName scene_rdb(config_path[i], wxT("Nintendo - Game Boy Advance (Scene)*.dat"));
wxString f = wxFindFirstFile(scene_rdb.GetFullPath(), wxFILE); wxFileName nointro_rdb(config_path[i], wxT("Official No-Intro Nintendo Gameboy Advance Number (Date).xml"));
wxString f = wxFindFirstFile(nointro_rdb.GetFullPath(), wxFILE);
if (!f.empty() && wxFileName(f).IsFileReadable())
rom_database_nointro = f;
f = wxFindFirstFile(scene_rdb.GetFullPath(), wxFILE);
if (!f.empty() && wxFileName(f).IsFileReadable()) if (!f.empty() && wxFileName(f).IsFileReadable())
rom_database_scene = f; rom_database_scene = f;
@ -588,10 +594,8 @@ void MainFrame::DownloadFile(wxString host, wxString url)
while (entry = zip.GetNextEntry()) while (entry = zip.GetNextEntry())
{ {
// access meta-data
wxFileName name(wxGetApp().data_path, entry->GetName(), wxEmptyString); wxFileName name(wxGetApp().data_path, entry->GetName(), wxEmptyString);
// read 'zip' to access the entry's data
if (!entry->IsDir()) if (!entry->IsDir())
{ {
zip.OpenEntry(*entry); zip.OpenEntry(*entry);
@ -925,7 +929,29 @@ void MainFrame::IdentifyRom()
wxString scene_rls; wxString scene_rls;
wxString scene_name; wxString scene_name;
wxString rom_crc32_str; wxString rom_crc32_str;
rom_crc32_str.Printf(_("crc %08X"), panel->rom_crc32); rom_crc32_str.Printf(_("%08X"), panel->rom_crc32);
if (wxGetApp().rom_database_nointro.FileExists())
{
wxFileInputStream input(wxGetApp().rom_database_nointro.GetFullPath());
wxTextInputStream text(input, wxT("\x09"), wxConvUTF8);
while (input.IsOk() && !input.Eof())
{
wxString line = text.ReadLine();
if (line.Contains(wxT("<releaseNumber>")))
{
scene_rls = line.AfterFirst('>').BeforeLast('<');
}
if (line.Contains(wxT("romCRC ")) && line.Contains(rom_crc32_str))
{
panel->rom_scene_rls = scene_rls;
break;
}
}
}
if (wxGetApp().rom_database_scene.FileExists()) if (wxGetApp().rom_database_scene.FileExists())
{ {
@ -938,13 +964,11 @@ void MainFrame::IdentifyRom()
if (line.StartsWith(wxT("\tname"))) if (line.StartsWith(wxT("\tname")))
{ {
scene_rls = line.AfterFirst('[').BeforeFirst(']');
scene_name = line.AfterLast(' ').BeforeLast('"'); scene_name = line.AfterLast(' ').BeforeLast('"');
} }
if (line.StartsWith(wxT("\trom")) && line.Contains(rom_crc32_str)) if (line.StartsWith(wxT("\trom")) && line.Contains(wxT("crc ") + rom_crc32_str))
{ {
panel->rom_scene_rls = scene_rls;
panel->rom_scene_rls_name = scene_name; panel->rom_scene_rls_name = scene_name;
panel->rom_name = scene_name; panel->rom_name = scene_name;
break; break;
@ -966,7 +990,7 @@ void MainFrame::IdentifyRom()
name = line.AfterFirst('"').BeforeLast('"'); name = line.AfterFirst('"').BeforeLast('"');
} }
if (line.StartsWith(wxT("\trom")) && line.Contains(rom_crc32_str)) if (line.StartsWith(wxT("\trom")) && line.Contains(wxT("crc ") + rom_crc32_str))
{ {
panel->rom_name = name; panel->rom_name = name;
break; break;

View File

@ -81,6 +81,7 @@ public:
wxFileName rom_database; wxFileName rom_database;
wxFileName rom_database_scene; wxFileName rom_database_scene;
wxFileName rom_database_nointro;
wxString data_path; wxString data_path;