X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Frun.h;fp=src%2Fserver%2Frun.h;h=877d2fb2b263d2b28ff73aab121661104bc3e539;hb=dd9d65ee727ac7e95801da0f8b5bae7009811802;hp=0000000000000000000000000000000000000000;hpb=c3d87a1dee96775443fdf73c53e1350af7ca5fc2;p=plomrogue diff --git a/src/server/run.h b/src/server/run.h new file mode 100644 index 0000000..877d2fb --- /dev/null +++ b/src/server/run.h @@ -0,0 +1,26 @@ +/* src/server/run.h + * + * Process commands and act on them. Stuff that furthers the state of the game. + */ + +#ifndef RUN_H +#define RUN_H + +#include /* uint8_t */ + + + +/* Try parsing "msg" into a server or player command to run. Player commands are + * are recorded into the record file at world.path_record if "do_record" is set. + */ +extern void obey_msg(char * msg, uint8_t do_record); + +/* Loop for receiving commands via io_round() and acting on them. Exits with 1 + * on "QUIT" command. In replay mode, exits with 0 on each non-"QUIT" command. + * In play mode, processes incomming commands via obey_msg(). + */ +extern uint8_t io_loop(); + + + +#endif