From: johann d. <jd...@us...> - 2001-10-07 19:29:11
|
Update of /cvsroot/linuxconsole/ruby/utils In directory usw-pr-cvs1:/tmp/cvs-serv30954 Modified Files: Tag: iforce-split Makefile ffcfstress.c ffmvforce.c fftest.c Log Message: Reflected the change of the ff_effect structure (the "direction" member was moved out of the union, as every effect type used it). Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/Makefile,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -d -r1.10 -r1.10.2.1 --- Makefile 2001/10/03 08:35:19 1.10 +++ Makefile 2001/10/07 19:29:08 1.10.2.1 @@ -41,7 +41,7 @@ $(RM) *.o *.swp $(PROGRAMS) *.orig *.rej map *~ ffcfstress: ffcfstress.c - $(CC) -O2 -mcpu=pentiumpro -fno-implement-inlines -funsigned-char \ + $(CC) -O2 -fno-implement-inlines -funsigned-char \ -lm ffcfstress.c -o ffcfstress ffmvforce.o: ffmvforce.c Index: ffcfstress.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/ffcfstress.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -d -r1.1 -r1.1.2.1 --- ffcfstress.c 2001/10/02 17:47:28 1.1 +++ ffcfstress.c 2001/10/07 19:29:08 1.1.2.1 @@ -20,7 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <linux/input.h> +#include "../linux/include/linux/input.h" #include <sys/ioctl.h> #include <stdio.h> #include <stdlib.h> @@ -186,7 +186,7 @@ effect.replay.length=0xffff; effect.replay.delay=0; effect.u.constant.level=0; - effect.u.constant.direction=0xC000; + effect.direction=0xC000; effect.u.constant.shape.attack_length=0; effect.u.constant.shape.attack_level=0; effect.u.constant.shape.fade_length=0; @@ -231,7 +231,7 @@ if (force>1.0) force=1.0; if (force<-1.0) force=1.0; effect.u.constant.level=(short)(force*32767.0); /* only to be safe */ - effect.u.constant.direction=0xC000; + effect.direction=0xC000; effect.u.constant.shape.attack_level=(short)(force*32767.0); /* this one counts! */ effect.u.constant.shape.fade_level=(short)(force*32767.0); /* only to be safe */ Index: ffmvforce.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/ffmvforce.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -u -d -r1.8 -r1.8.2.1 --- ffmvforce.c 2001/10/02 18:27:59 1.8 +++ ffmvforce.c 2001/10/07 19:29:08 1.8.2.1 @@ -77,8 +77,8 @@ printf("mouse: %d %d n: %4.2f %4.2f angle: %4.2f\n", x, y, nx, ny, angle); effect.type = FF_CONSTANT; effect.u.constant.level = 0x7fff * max(fabs(nx), fabs(ny)); - effect.u.constant.direction = 0x8000 * (angle + M_PI)/M_PI; -printf("level: %04x direction: %04x\n", (unsigned int)effect.u.constant.level, (unsigned int)effect.u.constant.direction); + effect.direction = 0x8000 * (angle + M_PI)/M_PI; +printf("level: %04x direction: %04x\n", (unsigned int)effect.u.constant.level, (unsigned int)effect.direction); effect.u.constant.shape.attack_length = 0; effect.u.constant.shape.attack_level = 0; effect.u.constant.shape.fade_length = 0; Index: fftest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/fftest.c,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -d -r1.11 -r1.11.2.1 --- fftest.c 2001/10/02 18:27:59 1.11 +++ fftest.c 2001/10/07 19:29:08 1.11.2.1 @@ -105,7 +105,7 @@ effects[1].type = FF_CONSTANT; effects[1].id = -1; effects[1].u.constant.level = 0x2000; /* Strength : 25 % */ - effects[1].u.constant.direction = 0x6000; /* 135 degrees */ + effects[1].direction = 0x6000; /* 135 degrees */ effects[1].u.constant.shape.attack_length = 0x100; effects[1].u.constant.shape.attack_level = 0; effects[1].u.constant.shape.fade_length = 0x100; @@ -128,7 +128,7 @@ effects[0].u.periodic.magnitude = 0x4000; /* 0.5 * Maximum magnitude */ effects[0].u.periodic.offset = 0; effects[0].u.periodic.phase = 0; - effects[0].u.periodic.direction = 0x4000; /* Along X axis */ + effects[0].direction = 0x4000; /* Along X axis */ effects[0].u.periodic.shape.attack_length = 0x100; effects[0].u.periodic.shape.attack_level = 0; effects[0].u.periodic.shape.fade_length = 0x100; |