]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cmd: Stub some data structures that'll end up being used eventually
authorCloudwalk <cloudwalk009@gmail.com>
Thu, 17 Sep 2020 05:18:18 +0000 (01:18 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Thu, 17 Sep 2020 05:18:18 +0000 (01:18 -0400)
cmd.h

diff --git a/cmd.h b/cmd.h
index 9ef9a9aba8e5fc81cbc772e647d622c85f912a83..1674673ad5a410cca29c5d97f41d0403d7fbb11d 100644 (file)
--- a/cmd.h
+++ b/cmd.h
@@ -151,6 +151,36 @@ typedef struct cmd_state_s
 }
 cmd_state_t;
 
+typedef enum cmd_type_e
+{
+       cmdtype_command,
+       cmdtype_cvar,
+       cmdtype_alias
+} cmd_type_t;
+
+typedef struct cmd_object_s
+{
+       cmd_type_t type;
+       int flags;
+       void *object;
+       char *name;
+       char *description;
+} cmd_object_t;
+
+typedef struct cmd_s
+{
+       mempool_t *mempool;
+       
+       cmd_state_t state;
+       cmd_buf_t buffer;
+       cmd_object_t *objects;
+
+       int cmd_flagsmask;
+       int cvar_flagsmask;
+       int auto_flagsmask; // Automatically add command if it matches these flags...
+       xcommand_t *auto_function; // ...with this function.
+} cmd_t;
+
 typedef struct cmd_input_s
 {
        llist_t list;