shithub: patch

Download patch

ref: 813d6c7b6e912937e30e99a74927ab3d81086433
parent: fdba1b8611216cb077271b465bf65a4e333ec413
author: qwx <qwx@sciops.net>
date: Mon Aug 22 18:49:09 EDT 2022

doom: remove merged patches

--- a/doom-autorun
+++ /dev/null
@@ -1,44 +1,0 @@
-doom: add autorun configuration option
-
-an autorun option avoids having the shift key swapping mouse buttons 2
-and 3 when playing with the mouse (or remapping the run key...)
-
-diff -r bd0ff7078273 sys/src/games/doom/g_game.c
---- a/sys/src/games/doom/g_game.c	Mon Aug 28 19:45:49 2017 +0200
-+++ b/sys/src/games/doom/g_game.c	Wed Aug 30 11:09:52 2017 +0200
-@@ -153,6 +153,7 @@
- int		key_use;
- int		key_strafe;
- int		key_speed; 
-+int		autorun;
-  
- int             mousebfire; 
- int             mousebstrafe; 
-@@ -252,7 +253,7 @@
-  
-     strafe = gamekeydown[key_strafe] || mousebuttons[mousebstrafe] 
- 	|| joybuttons[joybstrafe]; 
--    speed = gamekeydown[key_speed] || joybuttons[joybspeed];
-+    speed = autorun || gamekeydown[key_speed] || joybuttons[joybspeed];
-  
-     forward = side = 0;
-     
-diff -r bd0ff7078273 sys/src/games/doom/m_misc.c
---- a/sys/src/games/doom/m_misc.c	Mon Aug 28 19:45:49 2017 +0200
-+++ b/sys/src/games/doom/m_misc.c	Wed Aug 30 11:09:52 2017 +0200
-@@ -172,6 +172,7 @@
- extern int	viewwidth;
- extern int	viewheight;
- 
-+extern int	autorun;
- extern int	mouseSensitivity;
- extern int	showMessages;
- 
-@@ -213,6 +214,7 @@
-     {"key_use",&key_use, ' '},
-     {"key_strafe",&key_strafe, KEY_RALT},
-     {"key_speed",&key_speed, KEY_RSHIFT},
-+    {"autorun",&autorun, 0},
- 
-     {"use_mouse",&usemouse, 1},
-     {"mouseb_fire",&mousebfire,0},
--- a/doom-mouseglitches
+++ /dev/null
@@ -1,59 +1,0 @@
-doom: fix glitchy mouse movement
-
-- fix stuttering mouse movement by using all mouse deltas during a tic, not
-  just the last one (G_Responder can be called more than once per tic)
-- change mouse filtering and sensitivity calculation: divide mouse delta by
-  half, casting to double, and only then multiply by sensitivity
-
-10 * Δ * (sens+5) / 10  →  Δ * 0.5 * sens
-with sens in [1;10]
-
-diff -r 121def0aed4d sys/src/games/doom/g_game.c
---- a/sys/src/games/doom/g_game.c	Thu Jul 12 09:33:33 2018 +0200
-+++ b/sys/src/games/doom/g_game.c	Sat Jul 14 09:32:51 2018 +0200
-@@ -566,8 +566,8 @@
- 	mousebuttons[0] = ev->data1 & 1; 
- 	mousebuttons[1] = ev->data1 & 2; 
- 	mousebuttons[2] = ev->data1 & 4; 
--	mousex = ev->data2*(mouseSensitivity+5)/10; 
--	mousey = ev->data3*(mouseSensitivity+5)/10; 
-+	mousex += ev->data2*0.5*(mouseSensitivity+1); 
-+	mousey += ev->data3*0.5*(mouseSensitivity+1); 
- 	return true;    // eat events 
-  
-       case ev_joystick: 
-diff -r 121def0aed4d sys/src/games/doom/i_video.c
---- a/sys/src/games/doom/i_video.c	Thu Jul 12 09:33:33 2018 +0200
-+++ b/sys/src/games/doom/i_video.c	Sat Jul 14 09:32:51 2018 +0200
-@@ -362,8 +362,8 @@
- 			
- 			e.type = ev_mouse;
- 			e.data1 = m.buttons;
--			e.data2 = 10*(m.xy.x - om.xy.x);
--			e.data3 = 10*(om.xy.y - m.xy.y);
-+			e.data2 = m.xy.x - om.xy.x;
-+			e.data3 = om.xy.y - m.xy.y;
- 			D_PostEvent(&e);
- 			om = m;
- 
-diff -r 121def0aed4d sys/src/games/doom/m_menu.c
---- a/sys/src/games/doom/m_menu.c	Thu Jul 12 09:33:33 2018 +0200
-+++ b/sys/src/games/doom/m_menu.c	Sat Jul 14 09:32:51 2018 +0200
-@@ -945,7 +945,7 @@
- 		       W_CacheLumpName(msgNames[showMessages],PU_CACHE));
- 
-     M_DrawThermo(OptionsDef.x,OptionsDef.y+LINEHEIGHT*(mousesens+1),
--		 10,mouseSensitivity);
-+		 9,mouseSensitivity);
- 	
-     M_DrawThermo(OptionsDef.x,OptionsDef.y+LINEHEIGHT*(scrnsize+1),
- 		 9,screenSize);
-@@ -1099,7 +1099,7 @@
- 	    mouseSensitivity--;
- 	break;
-       case 1:
--	if (mouseSensitivity < 9)
-+	if (mouseSensitivity < 8)
- 	    mouseSensitivity++;
- 	break;
-     }
--- a/doom-naivescaleup
+++ /dev/null
@@ -1,64 +1,0 @@
-ups max scale in an idiotic way
-
-diff -r 7ee51d8d1eb9 sys/src/games/doom/i_video.c
---- a/sys/src/games/doom/i_video.c	Thu May 11 19:34:54 2017 +0000
-+++ b/sys/src/games/doom/i_video.c	Mon May 15 14:46:26 2017 +0200
-@@ -91,7 +91,7 @@
- 	Rectangle r;
- 	int y, scale;
- 	uchar *s, *e, *d, *m;
--	uchar buf[SCREENWIDTH*3*4];
-+	uchar buf[SCREENWIDTH*3*12];
- 
- 	if(resized){
- 		resized = 0;
-@@ -108,8 +108,8 @@
- 	scale = Dx(screen->r)/SCREENWIDTH;
- 	if(scale <= 0)
- 		scale = 1;
--	else if(scale > 4)
--		scale = 4;
-+	else if(scale > 12)
-+		scale = 12;
- 
- 	/* where to draw the scaled row */
- 	r = rectsubpt(rectaddpt(Rect(0, 0, scale*SCREENWIDTH, scale), center),
-@@ -127,6 +127,38 @@
- 		for(; s < e; s++){
- 			m = &cmap[*s * 3];
- 			switch(scale){
-+			case 12:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 11:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 10:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 9:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 8:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 7:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 6:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
-+			case 5:
-+				*d++ = m[2];
-+				*d++ = m[1];
-+				*d++ = m[0];
- 			case 4:
- 				*d++ = m[2];
- 				*d++ = m[1];
--- a/doom-nodclick
+++ /dev/null
@@ -1,99 +1,0 @@
-doom: remove mouse double click and don't move forward with button 3
-
-diff -r bd0ff7078273 sys/src/games/doom/g_game.c
---- a/sys/src/games/doom/g_game.c	Mon Aug 28 19:45:49 2017 +0200
-+++ b/sys/src/games/doom/g_game.c	Wed Aug 30 10:20:53 2017 +0200
-@@ -187,13 +187,6 @@
- int             mousex;
- int		mousey;         
- 
--int             dclicktime;
--int		dclickstate;
--int		dclicks; 
--int             dclicktime2;
--int		dclickstate2;
--int		dclicks2;
--
- // joystick values are repeated 
- int             joyxmove;
- int		joyymove;
-@@ -235,7 +228,6 @@
- { 
-     int		i; 
-     boolean	strafe;
--    boolean	bstrafe; 
-     int		speed;
-     int		tspeed; 
-     int		forward;
-@@ -329,11 +321,7 @@
- 	cmd->buttons |= BT_ATTACK; 
-  
-     if (gamekeydown[key_use] || joybuttons[joybuse] ) 
--    { 
- 	cmd->buttons |= BT_USE;
--	// clear double clicks if hit use button 
--	dclicks = 0;                   
--    } 
- 
-     // chainsaw overrides 
-     for (i=0 ; i<NUMWEAPONS-1 ; i++)        
-@@ -346,58 +334,7 @@
-     
-     // mouse
-     if (mousebuttons[mousebforward]) 
--	forward += forwardmove[speed];
--    
--    // forward double click
--    if (mousebuttons[mousebforward] != dclickstate && dclicktime > 1 ) 
--    { 
--	dclickstate = mousebuttons[mousebforward]; 
--	if (dclickstate) 
--	    dclicks++; 
--	if (dclicks == 2) 
--	{ 
--	    cmd->buttons |= BT_USE; 
--	    dclicks = 0; 
--	} 
--	else 
--	    dclicktime = 0; 
--    } 
--    else 
--    { 
--	dclicktime += ticdup; 
--	if (dclicktime > 20) 
--	{ 
--	    dclicks = 0; 
--	    dclickstate = 0; 
--	} 
--    }
--    
--    // strafe double click
--    bstrafe =
--	mousebuttons[mousebstrafe] 
--	|| joybuttons[joybstrafe]; 
--    if (bstrafe != dclickstate2 && dclicktime2 > 1 ) 
--    { 
--	dclickstate2 = bstrafe; 
--	if (dclickstate2) 
--	    dclicks2++; 
--	if (dclicks2 == 2) 
--	{ 
--	    cmd->buttons |= BT_USE; 
--	    dclicks2 = 0; 
--	} 
--	else 
--	    dclicktime2 = 0; 
--    } 
--    else 
--    { 
--	dclicktime2 += ticdup; 
--	if (dclicktime2 > 20) 
--	{ 
--	    dclicks2 = 0; 
--	    dclickstate2 = 0; 
--	} 
--    } 
-+	cmd->buttons |= BT_USE; 
-  
-     forward += mousey; 
-     if (strafe) 
--- a/doom-nomousemove
+++ /dev/null
@@ -1,11 +1,0 @@
---- //.git/fs/object/90ce513fb0df41c0d6c5cea8dbd612c1859d4392/tree/sys/src/games/doom/g_game.c
-+++ sys/src/games/doom/g_game.c
-@@ -399,7 +399,7 @@
- 	} 
-     } 
-  
--    forward += mousey; 
-+    //forward += mousey; 
-     if (strafe) 
- 	side += mousex*2; 
-     else