Commit 4f4606cf authored by Ivo Júnior's avatar Ivo Júnior
Browse files

Animacao explosao adicinada

parent aebdef22
......@@ -15,7 +15,9 @@ char diamond[3][6] = {" / \\ ", "| |", " \\==/ "};
char diamond2[3][6] = {" / \\ ", "|====|", " \\ / "};
char diamond3[3][6] = {" /==\\ ", "| |", " \\ / "};
char butterfly[3][6] = {"\\\\ //", " (__) ", "// \\\\"};
char explosion[3][6] = {"#%@$%@", "#@$$##", "&@#!*#"};
char explosion[3][6] = {" ", " ## ", " "};
char explosion2[3][6] = {"\\\\||//", "--##--", "//||\\\\"};
char explosion3[3][6] = {"#%$@%@", "#@ ##", "&@*@*#"};
char input[WIDTH];
rockford player;
int alter;
......@@ -78,7 +80,7 @@ void updateMap(map *m, int action) {
updateRockford(&player, m, action);
else {
s++;
if (s < 20) {
if (s < 21) {
m->grid[player.y-1][player.x-1] = 'x';
m->grid[player.y][player.x-1] = 'x';
m->grid[player.y+1][player.x-1] = 'x';
......@@ -252,9 +254,13 @@ void renderMap(map *m, int time) {
attron(COLOR_PAIR(9));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion[k][l]);
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion[k][l]);
attroff(COLOR_PAIR(9));
if(s < 7)
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion[k][l]);
else if(s < 14)
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion2[k][l]);
else
mvprintw(3*j+k+1, 6*i+l+1, "%c", explosion3[k][l]);
attroff(COLOR_PAIR(9));
break;
}
......
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