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

View File

@ -2508,13 +2508,14 @@ EVT_HANDLER(Translate, "Translations")
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);
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%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 rdb(config_path[i], wxT("Nintendo - Game Boy Advance*.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())
rom_database_scene = f;
@ -588,10 +594,8 @@ void MainFrame::DownloadFile(wxString host, wxString url)
while (entry = zip.GetNextEntry())
{
// access meta-data
wxFileName name(wxGetApp().data_path, entry->GetName(), wxEmptyString);
// read 'zip' to access the entry's data
if (!entry->IsDir())
{
zip.OpenEntry(*entry);
@ -925,7 +929,29 @@ void MainFrame::IdentifyRom()
wxString scene_rls;
wxString scene_name;
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())
{
@ -938,13 +964,11 @@ void MainFrame::IdentifyRom()
if (line.StartsWith(wxT("\tname")))
{
scene_rls = line.AfterFirst('[').BeforeFirst(']');
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_name = scene_name;
break;
@ -966,7 +990,7 @@ void MainFrame::IdentifyRom()
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;
break;

View File

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