diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index d745e74..c67ecbc 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp @@ -857,8 +857,6 @@ void BlockGame::ClearBlocks() } //for i } //for j - - combo = 0; chain = 0; for (int i=0; i<6; i++) for (int j=0; j<30; j++) @@ -899,7 +897,6 @@ void BlockGame::ClearBlocks() } } - combo=0; int startvalue; if (pixels == 0) startvalue=1; diff --git a/source/code/main.cpp b/source/code/main.cpp index 66b546e..ccc7415 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -1897,216 +1897,6 @@ bool OpenFileDialogbox(int x, int y, char *name) return true; } -//Slelect a theme -bool SelectThemeDialogbox(int x, int y, char *name) -{ - bool done = false; //We are done! - int mousex, mousey; - ListFiles lf = ListFiles(); - string folder = (string)SHAREDIR+(string)"/themes"; - if(verboseLevel) - cout << "Looking in " << folder << endl; - lf.setDirectory(folder.c_str()); -#ifdef __unix__ - string homeFolder = (string)getenv("HOME")+(string)"/.gamesaves/blockattack/themes"; - lf.setDirectory2(homeFolder.c_str()); -#endif - MakeBackground(xsize,ysize); - DrawIMG(background,screen,0,0); - DrawIMG(bForward,background,x+460,y+420); - DrawIMG(bBack,background,x+20,y+420); - while (!done && !Config::getInstance()->isShuttingDown()) - { - DrawIMG(background,screen,0,0); - const int nrOfFiles = 10; - DrawIMG(changeButtonsBack,screen,x,y); - for (int i=0; isetShuttingDown(5); - done = true; - } - - if ( event.type == SDL_KEYDOWN ) - { - if ( (event.key.keysym.sym == SDLK_ESCAPE) ) - { - done = true; - } - - if ( (event.key.keysym.sym == SDLK_RIGHT) ) - { - lf.forward(); - } - - if ( (event.key.keysym.sym == SDLK_LEFT) ) - { - lf.back(); - } - } - - } //while(event) - - SDL_GetMouseState(&mousex,&mousey); - - // If the mouse button is released, make bMouseUp equal true - if (!SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1)) - { - bMouseUp=true; - } - - if (SDL_GetMouseState(NULL,NULL)&SDL_BUTTON(1) && bMouseUp) - { - bMouseUp = false; - - //The Forward Button: - if ( (mousex>x+460) && (mousexy+420) && (mouseyx+20) && (mousexy+420) && (mouseyx+10) && (mousexy+10+i*36) && (mouseyisShuttingDown()) - { - DrawIMG(background,screen,0,0); - const int nrOfFiles = 10; - DrawIMG(changeButtonsBack,screen,x,y); - for (int i=0; isetShuttingDown(5); - done = true; - return false; - } - - if ( event.type == SDL_KEYDOWN ) - { - if ( (event.key.keysym.sym == SDLK_ESCAPE) ) - { - done = true; - return false; - } - - if ( (event.key.keysym.sym == SDLK_RIGHT) ) - { - lf.forward(); - } - - if ( (event.key.keysym.sym == SDLK_LEFT) ) - { - lf.back(); - } - } - - } //while(event) - - SDL_GetMouseState(&mousex,&mousey); - - // If the mouse button is released, make bMouseUp equal true - if (!SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1)) - { - bMouseUp=true; - } - - if (SDL_GetMouseState(NULL,NULL)&SDL_BUTTON(1) && bMouseUp) - { - bMouseUp = false; - - //The Forward Button: - if ( (mousex>x+460) && (mousexy+420) && (mouseyx+20) && (mousexy+420) && (mouseyx+10) && (mousexy+10+i*36) && (mousey