[Scummvm-cvs-logs] SF.net SVN: scummvm:[43135] tools/branches/gsoc2009-gui
Remere at users.sourceforge.net
Remere at users.sourceforge.net
Sat Aug 8 21:44:29 CEST 2009
Revision: 43135
http://scummvm.svn.sourceforge.net/scummvm/?rev=43135&view=rev
Author: Remere
Date: 2009-08-08 19:44:29 +0000 (Sat, 08 Aug 2009)
Log Message:
-----------
*Fixed bug with line label displaying tool name on the first pages.
*Changed default audio format to mp3 for nds / dreamcast platforms.
*Added shorthelps to some tools that missed them previously.
*Other fixes.
Modified Paths:
--------------
tools/branches/gsoc2009-gui/extract_loom_tg16.cpp
tools/branches/gsoc2009-gui/extract_mm_apple.cpp
tools/branches/gsoc2009-gui/extract_mm_c64.cpp
tools/branches/gsoc2009-gui/extract_mm_nes.cpp
tools/branches/gsoc2009-gui/extract_parallaction.cpp
tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
tools/branches/gsoc2009-gui/extract_zak_c64.cpp
tools/branches/gsoc2009-gui/gui/configuration.h
tools/branches/gsoc2009-gui/gui/pages.cpp
tools/branches/gsoc2009-gui/gui/pages.h
Modified: tools/branches/gsoc2009-gui/extract_loom_tg16.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_loom_tg16.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_loom_tg16.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -1229,7 +1229,8 @@
input.format = "*.iso";
_inputPaths.push_back(input);
- _helptext = "\nUsage: " + _name + " [-o outputdir = out/] <infile>";
+ _shorthelp = "Extract data files from the Loom game.";
+ _helptext = "\nUsage: " + _name + " [-o outputdir = out/] <infile>\n\t" + _shorthelp + "\n";
}
void ExtractLoomTG16::execute() {
Modified: tools/branches/gsoc2009-gui/extract_mm_apple.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_apple.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_mm_apple.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -52,7 +52,8 @@
input2.format = "*.dsk";
_inputPaths.push_back(input2);
- _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.dsk> <disk2.dsk>\n";
+ _shorthelp = "Extract Maniac Mansion data files, from the Apple II version.";
+ _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.dsk> <disk2.dsk>\n\t" + _shorthelp + "\n";
}
void ExtractMMApple::execute() {
Modified: tools/branches/gsoc2009-gui/extract_mm_c64.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_c64.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_mm_c64.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -53,7 +53,8 @@
input2.format = "*.d64";
_inputPaths.push_back(input2);
- _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64>\n";
+ _shorthelp = "Extract Maniac Mansion data files, from the C64 version.";
+ _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64>\n\t" + _shorthelp + "\n";
}
void ExtractMMC64::execute() {
Modified: tools/branches/gsoc2009-gui/extract_mm_nes.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_mm_nes.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_mm_nes.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -1117,8 +1117,10 @@
input.format = "*.PRG";
_inputPaths.push_back(input);
+ _shorthelp = "Extract Maniac Mansion data files, from the NES version.";
_helptext =
- "\nUsage: " + _name + " [-o <output dir> = out/] <infile.PRG>\n"
+ "\nUsage: " + _name + " [-o <output dir> = out/] <infile.PRG>\n" +
+ "\t" + _shorthelp + "\n" +
"\tSupported versions: USA, Europe, Sweden, France, Germany, Spain\n"
"\tJapanese version is NOT supported!\n";
}
Modified: tools/branches/gsoc2009-gui/extract_parallaction.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_parallaction.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_parallaction.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -70,7 +70,8 @@
}
void Archive::openSubfile(uint32 index) {
- if (index >= _numFiles) exit(-3);
+ if (index >= _numFiles)
+ throw ToolException("File index out of bounds.");
closeSubfile();
@@ -98,7 +99,8 @@
int32 index = findSubfile(filename);
- if (index == -1) exit(-2);
+ if (index == -1)
+ throw ToolException("Could not open subfile.");
openSubfile(index);
@@ -141,7 +143,7 @@
}
if (i > (uint32)maxEntries)
- exit(9);
+ throw ToolException("Could not open archive, index out of range.");
_numSlots = i;
@@ -298,7 +300,8 @@
input.format = "*.*";
_inputPaths.push_back(input);
- _helptext = "\nUsage: " + _name + " [--small] [-o <output dir> = out/] <file>\n";
+ _shorthelp = "Extract data files from games built on the Parallaction engine.";
+ _helptext = "\nUsage: " + _name + " [--small] [-o <output dir> = out/] <file>\n" + _shorthelp + "\n";
}
void ExtractParallaction::parseExtraArguments() {
Modified: tools/branches/gsoc2009-gui/extract_scumm_mac.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_scumm_mac.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_scumm_mac.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -44,8 +44,8 @@
InspectionMatch ExtractScummMac::inspectInput(const Filename &filename) {
std::string name = filename.getFullName();
std::transform(name.begin(), name.end(), name.begin(), tolower);
- std::string::size_type pos = name.find("data");
- if (pos == name.length() - 4) // True if the file name ends with "Data"
+ std::string::size_type pos = name.find(" data");
+ if (pos == name.length() - 5) // True if the file name ends with " Data"
return IMATCH_PERFECT;
return IMATCH_AWFUL;
}
Modified: tools/branches/gsoc2009-gui/extract_zak_c64.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_zak_c64.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/extract_zak_c64.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -48,7 +48,8 @@
input.format = "*.d64";
_inputPaths.push_back(input);
- _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64>\n";
+ _shorthelp = "Extract Zak McKraken data files from the C64 version.";
+ _helptext = "\nUsage: " + _name + " [-o <output dir> = out/] <disk1.d64> <disk2.d64>\n\t" + _shorthelp + "\n";
}
void ExtractZakC64::execute() {
Modified: tools/branches/gsoc2009-gui/gui/configuration.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/configuration.h 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/gui/configuration.h 2009-08-08 19:44:29 UTC (rev 43135)
@@ -142,6 +142,7 @@
platforms.Add(wxT("Nintendo DS"));
platforms.Add(wxT("PlayStation 2"));
platforms.Add(wxT("PocketPC"));
+ platforms.Add(wxT("Dreamcast"));
platforms.Add(wxT("PSP"));
platforms.Add(wxT("Symbian"));
platforms.Add(wxT("Wii"));
@@ -152,8 +153,8 @@
inline void Configuration::setPlatformDefaults() {
// Switch for strings would be nice here...
// Ogg works better on the small platforms (maybe all...?)
- if (selectedPlatform == wxT("iPhone") || selectedPlatform == wxT("Nintendo DS") || selectedPlatform == wxT("PocketPC"))
- selectedAudioFormat = AUDIO_VORBIS;
+ if (selectedPlatform == wxT("Nintendo DS") || selectedPlatform == wxT("Dreamcast"))
+ selectedAudioFormat = AUDIO_MP3;
}
#endif
Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp 2009-08-08 19:44:29 UTC (rev 43135)
@@ -155,6 +155,11 @@
}
}
+void IntroPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
+ buttons->setLineLabel(wxT("ScummVM Tools"));
+}
+
+
// Page to choose the tool to use
ChooseToolPage::ChooseToolPage(ScummToolsFrame *frame, const wxArrayString &options)
@@ -241,6 +246,10 @@
text->SetLabel(g_tools[tool->GetStringSelection()].getShortHelp());
}
+void ChooseToolPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
+ buttons->setLineLabel(wxT("ScummVM Tools"));
+}
+
// Common base class for the IO pages
ChooseIOPage::ChooseIOPage(ScummToolsFrame *frame)
@@ -278,7 +287,7 @@
wxDirPickerCtrl *inDirWindow = dynamic_cast<wxDirPickerCtrl *>(picker);
wxFilePickerCtrl *inFileWindow = dynamic_cast<wxFilePickerCtrl *>(picker);
- _topframe->_buttons->enableNext(
+ buttons->enableNext(
(inDirWindow && inDirWindow->GetPath().size() > 0) ||
(inFileWindow && inFileWindow->GetPath().size() > 0));
}
@@ -388,6 +397,11 @@
}
}
+void ChooseInPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
+ if (!_configuration.advanced)
+ buttons->setLineLabel(wxT("ScummVM Tools"));
+}
+
// Page to choose input and output directory or file
ChooseExtraInPage::ChooseExtraInPage(ScummToolsFrame *frame)
Modified: tools/branches/gsoc2009-gui/gui/pages.h
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.h 2009-08-08 19:09:30 UTC (rev 43134)
+++ tools/branches/gsoc2009-gui/gui/pages.h 2009-08-08 19:44:29 UTC (rev 43135)
@@ -140,6 +140,8 @@
void save(wxWindow *panel);
void onNext(wxWindow *panel);
+
+ void updateButtons(wxWindow *panel, WizardButtons *buttons);
};
/**
@@ -160,6 +162,8 @@
void save(wxWindow *panel);
void onChangeTool(wxCommandEvent &evt);
+
+ void updateButtons(wxWindow *panel, WizardButtons *buttons);
protected:
wxArrayString _options;
@@ -191,6 +195,8 @@
void onNext(wxWindow *panel);
void save(wxWindow *panel);
+
+ void updateButtons(wxWindow *panel, WizardButtons *buttons);
};
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list