Added fileCommon, added freebie font, start listening to SDL Keyboard text input
This commit is contained in:
@@ -50,39 +50,39 @@ int CommandParser::Parse() {
|
||||
FUNCTION toRun;
|
||||
|
||||
|
||||
printf("Please Enter a command \n");
|
||||
printf("> ");
|
||||
getline(std::cin, cmd);
|
||||
std::cin.clear();
|
||||
cmd[0] = toupper(cmd[0]);
|
||||
std::stringstream c(cmd);
|
||||
/*
|
||||
printf("Please Enter a command \n");
|
||||
printf("> ");
|
||||
|
||||
verbs = Verb(c);
|
||||
nouns = Noun(c);
|
||||
cmd[0] = toupper(cmd[0]);
|
||||
std::stringstream c(cmd);
|
||||
|
||||
for (const auto &verb: verbs) {
|
||||
if (!commands[verb]) {
|
||||
CommandUnrecognized();
|
||||
break;
|
||||
verbs = Verb(c);
|
||||
nouns = Noun(c);
|
||||
|
||||
for (const auto &verb: verbs) {
|
||||
if (!commands[verb]) {
|
||||
CommandUnrecognized();
|
||||
break;
|
||||
}
|
||||
|
||||
for (const auto &n: nouns) {
|
||||
noun = n;
|
||||
}
|
||||
|
||||
toRun = commands[verb];
|
||||
}
|
||||
|
||||
for (const auto &n: nouns) {
|
||||
noun = n;
|
||||
if (toRun) {
|
||||
toRun(noun);
|
||||
}
|
||||
|
||||
toRun = commands[verb];
|
||||
}
|
||||
cmd.clear();
|
||||
word.clear();
|
||||
verbs.clear();
|
||||
nouns.clear();
|
||||
c.clear();
|
||||
|
||||
if (toRun) {
|
||||
toRun(noun);
|
||||
}
|
||||
cmd.clear();
|
||||
word.clear();
|
||||
verbs.clear();
|
||||
nouns.clear();
|
||||
c.clear();
|
||||
|
||||
toRun = nullptr;
|
||||
toRun = nullptr;*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user