/*	
	Randomize function for DJGPP (GCC 2.0)
	Made by Ismo Horppu on 1996 - 1997
*/

#include <stdlib.h>
#include <go32.h>
#include <sys/farptr.h>
#include <stdio.h>
#include <conio.h>
#include <time.h>
#include <mem.h>
#include <dos.h>
#include <stdlib.h>
#include <dpmi.h>
#include <conio.h>

int oseed = 0;

int randomize (void)
{
	int seed;

	delay (5);
	seed = _farpeekw (_go32_conventional_mem_selector (), (0x40 * 16) + 0x6C);
	srandom (seed + oseed);
	oseed = seed;
}

int rnd (int area)
{
	return random ()% area;
}

