11 switch (task->substate) {
31 if (
OVL_NAME(keyboard).pageCount >= 2) {
34 if (--task->page < 0) {
35 task->page =
OVL_NAME(keyboard).pageCount - 1;
38 if (++task->page >
OVL_NAME(keyboard).pageCount - 1) {
42 if (page != task->page) {
47 if (newPage == 0 || newPage == 1) {
48 while (
OVL_NAME(keyboard).pages[newPage].cells[task->row][task->column].kind != 1) {
49 if (--task->column < 0) {
54 while (
OVL_NAME(keyboard).pages[newPage].cells[task->row][task->column].kind == 0) {
55 if (--task->row < 0) {
64 if (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind < 0) {
65 task->column +=
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind;
68 if (--task->column < 0) {
71 }
while (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind != 1);
74 if (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind < 0) {
75 task->column +=
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind;
78 if (++task->column >= 15) {
81 }
while (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind != 1);
86 if (--task->row < 0) {
89 }
while (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind == 0);
93 if (++task->row >= 7) {
96 }
while (
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].kind == 0);
100 for (i = 0;
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column + i].kind != 1; i--) {
102 key = task->row * 15 + task->column + i;
106 if (--task->cursor < 0) {
111 if (++task->cursor > task->maxLength - 1) {
112 task->cursor = task->maxLength - 1;
116 if (task->cursor <= task->maxLength - 1 && task->name[task->cursor] ==
SJIS_SPACE) {
117 if (--task->cursor < 0) {
121 c = windows->name->style->iconMap[1].code;
122 task->name[task->cursor] = (c >> 8) | ((c & 0xFF) << 8);
123 windows->name->setText(windows->name, task->name);
126 c = windows->name->style->iconMap[1].code;
127 task->name[task->cursor] = (c >> 8) | ((c & 0xFF) << 8);
128 if (++task->cursor > task->maxLength - 1) {
129 task->cursor = task->maxLength - 1;
131 windows->name->setText(windows->name, task->name);
134 for (j = 0; j < task->maxLength; j++) {
135 if (task->name[j] !=
SJIS_SPACE && task->name[j] != 0) {
136 for (j = 19; j >= 0; j--) {
138 task->substate = 100;
148 glyph = windows->name->style->sjisMap[
OVL_NAME(keyboard).pages[task->page].cells[task->row][task->column].code].code;
149 task->name[task->cursor] = (glyph >> 8) | ((glyph & 0xFF) << 8);
150 windows->name->setText(windows->name, task->name);
151 if (++task->cursor > task->maxLength - 1) {
152 task->cursor = task->maxLength - 1;
160 if (task->cursor <= task->maxLength - 1 && task->name[task->cursor] ==
SJIS_SPACE) {
161 if (--task->cursor < 0) {
165 c = windows->name->style->iconMap[1].code;
166 task->name[task->cursor] = (c >> 8) | ((c & 0xFF) << 8);
167 windows->name->setText(windows->name, task->name);
194 windows->message->setVisible(windows->message, 0);
#define NAME_KEY_DELETE
The keyboard's special keys: row * 15 + column of their first cell.
#define NAME_ENTRY_JAPANESE
The Japanese keyboard (three pages) is for language 0 of the European version, the Japanese version's...
#define NAME_KEY_END
row 6, column 13: where Start goes
#define SJIS_SPACE
full-width space, 0x81 0x40
A name entry: the keyboard, the name typed so far and the panels that open and close.