Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nextstation mouse

16 views
Skip to first unread message

John Carmack

unread,
Nov 4, 1995, 3:00:00 AM11/4/95
to
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);
}


Borja Marcos

unread,
Nov 6, 1995, 3:00:00 AM11/6/95
to

Just curious: When are you going to release DOOM for
Plan 9? :-)

Borja.
--
*******************************************************************
Borja Marcos | Preferred: bor...@we.lc.ehu.es
Alangoeta, 11, 1. izq. | Others: borj...@mx.sarenet.es
48990 - Algorta (Vizcaya) | 10001...@compuserve.com
SPAIN | CIS: 100015,3502
******************************************************************
(c)1995 by the author.
This message cannot be transferred to the Microsoft(tm) Network.


John Carmack

unread,
Nov 6, 1995, 3:00:00 AM11/6/95
to
>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


John D. Pritchard

unread,
Nov 6, 1995, 3:00:00 AM11/6/95
to

when are you going to post the sources? :-)

John Carmack

unread,
Nov 6, 1995, 3:00:00 AM11/6/95
to
> when are you going to post the sources? :-)

I'm pretty proud of releasing the wolfenstein source, even if it =
is crappy old 16 bit code.

Yes, I will be pushing to release the DOOM source after Quake has =
taken over the world.

In any case, most of the gameplay of Quake is written in an =
interpreted language, which is included in text form with the =
release.

(straying fairly far from plan9 here)

John Carmack


0 new messages