From: Christian Heller Date: Wed, 29 May 2013 01:56:41 +0000 (+0200) Subject: Seed rrand() at start of main() instead of inside init_map(). X-Git-Tag: tce~1268 X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Bdb.prefix%7D%7D/reset_cookie?a=commitdiff_plain;h=7d71ffdb2d5d0466c6daac495207c5c38fa3d5fe;p=plomrogue Seed rrand() at start of main() instead of inside init_map(). --- diff --git a/roguelike.c b/roguelike.c index e028845..7caaec9 100644 --- a/roguelike.c +++ b/roguelike.c @@ -69,7 +69,6 @@ void growshrink_active_window (struct WinMeta * win_meta, char change) { struct Map init_map (uint32_t seed) { // Initialize map with some experimental start values. - rrand(1, seed); struct Map map; map.width = 64; map.height = 64; @@ -197,6 +196,7 @@ int main (int argc, char *argv[]) { break; default: exit(EXIT_FAILURE); } } + rrand(1, seed); struct World world; init_keybindings(&world);