34 lines
731 B
C++
34 lines
731 B
C++
#include "ascii.h"
|
|
|
|
int current_editor = 0;
|
|
|
|
void do_terminal() {
|
|
const uint8_t key = whichbtn();
|
|
if (key != KEY_UNKNOWN) {
|
|
if (key < 30) debugchr(key+61);
|
|
else if (key < 39) debugchr(key+19);
|
|
else if (key == KEY_0) debugchr(key+9);
|
|
else if (key == KEY_RETURN) debug(" ");
|
|
else if (key == KEY_SPACE) debugchr(32);
|
|
else if (key == KEY_BACKSPACE) debugchr(8);
|
|
}
|
|
cls(0);
|
|
pdebug();
|
|
}
|
|
|
|
void loop() {
|
|
do_terminal();
|
|
/*
|
|
if (btnp(KEY_TAB)) {
|
|
current_editor = (++current_editor)%5;
|
|
}
|
|
switch(current_editor) {
|
|
case 0:
|
|
do_terminal();
|
|
break;
|
|
case 1:
|
|
do_sprite_editor();
|
|
break;
|
|
}
|
|
*/
|
|
} |