Commit 7df214fb authored by Bruno Freitas Tissei's avatar Bruno Freitas Tissei
Browse files

Adicionado mapa 5

parent 43c35690
586
\ No newline at end of file
597
\ No newline at end of file
564
343
\ No newline at end of file
......@@ -10,7 +10,6 @@ gcc src/*.c -Wall -o temp -l curses
./temp
rm temp
xdotool key Ctrl+plus
xdotool key Ctrl+plus
xdotool key Ctrl+0
export TERM=a
24 15 150
4 50 150
912 728 636
0 0 0
324 244 0
......@@ -9,19 +9,24 @@
1000 1000 1000
0000000000000000000000000000000000000000
1111111111111111111111111111111111111111
1522222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222000222220002222200022222000222221
1222222000222220002222200022222000222221
122222207M2222207M2222207M2222207M222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222000222220002222200022222000222221
1222222000222220002222200022222000222221
1222222070222220702222207022222070222221
1222222222222222222222222222222222222221
122222207M2222207M2222207M2222207M222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222221
1222222222222222222222222222222222222224
1111111111111111111111111111111111111111
......@@ -44,7 +44,6 @@ void run(int ismenu, int running) {
}
}
int getInput() {
int input = getch();
if (input != ERR) {
......
......@@ -18,7 +18,7 @@ char butterfly[3][6] = {"\\\\ //", " (__) ", "// \\\\"};
char explosion[3][6] = {" ", " ## ", " "};
char explosion2[3][6] = {"\\\\||//", "--##--", "//||\\\\"};
char explosion3[3][6] = {"#%$@%@", "#@ ##", "&@*@*#"};
char mapfile[3][100] = {"./sprites/map1.txt", "./sprites/map2.txt", "./sprites/map3.txt"};
char mapfile[5][100] = {"./sprites/map1.txt", "./sprites/map2.txt", "./sprites/map3.txt", "./sprites/map4.txt", "./sprites/map5.txt"};
int colors[8][3];
......@@ -35,6 +35,7 @@ int hold;
int extx, exty;
int pushdelay;
int highscore;
int fireflyblink;
FILE *lastscorefile;
FILE *highscorefile;
......@@ -254,20 +255,10 @@ void renderMap(map *m, int time) {
waittime = (waittime + 1) % 7;
switch (m->grid[i][j]) {
case('0'):
if (lightning) {
renderChar(empty, i, j, offx, offy, 4);
} else
renderChar(empty, i, j, offx, offy, 6);
renderChar(empty, i, j, offx, offy, lightning ? 4 : 6);
break;
case('1'):
attron(COLOR_PAIR(5));
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++)
if (j == 1 || j == 22)
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", steel[k][l]);
else
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", steel2[k][l]);
attroff(COLOR_PAIR(5));
renderChar((j == 1 || j == 22) ? steel : steel2, i, j, offx, offy, 5);
break;
case('2'):
for (k = 0; k < 3; k++)
......@@ -529,6 +520,28 @@ void renderMap(map *m, int time) {
case('K'):
renderChar(symbol, i, j, offx, offy, 11);
break;
case('M'):
if (!(time % 5))
fireflyblink = (fireflyblink + 1) % 3;
for (k = 0; k < 3; k++)
for (l = 0; l < 6; l++) {
if (k == 0 || k == 2 || l == 0 || l == 5) {
attron(COLOR_PAIR(4 + fireflyblink));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", empty[k][l]);
attroff(COLOR_PAIR(4 + fireflyblink));
} else if (k == 1 && (l == 2 || l == 3)) {
attron(COLOR_PAIR(4 + fireflyblink));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", empty[k][l]);
attroff(COLOR_PAIR(4 + fireflyblink));
} else {
attron(COLOR_PAIR(4 + fireflyblink));
mvprintw(3*j+k+offy, 6*i+l+offx, "%c", empty[k][l]);
attroff(COLOR_PAIR(4 + fireflyblink));
}
}
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