]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_win.c
minor cleanup/simplification (though a bit of a de-optimization) of explosion shading...
[xonotic/darkplaces.git] / sys_win.c
index 82b5179be4510168be8ca50a0a9650105b4fc7c0..10226f3a577659386859f2b1e8d380915e468fd8 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -39,44 +39,13 @@ qboolean    ActiveApp, Minimized;
 static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
 
-static char                    *tracking_tag = "Clams & Mooses";
+//static char                  *tracking_tag = "Clams & Mooses";
 
 static HANDLE  tevent;
 static HANDLE  hFile;
 static HANDLE  heventParent;
 static HANDLE  heventChild;
 
-volatile int                                   sys_checksum;
-
-
-/*
-================
-Sys_PageIn
-================
-*/
-/*
-void Sys_PageIn (void *ptr, int size)
-{
-       byte    *x;
-       int             m, n;
-
-// touch all the memory to make sure it's there. The 16-page skip is to
-// keep Win 95 from thinking we're trying to page ourselves in (we are
-// doing that, of course, but there's no reason we shouldn't)
-       x = (byte *)ptr;
-
-       for (n=0 ; n<4 ; n++)
-       {
-               for (m=0 ; m<(size - 16 * 0x1000) ; m += 4)
-               {
-                       sys_checksum += *(int *)&x[m];
-                       sys_checksum += *(int *)&x[m + 16 * 0x1000];
-               }
-       }
-}
-*/
-
-
 /*
 ===============================================================================
 
@@ -102,10 +71,10 @@ int                findhandle (void)
 
 /*
 ================
-filelength
+Sys_FileLength
 ================
 */
-int filelength (QFile *f)
+int Sys_FileLength (QFile *f)
 {
        int             pos;
        int             end;
@@ -136,7 +105,7 @@ int Sys_FileOpenRead (char *path, int *hndl)
        {
                sys_handles[i] = f;
                *hndl = i;
-               retval = filelength(f);
+               retval = Sys_FileLength(f);
        }
 
        return retval;
@@ -399,11 +368,11 @@ double Sys_DoubleTime (void)
 
 char *Sys_ConsoleInput (void)
 {
-       static char     text[256];
-       static int              len;
-       INPUT_RECORD    recs[1024];
-       int             dummy;
-       int             ch, numread, numevents;
+       static char text[256];
+       static int len;
+       INPUT_RECORD recs[1024];
+       int ch;
+       DWORD numread, numevents, dummy;
 
        if (cls.state != ca_dedicated)
                return NULL;
@@ -592,24 +561,6 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
 
        Sys_Shared_EarlyInit();
 
-// take the greater of all the available memory or half the total memory,
-// but at least 8 Mb and no more than 16 Mb, unless they explicitly
-// request otherwise
-       /*
-       host_parms.memsize = lpBuffer.dwAvailPhys;
-
-       if (host_parms.memsize < MINIMUM_WIN_MEMORY)
-               host_parms.memsize = MINIMUM_WIN_MEMORY;
-
-       if (host_parms.memsize < (lpBuffer.dwTotalPhys >> 1))
-               host_parms.memsize = lpBuffer.dwTotalPhys >> 1;
-
-       if (host_parms.memsize > MAXIMUM_WIN_MEMORY)
-               host_parms.memsize = MAXIMUM_WIN_MEMORY;
-       */
-
-//     Sys_PageIn (parms.membase, parms.memsize);
-
        tevent = CreateEvent(NULL, false, false, NULL);
 
        if (!tevent)