diff --git a/source/code/listFiles.cpp b/source/code/listFiles.cpp index eabc1bc..26b464a 100644 --- a/source/code/listFiles.cpp +++ b/source/code/listFiles.cpp @@ -61,9 +61,9 @@ void ListFiles::setDirectory(const string& directory) { if (!DirectoryPointer) { return; } - while (dp=readdir(DirectoryPointer)) { + while ( (dp=readdir(DirectoryPointer)) ) { string name = (string)(char*)dp->d_name; - if (!isInList(name) && name[0]!='.' ) { + if ( name.at(0) != '.' && !isInList(name) ) { filenames.push_back(name); } } @@ -93,9 +93,9 @@ void ListFiles::setDirectory2(const string& dic) { if (!DirectoryPointer) { return; } - while (dp=readdir(DirectoryPointer)) { + while ( (dp=readdir(DirectoryPointer)) ) { string name = (string)(char*)dp->d_name; - if (!isInList(name) && name != "." && name != "..") { + if ( name.at(0) != '.' && !isInList(name) ) { filenames.push_back(name); } } diff --git a/source/code/main.cpp b/source/code/main.cpp index dc22901..dbd726a 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -2139,7 +2139,6 @@ int runGame(int gametype, int level) { theTopScoresTimeTrial = Highscore(2); drawBalls = true; puzzleLoaded = false; - bool weWhereConnected = false; bool bNearDeath = false; //Play music faster or louder while tru theBallManeger = ballManeger(); diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index a09448e..2d7cf7b 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp @@ -29,10 +29,12 @@ http://blockattack.net using namespace std; +#if 0 //Menu static void PrintHi(Button* b) { cout << "Hi" <setLabel(MusicEnabled? "Music: On" : "Music: Off"); @@ -162,26 +156,6 @@ static void buttonActionPlayer2Name(Button* b) { } } -static void buttonActionPortChange(Button* b) { - string port = Config::getInstance()->getString("portv4"); - if (OpenDialogbox(200,100,port) && atoi(port.c_str())) { - Config::getInstance()->setInt("portv4",atoi(port.c_str())); - boost::format f(_("Port: %1%") ); - f % port; - b->setLabel(f.str()); - } -} - -static void buttonActionIpChange(Button* b) { - string ip = Config::getInstance()->getString("address0"); - if (OpenDialogbox(200,100,ip)) { - Config::getInstance()->setString("address0",ip); - boost::format f(_("Address: %1%") ); - f % ip; - b->setLabel(f.str()); - } -} - static void buttonActionHighscores(Button* b) { OpenScoresDisplay(); }