Go to most recent revision |
Blame |
Last modification |
View Log
| RSS feed
/* ------------------ */
/* Keyboard handler */
/* ------------------ */
#include <drivers/keyb.h>
#include "include/keyfunct.h"
void keyb_h() {
KEY_EVT k;
keyb_set_map(itaMap);
/* Exit keys: ALT-X, ENTER */
k.flag = ALTL_BIT;
k.scan = KEY_X;
k.ascii = 'x';
keyb_hook(k, endfun);
k.flag = ALTR_BIT;
k.scan = KEY_X;
k.ascii = 'x';
keyb_hook(k, endfun);
k.flag = 0;
k.scan = KEY_ENT;
k.ascii = 13;
keyb_hook(k, endfun);
/* Create HARD cars */
k.flag = 0;
k.scan = KEY_C;
k.ascii = 'c';
keyb_hook(k, h_car_create);
/* kill hard cars*/
k.flag = 0;
k.scan = KEY_K;
k.ascii = 'k';
keyb_hook(k, h_car_kill);
//refresh map
k.flag=0;
k.scan = KEY_R;
k.ascii = 'r';
keyb_hook(k, refresh);
//create soft cars
k.flag=0;
k.scan = KEY_S;
k.ascii = 's';
keyb_hook(k, s_car_create);
//toggle sensors
k.flag=0;
k.scan = KEY_D;
k.ascii = 'd';
keyb_hook(k, sensor_switch);
}