shithub: rott

Download patch

ref: 4b1aff50b5700d5c69ffab921511f4106d1a6962
parent: 3f5b7b5321154c86309df129b1edc45b89a2c987
author: LTCHIPS <ltchips994@gmail.com>
date: Mon Jun 11 21:05:38 EDT 2018

removed a few obsolete functions

--- a/src/modexlib.c
+++ b/src/modexlib.c
@@ -161,17 +161,6 @@
 /*
 ====================
 =
-= TurnOffTextCursor
-=
-====================
-*/
-void TurnOffTextCursor ( void )
-{
-}
-
-/*
-====================
-=
 = WaitVBL
 =
 ====================
@@ -256,32 +245,8 @@
 }
 
 /*
-=======================
-=
-= VL_CopyBufferToAll
+=================
 =
-=======================
-*/
-void VL_CopyBufferToAll ( byte *buffer )
-{
-    //STUB_FUNCTION;
-}
-
-/*
-=======================
-=
-= VL_CopyDisplayToHidden
-=
-=======================
-*/
-void VL_CopyDisplayToHidden ( void )
-{
-    VL_CopyBufferToAll ( displayofs );
-}
-
-/*
-=================
-=
 = VL_ClearBuffer
 =
 = Fill the entire video buffer with a given color
@@ -309,18 +274,6 @@
     memset (sdl_surface->pixels, color, iGLOBAL_SCREENWIDTH*iGLOBAL_SCREENHEIGHT);
 }
 
-/*
-=================
-=
-= VL_DePlaneVGA
-=
-=================
-*/
-
-void VL_DePlaneVGA (void)
-{
-}
-
 void RescaleAreaOfTexture(SDL_Renderer* renderer, SDL_Texture * source, SDL_Rect src, SDL_Rect dest)
 {
     SDL_Texture * sourceToResize = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, src.w, src.h);          
@@ -334,71 +287,6 @@
 }
 
 int hudRescaleFactor = 1;
-
-/*
-void DrawObjsInSDLQueue(SDL_Texture * tex)
-{
-    SDL_SetRenderTarget(renderer, tex);
-    //SDL_LockTexture(tex,NULL, sdl_surface->pixels, iGLOBAL_SCREENBWIDE);
-    
-    while(sdl_draw_obj_queue->sizeOfQueue != 0)
-    {   
-        SDLDrawObj * thing = sdl_draw_obj_queue->head->data;
-        
-        
-        SDL_Surface * tempSurf = SDL_CreateRGBSurfaceWithFormatFrom( thing->data, (int) thing->shape->width,
-                                (int) thing->shape->height, 8, (int)thing->shape->width, sdl_surface->format->format);
-        
-        //SDL_LockSurface(tempSurf);
-        
-        
-        //tempSurf->pixels = (byte *) &thing->data;
-        
-        //SDL_UnlockSurface(tempSurf);
-        
-        if(tempSurf == NULL)
-        {
-            Error("Failed to make temporary Surface when rendering things in SDL");
-            exit(1);
-        }
-        
-        SDL_Texture * tempTex = SDL_CreateTextureFromSurface(renderer, tempSurf);
-        
-        if(tempTex == NULL)
-        {
-            Error("Failed to make temporary Texture when rendering things in SDL");
-            exit(1);
-        }
-        
-        SDL_Rect newCoords = (SDL_Rect) {(iGLOBAL_SCREENWIDTH - (320* hudRescaleFactor)) >> 1, iGLOBAL_SCREENHEIGHT - 16*hudRescaleFactor, 320*hudRescaleFactor, 16*hudRescaleFactor};
-        
-        SDL_RenderCopy(renderer, tempTex, NULL, &newCoords);
-        
-        SDL_FreeSurface(tempSurf);
-        
-        SDL_DestroyTexture(tempTex);
-        
-        dequeue(sdl_draw_obj_queue, thing);
-        
-    
-    }
-    //SDL_SetRenderTarget(renderer, NULL);
-    
-    //SDL_RenderCopy(renderer, tex, NULL, NULL);
-    
-    
-    //SDL_UnlockTexture(tex);
-    
-    SDL_SetRenderTarget(renderer, NULL);
-    
-    //SDL_RenderPresent(renderer);
-    
-
-}
-*/
-
-
-
 
 void RenderSurface(void)
 {
--- a/src/rt_build.c
+++ b/src/rt_build.c
@@ -533,11 +533,6 @@
     titleshade+=titleshadedir;
     if (abs(titleshade-16)>6)
         titleshadedir=-titleshadedir;
-    if (BackgroundDrawn==false)
-    {
-        VL_CopyDisplayToHidden();
-        BackgroundDrawn=true;
-    }
 }
 
 //******************************************************************************
