Project

General

Profile

Revision 270

make code mapping

View differences:

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:

Also available in: Unified diff