shithub: qk1

Download patch

ref: 7138ee9632e711d1aad9400ed2c5df0e4bf90c72
parent: 999f960108cdd4f36aff80d80b898030b9177275
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Oct 14 12:42:39 EDT 2024

remove lcd_* stuff

--- a/r_main.c
+++ b/r_main.c
@@ -223,14 +223,6 @@
 
 	pvrect->x = (pvrectin->width - pvrect->width)/2;
 	pvrect->y = (h - pvrect->height)/2;
-
-	{
-		if (lcd_x.value)
-		{
-			pvrect->y >>= 1;
-			pvrect->height >>= 1;
-		}
-	}
 }
 
 
--- a/r_misc.c
+++ b/r_misc.c
@@ -147,7 +147,7 @@
 	r_dowarpold = r_dowarp;
 	r_dowarp = r_waterwarp.value && (r_viewleaf->contents <= CONTENTS_WATER);
 
-	if ((r_dowarp != r_dowarpold) || r_viewchanged || lcd_x.value)
+	if ((r_dowarp != r_dowarpold) || r_viewchanged)
 	{
 		if (r_dowarp)
 		{
--- a/screen.c
+++ b/screen.c
@@ -598,8 +598,6 @@
 */
 void SCR_UpdateScreen (bool drawdialog)
 {
-	static float oldlcd_x;
-
 	if (scr_disabled_for_loading)
 	{
 		if (realtime - scr_disabled_time > 60)
@@ -621,12 +619,6 @@
 	if (oldfov != scr_fov.value)
 	{
 		oldfov = scr_fov.value;
-		vid.recalc_refdef = true;
-	}
-
-	if (oldlcd_x != lcd_x.value)
-	{
-		oldlcd_x = lcd_x.value;
 		vid.recalc_refdef = true;
 	}
 
--- a/view.c
+++ b/view.c
@@ -10,12 +10,8 @@
 
 */
 
-cvar_t lcd_x = {"lcd_x","0"};
-
 cvar_t v_scale = {"v_scale", "1", true};
 
-static cvar_t lcd_yaw = {"lcd_yaw","0"};
-
 static cvar_t scr_ofsx = {"scr_ofsx","0", false};
 static cvar_t scr_ofsy = {"scr_ofsy","0", false};
 static cvar_t scr_ofsz = {"scr_ofsz","0", false};
@@ -783,40 +779,8 @@
 
 	R_PushDlights ();
 
-	if (lcd_x.value)
-	{
-		// render two interleaved views
-		int		i;
+	R_RenderView ();
 
-		vid.width <<= 1;
-		vid.aspect *= 0.5;
-
-		r_refdef.view.angles[YAW] -= lcd_yaw.value;
-		for (i=0 ; i<3 ; i++)
-			r_refdef.view.org[i] -= right[i]*lcd_x.value;
-		R_RenderView ();
-
-		vid.buffer += vid.width>>1;
-
-		R_PushDlights ();
-
-		r_refdef.view.angles[YAW] += lcd_yaw.value*2;
-		for (i=0 ; i<3 ; i++)
-			r_refdef.view.org[i] += 2*right[i]*lcd_x.value;
-		R_RenderView ();
-
-		vid.buffer -= vid.width>>1;
-
-		r_refdef.vrect.height <<= 1;
-
-		vid.width >>= 1;
-		vid.aspect *= 2;
-	}
-	else
-	{
-		R_RenderView ();
-	}
-
 	if (crosshair.value)
 		Draw_Character(
 			scr_vrect.x + scr_vrect.width/2 + cl_crossx.value,
@@ -887,9 +851,6 @@
 
 	Cvar_RegisterVariable(&v_scale);
 	v_scale.cb = v_scale_cb;
-
-	Cvar_RegisterVariable (&lcd_x);
-	Cvar_RegisterVariable (&lcd_yaw);
 
 	Cvar_RegisterVariable (&v_centermove);
 	Cvar_RegisterVariable (&v_centerspeed);
--- a/view.h
+++ b/view.h
@@ -1,6 +1,5 @@
 extern float v_blend[4];
 
-extern cvar_t lcd_x;
 extern cvar_t v_scale;
 
 void V_Init (void);