3 * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4 * or any later version. For details on its copyright, license, and warranties,
5 * see the file NOTICE in the root directory of the PlomRogue source package.
9 #include <stdint.h> /* uint16_t */
10 #include "world.h" /* global world */
14 extern uint16_t rrand()
15 { /* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */
16 world.seed = ((world.seed * 1103515245) + 12345) % 4294967296;
17 return (world.seed >> 16); /* Ignore less random least significant bits. */