scummvm/engines/mortevielle/keyboard.cpp

61 lines
949 B
C++
Raw Normal View History

char readkey1() {
char c;
2011-12-23 19:02:50 +00:00
char readkey1_result;
input >> kbd >> c;
readkey1_result = c;
return readkey1_result;
}
2011-12-23 19:02:50 +00:00
integer testou() {
char ch;
2011-12-23 19:02:50 +00:00
integer testou_result;
input >> kbd >> ch;
switch (ch) {
case '\23' :
sonoff = ! sonoff;
break;
case '\1':
case '\3':
case '\5' : {
newgd = (cardinal)pred(integer, ord(ch)) >> 1;
testou_result = 61;
return testou_result;
}
break;
case '\10' : {
newgd = her;
testou_result = 61;
return testou_result;
}
break;
case '\24' : {
newgd = tan;
testou_result = 61;
return testou_result;
}
break;
case '\26' :
if (set::of(1, 2, eos).has(c_zzz)) {
zzuul(adcfiec + 161, 0, 1644);
c_zzz = succ(integer, c_zzz);
testou_result = 61;
return testou_result;
}
break;
case '\33' :
if (keypressed()) input >> kbd >> ch;
break;
}
testou_result = ord(ch);
return testou_result;
}
2011-12-23 19:02:50 +00:00
void teskbd() {
integer dum;
2011-12-23 19:02:50 +00:00
if (keypressed()) dum = testou();
}
2011-12-23 19:02:50 +00:00