]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
Various graphical tweaks (mainly particle related), some code removed.
[xonotic/darkplaces.git] / vid_wgl.c
index 781cad32879da781d5a69e4b45745f3a568970f4..5767ca2b037b9f8ba8449eee4507ac5e910461d7 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -149,27 +149,6 @@ RECT               window_rect;
 
 // direct draw software compatability stuff
 
-void VID_HandlePause (qboolean pause)
-{
-}
-
-void VID_ForceLockState (int lk)
-{
-}
-
-void VID_LockBuffer (void)
-{
-}
-
-void VID_UnlockBuffer (void)
-{
-}
-
-int VID_ForceUnlockedAndReturnState (void)
-{
-       return 0;
-}
-
 void CenterWindow(HWND hWndCenter, int width, int height, BOOL lefttopjustify)
 {
     int     CenterX, CenterY;
@@ -258,8 +237,6 @@ qboolean VID_SetWindowedMode (int modenum)
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
-       vid.numpages = 2;
-
        mainwindow = dibwindow;
 
        SendMessage (mainwindow, WM_SETICON, (WPARAM)TRUE, (LPARAM)hIcon);
@@ -350,8 +327,6 @@ qboolean VID_SetFullDIBMode (int modenum)
        vid.width = vid.conwidth;
        vid.height = vid.conheight;
 
-       vid.numpages = 2;
-
 // needed because we're not getting WM_MOVE messages fullscreen on NT
        window_x = 0;
        window_y = 0;
@@ -574,17 +549,17 @@ void GL_Init (void)
 
 //     Con_Printf ("%s %s\n", gl_renderer, gl_version);
 
-    if (strnicmp(gl_renderer,"Permedia",8)==0)
-         isPermedia = true;
+       if (strncasecmp(gl_renderer,"Permedia",8)==0)
+               isPermedia = true;
 
        // LordHavoc: special differences for ATI (broken 8bit color when also using 32bit? weird!)
-    if (strnicmp(gl_vendor,"ATI",3)==0)
+       if (strncasecmp(gl_vendor,"ATI",3)==0)
        {
                isATI = true;
-               if (strnicmp(gl_renderer,"Rage Pro",8)==0)
+               if (strncasecmp(gl_renderer,"Rage Pro",8)==0)
                        isRagePro = true;
        }
-       if (strnicmp(gl_renderer,"Matrox G200 Direct3D",20)==0) // a D3D driver for GL? sigh...
+       if (strncasecmp(gl_renderer,"Matrox G200 Direct3D",20)==0) // a D3D driver for GL? sigh...
                isG200 = true;
 
        CheckMultiTexture ();
@@ -1423,15 +1398,15 @@ void VID_Init8bitPalette()
        char thePalette[256*3];
        char *oldPalette, *newPalette;
        // LordHavoc: 8bit texture support broke many things...  it now must be specifically stated on the commandline (-no8bit became -8bit)
-    if (!COM_CheckParm("-8bit"))
+       if (!COM_CheckParm("-8bit"))
                return;
-    if (strstr(gl_extensions, "GL_EXT_shared_texture_palette"))
+       if (strstr(gl_extensions, "GL_EXT_shared_texture_palette"))
                return;
-    if (!(glColorTableEXT = (void *)wglGetProcAddress("glColorTableEXT")))
+       if (!(glColorTableEXT = (void *)wglGetProcAddress("glColorTableEXT")))
                return;
 
        Con_SafePrintf("8-bit GL extensions enabled.\n");
-    glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
+       glEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
        oldPalette = (char *) d_8to24table;
        newPalette = thePalette;
        for (i=0;i<256;i++)
@@ -1671,11 +1646,6 @@ void     VID_Init (unsigned char *palette)
        if (vid.conheight < 200)
                vid.conheight = 200;
 
-       vid.maxwarpwidth = WARP_WIDTH;
-       vid.maxwarpheight = WARP_HEIGHT;
-       vid.colormap = host_colormap;
-       vid.fullbright = 256 - LittleLong (*((int *)vid.colormap + 2048));
-
        DestroyWindow (hwnd_dialog);
 
        VID_SetPalette (palette);
@@ -1684,13 +1654,13 @@ void    VID_Init (unsigned char *palette)
 
        VID_SetMode (vid_default, palette);
 
-    maindc = GetDC(mainwindow);
+       maindc = GetDC(mainwindow);
        bSetupPixelFormat(maindc);
 
-    baseRC = wglCreateContext( maindc );
+       baseRC = wglCreateContext( maindc );
        if (!baseRC)
                Sys_Error ("Could not initialize GL (wglCreateContext failed).\n\nMake sure you are in 65536 color mode, and try running -window.");
-    if (!wglMakeCurrent( maindc, baseRC ))
+       if (!wglMakeCurrent( maindc, baseRC ))
                Sys_Error ("wglMakeCurrent failed");
 
        GL_Init ();