commit 1e9795f2
Removed unused method
Changed files
| M | source/code/BlockGame.cpp before |
| M | source/code/BlockGame.hpp before |
| M | source/code/main.cpp before |
diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp
index b3c570d..d745e74 100644
--- a/source/code/BlockGame.cpp
+++ b/source/code/BlockGame.cpp
@@ -418,12 +418,6 @@ void BlockGame::NewVsGame(BlockGame *target, bool AI, unsigned int ticks)
putStartBlocks();
garbageTarget = target;
}
-//Go in Demonstration mode, no movement
-void BlockGame::Demonstration(bool toggle)
-{
- speed=0;
- baseSpeed = 0;
-}
//Prints "winner" and ends game
void BlockGame::setPlayerWon()
diff --git a/source/code/BlockGame.hpp b/source/code/BlockGame.hpp
index 1f1da8e..3d73be3 100644
--- a/source/code/BlockGame.hpp
+++ b/source/code/BlockGame.hpp
@@ -207,8 +207,6 @@ public:
//Prints "draw" and ends the game
void setDraw();
private:
- //Go in Demonstration mode, no movement
- void Demonstration(bool toggle);
//Test if LineNr is an empty line, returns false otherwise.
bool LineEmpty(int lineNr) const;
//Test if the entire board is empty (used for Puzzles)
diff --git a/source/code/main.cpp b/source/code/main.cpp
index 427c79d..66b546e 100644
--- a/source/code/main.cpp
+++ b/source/code/main.cpp
@@ -1319,168 +1319,6 @@ private:
DrawIMG(transCover, sBoard, i*bsize, 12*bsize-pixels); //Make the appering blocks transperant
}
- //Paints the bricks gotten from a replay/net package
- void SimplePaintBricks() const
- {
- /*
- * We will need to mark the blocks that must have a bomb, we will here need to see, what is falling
- */
- bool bbomb[6][13]; //has a bomb on it!
- bool falling[6][13]; //this is falling
- bool getReady[6][13]; //getReady
- for (int i=0; i<6; i++)
- for (int j=0; j<13; j++)
- {
- bbomb[i][j]=false; //All false by default
- falling[i][j]=false;
- if (board[i][j]>29)
- getReady[i][j]=true;
- else
- getReady[i][j]=false;
- }
- //See that is falling
- for (int i=0; i<6; i++)
- {
- bool rowFalling = false;
- for (int j=0; j<13; j++)
- {
- if (rowFalling)
- falling[i][j]=true;
- if ((!rowFalling)&&(board[i][j]%30==-1))
- rowFalling = true;
- if ((rowFalling)&&(board[i][j]%30>6))
- rowFalling = false;
- if (getReady[i][j])
- {
- falling[i][j]=true; //getReady is the same as falling
- rowFalling = false;
- }
- }
- }
- //Now looking at rows:
- for (int i=0; i<6; i++)
- {
- int count = 0;
- int color = -1;
- for (int j=1; j<13; j++)
- {
- if ((board[i][j]%30==color)&&(!falling[i][j]))
- count++;
- else if (falling[i][j])
- {
- count = 0;
- }
- else
- {
- color=board[i][j]%30;
- count=1;
- }
- if ((count>2)&&(color>-1)&&(color)<7)
- {
- bbomb[i][j]=true;
- bbomb[i][j-1]=true;
- bbomb[i][j-2]=true;
- }
- }
- }
- //now looking for lines
- for (int i=1; i<13; i++)
- {
- int count = 0;
- int color = -1;
- for (int j=0; j<6; j++)
- {
- if ((board[j][i]%30==color)&&(!falling[j][i]))
- count++;
- else if (falling[j][i])
- {
- count = 0;
- }
- else
- {
- color=board[j][i]%30;
- count=1;
- }
- if ((count>2)&&(color>-1)&&(color<7))
- {
- bbomb[j][i]=true;
- bbomb[j-1][i]=true;
- bbomb[j-2][i]=true;
- }
- }
- }
- for (int i=0; ((i<13)&&(i<30)); i++)
- for (int j=0; j<6; j++)
- {
- if ((board[j][i]%10 != -1) && (board[j][i]%30 < 7))
- {
- DrawIMG(bricks[board[j][i]%10], sBoard, j*bsize, 12*bsize-i*bsize-pixels);
- if (bbomb[j][i])
- DrawIMG(bomb[(ticks/BOMBTIME)%2], sBoard, j*bsize, 12*bsize-i*bsize-pixels);
- if (getReady[j][i])
- DrawIMG(ready[(ticks/READYTIME)%2], sBoard, j*bsize, 12*bsize-i*bsize-pixels);
- }
- if (board[j][i]%30>6)
- {
- if (board[j][i]%30==7)
- DrawIMG(garbageR, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==9)
- DrawIMG(garbageML, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==10)
- DrawIMG(garbageMR, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==11)
- DrawIMG(garbageTR, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==12)
- DrawIMG(garbageTL, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==13)
- DrawIMG(garbageBL, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==14)
- DrawIMG(garbageBR, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==15)
- DrawIMG(garbageM, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==16)
- DrawIMG(garbageFill, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==17)
- DrawIMG(garbageT, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==18)
- DrawIMG(garbageB, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==19)
- DrawIMG(garbageL, sBoard, j*bsize, 12*bsize-i*bsize-pixels); //good
- if (board[j][i]%30==20)
- switch(j)
- {
- case 0:
- DrawIMG(garbageGML, sBoard,j*bsize, 12*bsize-i*bsize-pixels);
- break;
- case 5:
- DrawIMG(garbageGMR, sBoard,j*bsize, 12*bsize-i*bsize-pixels);
- break;
- default:
- DrawIMG(garbageGM, sBoard,j*bsize, 12*bsize-i*bsize-pixels);
- }
- }
-
-
- }
-
- int garbageSize=0;
- for (int i=0; i<20; i++)
- {
- if ((board[0][i]%30==12)&&(garbageSize>0))
- {
- DrawIMG(smiley[0], sBoard, 2*bsize, bsize-i*bsize-pixels+(bsize/2)*garbageSize);
- }
- if (board[0][i]%30!=19) //not in garbage
- {
- garbageSize=0;
- }
- else
- {
- garbageSize++;
- }
-
- }
- }
public:
//Draws everything
void DoPaintJob()