Revision 166
encapsulated some functions
proj.c | ||
---|---|---|
7 | 7 |
|
8 | 8 |
#include "i8254.h" |
9 | 9 |
#include "kbc_macros.h" |
10 |
#include "graphics_macros.h"
|
|
10 |
#include "graph_macros.h" |
|
11 | 11 |
#include "mouse_macros.h" |
12 | 12 |
#include "proj_macros.h" |
13 | 13 |
#include "errors.h" |
14 | 14 |
|
15 | 15 |
#include "sprite.h" |
16 | 16 |
#include "kbc.h" |
17 |
#include "graphics.h"
|
|
17 |
#include "graph.h" |
|
18 | 18 |
#include "timer.h" |
19 | 19 |
#include "keyboard.h" |
20 | 20 |
#include "mouse.h" |
... | ... | |
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
int(proj_main_loop)(int argc, char *argv[]) { |
46 |
|
|
47 |
if (vbe_get_mode_information(GRAPH_MODE)) { |
|
48 |
printf("%s: failed to get information for mode %x.\n", __func__, GRAPH_MODE); |
|
49 |
if (cleanup()) |
|
50 |
printf("%s: failed to cleanup.\n", __func__); |
|
46 |
if(graph_init(GRAPH_MODE)){ |
|
47 |
printf("%s: failed to initalize graphics.\n", __func__); |
|
48 |
if (cleanup()) printf("%s: failed to cleanup.\n", __func__); |
|
51 | 49 |
return 1; |
52 | 50 |
} |
53 | 51 |
|
54 |
graph_map_vram(); // if function fails it aborts program |
|
55 |
|
|
56 |
if (graph_set_mode(GRAPH_MODE)) { |
|
57 |
printf("%s: failed to set graphic mode %x.\n", __func__, GRAPH_MODE); |
|
58 |
if (cleanup()) |
|
59 |
printf("%s: failed to cleanup.\n", __func__); |
|
60 |
return 1; |
|
61 |
}; |
|
62 |
|
|
63 | 52 |
#ifdef DIOGO |
64 | 53 |
graph_paint_screen(0x777777); |
65 | 54 |
sprite_t *shooter1 = get_shooter(); sprite_set_pos(shooter1, 100, 100); |
Also available in: Unified diff