[Scummvm-cvs-logs] SF.net SVN: scummvm:[42017] tools/branches/gsoc2009-gui
Remere at users.sourceforge.net
Remere at users.sourceforge.net
Thu Jul 2 03:41:45 CEST 2009
Revision: 42017
http://scummvm.svn.sourceforge.net/scummvm/?rev=42017&view=rev
Author: Remere
Date: 2009-07-02 01:41:45 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
*Code formatting fix (space after keywords)
Modified Paths:
--------------
tools/branches/gsoc2009-gui/compress.cpp
tools/branches/gsoc2009-gui/compress_agos.cpp
tools/branches/gsoc2009-gui/compress_gob.cpp
tools/branches/gsoc2009-gui/compress_kyra.cpp
tools/branches/gsoc2009-gui/compress_queen.cpp
tools/branches/gsoc2009-gui/compress_saga.cpp
tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
tools/branches/gsoc2009-gui/compress_scumm_san.cpp
tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
tools/branches/gsoc2009-gui/compress_sword1.cpp
tools/branches/gsoc2009-gui/compress_sword2.cpp
tools/branches/gsoc2009-gui/compress_touche.cpp
tools/branches/gsoc2009-gui/compress_tucker.cpp
tools/branches/gsoc2009-gui/encode_dxa.cpp
tools/branches/gsoc2009-gui/extract_kyra.cpp
tools/branches/gsoc2009-gui/gui/main.cpp
tools/branches/gsoc2009-gui/gui/pages.cpp
tools/branches/gsoc2009-gui/gui/tools.cpp
tools/branches/gsoc2009-gui/util.cpp
Modified: tools/branches/gsoc2009-gui/compress.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -451,15 +451,15 @@
}
} else if (rawAudioType.bitsPerSample == 16) {
if (rawAudioType.isLittleEndian) {
- for(i = 0; i < numSamples; i++) {
- for(j = 0; j < numChannels; j++) {
+ for (i = 0; i < numSamples; i++) {
+ for (j = 0; j < numChannels; j++) {
buffer[j][i] = ((rawData[(i * 2 * numChannels) + (2 * j) + 1] << 8) | (rawData[(i * 2 * numChannels) + (2 * j)] & 0xff)) / 32768.0f;
}
}
}
else {
- for(i = 0; i < numSamples; i++) {
- for(j = 0; j < numChannels; j++) {
+ for (i = 0; i < numSamples; i++) {
+ for (j = 0; j < numChannels; j++) {
buffer[j][i] = ((rawData[(i * 2 * numChannels) + (2 * j)] << 8) | (rawData[(i * 2 * numChannels) + (2 * j) + 1] & 0xff)) / 32768.0f;
}
}
Modified: tools/branches/gsoc2009-gui/compress_agos.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_agos.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_agos.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -243,12 +243,12 @@
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
- if(strcmp(argv[first_arg], "--mac") == 0) {
+ if (strcmp(argv[first_arg], "--mac") == 0) {
++first_arg;
convertMac = true;
}
@@ -265,7 +265,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty()) {
+ if (outpath.empty()) {
outpath = inpath;
outpath.setExtension(audio_extensions[gCompMode]);
}
Modified: tools/branches/gsoc2009-gui/compress_gob.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_gob.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_gob.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -69,13 +69,13 @@
// Standard output
outpath.setFullPath("out.stk");
- if(last_arg - first_arg != 0)
+ if (last_arg - first_arg != 0)
error("Expected only one input file");
inpath.setFullPath(argv[first_arg]);
// We output with .stk extension, if there is no specific out file
- if(outpath.empty()) {
+ if (outpath.empty()) {
outpath = inpath;
outpath.setExtension(".stk");
}
@@ -161,7 +161,7 @@
char buffer[4096];
uint32 tmpSize;
- while(curChunk) {
+ while (curChunk) {
inpath->setFullName(curChunk->name);
if (!(src = fopen(inpath->getFullPath(), "rb")))
error("Couldn't open conf file \"%s\"", inpath->getFullPath());
Modified: tools/branches/gsoc2009-gui/compress_kyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_kyra.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_kyra.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -43,7 +43,7 @@
// Compression mode
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
Modified: tools/branches/gsoc2009-gui/compress_queen.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_queen.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_queen.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -220,7 +220,7 @@
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
@@ -237,7 +237,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty()) {
+ if (outpath.empty()) {
outpath = inpath;
outpath.setFullName(FINAL_OUT);
}
Modified: tools/branches/gsoc2009-gui/compress_saga.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_saga.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_saga.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -398,7 +398,7 @@
}
outputTable = (Record*)malloc(resTableCount * sizeof(Record));
- if(outpath->empty()) {
+ if (outpath->empty()) {
*outpath = *inpath;
outpath->setExtension(".cmp");
}
@@ -448,7 +448,7 @@
// compression mode
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
Modified: tools/branches/gsoc2009-gui/compress_scumm_bun.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -1097,7 +1097,7 @@
// compression mode
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
@@ -1122,7 +1122,7 @@
error("Cannot open file: %s", inpath.getFullPath());
}
- if(outpath.empty()) {
+ if (outpath.empty()) {
// Change extension for output
outpath = inpath;
outpath.setExtension(".bun");
Modified: tools/branches/gsoc2009-gui/compress_scumm_san.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -643,11 +643,11 @@
// TODO
// Support flac too?
- if(compMode == kVorbisMode)
+ if (compMode == kVorbisMode)
_oggMode = true;
- else if(compMode != kMP3Mode)
+ else if (compMode != kMP3Mode)
notice("Only ogg vorbis and MP3 is supported for this tool.");
- if(compMode == kNoAudioMode) {
+ if (compMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
@@ -666,7 +666,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty()) {
+ if (outpath.empty()) {
// Change extension for output
outpath = inpath;
outpath.setExtension(".san");
Modified: tools/branches/gsoc2009-gui/compress_scumm_sou.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -155,7 +155,7 @@
// compression mode
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
Modified: tools/branches/gsoc2009-gui/compress_sword1.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_sword1.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -597,7 +597,7 @@
parseHelpArguments(argv, argc, helptext);
// Check extra arguments
- if(strcmp(argv[first_arg], "--speech-only") == 0) {
+ if (strcmp(argv[first_arg], "--speech-only") == 0) {
compMusic = false;
++first_arg;
} else if (strcmp(argv[first_arg], "--music-only") == 0) {
@@ -608,7 +608,7 @@
// compression mode
compMode = process_audio_params(argc, argv, &first_arg);
- if(compMode == kNoAudioMode) {
+ if (compMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
@@ -637,7 +637,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty())
+ if (outpath.empty())
// Extensions change between the in/out files, so we can use the same directory
outpath = inpath;
Modified: tools/branches/gsoc2009-gui/compress_sword2.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword2.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_sword2.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -103,7 +103,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty())
+ if (outpath.empty())
// Extensions change between the in/out files, so we can use the same directory
outpath = inpath;
Modified: tools/branches/gsoc2009-gui/compress_touche.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_touche.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_touche.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -177,7 +177,7 @@
// compression mode
gCompMode = process_audio_params(argc, argv, &first_arg);
- if(gCompMode == kNoAudioMode) {
+ if (gCompMode == kNoAudioMode) {
// Unknown mode (failed to parse arguments), display help and exit
displayHelp(helptext, argv[0]);
}
@@ -210,7 +210,7 @@
// Append '/' if it's not already done
// TODO: We need a way to detect a directory here!
size_t s = strlen(inpath._path);
- if(inpath._path[s-1] == '/' || inpath._path[s-1] == '\\') {
+ if (inpath._path[s-1] == '/' || inpath._path[s-1] == '\\') {
inpath._path[s] = '/';
inpath._path[s+1] = '\0';
}
Modified: tools/branches/gsoc2009-gui/compress_tucker.cpp
===================================================================
--- tools/branches/gsoc2009-gui/compress_tucker.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/compress_tucker.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -543,7 +543,7 @@
inpath.setFullPath(argv[first_arg]);
// Default out is same as in directory, file names differ by extension
- if(outpath.empty()) {
+ if (outpath.empty()) {
outpath = inpath;
}
Modified: tools/branches/gsoc2009-gui/encode_dxa.cpp
===================================================================
--- tools/branches/gsoc2009-gui/encode_dxa.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/encode_dxa.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -707,7 +707,7 @@
inpath.setFullPath(argv[first_arg]);
- if(outpath.empty()) {
+ if (outpath.empty()) {
// Actual change of extension is done later...
outpath = inpath;
}
Modified: tools/branches/gsoc2009-gui/extract_kyra.cpp
===================================================================
--- tools/branches/gsoc2009-gui/extract_kyra.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/extract_kyra.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -49,7 +49,7 @@
int param = first_arg;
// Parse our own arguments
- for(; param < last_arg; ++param) {
+ for (; param < last_arg; ++param) {
if (strcmp(argv[param], "-x") == 0) {
extractAll = true;
extractOne = false;
Modified: tools/branches/gsoc2009-gui/gui/main.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/main.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/gui/main.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -117,7 +117,7 @@
}
ScummToolsFrame::~ScummToolsFrame() {
- for(std::vector<WizardPage *>::iterator iter = _pages.begin(); iter != _pages.end(); ++iter)
+ for (std::vector<WizardPage *>::iterator iter = _pages.begin(); iter != _pages.end(); ++iter)
delete *iter;
}
@@ -127,7 +127,7 @@
_pages.back()->save(oldPanel);
- if(moveback) {
+ if (moveback) {
// Don't save the old page (which is ontop of the stack already)
delete _pages.back();
_pages.pop_back();
@@ -152,7 +152,7 @@
}
void ScummToolsFrame::onIdle(wxIdleEvent &evt) {
- if(_pages.back()->onIdle(dynamic_cast<wxPanel *>(_wizardpane->FindWindow(wxT("Wizard Page"))))) {
+ if (_pages.back()->onIdle(dynamic_cast<wxPanel *>(_wizardpane->FindWindow(wxT("Wizard Page"))))) {
// We want more!
evt.RequestMore(true);
}
@@ -218,20 +218,20 @@
}
void WizardButtons::enablePrevious(bool enable) {
- if(enable)
+ if (enable)
showPrevious(true);
_prev->Enable(enable);
}
void WizardButtons::showFinish(bool show) {
- if(show)
+ if (show)
_next->SetLabel(wxT("Finish!"));
else
_next->SetLabel(wxT("Next >"));
}
void WizardButtons::showPrevious(bool show) {
- if(show)
+ if (show)
_prev->Show();
else
_prev->Hide();
@@ -264,9 +264,9 @@
wxLogNull nulllog;
// Add support for loading .jpg images
- if(wxImage::FindHandler(wxT("jpg")) == NULL)
+ if (wxImage::FindHandler(wxT("jpg")) == NULL)
wxImage::AddHandler(new wxJPEGHandler);
- if(wxImage::FindHandler(wxT("gif")) == NULL)
+ if (wxImage::FindHandler(wxT("gif")) == NULL)
wxImage::AddHandler(new wxGIFHandler);
// Load image files
@@ -283,7 +283,7 @@
int w, h;
this->GetSize(&w, &h);
- if(_logo.IsOk() == false || _tile.IsOk() == false) {
+ if (_logo.IsOk() == false || _tile.IsOk() == false) {
// If we couldn't load the images, use orange instead!
dc.SetBackground(wxBrush(wxColor(213, 114, 0)));
dc.Clear();
@@ -298,7 +298,7 @@
dc.DrawBitmap(_logo, x, 0);
x += _logo.GetWidth();
- while(x < w) {
+ while (x < w) {
dc.DrawBitmap(_tile, x, 0);
x += _tile.GetWidth();
}
Modified: tools/branches/gsoc2009-gui/gui/pages.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/pages.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/gui/pages.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -78,7 +78,7 @@
void WizardPage::onCancel(wxWindow *panel) {
wxMessageDialog dlg(panel, wxT("Are you sure you want to abort the wizard?"), wxT("Abort"), wxYES | wxNO);
wxWindowID ret = dlg.ShowModal();
- if(ret == wxID_YES) {
+ if (ret == wxID_YES) {
_topframe->Close(true);
} else {
// Do nothing
@@ -128,9 +128,9 @@
// Load options
Configuration &config = _configuration;
- if(config.advanced)
+ if (config.advanced)
options->SetSelection(2);
- else if(config.compressing)
+ else if (config.compressing)
options->SetSelection(1);
else
options->SetSelection(0);
@@ -152,10 +152,10 @@
void IntroPage::onNext(wxWindow *panel) {
wxString selected_option = static_cast<wxRadioBox *>(panel->FindWindowByName(wxT("ChooseActivity")))->GetStringSelection().Lower();
- if(selected_option.Find(wxT("extract")) != wxNOT_FOUND) {
+ if (selected_option.Find(wxT("extract")) != wxNOT_FOUND) {
// extract
switchPage(new ChooseExtractionPage(_topframe));
- } else if(selected_option.Find(wxT("advanced")) != wxNOT_FOUND) {
+ } else if (selected_option.Find(wxT("advanced")) != wxNOT_FOUND) {
// advanced
switchPage(new ChooseToolPage(_topframe));
} else {
@@ -275,7 +275,7 @@
SetAlignedSizer(panel, sizer);
// Load configuration
- if(_configuration.selectedTool != NULL)
+ if (_configuration.selectedTool != NULL)
tool->SetStringSelection(_configuration.selectedTool->_name);
return panel;
@@ -315,13 +315,13 @@
wxStaticBoxSizer *inputbox = new wxStaticBoxSizer(wxVERTICAL, panel, wxT("Input files"));
int i = 1;
- for(ToolInputs::const_iterator iter = tool._inputs.begin(); iter != tool._inputs.end(); ++iter) {
+ for (ToolInputs::const_iterator iter = tool._inputs.begin(); iter != tool._inputs.end(); ++iter) {
const ToolInput &input = *iter;
wxString windowName = wxT("InputPicker");
windowName << i;
- if(input._file) {
+ if (input._file) {
inputbox->Add(new wxFilePickerCtrl(
panel, wxID_ANY, wxEmptyString, wxT("Select a file"),
input._extension,
@@ -347,7 +347,7 @@
// Create output selection
- if(tool._outputToDirectory) {
+ if (tool._outputToDirectory) {
wxStaticBoxSizer *box = new wxStaticBoxSizer(wxHORIZONTAL, panel, wxT("Destination folder"));
box->Add(new wxDirPickerCtrl(
@@ -380,16 +380,16 @@
wxDirPickerCtrl *outDirWindow = dynamic_cast<wxDirPickerCtrl *>(outputWindow);
wxFilePickerCtrl *inDirWindow = dynamic_cast<wxFilePickerCtrl *>(outputWindow);
- if(outDirWindow)
+ if (outDirWindow)
_configuration.outputPath = outDirWindow->GetPath();
- if(inDirWindow)
+ if (inDirWindow)
_configuration.outputPath = inDirWindow->GetPath();
// TODO: save input, unsure of exact format
}
void ChooseInOutPage::onNext(wxWindow *panel) {
- if(_configuration.compressing)
+ if (_configuration.compressing)
switchPage(new ChooseAudioFormatPage(_topframe));
else
switchPage(new ProcessPage(_topframe));
@@ -433,11 +433,11 @@
SetAlignedSizer(panel, sizer);
// Load already set values
- if(_configuration.selectedAudioFormat == AUDIO_VORBIS)
+ if (_configuration.selectedAudioFormat == AUDIO_VORBIS)
format->SetSelection(0);
- else if(_configuration.selectedAudioFormat == AUDIO_FLAC)
+ else if (_configuration.selectedAudioFormat == AUDIO_FLAC)
format->SetSelection(1);
- else if(_configuration.selectedAudioFormat == AUDIO_MP3)
+ else if (_configuration.selectedAudioFormat == AUDIO_MP3)
format->SetSelection(2);
advanced->SetValue(_configuration.advancedAudioSettings);
@@ -450,11 +450,11 @@
wxChoice *format = static_cast<wxChoice *>(panel->FindWindowByName(wxT("AudioSelection")));
wxCheckBox *advanced = static_cast<wxCheckBox *>(panel->FindWindowByName(wxT("AdvancedAudio")));
- if(format->GetStringSelection() == wxT("Vorbis"))
+ if (format->GetStringSelection() == wxT("Vorbis"))
_configuration.selectedAudioFormat = AUDIO_VORBIS;
- else if(format->GetStringSelection() == wxT("FLAC"))
+ else if (format->GetStringSelection() == wxT("FLAC"))
_configuration.selectedAudioFormat = AUDIO_FLAC;
- else if(format->GetStringSelection() == wxT("MP3"))
+ else if (format->GetStringSelection() == wxT("MP3"))
_configuration.selectedAudioFormat = AUDIO_MP3;
_configuration.advancedAudioSettings = advanced->GetValue();
@@ -465,13 +465,13 @@
wxChoice *format = static_cast<wxChoice *>(panel->FindWindowByName(wxT("AudioSelection")));
wxCheckBox *advanced = static_cast<wxCheckBox *>(panel->FindWindowByName(wxT("AdvancedAudio")));
- if(advanced->GetValue()) {
+ if (advanced->GetValue()) {
- if(format->GetStringSelection() == wxT("Vorbis"))
+ if (format->GetStringSelection() == wxT("Vorbis"))
switchPage(new ChooseAudioOptionsVorbisPage(_topframe));
- else if(format->GetStringSelection() == wxT("FLAC"))
+ else if (format->GetStringSelection() == wxT("FLAC"))
switchPage(new ChooseAudioOptionsFlacPage(_topframe));
- else if(format->GetStringSelection() == wxT("MP3"))
+ else if (format->GetStringSelection() == wxT("MP3"))
switchPage(new ChooseAudioOptionsMp3Page(_topframe));
} else {
switchPage(new ProcessPage(_topframe));
@@ -522,7 +522,7 @@
// Bitrates
const int possibleBitrateCount = 160 / 8;
wxString possibleBitrates[possibleBitrateCount + 1];
- for(int i = 0; i <= possibleBitrateCount; ++i) {
+ for (int i = 0; i <= possibleBitrateCount; ++i) {
possibleBitrates[i] << i*8;
}
@@ -555,7 +555,7 @@
// Quality
const int possibleQualityCount = 9;
wxString possibleQualities[possibleQualityCount + 1];
- for(int i = 0; i <= possibleQualityCount; ++i) {
+ for (int i = 0; i <= possibleQualityCount; ++i) {
possibleQualities[i] << i;
}
@@ -579,7 +579,7 @@
// Load settings
- if(_topframe->_configuration.mp3CompressionType == wxT("ABR"))
+ if (_topframe->_configuration.mp3CompressionType == wxT("ABR"))
abrButton->SetValue(true);
else
vbrButton->SetValue(true);
@@ -609,7 +609,7 @@
_topframe->_configuration.mp3ABRBitrate = abrAvgBitrate->GetStringSelection();
_topframe->_configuration.mp3VBRQuality = vbrQuality ->GetStringSelection();
_topframe->_configuration.mp3MpegQuality = mpegQuality ->GetStringSelection();
- if(abr->GetValue())
+ if (abr->GetValue())
_topframe->_configuration.mp3CompressionType = wxT("ABR");
else
_topframe->_configuration.mp3CompressionType = wxT("VBR");
@@ -677,7 +677,7 @@
// Compression Level
const int possibleLevelCount = 8;
wxString possibleLevels[possibleLevelCount + 1];
- for(int i = 0; i <= possibleLevelCount; ++i) {
+ for (int i = 0; i <= possibleLevelCount; ++i) {
possibleLevels[i] << i;
}
@@ -754,7 +754,7 @@
// Bitrates
const int possibleBitrateCount = 160 / 8;
wxString possibleBitrates[possibleBitrateCount + 1];
- for(int i = 0; i <= possibleBitrateCount; ++i) {
+ for (int i = 0; i <= possibleBitrateCount; ++i) {
possibleBitrates[i] << i*8;
}
@@ -784,7 +784,7 @@
// Quality
const int possibleQualityCount = 10;
wxString possibleQualities[possibleQualityCount + 1];
- for(int i = 0; i <= possibleQualityCount; ++i) {
+ for (int i = 0; i <= possibleQualityCount; ++i) {
possibleQualities[i] << i;
}
@@ -865,9 +865,9 @@
cli.Add(conf.selectedTool->getExecutable());
// Audio format args
- if(conf.compressing) {
+ if (conf.compressing) {
cli.Add(wxT("--mp3"));
- if(conf.selectedAudioFormat == AUDIO_VORBIS) {
+ if (conf.selectedAudioFormat == AUDIO_VORBIS) {
cli.Add(wxT("--vorbis"));
cli.Add(wxT("-b"));
cli.Add(conf.oggAvgBitrate);
@@ -877,14 +877,14 @@
cli.Add(conf.oggMaxBitrate);
cli.Add(wxT("-q"));
cli.Add(conf.oggQuality);
- } else if(conf.selectedAudioFormat == AUDIO_FLAC) {
+ } else if (conf.selectedAudioFormat == AUDIO_FLAC) {
cli.Add(wxT("--flac"));
cli.Add(wxT("-"));
cli.Add(conf.flacCompressionLevel);
cli.Add(wxT("-b"));
cli.Add(conf.flacBlockSize);
- } else if(conf.selectedAudioFormat == AUDIO_MP3) {
- if(conf.mp3CompressionType == wxT("ABR")) {
+ } else if (conf.selectedAudioFormat == AUDIO_MP3) {
+ if (conf.mp3CompressionType == wxT("ABR")) {
cli.Add(wxT("--abr"));
cli.Add(wxT("-b"));
cli.Add(conf.mp3ABRBitrate);
@@ -933,7 +933,7 @@
_success = (ret == 0);
// Free memory in use by the CLI args
- for(int i = 0; i != cli.first; ++i) {
+ for (int i = 0; i != cli.first; ++i) {
delete[] cli.second[i];
}
delete[] cli.second;
@@ -952,10 +952,10 @@
}
void ProcessPage::updateButtons(wxWindow *panel, WizardButtons *buttons) {
- if(_success) {
+ if (_success) {
buttons->enablePrevious(false);
buttons->enableNext(true);
- } else if(_finished) {
+ } else if (_finished) {
buttons->enablePrevious(true);
buttons->enableNext(true);
} else {
@@ -994,7 +994,7 @@
void FinishPage::onNext(wxWindow *panel) {
wxCheckBox *display = static_cast<wxCheckBox *>(panel->FindWindowByName(wxT("DisplayOutput")));
- if(display->GetValue())
+ if (display->GetValue())
// Haven't found the function to do this yet...
//wxOpenExplorer(_topframe->_configuration.outputPath);
(void)0;
Modified: tools/branches/gsoc2009-gui/gui/tools.cpp
===================================================================
--- tools/branches/gsoc2009-gui/gui/tools.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/gui/tools.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -169,8 +169,8 @@
wxArrayString Tools::getToolList(ToolType tt) const {
wxArrayString l;
- for(std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
- if(tt == TOOLTYPE_ALL || iter->second._type == tt)
+ for (std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
+ if (tt == TOOLTYPE_ALL || iter->second._type == tt)
l.Add(iter->first);
l.Sort();
std::unique(l.begin(), l.end());
@@ -179,9 +179,9 @@
wxArrayString Tools::getGameList(ToolType tt) const {
wxArrayString l;
- for(std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
- if(tt == TOOLTYPE_ALL || iter->second._type == tt)
- for(wxArrayString::const_iterator citer = iter->second._games.begin(); citer != iter->second._games.end(); ++citer)
+ for (std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
+ if (tt == TOOLTYPE_ALL || iter->second._type == tt)
+ for (wxArrayString::const_iterator citer = iter->second._games.begin(); citer != iter->second._games.end(); ++citer)
l.Add(*citer);
l.Sort();
std::unique(l.begin(), l.end());
@@ -199,17 +199,17 @@
const Tool *Tools::get(const wxString& name) const {
std::map<wxString, Tool>::const_iterator iter = tools.find(name);
- if(iter == tools.end())
+ if (iter == tools.end())
return NULL;
return &iter->second;
}
const Tool *Tools::getByGame(const wxString &gamename, ToolType type) const {
- for(std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
- if(type == TOOLTYPE_ALL || iter->second._type == type)
- for(wxArrayString::const_iterator citer = iter->second._games.begin(); citer != iter->second._games.end(); ++citer)
- if(*citer == gamename)
+ for (std::map<wxString, Tool>::const_iterator iter = tools.begin(); iter != tools.end(); ++iter)
+ if (type == TOOLTYPE_ALL || iter->second._type == type)
+ for (wxArrayString::const_iterator citer = iter->second._games.begin(); citer != iter->second._games.end(); ++citer)
+ if (*citer == gamename)
return &iter->second;
return NULL;
}
@@ -226,9 +226,9 @@
_name = name;
invoke = main;
- if(name.Find(wxT("extract")) != wxNOT_FOUND)
+ if (name.Find(wxT("extract")) != wxNOT_FOUND)
_type = TOOLTYPE_EXTRACTION;
- else if(name.Find(wxT("compress")) != wxNOT_FOUND)
+ else if (name.Find(wxT("compress")) != wxNOT_FOUND)
_type = TOOLTYPE_COMPRESSION;
else {
wxLogError(wxT("Tools with unknown type shouldn't exist."));
Modified: tools/branches/gsoc2009-gui/util.cpp
===================================================================
--- tools/branches/gsoc2009-gui/util.cpp 2009-07-02 01:38:06 UTC (rev 42016)
+++ tools/branches/gsoc2009-gui/util.cpp 2009-07-02 01:41:45 UTC (rev 42017)
@@ -179,10 +179,10 @@
void Filename::setExtension(const char *ext) {
char *dot = strrchr(_path, '.');
- if(!dot)
+ if (!dot)
dot = _path + strlen(_path) - 1;
// Don't copy the dot
- if(*ext == '.')
+ if (*ext == '.')
ext++;
strcpy(dot+1, ext);
}
@@ -202,23 +202,23 @@
bool Filename::hasExtension(const char *suffix) const {
const char *dot = strrchr(_path, '.');
- if(!dot)
+ if (!dot)
dot = _path + strlen(_path);
// Check that dot position is less than /, since some
// directories contain ., like /home/.data/file
const char *slash = strrchr(_path, '/');
- if(slash && slash > dot)
+ if (slash && slash > dot)
return false;
slash = strrchr(_path, '\\');
- if(slash && slash > dot)
+ if (slash && slash > dot)
return false;
// We compare extensions, skip any dots
- if(*dot == '.')
+ if (*dot == '.')
dot++;
- if(*suffix == '.')
+ if (*suffix == '.')
suffix++;
#ifdef _WIN32
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