Skip to content

Commit

Permalink
Merge pull request #6 from sirbaratusii/main
Browse files Browse the repository at this point in the history
Add debug mode and EKG commands.
  • Loading branch information
erysdren authored Dec 18, 2023
2 parents 9b85704 + 9446f87 commit d8087e7
Showing 1 changed file with 41 additions and 1 deletion.
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

0 comments on commit d8087e7

Please sign in to comment.