X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fcommand_db.h;h=866f5e34a577eaba89ccd38b2381f83835a6598b;hb=67bcb0339e09a67fe1685cf81e35ccac18eba0c5;hp=6b087004c9987b8ef0cd6636923c5c639a50cf69;hpb=951248dddace9f7cadcf30700a3c3e6ad7ae2888;p=plomrogue diff --git a/src/command_db.h b/src/command_db.h index 6b08700..866f5e3 100644 --- a/src/command_db.h +++ b/src/command_db.h @@ -8,10 +8,7 @@ #ifndef COMMAND_DB_H #define COMMAND_DB_H - - #include /* for uint8_t */ -struct World; @@ -19,7 +16,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 @@ -31,22 +28,19 @@ struct CommandDB /* 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); +extern uint8_t is_command_id_shortdsc(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); +extern uint8_t get_command_id(char * dsc_short); /* Give short description of command ("dsc_short"), get long description. */ -extern char * get_command_longdsc(struct World * world, char * dsc_short); - - +extern char * get_command_longdsc(char * dsc_short); /* Read in CommandDB from file "config/commands" to world.cmd_db. */ -extern void init_command_db(struct World * world); +extern void init_command_db(); /* Free all memory allocated with init_command_db. */ -extern void free_command_db(struct World * world); +extern void free_command_db();