* nextstation mouse
@ 1995-11-05 6:30 John
0 siblings, 0 replies; 3+ messages in thread
From: John @ 1995-11-05 6:30 UTC (permalink / raw)
Here is a modification to get an adjustable, accelerative cursor =
from the standard two button NeXT mouse.
After adding this, you can modify the mouse rate by typing:
echo 'speed 3' > /dev/mousectl
John Carmack
Id Software
in 9/next/screen.c:
Add the variable:
/* JDC: for mouse acceleration */
int mouse_speed =3D 2;
In the kbdmouseintr() function, replace the mousetrack call with:
/* mousetrack(b, 3*-dx, 3*-dy);
JDC*/
{
int speed;
speed =3D abs(dx) > abs(dy) ? abs(dx) : abs(dy);
speed =3D speed*speed*mouse_speed;
mousetrack(b, speed*-dx, speed*-dy);
}
change mousectl to accept a "speed" parameter.
void
mousectl(char *arg)
{
int n;
char *field[3];
n =3D getfields(arg, field, 3, " ");
if(strncmp(field[0], "serial", 6) =3D=3D 0){
switch(n){
case 1:
serialmouse(atoi(field[0]+6), 0, 1);
break;
case 2:
serialmouse(atoi(field[1]), 0, 0);
break;
case 3:
default:
serialmouse(atoi(field[1]), field[2], 0);
break;
}
}
/* JDC */
else if (!strcmp(field[0], "speed") && n =3D=3D 2)
{
mouse_speed =3D atoi(field[1]);
if (mouse_speed < 1)
mouse_speed =3D 1;
}
=09
else
error(Ebadctl);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* nextstation mouse
@ 1995-11-06 22:21 Borja
0 siblings, 0 replies; 3+ messages in thread
From: Borja @ 1995-11-06 22:21 UTC (permalink / raw)
Just curious: When are you going to release DOOM for
Plan 9? :-)
Borja.
--
*******************************************************************
Borja Marcos | Preferred: borjam@we.lc.ehu.es
Alangoeta, 11, 1. izq. | Others: borjamar@mx.sarenet.es
48990 - Algorta (Vizcaya) | 100015.3502@compuserve.com
SPAIN | CIS: 100015,3502
******************************************************************
(c)1995 by the author.
This message cannot be transferred to the Microsoft(tm) Network.
^ permalink raw reply [flat|nested] 3+ messages in thread
* nextstation mouse
@ 1995-11-06 22:42 John
0 siblings, 0 replies; 3+ messages in thread
From: John @ 1995-11-06 22:42 UTC (permalink / raw)
>Just curious: When are you going to release DOOM for Plan 9? :-)
I should be releasing Quake on Plan 9 shortly after the dos =
release (whenever that happens).
It will probably require some kernel hacks for proper control, =
though.
John Carmack
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-11-06 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-05 6:30 nextstation mouse John
1995-11-06 22:21 Borja
1995-11-06 22:42 John
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).