Revision 183
can reduce letter size; working on increasing
proj.c | ||
---|---|---|
16 | 16 |
#include "rectangle.h" |
17 | 17 |
#include "font.h" |
18 | 18 |
|
19 |
#ifdef DIOGO |
|
20 |
#include "shooter.h" |
|
21 |
#endif |
|
22 |
|
|
19 | 23 |
#ifdef TELMO |
20 | 24 |
#include "crosshair.h" |
21 | 25 |
#endif |
... | ... | |
53 | 57 |
//printf("%d\n", 1000000-(int)(1000000*fm_sin(0.5*M_PI))); |
54 | 58 |
//printf("%d\n", (int)(1000000*fm_cos(0.5*M_PI))); |
55 | 59 |
/* |
60 |
rectangle_t *rect = rectangle_ctor(0,0,graph_get_XRes(), graph_get_YRes()); |
|
61 |
rectangle_set_fill_color(rect, WHITE); |
|
62 |
|
|
56 | 63 |
clock_t t = clock(); |
57 | 64 |
sprite_t *shooter1 = get_shooter(); sprite_set_pos(shooter1, 100, 100); |
58 | 65 |
for(double angle = 0; angle <= 6.283185; angle += 0.006283185){ |
59 | 66 |
sprite_set_angle(shooter1, angle); |
60 | 67 |
graph_clear_screen(); |
68 |
rectangle_draw(rect); |
|
61 | 69 |
sprite_draw(shooter1); |
62 | 70 |
graph_draw(); |
63 | 71 |
} |
... | ... | |
84 | 92 |
graph_draw(); |
85 | 93 |
*/ |
86 | 94 |
|
95 |
font_t *fnt = font_ctor("/home/lcom/labs/proj/font/xpm2"); |
|
87 | 96 |
|
88 | 97 |
|
98 |
rectangle_t *rect = rectangle_ctor(100,100,100, 100); |
|
99 |
rectangle_set_fill_color(rect, WHITE); |
|
100 |
rectangle_draw(rect); |
|
101 |
rectangle_dtor(rect); |
|
102 |
|
|
103 |
text_t *txt = text_ctor(fnt, "Hello world!"); |
|
104 |
text_set_color(txt, 0x00FF00); |
|
105 |
text_set_pos(txt, 100, 100); |
|
106 |
text_draw(txt); |
|
107 |
text_dtor(txt); |
|
108 |
|
|
109 |
graph_draw(); |
|
110 |
|
|
111 |
font_dtor(fnt); |
|
112 |
|
|
113 |
tickdelay(micros_to_ticks(1000000)); |
|
114 |
|
|
89 | 115 |
#endif |
90 | 116 |
|
91 | 117 |
#ifdef TELMO |
... | ... | |
100 | 126 |
message msg; |
101 | 127 |
int good = 1; |
102 | 128 |
|
129 |
#ifdef DIOGO |
|
130 |
good = 0; |
|
131 |
#endif |
|
132 |
|
|
103 | 133 |
while (good) { |
104 | 134 |
/* Get a request message. */ |
105 | 135 |
if ((r = driver_receive(ANY, &msg, &ipc_status)) != 0) { |
Also available in: Unified diff