commit cad041e3
Gray garbage are now displayed corretly in replay mode and during
network play
git-svn-id: https://blockattack.svn.sourceforge.net/svnroot/blockattack/trunk@70 9d7177f8-192b-0410-8f35-a16a89829b06
Changed files
| M | source/code/BlockGame.hpp before |
diff --git a/source/code/BlockGame.hpp b/source/code/BlockGame.hpp
index d791748..a49ed3e 100644
--- a/source/code/BlockGame.hpp
+++ b/source/code/BlockGame.hpp
@@ -481,7 +481,9 @@ public:
for (int j=0;j<13;j++) {
if (board[i][j]%10<7)
bp.brick[i][j]=board[i][j]%10+1;
- if ((board[i][j]/1000000)%10>0) {
+ if ((board[i][j]/1000000)%10==1)
+ {
+ //Ordinary garbage
int aInt=0; //N=1, S=2, W=4, E=8
if (i==0)
aInt+=4;
@@ -542,6 +544,11 @@ public:
};
//cout << "garbage added to replay: " << aInt << endl;
}
+ if ((board[i][j]/1000000)%10==2)
+ {
+ //Gray garbage
+ bp.brick[i][j]=21;
+ }
if ((board[i][j]/BLOCKHANG)%10==1) //If "get ready"
bp.brick[i][j]+=30;
}
@@ -2001,6 +2008,17 @@ public:
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);
+ }
//cout << "IS: " << board[j][i] << endl;
}