X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=src%2Fcommand_db.h;h=f0baef99438f274a7b76f3e945bb158d96052bef;hb=8e38bb5605a46afd6398b69c63c935aa5dc83660;hp=efa342a2433e302225ac6d732fe2c80a03bc9caa;hpb=58f0067336c9239750009b3f35d18031bec8f7b5;p=plomrogue
diff --git a/src/command_db.h b/src/command_db.h
index efa342a..f0baef9 100644
--- a/src/command_db.h
+++ b/src/command_db.h
@@ -19,7 +19,7 @@ struct Command
{
uint8_t id; /* unique identifier of command */
char * dsc_short; /* short string name of command to be used internally */
- char * dsc_long; /* long string description of command for the user */
+ char * dsc_long; /* long string description of command for the user */
};
struct CommandDB
@@ -30,7 +30,14 @@ struct CommandDB
-/* Give short description of command ("dsc_short"), get long descrption. */
+/* Is "id" the ID of command whose dsc_short is "shortdsc"? Answer in binary. */
+extern uint8_t is_command_id_shortdsc(struct World * world,
+ uint8_t id, char * shortdsc);
+
+/* Give short description of command ("dsc_short"), get its ID. */
+extern uint8_t get_command_id(struct World * world, char * dsc_short);
+
+/* Give short description of command ("dsc_short"), get long description. */
extern char * get_command_longdsc(struct World * world, char * dsc_short);
@@ -38,8 +45,6 @@ extern char * get_command_longdsc(struct World * world, char * dsc_short);
/* Read in CommandDB from file "config/commands" to world.cmd_db. */
extern void init_command_db(struct World * world);
-
-
/* Free all memory allocated with init_command_db. */
extern void free_command_db(struct World * world);