X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fmisc.h;h=24f36b5ad6ae5d3ab15d089fe2953f428ff6dc01;hb=00a7727e37e2d80ff115f03e7971a92c66edcd96;hp=fad27f6a51e890b18aa675a710f23f8c3aa4833a;hpb=350ef2e2d17e8122e2991466f76a9a083a6303e7;p=plomrogue diff --git a/src/misc.h b/src/misc.h index fad27f6..24f36b5 100644 --- a/src/misc.h +++ b/src/misc.h @@ -14,8 +14,11 @@ struct Map; -/* Returns message: "Trouble in ".parent." with ".child."." (try_*() helper) */ -extern char * trouble_msg(char * parent, char * child); +/* Return 16-bit number pseudo-randomly generated via Linear Congruential + * Generator algorithm with some proven constants. Use instead of rand() to + * ensure portability of the same pseudo-randomness across systems. + */ +extern uint16_t rrand(); /* Wrappers to malloc(), calloc() from function called "f" calling exit_err() * with trouble_msg() error message if necessary.