git repos / blockattack-game

commit 970c4ebe

sago007 · 2015-08-22 18:08
970c4ebe69d8fbd7d5d86630130857b1f5cca069 patch · browse files
parent 58dd05a0c233d5a9a5e53eb3a1f8e8c46920cfd9

Added a few const.

Changed files

M source/code/main.cpp before
M source/code/mainVars.hpp before
diff --git a/source/code/main.cpp b/source/code/main.cpp index 91ef68f..61af457 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -1287,7 +1287,7 @@ private:
sBoard = SDL_DisplayFormat(backBoard);
}
//Draws all the bricks to the board (including garbage)
- void PaintBricks()
+ void PaintBricks() const
{
for (int i=0; ((i<13)&&(i<30)); i++)
for (int j=0; j<6; j++)
@@ -1386,7 +1386,7 @@ private:
}
//Paints the bricks gotten from a replay/net package
- void SimplePaintBricks()
+ void SimplePaintBricks() const
{
/*
* We will need to mark the blocks that must have a bomb, we will here need to see, what is falling
diff --git a/source/code/mainVars.hpp b/source/code/mainVars.hpp index cec0b4b..704756b 100644 --- a/source/code/mainVars.hpp +++ b/source/code/mainVars.hpp
@@ -196,7 +196,7 @@ unsigned long int currentTime; //contains the current time, so we don't cal
static int xsize = 1024;
static int ysize = 768;
-static int bsize = 50;
+static const int bsize = 50;
//Stores the players names (way to long, but at least no buffer overflows (max length is 16 for display reasons))
char player1name[30];