--- a/src/rt_draw.c
+++ b/src/rt_draw.c
@@ -2700,7 +2700,6 @@
     FlipPage();
 
     VL_CopyPlanarPageToMemory ( (byte *)bufferofs,  destscreen );
-    VL_CopyDisplayToHidden ();
 
     CalcTics();
     
@@ -2719,7 +2718,6 @@
 
     DrawScaledScreen(0,0,0x10000,destscreen);
     FlipPage();
-    VL_CopyDisplayToHidden ();
     SafeFree(destscreen);
     CalcTics();
     CalcTics();
--- a/src/rt_main.c
+++ b/src/rt_main.c
@@ -394,12 +394,10 @@
     char buf[5];
 
     SetTextMode();
-    TurnOffTextCursor ();
 
     if (CheckParm("QUIET") == 0)
     {
         SetTextMode();
-        TurnOffTextCursor ();
             strcpy (title,"Rise of the Triad Startup  Version ");
             strcat (title,itoa(ROTTMAJORVERSION,&buf[0],10));
             strcat (title,".");
@@ -414,7 +412,7 @@
             px=(80-strlen(title))>>1;
             py=0;
 
-            UL_printf(title);
+            printf("%s ", title);
 
             memset (title,0,sizeof(title));
 
@@ -438,15 +436,11 @@
             px=(80-strlen(title))>>1;
             py=1;
 
-            UL_printf(title);
+            printf("%s ", title);
+            
             printf ("\n");
-
-            UL_ColorBox (0, 0, 80, 2, 0x1e);
-    }
-    else
-    {
-        TurnOffTextCursor ();
-    }
+ 
+   }
 
 }
 
--- a/src/rt_util.c
+++ b/src/rt_util.c
@@ -352,7 +352,8 @@
             sptr = script_p;
         }
 
-        UL_printf (token);
+        printf("%s ", token);
+        
         px++;                //SPACE
         GetToken (true);
     }
@@ -1283,36 +1284,6 @@
 /*
 =================
 =
-= VL_SetColor
-=
-=================
-*/
-
-void VL_SetColor  (int color, int red, int green, int blue)
-{
-    STUB_FUNCTION;
-}
-
-//===========================================================================
-
-/*
-=================
-=
-= VL_GetColor
-=
-=================
-*/
-
-void VL_GetColor  (int color, int *red, int *green, int *blue)
-{
-    STUB_FUNCTION;
-}
-
-//===========================================================================
-
-/*
-=================
-=
 = VL_NormalizePalette
 =
 =================
@@ -1399,32 +1370,6 @@
     exit (0);
 }
 
-
-/*
-=================
-=
-= UL_printf
-=
-=================
-*/
-
-void UL_printf (byte *str)
-{
-    printf ("%s ",str);	// Hackish but works - DDOI
-}
-
-/*
-=================
-=
-= UL_ColorBox
-=
-=================
-*/
-
-void UL_ColorBox (int x, int y, int w, int h, int color)
-{
-}
-
 //******************************************************************************
 //
 // SideOfLine
@@ -1578,32 +1523,6 @@
 
     return true;
 }
-
-
-
-//******************************************************************************
-//
-// UL_ChangeDrive ()
-//
-// Purpose
-//    To change drives.
-//
-// Parms
-//    drive - The drive to change to.
-//
-// Returns
-//    TRUE  - If drive change successful.
-//    FALSE - If drive change unsuccessful.
-//
-//******************************************************************************
-
-boolean UL_ChangeDrive (char *drive)
-{
-    STUB_FUNCTION;
-
-    return false;
-}
-
 
 /*
 =============
--- a/src/rt_view.c
+++ b/src/rt_view.c
@@ -444,7 +444,6 @@
         DisableScreenStretch();
         DrawPlayScreen (true);
         ThreeDRefresh();
-        VL_CopyDisplayToHidden();
         if (wasStretched == true)
         {
             EnableScreenStretch();