Revision 290
fixed menu lag
proj/libs/graph/include/graph.h | ||
---|---|---|
13 | 13 |
// Colors in RBG (8 bit) |
14 | 14 |
#define GRAPH_BLACK 0x000000 |
15 | 15 |
#define GRAPH_WHITE 0xFFFFFF |
16 |
#define GRAPH_TRANSPARENT 0x00 |
|
16 | 17 |
|
17 | 18 |
// Alpha |
18 | 19 |
#define ALPHA_THRESHOLD 0x7F |
proj/src/proj.c | ||
---|---|---|
159 | 159 |
case TIMER0_IRQ: |
160 | 160 |
switch (game_state) { |
161 | 161 |
case MENU: |
162 |
if (no_interrupts % 2 == 0){ |
|
163 |
graph_clear_screen(); |
|
164 |
game_state = menu_update_state(main_menu, click); |
|
165 |
menu_draw(main_menu); |
|
162 |
graph_clear_screen(); |
|
163 |
game_state = menu_update_state(main_menu, click); |
|
164 |
menu_draw(main_menu); |
|
166 | 165 |
|
167 |
click = 0;
|
|
166 |
click = 0; |
|
168 | 167 |
|
169 |
sprite_set_pos(sp_crosshair, *mouse_x, *mouse_y); |
|
170 |
sprite_draw(sp_crosshair); |
|
171 |
graph_draw(); |
|
172 |
} |
|
168 |
sprite_set_pos(sp_crosshair, *mouse_x, *mouse_y); |
|
169 |
sprite_draw(sp_crosshair); |
|
170 |
graph_draw(); |
|
173 | 171 |
break; |
174 | 172 |
case GAME: |
175 | 173 |
if (no_interrupts % 60 == 0) timer_update(in_game_timer); |
proj/src/proj_func.c | ||
---|---|---|
213 | 213 |
rectangle_set_fill_color(ret->r0, GRAPH_BLACK); |
214 | 214 |
rectangle_set_outline_width(ret->r0, 2); |
215 | 215 |
rectangle_set_outline_color(ret->r0, GRAPH_WHITE); |
216 |
rectangle_set_fill_trans(ret->r0, GRAPH_TRANSPARENT); |
|
216 | 217 |
rectangle_set_fill_color(ret->r1, GRAPH_BLACK); |
217 | 218 |
rectangle_set_outline_width(ret->r1, 2); |
218 | 219 |
rectangle_set_outline_color(ret->r1, GRAPH_WHITE); |
220 |
rectangle_set_fill_trans(ret->r1, GRAPH_TRANSPARENT); |
|
219 | 221 |
rectangle_set_fill_color(ret->r2, GRAPH_BLACK); |
220 | 222 |
rectangle_set_outline_width(ret->r2, 2); |
221 | 223 |
rectangle_set_outline_color(ret->r2, GRAPH_WHITE); |
224 |
rectangle_set_fill_trans(ret->r2, GRAPH_TRANSPARENT); |
|
222 | 225 |
text_set_valign(ret->t0, text_valign_center); |
223 | 226 |
text_set_halign(ret->t0, text_halign_center); |
224 | 227 |
text_set_color(ret->t0, TEXT_COLOR); |
... | ... | |
231 | 234 |
rectangle_set_fill_color(ret->frame, GRAPH_BLACK); |
232 | 235 |
rectangle_set_outline_width(ret->frame, 6); |
233 | 236 |
rectangle_set_outline_color(ret->frame, GRAPH_WHITE); |
237 |
rectangle_set_fill_trans(ret->frame, GRAPH_TRANSPARENT); |
|
234 | 238 |
// POSITIONS |
235 | 239 |
rectangle_set_pos(ret->r0, |
236 | 240 |
graph_get_XRes()/2 - rectangle_get_w(ret->r0)/2, |
proj/Makefile | ||
---|---|---|
9 | 9 |
.PATH: ${.CURDIR}/libs/classes/src |
10 | 10 |
.PATH: ${.CURDIR}/libs/utils/src |
11 | 11 |
|
12 |
SRCS= proj.c list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c font.c xpm_utils.c ent.c rtc.c uart.c makecode_map.c |
|
12 |
SRCS= proj.c list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c font.c xpm_utils.c ent.c rtc.c uart.c hltp.c makecode_map.c
|
|
13 | 13 |
IPATHS=-I./include -I./libs/graph/include -I./libs/kbc/include -I./libs/rtc/include -I./libs/timer/include -I./libs/uart/include -I./libs/classes/include -I./libs/utils/include -I./maps -I./media/xpm |
14 | 14 |
|
15 | 15 |
CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO #-D __LCOM_OPTIMIZED_ |
Also available in: Unified diff