I'm trying to compile a really simple code with just the initialize stuff and a textout but it keeps saying
[Warning] `textout' is deprecated (declared at C:/Dev-C/Dev-Cpp/include/allegro/alcompat.h:155)
code (I'm using dev-c++)
1 | #include <allegro.h> |
2 | |
3 | |
4 | void init(); |
5 | void shutdown(); |
6 | |
7 | // main function |
8 | int main() { |
9 | allegro_init(); |
10 | init(); |
11 | while (!key[KEY_ESC]) { |
12 | textout(screen,font," try printing text", 0, 0,15); |
13 | } |
14 | shutdown(); |
15 | return 0; |
16 | } |
17 | END_OF_MAIN() |
18 | |
19 | void init() { |
20 | int depth, res; |
21 | depth = desktop_color_depth(); |
22 | if (depth == 0) depth = 32; |
23 | set_color_depth(depth); |
24 | res = set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); |
25 | if (res != 0) { |
26 | allegro_message(allegro_error); |
27 | exit(-1); |
28 | } |
29 | |
30 | install_timer(); |
31 | install_keyboard(); |
32 | install_mouse(); |
33 | /* add other initializations here */ |
34 | } |
35 | |
36 | void shutdown() { |
37 | clear_keybuf(); |
38 | /* add other deinitializations here */ |
39 | } |
Read what it tells you:
[Warning] `textout' is deprecated
That's a warning, your program works just fine. As for getting rid of it, look upthe manual entry for textout_ex.