shithub: rott

Download patch

ref: bdc20c79f9404fdf257def8cb9134e4ee0712100
parent: 141e13efbab8808d4b7a7112272e75dd6534d42f
author: levesqu8 <levesqu8@msu.edu>
date: Tue Jan 9 15:07:34 EST 2018

more resolutions support

--- a/rott/engine.c
+++ b/rott/engine.c
@@ -39,7 +39,7 @@
 =============================================================================
 */
 //wallcast_t posts[642];//bna++
-wallcast_t posts[1280+4];//bna++
+wallcast_t posts[1920+4];//bna++
 //wallcast_t posts[321];
 int lasttilex;
 int lasttiley;
--- a/rott/engine.h
+++ b/rott/engine.h
@@ -38,7 +38,7 @@
     int      posttype;
     int      alttile;
 } wallcast_t;
-extern wallcast_t posts[1280+4];//bna++ JUST MAKE IT MAX RES
+extern wallcast_t posts[1920+4];//bna++ JUST MAKE IT MAX RES
 //extern wallcast_t posts[642];//bna++
 //extern wallcast_t posts[321];
 
--- a/rott/modexlib.c
+++ b/rott/modexlib.c
@@ -53,7 +53,7 @@
 
 int    linewidth;
 //int    ylookup[MAXSCREENHEIGHT];
-int    ylookup[1024];//just set to max res
+int    ylookup[1080];//just set to max res
 byte  *page1start;
 byte  *page2start;
 byte  *page3start;
@@ -434,9 +434,9 @@
 #if defined(PLATFORM_WIN32) || defined(PLATFORM_MACOSX)
     // FIXME: remove this.  --ryan.
     flags = SDL_FULLSCREEN;
-    SDL_WM_GrabInput(SDL_GRAB_ON);
+    
 #endif
-
+    SDL_WM_GrabInput(SDL_GRAB_ON);
     SDL_WM_SetCaption ("Rise of the Triad", "ROTT");
     SDL_ShowCursor (0);
 //    sdl_surface = SDL_SetVideoMode (320, 200, 8, flags);
--- a/rott/modexlib.h
+++ b/rott/modexlib.h
@@ -111,7 +111,7 @@
 extern  boolean StretchScreen;//bn�++
 
 //extern  int      ylookup[MAXSCREENHEIGHT];      // Table of row offsets
-extern  int      ylookup[1024];      // just set to max res
+extern  int      ylookup[1080];      // just set to max res
 extern  int      linewidth;
 extern  byte    *page1start;
 extern  byte    *page2start;
--- a/rott/rt_draw.c
+++ b/rott/rt_draw.c
@@ -3041,8 +3041,7 @@
     dy=(-y)/time;
     ds=-((s-0x1000000)/time);
 
-    destscreen=SafeMalloc(64000*24);//bna fixme
-
+    destscreen=SafeMalloc(iGLOBAL_SCREENWIDTH*iGLOBAL_SCREENHEIGHT);
     SetupScreen(false);
     ThreeDRefresh();
 
@@ -3122,6 +3121,14 @@
     {
         RotatedImage=SafeMalloc(131072*20);
     }
