DREAMWEB: Convert checkInput
This commit is contained in:
parent
11adaf6d69
commit
05a2713874
5 changed files with 40 additions and 64 deletions
|
@ -481,4 +481,41 @@ void DreamBase::showNames() {
|
|||
}
|
||||
}
|
||||
|
||||
void DreamGenContext::checkInput() {
|
||||
if (data.byte(kLoadingorsave) == 3)
|
||||
return;
|
||||
|
||||
readKey();
|
||||
|
||||
char *name = (char *)data.ptr(kSavenames + 17*data.byte(kCurrentslot) + 1, 16);
|
||||
|
||||
if (data.byte(kCurrentkey) == 0) {
|
||||
return;
|
||||
} else if (data.byte(kCurrentkey) == 13) {
|
||||
data.byte(kLoadingorsave) = 3;
|
||||
} else if (data.byte(kCurrentkey) == 8) {
|
||||
if (data.byte(kCursorpos) == 0)
|
||||
return;
|
||||
|
||||
--data.byte(kCursorpos);
|
||||
name[data.byte(kCursorpos)] = 0;
|
||||
name[data.byte(kCursorpos)+1] = 1;
|
||||
} else {
|
||||
if (data.byte(kCursorpos) == 14)
|
||||
return;
|
||||
|
||||
name[data.byte(kCursorpos)] = data.byte(kCurrentkey);
|
||||
name[data.byte(kCursorpos)+1] = 0;
|
||||
name[data.byte(kCursorpos)+2] = 1;
|
||||
++data.byte(kCursorpos);
|
||||
}
|
||||
|
||||
showOpBox();
|
||||
showNames();
|
||||
showSlots();
|
||||
showSaveOps();
|
||||
workToScreenM();
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace DreamGen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue