// do some initial settings for the game loading screen // void SCR_Startup(void) { const CPUInfoFlags *RCpuInfo = I_CPUInfo(); if (!M_CheckParm("-NOCPUID") && RCpuInfo) { #if defined (__i386__) || defined (_M_IX86) || defined (__WATCOMC__) R_486 = true; #endif if (RCpuInfo->RDTSC) R_586 = true; if (RCpuInfo->MMX) R_MMX = true; if (RCpuInfo->AMD3DNow) R_3DNow = true; if (RCpuInfo->MMXExt) R_MMXExt = true; if (RCpuInfo->SSE) R_SSE = true; if (RCpuInfo->SSE2) R_SSE2 = true; CONS_Printf("CPU Info: 486: %i, 586: %i, MMX: %i, 3DNow: %i, MMXExt: %i, SSE2: %i\n", R_486, R_586, R_MMX, R_3DNow, R_MMXExt, R_SSE2); } if (M_CheckParm("-noASM")) R_ASM = false; if (M_CheckParm("-486")) R_486 = true; if (M_CheckParm("-586")) R_586 = true; if (M_CheckParm("-MMX")) R_MMX = true; if (M_CheckParm("-3DNow")) R_3DNow = true; if (M_CheckParm("-MMXExt")) R_MMXExt = true; if (M_CheckParm("-SSE")) R_SSE = true; if (M_CheckParm("-noSSE")) R_SSE = false; if (M_CheckParm("-SSE2")) R_SSE2 = true; M_SetupMemcpy(); if (dedicated) { V_Init(); V_SetPalette(0); return; } vid.modenum = 0; vid.dupx = vid.width / BASEVIDWIDTH; vid.dupy = vid.height / BASEVIDHEIGHT; vid.dupx = vid.dupy = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy); vid.fdupx = FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT); vid.fdupy = FixedDiv(vid.height*FRACUNIT, BASEVIDHEIGHT*FRACUNIT); #ifdef HWRENDER if (rendermode != render_opengl && rendermode != render_none) // This was just placing it incorrectly at non aspect correct resolutions in opengl #endif vid.fdupx = vid.fdupy = (vid.fdupx < vid.fdupy ? vid.fdupx : vid.fdupy); vid.meddupx = (UINT8)(vid.dupx >> 1) + 1; vid.meddupy = (UINT8)(vid.dupy >> 1) + 1; #ifdef HWRENDER vid.fmeddupx = vid.meddupx*FRACUNIT; vid.fmeddupy = vid.meddupy*FRACUNIT; #endif vid.smalldupx = (UINT8)(vid.dupx / 3) + 1; vid.smalldupy = (UINT8)(vid.dupy / 3) + 1; #ifdef HWRENDER vid.fsmalldupx = vid.smalldupx*FRACUNIT; vid.fsmalldupy = vid.smalldupy*FRACUNIT; #endif vid.baseratio = FRACUNIT; V_Init(); CV_RegisterVar(&cv_ticrate); CV_RegisterVar(&cv_constextsize); V_SetPalette(0); }
// do some initial settings for the game loading screen // void SCR_Startup(void) { const CPUInfoFlags *RCpuInfo = I_CPUInfo(); if (!M_CheckParm("-NOCPUID") && RCpuInfo) { #if defined (__i386__) || defined (_M_IX86) || defined (__WATCOMC__) R_486 = true; #endif if (RCpuInfo->RDTSC) R_586 = true; if (RCpuInfo->MMX) R_MMX = true; if (RCpuInfo->AMD3DNow) R_3DNow = true; if (RCpuInfo->MMXExt) R_MMXExt = true; if (RCpuInfo->SSE2) R_SSE2 = true; if (RCpuInfo->CPUs > 1) { R_ASM = false; //with more than 1 CPU, ASM go BOOM! } CONS_Printf("CPU Info: 486: %i, 586: %i, MMX: %i, 3DNow: %i, MMXExt: %i, SSE2: %i\n", R_486, R_586, R_MMX, R_3DNow, R_MMXExt, R_SSE2); } if (M_CheckParm("-noASM")) R_ASM = false; if (M_CheckParm("-486")) R_486 = true; if (M_CheckParm("-586")) R_586 = true; if (M_CheckParm("-MMX")) R_MMX = true; if (M_CheckParm("-3DNow")) R_3DNow = true; if (M_CheckParm("-MMXExt")) R_MMXExt = true; if (M_CheckParm("-SSE2")) R_SSE2 = true; #if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) if (!RCpuInfo || !RCpuInfo->CPUs) //bad CPUID code? { LPCSTR cNOP = I_GetEnv("NUMBER_OF_PROCESSORS"); if (cNOP && atoi(cNOP) > 1 && !M_CheckParm("-ASM")) { R_ASM = false; CONS_Printf("Disabling ASM code\n"); } } #endif M_SetupMemcpy(); if (dedicated) { V_Init(); V_SetPalette(0); return; } vid.modenum = 0; vid.fdupx = (float)vid.width/BASEVIDWIDTH; vid.fdupy = (float)vid.height/BASEVIDHEIGHT; vid.dupx = (INT32)vid.fdupx; vid.dupy = (INT32)vid.fdupy; vid.baseratio = FRACUNIT; #ifdef RUSEASM if (R_ASM) ASM_PatchRowBytes(vid.rowbytes); // if (R_486 || R_586 || R_MMX) // MMX_PatchRowBytes(vid.rowbytes); #endif V_Init(); CV_RegisterVar(&cv_ticrate); V_SetPalette(0); }