+    else if (iGLOBAL_SCREENWIDTH == 1400)
+    {
+        RotatedImage=SafeMalloc(131072*30);
+    }
+    else if (iGLOBAL_SCREENWIDTH == 1920)
+    {
+        RotatedImage=SafeMalloc(131072*50);
+    }
 //SetupScreen(false);//used these 2 to test screen size
 //VW_UpdateScreen ();
     if (masked==0) {
@@ -3139,6 +3146,14 @@
         {
             memset(RotatedImage, 0, 131072*20);
         }
+        else if (iGLOBAL_SCREENWIDTH == 1400)
+        {
+            memset(RotatedImage, 0, 131072*30);
+        }
+        else if (iGLOBAL_SCREENWIDTH == 1920)
+        {
+            memset(RotatedImage, 0, 131072*50);
+        }
     } else {
         if (iGLOBAL_SCREENWIDTH == 320) {
             memset(RotatedImage,0xff,131072);
@@ -3153,6 +3168,14 @@
         else if (iGLOBAL_SCREENWIDTH == 1280)
         {
             memset(RotatedImage, 0xff, 131072*20);
+        }
+        else if (iGLOBAL_SCREENWIDTH == 1400)
+        {
+            memset(RotatedImage, 0xff, 131072*30);
+        }
+        else if (iGLOBAL_SCREENWIDTH == 1920)
+        {
+            memset(RotatedImage, 0xff, 131072*50);
         }
     }
     //memset(RotatedImage,0xff,131072);//org
--- a/rott/rt_floor.c
+++ b/rott/rt_floor.c
@@ -76,7 +76,7 @@
 static byte     *floor;
 static byte     *ceiling;
 //static int xstarts[MAXVIEWHEIGHT];
-static int xstarts[1024];//set to max hight res
+static int xstarts[1080];//set to max hight res
 static byte * skysegs[MAXSKYSEGS];
 static byte * skydata[MAXSKYDATA];
 static int      horizonheight;
--- a/rott/rt_main.c
+++ b/rott/rt_main.c
@@ -1145,7 +1145,7 @@
 
     while (1)
     {
-        SDL_WarpMouse(iGLOBAL_SCREENWIDTH<<2, iGLOBAL_SCREENHEIGHT<<2);
+        SDL_WarpMouse(iGLOBAL_SCREENWIDTH<<1, iGLOBAL_SCREENHEIGHT<<1);
         if ( playstate == ex_battledone )
         {
             while( damagecount > 0 )
--- a/rott/rt_view.c
+++ b/rott/rt_view.c
@@ -87,7 +87,7 @@
 byte * greenmap;
 byte * playermaps[MAXPLAYERCOLORS];
 //short  pixelangle[MAXVIEWWIDTH];
-short  pixelangle[1280];
+short  pixelangle[1920];
 byte   gammatable[GAMMAENTRIES];
 int    gammaindex;
 int    focalwidth=160;
@@ -478,6 +478,78 @@
         
         viewsizes[height++]= 1280; 
         viewsizes[height++]= 1024;
+    }
+    else if ( iGLOBAL_SCREENWIDTH == 1400)
+    {
+        height = 0;
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+        
+        viewsizes[height++]= 1400; 
+        viewsizes[height++]= 1050;
+    }
+    else if ( iGLOBAL_SCREENWIDTH == 1920)
+    {
+        height = 0;
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
+        
+        viewsizes[height++]= 1920; 
+        viewsizes[height++]= 1080;
     }
 
 
--- a/rott/rt_view.h
+++ b/rott/rt_view.h
@@ -76,7 +76,7 @@
 
 extern byte * playermaps[MAXPLAYERCOLORS];
 //extern short  pixelangle[MAXVIEWWIDTH];
-extern short  pixelangle[1280];
+extern short  pixelangle[1920];
 extern byte   gammatable[GAMMAENTRIES];
 extern int    gammaindex;
 extern byte   uniformcolors[MAXPLAYERCOLORS];
--- a/rott/stdout.txt
+++ /dev/null
@@ -1,14 +1,0 @@
-Rise of the Triad Startup  Version 1.4
- Commercial Version 
-Z_INIT: 8950000 bytes
-IN_Startup: Mouse Present
-    Adding DARKWAR.WAD.
-    Adding REMOTE1.RTS.
-W_Wad: Wad Manager Started NUMLUMPS=3904
-RT_DRAW: Tables Initialized
-MU_Startup: 
-SD_SetupFXCard: Fx ok.
-SD_Startup: Fx ok.
-RT_MAIN: Fonts Initialized
-RT_MSG: Message System Started
-RT_VIEW: Colormaps Initialized