MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / handleCommand

Function handleCommand

TheForceEngine/TFE_FrontEndUI/console.cpp:518–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516 }
517
518 void handleCommand(const char* cmd)
519 {
520 s_commandHistory.push_back({ cmd });
521
522 TFE_Parser parser;
523 parser.init(cmd, strlen(cmd));
524
525 TokenList tokens;
526 parser.tokenizeLine(cmd, tokens);
527 if (tokens.size() < 1)
528 {
529 char errorMsg[CSTR_LEN];
530 sprintf(errorMsg, "Invalid Command - only whitespace found.");
531 s_history.push_back({ c_historyErrorColor, errorMsg });
532 return;
533 }
534
535 execute(tokens, cmd);
536 }
537
538 void update()
539 {

Callers 1

updateFunction · 0.85

Calls 5

push_backMethod · 0.80
tokenizeLineMethod · 0.80
executeFunction · 0.70
initMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected