git repos / blockattack-game

commit 3838c95c

sago007 · 2016-01-23 10:47
3838c95c6bf6cadcb82b7858b88dc9e3aa3a09ff patch · browse files
parent bdb080e67a41fcf9aa3f9e372023686fcaf1a23c

Removed current warnings.

Changed files

M source/code/listFiles.cpp before
M source/code/main.cpp before
M source/code/menudef.cpp before
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" <<endl;
}
+#endif
//Stores the controls
struct control {
@@ -126,14 +128,6 @@ static void runTwoPlayerVs(Button* b) {
runGame(11,0);
}
-static void runHostGame(Button* b) {
- runGame(12,0);
-}
-
-static void runJoinGame(Button* b) {
- runGame(13,0);
-}
-
static void buttonActionMusic(Button* b) {
MusicEnabled = !MusicEnabled;
b->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();
}