Added support for numbers
BIN
fremen-assets/0.png
Normal file
After Width: | Height: | Size: 102 B |
BIN
fremen-assets/1.png
Normal file
After Width: | Height: | Size: 113 B |
BIN
fremen-assets/2.png
Normal file
After Width: | Height: | Size: 140 B |
BIN
fremen-assets/3.png
Normal file
After Width: | Height: | Size: 148 B |
BIN
fremen-assets/4.png
Normal file
After Width: | Height: | Size: 125 B |
BIN
fremen-assets/5.png
Normal file
After Width: | Height: | Size: 135 B |
BIN
fremen-assets/6.png
Normal file
After Width: | Height: | Size: 124 B |
BIN
fremen-assets/7.png
Normal file
After Width: | Height: | Size: 122 B |
BIN
fremen-assets/8.png
Normal file
After Width: | Height: | Size: 125 B |
BIN
fremen-assets/9.png
Normal file
After Width: | Height: | Size: 120 B |
58
src/main.c
@ -54,7 +54,17 @@ enum Character {
|
|||||||
E,
|
E,
|
||||||
I,
|
I,
|
||||||
O,
|
O,
|
||||||
U
|
U,
|
||||||
|
c_0,
|
||||||
|
c_1,
|
||||||
|
c_2,
|
||||||
|
c_3,
|
||||||
|
c_4,
|
||||||
|
c_5,
|
||||||
|
c_6,
|
||||||
|
c_7,
|
||||||
|
c_8,
|
||||||
|
c_9
|
||||||
};
|
};
|
||||||
|
|
||||||
void transcript(char* message, int *charcters){
|
void transcript(char* message, int *charcters){
|
||||||
@ -165,6 +175,36 @@ void transcript(char* message, int *charcters){
|
|||||||
case 'u':
|
case 'u':
|
||||||
charcters[i] = U;
|
charcters[i] = U;
|
||||||
break;
|
break;
|
||||||
|
case '0':
|
||||||
|
charcters[i] = c_0;
|
||||||
|
break;
|
||||||
|
case '1':
|
||||||
|
charcters[i] = c_1;
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
charcters[i] = c_2;
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
charcters[i] = c_3;
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
charcters[i] = c_4;
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
charcters[i] = c_5;
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
charcters[i] = c_6;
|
||||||
|
break;
|
||||||
|
case '7':
|
||||||
|
charcters[i] = c_7;
|
||||||
|
break;
|
||||||
|
case '8':
|
||||||
|
charcters[i] = c_8;
|
||||||
|
break;
|
||||||
|
case '9':
|
||||||
|
charcters[i] = c_9;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -251,14 +291,24 @@ int main(int argc, char *argv[]){
|
|||||||
characters_img[25] = LoadImage(concat(executablePath,"fremen-assets/I.png"));
|
characters_img[25] = LoadImage(concat(executablePath,"fremen-assets/I.png"));
|
||||||
characters_img[26] = LoadImage(concat(executablePath,"fremen-assets/O.png"));
|
characters_img[26] = LoadImage(concat(executablePath,"fremen-assets/O.png"));
|
||||||
characters_img[27] = LoadImage(concat(executablePath,"fremen-assets/U.png"));
|
characters_img[27] = LoadImage(concat(executablePath,"fremen-assets/U.png"));
|
||||||
|
characters_img[28] = LoadImage(concat(executablePath,"fremen-assets/0.png"));
|
||||||
|
characters_img[29] = LoadImage(concat(executablePath,"fremen-assets/1.png"));
|
||||||
|
characters_img[30] = LoadImage(concat(executablePath,"fremen-assets/2.png"));
|
||||||
|
characters_img[31] = LoadImage(concat(executablePath,"fremen-assets/3.png"));
|
||||||
|
characters_img[32] = LoadImage(concat(executablePath,"fremen-assets/4.png"));
|
||||||
|
characters_img[33] = LoadImage(concat(executablePath,"fremen-assets/5.png"));
|
||||||
|
characters_img[34] = LoadImage(concat(executablePath,"fremen-assets/6.png"));
|
||||||
|
characters_img[35] = LoadImage(concat(executablePath,"fremen-assets/7.png"));
|
||||||
|
characters_img[36] = LoadImage(concat(executablePath,"fremen-assets/8.png"));
|
||||||
|
characters_img[37] = LoadImage(concat(executablePath,"fremen-assets/9.png"));
|
||||||
|
|
||||||
for(int i = 0; i <= 27; i++){
|
for(int i = 0; i <= 37; i++){
|
||||||
ImageResizeNN(&characters_img[i], CHAR_WIDTH, CHAR_HEIGHT);
|
ImageResizeNN(&characters_img[i], CHAR_WIDTH, CHAR_HEIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
Texture2D characters_tex[28] = {0};
|
Texture2D characters_tex[28] = {0};
|
||||||
|
|
||||||
for(int i = 0; i <= 27; i++){
|
for(int i = 0; i <= 37; i++){
|
||||||
characters_tex[i] = LoadTextureFromImage(characters_img[i]);
|
characters_tex[i] = LoadTextureFromImage(characters_img[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,7 +402,7 @@ int main(int argc, char *argv[]){
|
|||||||
//INPUT
|
//INPUT
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i <= 27; i++){
|
for(int i = 0; i <= 37; i++){
|
||||||
UnloadImage(characters_img[i]);
|
UnloadImage(characters_img[i]);
|
||||||
UnloadTexture(characters_tex[i]);
|
UnloadTexture(characters_tex[i]);
|
||||||
}
|
}
|
||||||
|