Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug mode and EKG commands. #6

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion source/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,44 @@ int _cmd_exec(int argc, char **argv)
return 0;
}

/* debug mode */
int _cmd_debug(int argc, char **argv)
{

cmd_t *cmd;

if (argc < 2)
{
DebugOk = 0;
console_printf("Debug Mode DISABLED!");
}
else
{
DebugOk = 1;
console_printf("Debug Mode ENABLED!");
}

return 0;
}

/* EKG command */
int _cmd_ekg(int argc, char **argv)
{

cmd_t *cmd;

if (argc < 2)
{
ludicrousgibs ^= 1;
if (ludicrousgibs)
console_printf("EKG mode on!");
else
console_printf("EKG mode off!");
}
return 0;
}


/* cmdlib array */
cmd_t _cmdlib[] = {
CMD("quit", "exit the game immediately", _cmd_quit),
Expand All @@ -634,7 +672,9 @@ cmd_t _cmdlib[] = {
CMD("help", "print help text", _cmd_help),
CMD("find", "find command or variable by name", _cmd_find),
CMD("dopefish", "?", _cmd_dopefish),
CMD("exec", "execute config script", _cmd_exec)
CMD("exec", "execute config script", _cmd_exec),
CMD("debug", "enables debug mode", _cmd_debug),
CMD("ekg", "enables Engine Killing Gibs", _cmd_ekg)
};

/* register standard library of cmds */
Expand Down