Rev 539 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
249 | Ghost | 1 | |
2 | |||
3 | |||
647 | andrew_pro | 4 | #include |
5 | #include |
||
6 | |||
249 | Ghost | 7 | |
647 | andrew_pro | 8 | int i; |
249 | Ghost | 9 | |
10 | |||
11 | char* caption = "Console test - colors"; |
||
12 | |||
13 | |||
14 | dword* dll_ver; |
||
15 | void stdcall (* con_init)(dword wnd_width, dword wnd_height, dword scr_width, dword scr_height, const char* title); |
||
16 | void stdcall (* con_write_asciiz)(const char* string); |
||
647 | andrew_pro | 17 | void cdecl (* con_printf)(const char* format,...); |
18 | void stdcall (* con_exit)(dword bCloseWindow); |
||
249 | Ghost | 19 | |
20 | |||
21 | char *name; |
||
647 | andrew_pro | 22 | void *data; |
23 | }; |
||
249 | Ghost | 24 | |
25 | |||
26 | dll_start = (dword (*)(dword)) |
||
647 | andrew_pro | 27 | _ksys_cofflib_getproc(exp, imports[0]); |
28 | dll_ver = (dword*) |
||
29 | _ksys_cofflib_getproc(exp, imports[1]); |
||
30 | con_init = (void stdcall (*)(dword , dword, dword, dword, const char*)) |
||
31 | _ksys_cofflib_getproc(exp, imports[2]); |
||
32 | con_write_asciiz = (void stdcall (*)(const char*)) |
||
33 | _ksys_cofflib_getproc(exp, imports[3]); |
||
34 | con_printf = (void cdecl (*)(const char*,...)) |
||
35 | _ksys_cofflib_getproc(exp, imports[4]); |
||
36 | con_exit = (void stdcall (*)(dword)) |
||
37 | _ksys_cofflib_getproc(exp, imports[5]); |
||
38 | } |
||
249 | Ghost | 39 | |
40 | |||
41 | |||
42 | |||
647 | andrew_pro | 43 | int a,b,c,d; |
44 | |||
249 | Ghost | 45 | |
647 | andrew_pro | 46 | debug_out_str("can't load lib\n"); |
47 | return 1; |
||
48 | } |
||
249 | Ghost | 49 | link(hDll, imports); |
647 | andrew_pro | 50 | debug_out_str("dll loaded\n"); |
51 | |||
249 | Ghost | 52 | |
647 | andrew_pro | 53 | debug_out_str("dll_start failed\n"); |
54 | return 1; |
||
55 | } |
||
56 | |||
249 | Ghost | 57 | |
647 | andrew_pro | 58 | |
59 | |||
60 | con_printf("Color 0x%02X: ", i); |
||
61 | con_write_asciiz("Text sample."); |
||
62 | |||
63 | |||
64 | |||
65 | |||
249 | Ghost | 66 | |
67 | |||
647 | andrew_pro | 68 | debug_out_str("all right's ;)\n"); |
69 | }> |
||
249 | Ghost | 70 |