Revision 270
make code mapping
proj/src/proj.c | ||
---|---|---|
14 | 14 |
#include "graph.h" |
15 | 15 |
#include "rtc.h" |
16 | 16 |
#include "interrupts_func.h" |
17 |
#include "makecode_map.h" |
|
17 | 18 |
|
18 | 19 |
#include "graph.h" |
19 | 20 |
#include "sprite.h" |
... | ... | |
206 | 207 |
case MENU: |
207 | 208 |
if ((scancode[0]) == ESC_BREAK_CODE) game_state = EXIT; |
208 | 209 |
|
209 |
else if ((scancode[0]) == A_MAKE_CODE){ |
|
210 |
buffer[buffer_pos++] = 'A'; |
|
211 |
printf("%c", buffer[buffer_pos-1]); |
|
212 |
} |
|
213 | 210 |
else if ((scancode[0]) == ENTER_MAKE_CODE) { |
214 | 211 |
buffer[buffer_pos] = '\0'; |
215 | 212 |
printf("\nSending string -%s-\n", buffer); |
... | ... | |
217 | 214 |
hltp_send_string(COM1_ADDR, buffer)); |
218 | 215 |
buffer_pos = 0; |
219 | 216 |
} |
217 |
else { |
|
218 |
char c = map_makecode(scancode[0]); |
|
219 |
if (c == ERROR_CODE) break; |
|
220 |
buffer[buffer_pos++] = c; |
|
221 |
printf("%c", c); |
|
222 |
} |
|
220 | 223 |
|
221 | 224 |
break; |
222 | 225 |
case GAME: |
proj/DR.mk | ||
---|---|---|
2 | 2 |
|
3 | 3 |
.PATH: ${.CURDIR}/src |
4 | 4 |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c makecode_map.c
|
|
6 | 6 |
|
7 | 7 |
CPPFLAGS += -pedantic -I./include -I./maps -I./media/xpm -D LCOM_MACRO -D DIOGO #-D __LCOM_OPTIMIZED_ |
8 | 8 |
|
proj/Makefile | ||
---|---|---|
2 | 2 |
|
3 | 3 |
.PATH: ${.CURDIR}/src |
4 | 4 |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c makecode_map.c
|
|
6 | 6 |
|
7 | 7 |
CPPFLAGS += -pedantic -I./include -I./maps -I./media/xpm -D LCOM_MACRO -D __LCOM_OPTIMIZED_ |
8 | 8 |
|
proj/TB.mk | ||
---|---|---|
2 | 2 |
|
3 | 3 |
.PATH: ${.CURDIR}/src |
4 | 4 |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c |
|
5 |
SRCS= proj.c list.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 test7.c uart.c hltp.c makecode_map.c
|
|
6 | 6 |
|
7 | 7 |
CPPFLAGS += -pedantic -I./include -I./maps -I./media/xpm -D LCOM_MACRO -D TELMO #-D __LCOM_OPTIMIZED_ |
8 | 8 |
|
Also available in: Unified diff