aboutsummaryrefslogtreecommitdiff
path: root/src/game/commands.h
diff options
context:
space:
mode:
authorSopár Adrián <adrian.sopar@protonmail.com>2024-06-20 09:28:14 +0200
committerSopár Adrián <adrian.sopar@protonmail.com>2024-06-20 09:28:14 +0200
commit74ea6dc86646cee9915292d73d8c7afef01ef3e0 (patch)
tree9a58866f7765dad8ba56f1f40b1fa031e9d2687d /src/game/commands.h
First commit. This is mostly the state of the project as I left it around the end of 2019.HEADmaster
Diffstat (limited to 'src/game/commands.h')
-rw-r--r--src/game/commands.h24
1 files changed, 24 insertions, 0 deletions
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