Commit f0f3d3ee authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Fix merge

parents 7df214fb 840faf64
...@@ -313,11 +313,11 @@ void renderMap(map *m, int time) { ...@@ -313,11 +313,11 @@ void renderMap(map *m, int time) {
} }
break; break;
case('6'): case('6'):
if (m->grid[i][j+1] == '0') if (m->grid[i][j+1] == '0' || m->grid[i][j+1] == '7')
m->grid[i][j] = 'f'; m->grid[i][j] = 'f';
if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z') && m->grid[i+1][j] == '0' && m->grid[i+1][j+1] == '0') if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z' || m->grid[i][j+1] == '7') && m->grid[i+1][j] == '0' && m->grid[i+1][j+1] == '0')
m->grid[i][j] = 'r'; m->grid[i][j] = 'r';
if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z') && m->grid[i-1][j] == '0' && m->grid[i-1][j+1] == '0') if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z' || m->grid[i][j+1] == '7') && m->grid[i-1][j] == '0' && m->grid[i-1][j+1] == '0')
m->grid[i][j] = 'l'; m->grid[i][j] = 'l';
for (k = 0; k < 3; k++) for (k = 0; k < 3; k++)
...@@ -335,8 +335,12 @@ void renderMap(map *m, int time) { ...@@ -335,8 +335,12 @@ void renderMap(map *m, int time) {
} }
break; break;
case('7'): case('7'):
if (m->grid[i][j+1] == '0') if (m->grid[i][j+1] == '0' || m->grid[i][j+1] == '7')
m->grid[i][j] = 'h'; m->grid[i][j] = 'F';
if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z' || m->grid[i][j+1] == '7') && m->grid[i+1][j] == '0' && m->grid[i+1][j+1] == '0')
m->grid[i][j] = 'R';
if ((m->grid[i][j+1] == '6' || m->grid[i][j+1] == 'w' || m->grid[i][j+1] == 'z' || m->grid[i][j+1] == '7') && m->grid[i-1][j] == '0' && m->grid[i-1][j+1] == '0')
m->grid[i][j] = 'L';
attron(COLOR_PAIR(7)); attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++) for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) for (l = 0; l < 6; l++)
...@@ -377,7 +381,7 @@ void renderMap(map *m, int time) { ...@@ -377,7 +381,7 @@ void renderMap(map *m, int time) {
m->grid[i][j] = '6'; m->grid[i][j] = '6';
} }
break; break;
case('h'): case('F'):
attron(COLOR_PAIR(7)); attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++) for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) for (l = 0; l < 6; l++)
...@@ -391,10 +395,10 @@ void renderMap(map *m, int time) { ...@@ -391,10 +395,10 @@ void renderMap(map *m, int time) {
if (waittime == 6) { if (waittime == 6) {
if (m->grid[i][j+1] == '0') { if (m->grid[i][j+1] == '0') {
m->grid[i][j+1] = 'h'; m->grid[i][j+1] = 'F';
m->grid[i][j] = '0'; m->grid[i][j] = '0';
} else if (m->grid[i][j+1] == '5') { } else if (m->grid[i][j+1] == '5') {
m->grid[i][j+1] = 'h'; m->grid[i][j+1] = 'F';
m->grid[i][j] = '0'; m->grid[i][j] = '0';
dead = true; dead = true;
} else } else
...@@ -441,18 +445,58 @@ void renderMap(map *m, int time) { ...@@ -441,18 +445,58 @@ void renderMap(map *m, int time) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) { if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
if (k == 0 && (l == 3 || l == 4)) { if (k == 0 && (l == 3 || l == 4)) {
attron(COLOR_PAIR(8)); attron(COLOR_PAIR(8));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]); mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond[k][l]);
attroff(COLOR_PAIR(8)); attroff(COLOR_PAIR(8));
} else { } else {
attron(COLOR_PAIR(3)); attron(COLOR_PAIR(3));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", bould[k][l]); mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond[k][l]);
attroff(COLOR_PAIR(3)); attroff(COLOR_PAIR(3));
} }
} }
}
case('R'):
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
if (time < 10)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond[k][l]);
else if (time < 20)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond2[k][l]);
else
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond3[k][l]);
attroff(COLOR_PAIR(7));
}
}
}
if (waittime == 6) {
if (m->grid[i+1][j] == '0') {
m->grid[i+1][j] = 'F';
m->grid[i][j] = '0';
}
}
break;
case('L'):
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (!((k == 0 || k == 2) && (l == 0 || l == 5))) {
attron(COLOR_PAIR(7));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
if (time < 10)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond[k][l]);
else if (time < 20)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond2[k][l]);
else
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", diamond3[k][l]);
attroff(COLOR_PAIR(7));
}
} }
if (waittime == 6) { if (waittime == 6) {
if (m->grid[i-1][j] == '0') { if (m->grid[i-1][j] == '0') {
m->grid[i-1][j] = 'f'; m->grid[i-1][j] = 'F';
m->grid[i][j] = '0'; m->grid[i][j] = '0';
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment