shithub: rott

Download patch

ref: 7747cc22938c8c9b767e0435605522ddacdc64c2
parent: da547d6299123ed8b0ec665d27108cf52b70b9df
author: LTCHIPS <ltchips994@gmail.com>
date: Fri Jun 1 12:02:57 EDT 2018

resolved a few warnings

--- a/rott/_rt_menu.h
+++ b/rott/_rt_menu.h
@@ -194,7 +194,7 @@
 //
 //******************************************************************************
 
-static byte *ScanNames[] =    // Scan code names with single chars
+static char *ScanNames[] =    // Scan code names with single chars
 {
     "?","?","1","2","3","4","5","6","7","8","9","0","-","+","?","?",
     "Q","W","E","R","T","Y","U","I","O","P","[","]","|","?","A","S",
@@ -215,7 +215,7 @@
     0x50, 0x4b, 0x4d, 0x00
 };
 
-static byte *ExtScanNames[] = // Names corresponding to ExtScanCodes
+static char *ExtScanNames[] = // Names corresponding to ExtScanCodes
 {
     "Esc","BkSp","Tab","Ctrl","Space","CapLk","F1","F2","F3","F4",
     "F5","F6","F7","F8","F9","F10","F11","F12","SclLk","Enter","Shift",
--- a/rott/cin_evnt.c
+++ b/rott/cin_evnt.c
@@ -283,7 +283,7 @@
     char name2[10];
     int duration;
     int yoffset;
-    int width;
+    int width = 0;
     int startx;
     int endx;
 
--- a/rott/modexlib.c
+++ b/rott/modexlib.c
@@ -225,10 +225,10 @@
     iG_X_center = iGLOBAL_SCREENWIDTH / 2;
     iG_Y_center = (iGLOBAL_SCREENHEIGHT / 2)+10 ;//+10 = move aim down a bit
 
-    iG_buf_center = bufferofs + (screensize/2);//(iG_Y_center*iGLOBAL_SCREENWIDTH);//+iG_X_center;
+    iG_buf_center = (char *)(bufferofs + (screensize/2));//(iG_Y_center*iGLOBAL_SCREENWIDTH);//+iG_X_center;
 
-    bufofsTopLimit =  bufferofs + screensize - iGLOBAL_SCREENWIDTH;
-    bufofsBottomLimit = bufferofs + iGLOBAL_SCREENWIDTH;
+    bufofsTopLimit =  (char *) (bufferofs + screensize - iGLOBAL_SCREENWIDTH);
+    bufofsBottomLimit = (char *) (bufferofs + iGLOBAL_SCREENWIDTH);
 
     // start stretched
     EnableScreenStretch();
@@ -560,7 +560,7 @@
                 x = iG_playerTilt;
                 iG_playerTilt=x/2;
             }
-            iG_buf_center = bufferofs + ((iG_Y_center-iG_playerTilt)*iGLOBAL_SCREENWIDTH);//+iG_X_center;
+            iG_buf_center = (char *)(bufferofs + ((iG_Y_center-iG_playerTilt)*iGLOBAL_SCREENWIDTH));//+iG_X_center;
 
             for (x=iG_X_center-10; x<=iG_X_center-4; x++) {
                 if ((iG_buf_center+x < bufofsTopLimit)&&(iG_buf_center+x > bufofsBottomLimit)) {
--- a/rott/rt_build.c
+++ b/rott/rt_build.c
@@ -230,7 +230,7 @@
 {
     int height;
     char * buf;
-    byte * shape;
+    byte * shape = NULL;
     int lastwall=-2;
     int plane;
     int i;
@@ -238,7 +238,7 @@
     shadingtable=colormap+(16<<8);
     {
         VGAWRITEMAP(plane);
-        buf=(byte *)(bufferofs);
+        buf=(char *)(bufferofs);
 
         for (i=0; i<viewwidth; i++,buf++)
         {
@@ -253,7 +253,7 @@
                 else
                     shape=W_CacheLumpNum(lastwall,PU_CACHE, Cvt_patch_t, 1);
             }
-            DrawRotPost (height,shape+posts[i].texture,buf,posts[i].offset);
+            DrawRotPost (height,shape+posts[i].texture,(byte*)buf,posts[i].offset);
         }
     }
 }
@@ -367,7 +367,7 @@
     int greatest;
     int height;
     int i;
-    visobj_t * closest;
+    visobj_t * closest = NULL;
 
     numvisible = visptr-&vislist[0];
     if (!numvisible)
--- a/rott/rt_cfg.c
+++ b/rott/rt_cfg.c
@@ -2053,7 +2053,7 @@
     if (!stricmp (token, tokenstr))
     {
         GetTokenEOL (false);
-        memset (&info->path[0], 0, sizeof (info->path));
+        memset (&info->path[0], 0, sizeof (&info->path));
         strcpy (&info->path[0], &name[0]);
     }
 }
@@ -2080,7 +2080,7 @@
             {
 #if (SHAREWARE == 0)
                 info->avail = true;
-                memset (&info->file[0], 0, sizeof (info->file));
+                memset (&info->file[0], 0, sizeof (&info->file));
                 strcpy (&info->file[0], &token[0]);
 #else
                 printf("Alternate file %s ignored.\n",token);
--- a/rott/rt_menu.c
+++ b/rott/rt_menu.c
@@ -3972,7 +3972,7 @@
             buttonscan[ (unsigned int)order[ handlewhich ] ] = key;
 
             strcpy( &NormalKeyNames[ handlewhich ][ KEYNAMEINDEX ],
-                    IN_GetScanName( key ) );
+                    (char *)IN_GetScanName( key ) );
 
             picked = true;
 
--- a/rott/rt_vid.c
+++ b/rott/rt_vid.c
@@ -793,6 +793,8 @@
 //
     VL_SetPalette (palette);
     screenfaded = false;
+    VH_UpdateScreen();
+    
 }