shithub: rott

Download patch

ref: dad65e8699dbf9d4edc0e2e957dc816775aef20d
parent: aa6fbb27fa643d09277a5c411256accb884c1038
author: levesqu8 <levesqu8@msu.edu>
date: Tue Nov 21 17:10:24 EST 2017

Added 640x400 resolution params

--- a/rott/rt_game.c
+++ b/rott/rt_game.c
@@ -466,18 +466,29 @@
             ShowKillsYoffset = KILLS_HEIGHT;
         }
             if (iGLOBAL_SCREENWIDTH == 640) {
-                //bna fix - not to good? but no one has 286 any more
-                //statusbar dosent cover hole screen, because its a lump picture width max 320
-                //first write dummy shape and next over it
-                GameMemToScreen( shape, 320, (224*2)+16-ShowKillsYoffset, bufferofsonly );
+                if (iGLOBAL_SCREENHEIGHT == 400)
+                {
+                    shape =  ( pic_t * )W_CacheLumpName( "backtile", PU_CACHE, Cvt_pic_t, 1 );
+                    DrawTiledRegion( 0, iGLOBAL_SCREENHEIGHT - 16, iGLOBAL_SCREENWIDTH, 16, 0,16, shape );
+                    shape = ( pic_t * ) W_CacheLumpName( "bottbar", PU_CACHE, Cvt_pic_t, 1 );
+                    
+                    GameMemToScreen( shape, topBarCenterOffsetX, iGLOBAL_SCREENHEIGHT - 16, bufferofsonly ); //using topBarCenterOffsetX since bottbar dims == statbar dims
+                    
+                }
+                else
+                {
+                    GameMemToScreen( shape, 320, (224*2)+16-ShowKillsYoffset, bufferofsonly );
                 //copy next shape to mem
-                GameMemToScreen( shape, 0, (224*2)+16-ShowKillsYoffset, bufferofsonly );
+                    GameMemToScreen( shape, 0, (224*2)+16-ShowKillsYoffset, bufferofsonly );
                 // delete bullet in middle of shape picture
-                DrawPPic( 310, (224*2)+17-ShowKillsYoffset, 8 >> 2, 16,
+                    DrawPPic( 310, (224*2)+17-ShowKillsYoffset, 8 >> 2, 16,
                           ( byte * )&erase->data, 2, true, bufferofsonly );
                 // delete hart in middle of shape picture
-                DrawPPic( 324, (224*2)+17-ShowKillsYoffset, 8 >> 2, 16,
+                    DrawPPic( 324, (224*2)+17-ShowKillsYoffset, 8 >> 2, 16,
                           ( byte * )&erase->data, 2, true, bufferofsonly );
+                
+                
+                }
 
             } else if (iGLOBAL_SCREENWIDTH == 800) {
                 GameMemToScreen( shape, 800-320, 584-ShowKillsYoffset, bufferofsonly );
--- a/rott/rt_main.c
+++ b/rott/rt_main.c
@@ -869,6 +869,7 @@
                 if ( (sscanf(_argv[i], "%dx%d", &width, &height) == 2) &&
                         ( ( (width == 320) && (height == 200) ) ||
                           ( (width == 640) && (height == 480) ) ||
+                          ((width == 640) && (height == 400)) ||
                           ( (width == 800) && (height == 600) ) ) )
                 {
                     iGLOBAL_SCREENWIDTH  = width;
--- a/rott/rt_view.c
+++ b/rott/rt_view.c
@@ -309,29 +309,69 @@
     */
 
     if ( iGLOBAL_SCREENWIDTH == 640) {
-        height = 0;//we use height as dummy cnt
-        viewsizes[height++]= 380;
-        viewsizes[height++]= 336;
-        viewsizes[height++]= 428;
-        viewsizes[height++]= 352;
-        viewsizes[height++]= 460;
-        viewsizes[height++]= 368;
-        viewsizes[height++]= 492;
-        viewsizes[height++]= 384;
-        viewsizes[height++]= 524;
-        viewsizes[height++]= 400;
-        viewsizes[height++]= 556;
-        viewsizes[height++]= 416;
-        viewsizes[height++]= 588;
-        viewsizes[height++]= 432;
-        viewsizes[height++]= 640;
-        viewsizes[height++]= 448;
-        viewsizes[height++]= 640;
-        viewsizes[height++]= 464;
-        viewsizes[height++]= 640;
-        viewsizes[height++]= 480;
-        viewsizes[height++]= 640;
-        viewsizes[height++]= 480;
+        if (iGLOBAL_SCREENHEIGHT == 400)
+        {
+            height = 0;//we use height as dummy cnt
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 32;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400 - 16;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400;
+            
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 400;
+        
+        }
+        else{
+            height = 0;//we use height as dummy cnt
+            viewsizes[height++]= 380;
+            viewsizes[height++]= 336;
+            viewsizes[height++]= 428;
+            viewsizes[height++]= 352;
+            viewsizes[height++]= 460;
+            viewsizes[height++]= 368;
+            viewsizes[height++]= 492;
+            viewsizes[height++]= 384;
+            viewsizes[height++]= 524;
+            viewsizes[height++]= 400;
+            viewsizes[height++]= 556;
+            viewsizes[height++]= 416;
+            viewsizes[height++]= 588;
+            viewsizes[height++]= 432;
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 448;
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 464;
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 480;
+            viewsizes[height++]= 640;
+            viewsizes[height++]= 480;
+        }
+
     } else if ( iGLOBAL_SCREENWIDTH == 800) {
         height = 0;
         viewsizes[height++]= 556;
--- a/rott/winrott.c
+++ b/rott/winrott.c
@@ -71,14 +71,31 @@
         dTopYZANGLELIMIT = (44*FINEANGLES/360);;
     }
     if (iGLOBAL_SCREENWIDTH == 640) {
-        iGLOBAL_FOCALWIDTH = 180 - FocalWidthOffset;
-        dGLOBAL_FPFOCALWIDTH = 180.0 - FocalWidthOffset ;
-        iGLOBAL_HEALTH_X = 40;//20*2;
-        iGLOBAL_HEALTH_Y = 466;//(185*2)+16;
-        iGLOBAL_AMMO_X = 600;//300*2;
-        iGLOBAL_AMMO_Y = 464;//480-16;
+        if (iGLOBAL_SCREENHEIGHT == 400)
+        {
+            iGLOBAL_FOCALWIDTH = 180 - FocalWidthOffset;
+            dGLOBAL_FPFOCALWIDTH = 180.0 - FocalWidthOffset ;
+            iGLOBAL_HEALTH_X = 180;
+            iGLOBAL_HEALTH_Y = 400 - 16;
+            iGLOBAL_AMMO_X = 460;
+            iGLOBAL_AMMO_Y = 400 - 16;
 
-        dTopYZANGLELIMIT = (42*FINEANGLES/360);;
+            dTopYZANGLELIMIT = (42*FINEANGLES/360);;
+        
+        }
+        else
+        {
+            iGLOBAL_FOCALWIDTH = 180 - FocalWidthOffset;
+            dGLOBAL_FPFOCALWIDTH = 180.0 - FocalWidthOffset ;
+            iGLOBAL_HEALTH_X = 40;//20*2;
+            iGLOBAL_HEALTH_Y = 466;//(185*2)+16;
+            iGLOBAL_AMMO_X = 600;//300*2;
+            iGLOBAL_AMMO_Y = 464;//480-16;
+
+            dTopYZANGLELIMIT = (42*FINEANGLES/360);;
+        
+        }
+        
     }
     if (iGLOBAL_SCREENWIDTH == 800) {
         iGLOBAL_FOCALWIDTH = 200 - FocalWidthOffset;