From 74ea6dc86646cee9915292d73d8c7afef01ef3e0 Mon Sep 17 00:00:00 2001 From: Sopár Adrián Date: Thu, 20 Jun 2024 09:28:14 +0200 Subject: First commit. This is mostly the state of the project as I left it around the end of 2019. --- src/game/commands.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/game/commands.h (limited to 'src/game/commands.h') diff --git a/src/game/commands.h b/src/game/commands.h new file mode 100644 index 0000000..8e2cc5f --- /dev/null +++ b/src/game/commands.h @@ -0,0 +1,24 @@ +#ifndef H_MAZE_GAME_COMMANDS +#define H_MAZE_GAME_COMMANDS + +#include "game.h" + +enum cmd_res_type +{ + CRT_SUCCESS, + CRT_FAIL, + CRT_QUIT +}; + +#define MAX_CR_TEXT_LENGTH 256 +#define MAX_ARGS_COUNT 100 + +struct cmd_res +{ + enum cmd_res_type type; + char text[MAX_CR_TEXT_LENGTH]; +}; + +struct cmd_res run_command(struct game_state *state, char *command); + +#endif \ No newline at end of file -- cgit v1.2.3