utils.c 2.88 KB
Newer Older
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
1
2
#include "utils.h"

Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
char steel[3][6]     = {" @  @ ", "      ", " @  @ "};
char steel2[3][6]    = {"      ", " @  @ ", "      "};
char dirt[3][6]      = {"-_-_-_", "_-_-_-", "-_-_-_"};
char wall[3][6]      = {"|_|_|_", "_|_|_|", "|_|_|_"};
char wall2[3][6]     = {"_|_|_|", "|_|_|_", "_|_|_|"};

char ext[3][6]        = {" @  @ ", "      ", " @  @ "};
char rockf[3][6]      = {" (**) ", " /EE\\ ", "  II  "};
char rockfr[3][6]     = {" ( *} ", "  EE\\ ", "  /;  "};
char rockfl[3][6]     = {" {* ) ", " /EE  ", "  ;\\  "};
char bould[3][6]      = {" (@*) ", "( #@#)", " (_*) "};
char diamond[3][6]    = {" /  \\ ", "|    |", " \\==/ "};
char diamond2[3][6]   = {" /  \\ ", "|====|", " \\  / "};
char diamond3[3][6]   = {" /==\\ ", "|    |", " \\  / "};
char butterfly[3][6]  = {"\\\\  //", " (__) ", "//  \\\\"};
char explosion[3][6]  = {"      ", "  ##  ", "      "}; 
char explosion2[3][6] = {"\\\\||//", "--##--", "//||\\\\"}; 
char explosion3[3][6] = {"#%$@%@", "#@  ##", "&@*@*#"}; 

Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
22
char empty[3][6]    = {"      ", "      ", "      "};
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
23
24
25
26
27
28
29
30
31
32
33
char one[3][6]      = {"      ", "  -|  ", "  _|_ "};
char two[3][6]      = {"  __  ", "  __] ", " |__  "};
char three[3][6]    = {"  __  ", "  __] ", "  __] "};
char four[3][6]     = {"      ", "  /_| ", "    | "};
char five[3][6]     = {"  __  ", " |__  ", "  __] "};
char six[3][6]      = {"  __  ", " |__  ", " [__] "};
char seven[3][6]    = {" ___  ", "   /  ", "  /   "};
char eight[3][6]    = {"  __  ", " [__] ", " [__] "};
char nine[3][6]     = {"  __  ", " [__] ", "  _/  "};
char zero[3][6]     = {"  __  ", " |  | ", " |__| "};
char symbol[3][6]   = {"      ", " /##\\ ", " \\##/ "};
34
char A[3][6]	    = {"  __  ", " |__| ", " |  | "};
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
35
char B[3][6]	    = {"  __  ", " |__) ", " |__) "};
36
37
38
char C[3][6]	    = {"  __  ", " |    ", " |__  "};
char D[3][6]	    = {"  __  ", " |  \\ ", " |__/ "};
char E[3][6]	    = {"  __  ", " |__  ", " |__  "};
Ivo Júnior's avatar
Ivo Júnior committed
39
char F[3][6]	    = {"  __  ", " |__  ", " |    "};
40
41
42
char G[3][6]	    = {"  __  ", " | _  ", " |__| "};
char H[3][6]	    = {"      ", " |__| ", " |  | "};
char I[3][6]	    = {" ___  ", "  |   ", " _|_  "};
43
char J[3][6]	    = {"  ___ ", "   |  ", " |_|  "};
44
45
46
47
48
char L[3][6]	    = {"      ", " |    ", " |__  "};
char N[3][6]	    = {"      ", " |\\ | ", " | \\| "};
char R[3][6]	    = {"  __  ", " |__| ", " |  \\ "};
char S[3][6]	    = {"  __  ", " |__  ", "  __| "};
char T[3][6]	    = {" ___  ", "  |   ", "  |   "};
49
char U[3][6]	    = {"      ", " |  | ", " |__| "};
50
51
52
char V[3][6]	    = {"      ", " \\  / ", "  \\/  "};
char SL[3][6]	    = {"      ", " /___ ", " \\    "};
char SR[3][6]	    = {"      ", " ___\\ ", "    / "};
53
char DOTS[3][6]	    = {"      ", " .    ", " .    "};
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
54

Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
55
void renderChar(char mat[3][6], int i, int j, int offx, int offy, int color) {
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
56
    int k, l;
57
    attron(COLOR_PAIR(color));
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
58
59
    for (k = 0; k < 3; k++)
        for (l = 0; l < 6; l++)
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
60
            mvprintw(3*j+k+offy, 6*i+l+offx, "%c", mat[k][l]);
61
    attroff(COLOR_PAIR(color));
Bruno Freitas Tissei's avatar
Bruno Freitas Tissei committed
62
}