Ejemplo n.º 1
0
void
Sys_Init(void)
{
#ifdef USE_X86_ASM
    Sys_SetFPCW();
#endif
}
Ejemplo n.º 2
0
void
Sys_Init (void)
{
#ifdef WIN32
	OSVERSIONINFO vinfo;
#endif
#ifdef USE_INTEL_ASM
#ifdef _WIN32
	MaskExceptions ();
#endif
	Sys_SetFPCW ();
#endif

#ifdef _WIN32
	// make sure the timer is high precision, otherwise
	// NT gets 18ms resolution
	timeBeginPeriod (1);

	vinfo.dwOSVersionInfoSize = sizeof (vinfo);

	if (!GetVersionEx (&vinfo))
		Sys_Error ("Couldn't get OS info");

	if ((vinfo.dwMajorVersion < 4)
		|| (vinfo.dwPlatformId == VER_PLATFORM_WIN32s)) {
		Sys_Error ("This version of " PROGRAM
				   " requires at least Win95 or NT 4.0");
	}
#endif
}
Ejemplo n.º 3
0
int			 main (int argc, char **argv)
{
	double	 time, oldtime, newtime;

#ifdef PARANOID
	signal(SIGFPE, floating_point_exception_handler);
#else
	signal(SIGFPE, SIG_IGN);
#endif

#ifdef hpux
	// makes it possible to access unaligned pointers (e.g. inside structures)
	//   must be linked with libhpp.a to work (add -lhppa to LDFLAGS)
	allow_unaligned_data_access();
#endif

	// we need to check for -noconinput and -nostdout
	// before Host_Init is called
	COM_InitArgv (argc, argv);

	noconinput = COM_CheckParm("-noconinput");
	if (!noconinput)
		fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY);

	if (COM_CheckParm("-nostdout"))
		nostdout = 1;

#if id386
	Sys_SetFPCW();
#endif

	Host_Init (argc, argv, 32*1024*1024);

	oldtime = Sys_DoubleTime ();
	while (1)
	{
		if (dedicated)
			NET_Sleep (10);

		// find time spent rendering last frame
		newtime = Sys_DoubleTime ();
		time = newtime - oldtime;

		Host_Frame(time);
		oldtime = newtime;
	}
    return 0;
}
Ejemplo n.º 4
0
void Sys_Init(void)
{

	MaskExceptions ();

	Sys_SetFPCW ();

    dos_outportb(0x43, 0x34); // set system timer to mode 2
    dos_outportb(0x40, 0);    // for the Sys_FloatTime() function
    dos_outportb(0x40, 0);

	Sys_InitFloatTime ();

	_go32_interrupt_stack_size = 4 * 1024;;
	_go32_rmcb_stack_size = 4 * 1024;
}
Ejemplo n.º 5
0
static void Sys_Init (void)
{
	MaskExceptions ();

	Sys_SetFPCW ();

#if !USE_UCLOCK_TIME
	dos_outportb(0x43, 0x34);	// set system timer to mode 2
	dos_outportb(0x40, 0);		// for the Sys_DoubleTime() function
	dos_outportb(0x40, 0);
#endif	/* ! USE_UCLOCK_TIME */

	Sys_InitTime ();

	_go32_interrupt_stack_size = 4 * 1024;
	_go32_rmcb_stack_size = 4 * 1024;
}
Ejemplo n.º 6
0
void Sys_Init(void)
{

	MaskExceptions ();

	Sys_SetFPCW ();

// 2000-07-28 DOSQuake time running too fast fix by Norberto Alfredo Bensa  start
/*
	dos_outportb(0x43, 0x34); // set system timer to mode 2
	dos_outportb(0x40, 0);    // for the Sys_FloatTime() function
	dos_outportb(0x40, 0);

	Sys_InitFloatTime ();
*/
// 2000-07-28 DOSQuake time running too fast fix by Norberto Alfredo Bensa  end

	_go32_interrupt_stack_size = 4 * 1024;;
	_go32_rmcb_stack_size = 4 * 1024;
}
Ejemplo n.º 7
0
void Sys_Init(void)
{
	Cmd_AddCommand ("in_restart", Sys_In_Restart_f);

#if id386
	Sys_SetFPCW();
#endif

#if defined __linux__
#if defined __i386__
	Cvar_Set( "arch", "linux i386" );
#elif defined __alpha__
	Cvar_Set( "arch", "linux alpha" );
#elif defined __sparc__
	Cvar_Set( "arch", "linux sparc" );
#else
	Cvar_Set( "arch", "linux unknown" );
#endif
#elif defined __sun__
#if defined __i386__
	Cvar_Set( "arch", "solaris x86" );
#elif defined __sparc__
	Cvar_Set( "arch", "solaris sparc" );
#else
	Cvar_Set( "arch", "solaris unknown" );
#endif
#elif defined __sgi__
#if defined __mips__
	Cvar_Set( "arch", "sgi mips" );
#else
	Cvar_Set( "arch", "sgi unknown" );
#endif
#else
	Cvar_Set( "arch", "unknown" );
#endif

	IN_Init();

}
Ejemplo n.º 8
0
void Sys_Init(void)
{
#if id386
	Sys_SetFPCW();
#endif
}
Ejemplo n.º 9
0
void Sys_Init(void)
{
#ifdef USE_INTEL_ASM
	Sys_SetFPCW();
#endif
}