X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fclient%2Fcommand_db.h;h=e20d16d03b8d9173baa730d5f60e47ad749dafb4;hb=0255432b4e8d3a7b3aec71c4e43e7fb063c45833;hp=0d4ffbae8e3653a5748b4de3b07bd257ca41215d;hpb=21cac2d976f806643aee1471bcee7b38597ac121;p=plomrogue
diff --git a/src/client/command_db.h b/src/client/command_db.h
index 0d4ffba..e20d16d 100644
--- a/src/client/command_db.h
+++ b/src/client/command_db.h
@@ -1,7 +1,8 @@
/* src/client/command_db.h
*
- * The Command DB collects identifiers and verbal descriptions of all commands
- * the user can give.
+ * The Command DB collects the commands available to the user by internal name,
+ * description and, optionally, components of a message to send to the server
+ * when calling it.
*/
#ifndef COMMAND_DB_H
@@ -13,9 +14,10 @@
struct Command
{
- char * dsc_short; /* short string name of command to be used internally */
- char * dsc_long; /* long string description of command for the user */
- uint8_t id; /* unique identifier of command */
+ char * dsc_short; /* short name of command to be used internally */
+ char * dsc_long; /* long description of command to be shown to the user */
+ char * server_msg; /* optionally start string of message to send to server*/
+ char arg; /* defines server message suffix by player_control() convention */
};
struct CommandDB
@@ -26,13 +28,12 @@ struct CommandDB
-/* Give short description of command ("dsc_short"), get its ID. */
-extern uint8_t get_command_id(char * dsc_short);
-
-/* Give short description of command ("dsc_short"), get long description. */
-extern char * get_command_longdsc(char * dsc_short);
+/* Return Command struct for command described by its "dsc_short" member. Return
+ * NULL if no such command is found.
+ */
+extern struct Command * get_command(char * dsc_short);
-/* Reads CommandDB from CommandDB file, line by line, until first empty line. */
+/* Reads in CommandDB config file line by line until end or first empty line. */
extern void init_command_db();
/* Free all memory allocated with init_command_db. */