Revision 187
nothing special
proj.c | ||
---|---|---|
149 | 149 |
interrupt_handler(i); |
150 | 150 |
if ((scancode[0]) == ESC_BREAK_CODE) good = 0; |
151 | 151 |
#ifdef TELMO |
152 |
update_movement(shooter1); |
|
153 |
printf("POS: %d %d\n", sprite_get_x(shooter1), sprite_get_y(shooter1)); |
|
154 |
if (counter_mouse_ih >= 3) { |
|
155 |
struct packet pp = mouse_parse_packet(packet_mouse_ih); |
|
156 |
update_mouse_position(&pp); |
|
157 |
printf("X: %d | Y: %d | XRES: %d | YRES: %d\n", get_mouse_X(), get_mouse_Y(), graph_get_XRes(), graph_get_YRes()); |
|
158 |
counter_mouse_ih = 0; |
|
152 |
if (i == 0) { |
|
153 |
uint32_t refresh_count_value = sys_hz() / REFRESH_RATE; |
|
154 |
if (no_interrupts % refresh_count_value == 0) { |
|
155 |
update_movement(shooter1); |
|
156 |
sprite_set_pos(crosshair, get_mouse_X(), get_mouse_Y()); |
|
157 |
double angle = get_mouse_angle(shooter1); |
|
158 |
sprite_set_angle(shooter1, angle - M_PI_2); |
|
159 |
graph_clear_screen(); |
|
160 |
sprite_draw(crosshair); |
|
161 |
sprite_draw(shooter1); |
|
162 |
graph_draw(); |
|
163 |
} |
|
159 | 164 |
} |
160 |
|
|
161 |
sprite_set_pos(crosshair, get_mouse_X(), get_mouse_Y()); |
|
162 |
double angle = get_mouse_angle(shooter1); |
|
163 |
sprite_set_angle(shooter1, angle - M_PI_2); |
|
164 |
graph_clear_screen(); |
|
165 |
sprite_draw(crosshair); |
|
166 |
sprite_draw(shooter1); |
|
167 |
graph_draw(); |
|
168 | 165 |
#endif |
169 | 166 |
} |
170 | 167 |
} |
168 |
#ifdef TELMO |
|
169 |
if (counter_mouse_ih >= 3) { |
|
170 |
struct packet pp = mouse_parse_packet(packet_mouse_ih); |
|
171 |
update_mouse_position(&pp); |
|
172 |
counter_mouse_ih = 0; |
|
173 |
} |
|
174 |
#endif |
|
171 | 175 |
|
172 | 176 |
break; |
173 | 177 |
default: |
Also available in: Unified diff