Lines Matching full:i

76 	unsigned int i;  member
549 int abs(int i){ in abs() argument
550 if(i<0) in abs()
551 return ~(--i); in abs()
552 return i; in abs()
557 int i; in Sqrt() local
558 for(i=14;i>=0;i--) in Sqrt()
560 if((ret + (0x1<<i))*(ret + (0x1<<i)) <= d) in Sqrt()
561 ret |= (0x1<<i); in Sqrt()
568 int i; in PointCoor() local
570 for(i=0;i<point_num;i++) in PointCoor()
573 point_now[i].all &= (FLAG_COOR_EX | FLAG_KEY | FLAG_ABLE); in PointCoor()
575 point_now[i].all &= (FLAG_COOR | FLAG_KEY | FLAG_ABLE); in PointCoor()
580 int i,j; in PointRepeat() local
602 for(i=0;i<POINT_MAX;i++) in PointRepeat()
604 if(point_now[i].all == 0) in PointRepeat()
606 if (point_now[i].other.key) in PointRepeat()
608 x_min = point_now[i].other.x - pn; in PointRepeat()
609 x_max = point_now[i].other.x + pn; in PointRepeat()
610 y_min = point_now[i].other.y - pn; in PointRepeat()
611 y_max = point_now[i].other.y + pn; in PointRepeat()
612 for(j=i+1;j<POINT_MAX;j++) in PointRepeat()
622 point_now[i].other.x = in PointRepeat()
623 (point_now[i].other.x + in PointRepeat()
625 point_now[i].other.y = in PointRepeat()
626 (point_now[i].other.y + in PointRepeat()
629 i--; in PointRepeat()
639 int i,pn; in PointPointer() local
644 for(i=0;i<PP_DEEP;i++) in PointPointer()
646 pp[i] = point_array[pn]; in PointPointer()
653 for(i=0;i<PS_DEEP;i++) in PointPointer()
655 ps[i] = point_array[pn+PP_DEEP]; in PointPointer()
662 for(i=0;i<PR_DEEP;i++) in PointPointer()
664 pr[i] = point_array[pn+PP_DEEP+PS_DEEP]; in PointPointer()
671 for(i=0;i<PRESSURE_DEEP;i++) in PointPointer()
673 pa[i] = pressure_array[pn]; in PointPointer()
681 for(i=0;i<POINT_MAX;i++) in PointPointer()
683 if(point_now[i].all) in PointPointer()
684 point_now[pn++].all = point_now[i].all; in PointPointer()
685 pp[0][i].all = 0; in PointPointer()
686 ps[0][i].all = 0; in PointPointer()
687 pr[0][i].all = 0; in PointPointer()
690 for(i=pn;i<POINT_MAX;i++) in PointPointer()
691 point_now[i].all = 0; in PointPointer()
729 int i,j; in CoordinateCorrect() local
740 for(i=0;i<LINE_SIZE;i++) in CoordinateCorrect()
742 px[i+1] = NULL; in CoordinateCorrect()
743 py[i+1] = NULL; in CoordinateCorrect()
747 i=0; in CoordinateCorrect()
749 px[1] = multi_group[i++]; in CoordinateCorrect()
751 py[1] = multi_group[i++]; in CoordinateCorrect()
755 for(i=0;i<LINE_SIZE;i++) in CoordinateCorrect()
757 multi_x[i].range = multi_x_array[i] & 0xffff; in CoordinateCorrect()
758 multi_x[i].group = multi_x_array[i] >> 16; in CoordinateCorrect()
759 multi_y[i].range = multi_y_array[i] & 0xffff; in CoordinateCorrect()
760 multi_y[i].group = multi_y_array[i] >> 16; in CoordinateCorrect()
763 for(i=0;i<LINE_SIZE;i++) in CoordinateCorrect()
764 if(multi_x[i].range && multi_x[i].group<LINE_SIZE) in CoordinateCorrect()
765 px[j++] = multi_group[multi_x[i].group]; in CoordinateCorrect()
767 for(i=0;i<LINE_SIZE;i++) in CoordinateCorrect()
768 if(multi_y[i].range && multi_y[i].group<LINE_SIZE) in CoordinateCorrect()
769 py[j++] = multi_group[multi_y[i].group]; in CoordinateCorrect()
771 for(i=0;i<(int)point_num && i<POINT_MAX;i++) in CoordinateCorrect()
773 if(point_now[i].all==0) in CoordinateCorrect()
775 if (point_now[i].other.key != 0) in CoordinateCorrect()
777 if (point_now[i].other.x >= edge_size && in CoordinateCorrect()
778 point_now[i].other.x <= drv_num_nokey * 64 - edge_size) in CoordinateCorrect()
782 if (point_now[i].other.x & 64) in CoordinateCorrect()
783 point_now[i].other.x = CCO(point_now[i].other.x, px[0], 2); in CoordinateCorrect()
785 point_now[i].other.x = CCO(point_now[i].other.x, px[1], 2); in CoordinateCorrect()
794 point_now[i].other.x < multi_x[j].range)) in CoordinateCorrect()
796 point_now[i].other.x = CCO(point_now[i].other.x, px[j], kx); in CoordinateCorrect()
801 if (point_now[i].other.y >= edge_size && in CoordinateCorrect()
802 point_now[i].other.y <= sen_num_nokey * 64 - edge_size) in CoordinateCorrect()
806 if (point_now[i].other.y & 64) in CoordinateCorrect()
807 point_now[i].other.y = CCO(point_now[i].other.y, py[0], 2); in CoordinateCorrect()
809 point_now[i].other.y = CCO(point_now[i].other.y, py[1], 2); in CoordinateCorrect()
818 point_now[i].other.y < multi_y[j].range)) in CoordinateCorrect()
820 point_now[i].other.y = CCO(point_now[i].other.y, py[j], ky); in CoordinateCorrect()
891 int i; in PointPredict() local
892 for(i=0;i<POINT_MAX;i++) in PointPredict()
894 if(pp[1][i].all != 0) in PointPredict()
897 || pp[2][i].all == 0 in PointPredict()
898 || pp[2][i].other.fill != 0 in PointPredict()
899 || pp[3][i].other.fill != 0 in PointPredict()
900 || pp[1][i].other.key != 0 in PointPredict()
903 PointPredictOne(i); in PointPredict()
905 else if(pp[2][i].all != 0) in PointPredict()
907 if(pp[3][i].all != 0) in PointPredict()
908 PointPredictThree(i); in PointPredict()
910 PointPredictTwo(i); in PointPredict()
912 pp[0][i].all |= FLAG_FILL; in PointPredict()
913 pa[0][i] = pa[1][i]; in PointPredict()
916 pp[0][i].all = 0x0fff0fff; in PointPredict()
917 if (pp[1][i].other.key) in PointPredict()
918 pp[0][i].all |= FLAG_KEY; in PointPredict()
936 int i; in DistanceInit() local
938 for(i=0;i<POINT_MAX*POINT_MAX;i++) in DistanceInit()
944 int i,j; in DistanceMin() local
948 for(i=0;i<POINT_MAX;i++) in DistanceMin()
950 if(p->d[j][i] < p->min) in DistanceMin()
952 p->i = i; in DistanceMin()
954 p->min = p->d[j][i]; in DistanceMin()
965 int i,j; in DistanceIgnore() local
966 for(i=0;i<POINT_MAX;i++) in DistanceIgnore()
967 p->d[p->j][i] = 0x7fffffff; in DistanceIgnore()
969 p->d[j][p->i] = 0x7fffffff; in DistanceIgnore()
974 int i; in SpeedGet() local
975 for(i=8;i>0;i--) in SpeedGet()
977 if(d > 0x100<<i) in SpeedGet()
980 return i; in SpeedGet()
985 int i,j; in PointId() local
989 for(i=0;i<POINT_MAX;i++) in PointId()
991 if (pp[0][i].other.predict == 0 || pp[1][i].other.fill != 0) in PointId()
992 id_speed[i] = id_first_coe; in PointId()
994 id_speed[i] = SpeedGet( PointDistance(&pp[1][i],&pp[0][i]) ); in PointId()
996 for(i=0;i<POINT_MAX;i++) in PointId()
998 if(pp[0][i].all == FLAG_COOR) in PointId()
1002 distance.d[j][i] = PointDistance(&point_now[j],&pp[0][i]); in PointId()
1025 for(i=0;i<POINT_MAX;i++) in PointId()
1026 point_now[i].all = 0; in PointId()
1038 id_speed[distance.i] * id_speed_coe) /**average/(soft_average+1)*/) in PointId()
1043 pp[0][distance.i].all = point_now[distance.j].all; in PointId()
1044 pa[0][distance.i] = pressure_now[distance.j]; in PointId()
1051 static int ClearLenPP(int i) in ClearLenPP() argument
1056 if(pp[n][i].all) in ClearLenPP()
1089 int i; in PointOrder() local
1090 for(i=0;i<POINT_MAX;i++) in PointOrder()
1092 if (pp[0][i].other.fill == 0) in PointOrder()
1094 if (pp[1][i].all == 0 || pp[1][i].other.fill != 0 || filter_able == 0 || filter_able == 1) in PointOrder()
1096 pp[0][i].all = 0; in PointOrder()
1097 pressure_now[i] = 0; in PointOrder()
1104 unsigned int i,j; in PointCross() local
1108 for(i=j+1;i<POINT_MAX;i++) in PointCross()
1110 if(pp[0][i].all == 0 || pp[0][j].all == 0 in PointCross()
1111 || pp[1][i].all == 0 || pp[1][j].all == 0) in PointCross()
1113 if (((pp[0][j].other.x < pp[0][i].other.x && pp[1][j].other.x > pp[1][i].other.x) in PointCross()
1114 || (pp[0][j].other.x > pp[0][i].other.x && pp[1][j].other.x < pp[1][i].other.x)) in PointCross()
1115 && ((pp[0][j].other.y < pp[0][i].other.y && pp[1][j].other.y > pp[1][i].other.y) in PointCross()
1116 || (pp[0][j].other.y > pp[0][i].other.y && pp[1][j].other.y < pp[1][i].other.y))) in PointCross()
1118 t = pp[0][i].other.x; in PointCross()
1119 pp[0][i].other.x = pp[0][j].other.x; in PointCross()
1121 t = pp[0][i].other.y; in PointCross()
1122 pp[0][i].other.y = pp[0][j].other.y; in PointCross()
1131 int i; in GetPointNum() local
1133 for(i=0;i<POINT_MAX;i++) in GetPointNum()
1134 if(pt[i].all != 0) in GetPointNum()
1140 int i,j; in PointDelay() local
1141 for(i=0;i<POINT_MAX;i++) in PointDelay()
1145 point_delay[i].all = 0; in PointDelay()
1146 if(pp[0][i].all) in PointDelay()
1147 point_delay[i].other.able = 1; in PointDelay()
1150 if (pp[0][i].all != 0 && in PointDelay()
1151 point_delay[i].other.init == 0 && in PointDelay()
1152 point_delay[i].other.able == 0) in PointDelay()
1156 point_delay[i].other.delay = (report_delay >> 3 * in PointDelay()
1158 point_delay[i].other.report = (report_ahead >> 3 * in PointDelay()
1160 if (point_delay[i].other.report > point_delay[i].other.delay) in PointDelay()
1161 point_delay[i].other.report = point_delay[i].other.delay; in PointDelay()
1162 point_delay[i].other.init = 1; in PointDelay()
1164 if(pp[0][i].all == 0) in PointDelay()
1166 point_delay[i].other.init = 0; in PointDelay()
1168 if (point_delay[i].other.able == 0 && point_delay[i].other.init != 0) in PointDelay()
1170 for (j = 0; j <= (int)point_delay[i].other.delay; j++) in PointDelay()
1171 if (pp[j][i].all == 0 || in PointDelay()
1172 pp[j][i].other.fill != 0 || in PointDelay()
1173 pp[j][i].other.able != 0) in PointDelay()
1175 if (j <= (int)point_delay[i].other.delay) in PointDelay()
1177 point_delay[i].other.able = 1; in PointDelay()
1179 if (pp[point_delay[i].other.report][i].all == 0) in PointDelay()
1181 point_delay[i].other.able = 0; in PointDelay()
1184 if (point_delay[i].other.able == 0) in PointDelay()
1186 if (point_delay[i].other.report) in PointDelay()
1188 if (PointDistance(&pp[point_delay[i].other.report][i], in PointDelay()
1189 &pp[point_delay[i].other.report - 1][i]) < 3 * 3) in PointDelay()
1190 point_delay[i].other.report--; in PointDelay()
1195 static void FilterOne(int i,int *ps_c,int *pr_c,int denominator) in FilterOne() argument
1199 pr[0][i].all = ps[0][i].all; in FilterOne()
1200 if(pr[0][i].all == 0) in FilterOne()
1206 x += (int)pr[j][i].other.x * (int)pr_c[j] + in FilterOne()
1207 (int)ps[j][i].other.x * (int)ps_c[j]; in FilterOne()
1208 y += (int)pr[j][i].other.y * (int)pr_c[j] + in FilterOne()
1209 (int)ps[j][i].other.y * (int)ps_c[j]; in FilterOne()
1221 pr[0][i].other.x = x; in FilterOne()
1222 pr[0][i].other.y = y; in FilterOne()
1225 static unsigned int FilterSpeed(int i) in FilterSpeed() argument
1227 return (Sqrt(PointDistance(&ps[0][i], &ps[1][i])) + in FilterSpeed()
1228 Sqrt(PointDistance(&ps[1][i], &ps[2][i])))/2; in FilterSpeed()
1233 int i; in MedianSpeedOver() local
1240 for(i=0;i<=deep && i<POINT_DEEP;i++) in MedianSpeedOver()
1242 if(PointDistance(&ps[i][id],&ps[i+1][id]) > dis) in MedianSpeedOver()
1252 int i,j; in PointMedian() local
1255 for(i=0;i<POINT_MAX;i++) in PointMedian()
1257 if(filter_deep[i] < 3) in PointMedian()
1260 deep = filter_deep[i] + 2; in PointMedian()
1266 if(MedianSpeedOver(i,deep)) in PointMedian()
1270 buf_x[j] = ps[j][i].other.x; in PointMedian()
1271 buf_y[j] = ps[j][i].other.y; in PointMedian()
1275 pr[0][i].other.x = buf_x[deep / 2]; in PointMedian()
1276 pr[0][i].other.y = buf_y[deep / 2]; in PointMedian()
1278 filter_deep[i] = deep; in PointMedian()
1283 int i,j; in PointFilter() local
1288 for(i=0;i<POINT_MAX;i++) in PointFilter()
1290 pr[0][i].all = ps[0][i].all; in PointFilter()
1292 for(i=0;i<POINT_MAX;i++) in PointFilter()
1294 if(pr[0][i].all!=0 && pr[1][i].all == 0) in PointFilter()
1297 pr[j][i].all = ps[0][i].all; in PointFilter()
1299 ps[j][i].all = ps[0][i].all; in PointFilter()
1306 for(i=0;i<8;i++) in PointFilter()
1308 ps_c[i] = (filter_coe[i/4] >> ((i%4)*8)) & 0xff; in PointFilter()
1309 pr_c[i] = (filter_coe[i/4+2] >> ((i%4)*8)) & 0xff; in PointFilter()
1310 if(ps_c[i] >= 0x80) in PointFilter()
1311 ps_c[i] |= 0xffffff00; in PointFilter()
1312 if(pr_c[i] >= 0x80) in PointFilter()
1313 pr_c[i] |= 0xffffff00; in PointFilter()
1315 for(i=0;i<POINT_MAX;i++) in PointFilter()
1317 FilterOne(i,ps_c,pr_c,filter_able); in PointFilter()
1326 for(i=0;i<4;i++) in PointFilter()
1327 filter_speed[i+1] = median_dis[i]; in PointFilter()
1330 for(i=0;i<POINT_MAX;i++) in PointFilter()
1332 if(pr[0][i].all == 0) in PointFilter()
1334 filter_deep[i] = 0; in PointFilter()
1337 speed_now = FilterSpeed(i); in PointFilter()
1338 if (filter_deep[i] > 0 && in PointFilter()
1339 speed_now > filter_speed[filter_deep[i]+1 - 2]) in PointFilter()
1340 filter_deep[i] --; in PointFilter()
1341 else if(filter_deep[i] < 3 && in PointFilter()
1342 speed_now < filter_speed[filter_deep[i]+1 + 2]) in PointFilter()
1343 filter_deep[i] ++; in PointFilter()
1345 FilterOne(i,ps_coe[filter_deep[i]], in PointFilter()
1346 pr_coe[filter_deep[i]],0-filter_able); in PointFilter()
1358 int i; in KeyMap() local
1359 for(i=0;i<8;i++) in KeyMap()
1361 if ((unsigned int)*drv >= (key_range[i].up_down >> 16) in KeyMap()
1362 && (unsigned int)*drv <= (key_range[i].up_down & 0xffff) in KeyMap()
1363 && (unsigned int)*sen >= (key_range[i].left_right >> 16) in KeyMap()
1364 && (unsigned int)*sen <= (key_range[i].left_right & 0xffff)) in KeyMap()
1366 *sen = key_range[i].coor >> 16; in KeyMap()
1367 *drv = key_range[i].coor & 0xffff; in KeyMap()
1368 return key_range[i].coor; in KeyMap()
1439 int i; in PointReport() local
1448 for(i=0;i<POINT_MAX;i++) in PointReport()
1449 data[i] = 0; in PointReport()
1453 for(i=0;i<POINT_MAX && num<point_num_max;i++) in PointReport()
1455 if (point_delay[i].other.able == 0) in PointReport()
1457 if (point_delay[i].other.report >= PR_DEEP - 1) in PointReport()
1459 if (pr[point_delay[i].other.report + 1][i].other.able == 0) in PointReport()
1461 if (pr[point_delay[i].other.report][i].all) in PointReport()
1463 pr[point_delay[i].other.report][i].other.able = 1; in PointReport()
1464 data[i] = ScreenResolution(&pr[point_delay[i].other.report][i]); in PointReport()
1465 if(data[i]) in PointReport()
1467 data[i] |= (i+1)<<28; in PointReport()
1472 for(i=0;i<POINT_MAX && num<point_num_max;i++) in PointReport()
1474 if (point_delay[i].other.able == 0) in PointReport()
1476 if (point_delay[i].other.report >= PR_DEEP) in PointReport()
1478 if (pr[point_delay[i].other.report][i].all == 0) in PointReport()
1480 if (pr[point_delay[i].other.report][i].other.able == 0) in PointReport()
1482 pr[point_delay[i].other.report][i].other.able = 1; in PointReport()
1483 data[i] = ScreenResolution(&pr[point_delay[i].other.report][i]); in PointReport()
1484 if(data[i]) in PointReport()
1486 data[i] |= (i+1)<<28; in PointReport()
1495 for(i=0;i<point_num_max;i++) in PointReport()
1497 if (point_delay[i].other.able == 0) in PointReport()
1499 if (point_delay[i].other.report >= PR_DEEP) in PointReport()
1501 data[num] = ScreenResolution(&pr[point_delay[i].other.report][i]); in PointReport()
1503 data[num++] |= (i+1)<<28; in PointReport()
1507 for(i=0;i<POINT_MAX;i++) in PointReport()
1509 if(data[i] == 0) in PointReport()
1511 point_now[num].all = data[i]; in PointReport()
1512 cinfo->x[num] = (data[i] >> 16) & 0xfff; in PointReport()
1513 cinfo->y[num] = data[i] & 0xfff; in PointReport()
1514 cinfo->id[num] = data[i] >> 28; in PointReport()
1515 pressure_now[num] = pressure_report[i]; in PointReport()
1539 int i,id; in PointEdge() local
1546 for(i=0;i<4*4*2;i++) in PointEdge()
1548 sac[i] = stretch_array[i]; in PointEdge()
1549 if(sac[i]) in PointEdge()
1555 for(i=0;i<4;i++) in PointEdge()
1557 if(stretch->right[i].range > screen_y_max * 64 / 128 in PointEdge()
1558 || stretch->down [i].range > screen_x_max * 64 / 128) in PointEdge()
1560 for(i=0;i<4;i++) in PointEdge()
1562 if(stretch->up[i].range) in PointEdge()
1563 stretch->up[i].range = in PointEdge()
1564 stretch->up[i].range * in PointEdge()
1566 if(stretch->down[i].range) in PointEdge()
1567 stretch->down[i].range = in PointEdge()
1569 stretch->down[i].range) * in PointEdge()
1571 if(stretch->left[i].range) in PointEdge()
1572 stretch->left[i].range = in PointEdge()
1573 stretch->left[i].range * in PointEdge()
1575 if(stretch->right[i].range) in PointEdge()
1576 stretch->right[i].range = in PointEdge()
1578 stretch->right[i].range) * in PointEdge()
1593 for(i=0;i<4;i++) in PointEdge()
1595 if(stretch->left[i].range == 0) in PointEdge()
1597 if(data[1] < stretch->left[i].range) in PointEdge()
1599 data[0] += (stretch->left[i].range - data[1]) * in PointEdge()
1600 stretch->left[i].coe/128; in PointEdge()
1601 data[1] = stretch->left[i].range; in PointEdge()
1612 for(i=0;i<4;i++) in PointEdge()
1614 if(stretch->right[i].range == 0) in PointEdge()
1616 if(data[1] < stretch->right[i].range) in PointEdge()
1618 data[0] += (stretch->right[i].range - data[1]) * in PointEdge()
1619 stretch->right[i].coe/128; in PointEdge()
1620 data[1] = stretch->right[i].range; in PointEdge()
1631 for(i=0;i<4;i++) in PointEdge()
1633 if(stretch->up[i].range == 0) in PointEdge()
1635 if(data[1] < stretch->up[i].range) in PointEdge()
1637 data[0] += (stretch->up[i].range - data[1]) * in PointEdge()
1638 stretch->up[i].coe/128; in PointEdge()
1639 data[1] = stretch->up[i].range; in PointEdge()
1650 for(i=0;i<4;i++) in PointEdge()
1652 if(stretch->down[i].range == 0) in PointEdge()
1654 if(data[1] < stretch->down[i].range) in PointEdge()
1656 data[0] += (stretch->down[i].range - data[1]) * in PointEdge()
1657 stretch->down[i].coe/128; in PointEdge()
1658 data[1] = stretch->down[i].range; in PointEdge()
1681 int i,j; in PointStretch() local
1687 for(i=0;i<POINT_MAX;i++) in PointStretch()
1689 ps[0][i].all = pp[0][i].all; in PointStretch()
1691 for(i=0;i<POINT_MAX;i++) in PointStretch()
1693 if (pp[0][i].all == 0 || pp[0][i].other.key) in PointStretch()
1695 point_shake &= ~(0x1<<i); in PointStretch()
1696 if(i == 0) in PointStretch()
1700 if(i == 0) in PointStretch()
1702 if(edge_first!=0 && ps[1][i].all == 0) in PointStretch()
1704 point_edge.coor.all = ps[0][i].all; in PointStretch()
1713 if(point_edge.coor.all != ps[0][i].all) in PointStretch()
1715 point_edge.dis = PointDistance(&ps[0][i],&point_edge.coor); in PointStretch()
1722 temp = PointDistance(&ps[0][i],&point_edge.coor); in PointStretch()
1734 ps[0][i].other.x = point_edge.coor.other.x + in PointStretch()
1735 (ps[0][i].other.x - point_edge.coor.other.x) * in PointStretch()
1737 ps[0][i].other.y = point_edge.coor.other.y + in PointStretch()
1738 (ps[0][i].other.y - point_edge.coor.other.y) * in PointStretch()
1742 if(ps[1][i].all == 0) in PointStretch()
1746 else if((point_shake & (0x1<<i)) == 0) in PointStretch()
1748 if(PointDistance(&ps[0][i],&ps[1][i]) < (unsigned int)shake_min) in PointStretch()
1750 ps[0][i].all = ps[1][i].all; in PointStretch()
1754 point_shake |= (0x1<<i); in PointStretch()
1757 for(i=0;i<len;i++) in PointStretch()
1759 if(shake_all[i].dis == 0) in PointStretch()
1761 len=i; in PointStretch()
1769 for(i=0;i<POINT_MAX;i++) in PointStretch()
1771 if(ps[1][i].all == 0) in PointStretch()
1774 ps[j][i].all = ps[0][i].all; in PointStretch()
1777 if((point_shake & (0x1<<i)) == 0) in PointStretch()
1779 dn = PointDistance(&pp[0][i],&ps[1][i]); in PointStretch()
1782 temp = ps[0][i].all; in PointStretch()
1785 ps[0][i].other.x = ps[1][i].other.x; in PointStretch()
1786 ps[0][i].other.y = ps[1][i].other.y; in PointStretch()
1790 ps[0][i].other.x = (int)ps[1][i].other.x + in PointStretch()
1791 ((int)pp[0][i].other.x - in PointStretch()
1792 (int)ps[1][i].other.x) * dr / dn; in PointStretch()
1793 ps[0][i].other.y = (int)ps[1][i].other.y + in PointStretch()
1794 ((int)pp[0][i].other.y - in PointStretch()
1795 (int)ps[1][i].other.y) * dr / dn; in PointStretch()
1799 if(ps[0][i].all == ps[1][i].all && temp != ps[0][i].all) in PointStretch()
1801 ps[0][i].all = temp; in PointStretch()
1802 point_decimal[i].other.x += in PointStretch()
1803 (short)ps[0][i].other.x - in PointStretch()
1804 (short)ps[1][i].other.x; in PointStretch()
1805 point_decimal[i].other.y += in PointStretch()
1806 (short)ps[0][i].other.y - in PointStretch()
1807 (short)ps[1][i].other.y; in PointStretch()
1808 ps[0][i].other.x = ps[1][i].other.x; in PointStretch()
1809 ps[0][i].other.y = ps[1][i].other.y; in PointStretch()
1810 if (point_decimal[i].other.x > dc[0] && ps[1][i].other.x < 0xffff) in PointStretch()
1812 ps[0][i].other.x += 1; in PointStretch()
1813 point_decimal[i].other.x = 0; in PointStretch()
1815 if (point_decimal[i].other.x < -dc[0] && ps[1][i].other.x > 0) in PointStretch()
1817 ps[0][i].other.x -= 1; in PointStretch()
1818 point_decimal[i].other.x = 0; in PointStretch()
1820 if (point_decimal[i].other.y > dc[0] && ps[1][i].other.y < 0xffff) in PointStretch()
1822 ps[0][i].other.y += 1; in PointStretch()
1823 point_decimal[i].other.y = 0; in PointStretch()
1825 if (point_decimal[i].other.y < -dc[0] && ps[1][i].other.y > 0) in PointStretch()
1827 ps[0][i].other.y -= 1; in PointStretch()
1828 point_decimal[i].other.y = 0; in PointStretch()
1833 point_decimal[i].other.x = 0; in PointStretch()
1834 point_decimal[i].other.y = 0; in PointStretch()
1842 for(i=0;i<8 && i<len;i++) in PointStretch()
1844 ds[i+1] = shake_all[i].dis; in PointStretch()
1845 dc[i+1] = shake_all[i].coe;//;ds[i+1] * shake_all[i].coe; in PointStretch()
1858 for(i=0;i<POINT_MAX;i++) in PointStretch()
1860 if(ps[1][i].all == 0) in PointStretch()
1863 ps[j][i].all = ps[0][i].all; in PointStretch()
1864 save_dr[i] = 128; in PointStretch()
1865 save_dn[i] = 0; in PointStretch()
1868 if((point_shake & (0x1<<i)) == 0) in PointStretch()
1870 dn = PointDistance(&pp[0][i],&ps[1][i]); in PointStretch()
1876 if(dn < save_dn[i]) in PointStretch()
1878 dr = save_dr[i]; in PointStretch()
1879 save_dn[i] = dn; in PointStretch()
1880 ps[0][i].other.x = (int)ps[1][i].other.x + in PointStretch()
1881 (((int)pp[0][i].other.x - in PointStretch()
1882 (int)ps[1][i].other.x) * dr) / 128; in PointStretch()
1883 ps[0][i].other.y = (int)ps[1][i].other.y + in PointStretch()
1884 (((int)pp[0][i].other.y - in PointStretch()
1885 (int)ps[1][i].other.y) * dr) / 128; in PointStretch()
1892 ps[0][i].other.x = ps[1][i].other.x; in PointStretch()
1893 ps[0][i].other.y = ps[1][i].other.y; in PointStretch()
1899 save_dr[i] = dr; in PointStretch()
1900 save_dn[i] = dn; in PointStretch()
1901 // ps[0][i].x = (int)ps[1][i].x + ((int)pp[0][i].x - (int)ps[1][i].x) * dr / dn / 128; in PointStretch()
1902 // ps[0][i].y = (int)ps[1][i].y + ((int)pp[0][i].y - (int)ps[1][i].y) * dr / dn / 128; in PointStretch()
1903 ps[0][i].other.x = (int)ps[1][i].other.x + in PointStretch()
1904 (((int)pp[0][i].other.x - in PointStretch()
1905 (int)ps[1][i].other.x) * dr + 64) / 128; in PointStretch()
1906 ps[0][i].other.y = (int)ps[1][i].other.y + in PointStretch()
1907 (((int)pp[0][i].other.y - in PointStretch()
1908 (int)ps[1][i].other.y) * dr + 64) / 128; in PointStretch()
1965 int i,j; in ConfigCoorMulti() local
1967 for(i=0;i<4;i++) in ConfigCoorMulti()
1969 if(data[247+i]!=0) in ConfigCoorMulti()
1971 if((data[247+i]&63)==0 && (data[247+i]>>16)<4) in ConfigCoorMulti()
1976 if(data[251+i]!=0) in ConfigCoorMulti()
1978 if((data[251+i]&63)==0 && (data[251+i]>>16)<4) in ConfigCoorMulti()
1988 for(i=0;i<64;i++) in ConfigCoorMulti()
1990 if(data[256+j*64+i] >= 64) in ConfigCoorMulti()
1992 if(i) in ConfigCoorMulti()
1994 if(data[256+j*64+i] < data[256+j*64+i-1]) in ConfigCoorMulti()
2004 int i; in ConfigFilter() local
2011 for(i=0;i<8;i++) in ConfigFilter()
2013 ps_c[i] = (data[243+i/4] >> ((i%4)*8)) & 0xff; in ConfigFilter()
2014 pr_c[i] = (data[243+i/4+2] >> ((i%4)*8)) & 0xff; in ConfigFilter()
2015 if(ps_c[i] >= 0x80) in ConfigFilter()
2016 ps_c[i] |= 0xffffff00; in ConfigFilter()
2017 if(pr_c[i] >= 0x80) in ConfigFilter()
2018 pr_c[i] |= 0xffffff00; in ConfigFilter()
2019 sum += ps_c[i]; in ConfigFilter()
2020 sum += pr_c[i]; in ConfigFilter()
2030 int i; in ConfigKeyMap() local
2033 for(i=0;i<8;i++) in ConfigKeyMap()
2037 if((data[218+i*3+0]>>16) > (data[218+i*3+0]&0xffff)) in ConfigKeyMap()
2039 if((data[218+i*3+1]>>16) > (data[218+i*3+1]&0xffff)) in ConfigKeyMap()
2103 int i; in PointDiagonal() local
2111 for(i=0;i<POINT_MAX;i++) in PointDiagonal()
2113 if (ps[0][i].all == 0 || ps[0][i].other.key != 0) in PointDiagonal()
2115 point_corner &= ~(0x3<<i*2); in PointDiagonal()
2118 else if((point_corner & (0x3<<i*2)) == 0) in PointDiagonal()
2120 if ((ps[0][i].other.x <= diagonal_start && in PointDiagonal()
2121 ps[0][i].other.y <= diagonal_start) || in PointDiagonal()
2122 (ps[0][i].other.x >= drv_num_nokey * 64 - diagonal_start && in PointDiagonal()
2123 ps[0][i].other.y >= sen_num_nokey * 64 - diagonal_start)) in PointDiagonal()
2124 point_corner |= 0x2<<i*2; in PointDiagonal()
2125 else if ((ps[0][i].other.x <= diagonal_start && in PointDiagonal()
2126 ps[0][i].other.y >= sen_num_nokey * 64 - diagonal_start) || in PointDiagonal()
2127 (ps[0][i].other.x >= drv_num_nokey * 64 - diagonal_start && in PointDiagonal()
2128 ps[0][i].other.y <= diagonal_start)) in PointDiagonal()
2129 point_corner |= 0x3<<i*2; in PointDiagonal()
2131 point_corner |= 0x1<<i*2; in PointDiagonal()
2133 if(point_corner & (0x2<<i*2)) in PointDiagonal()
2135 dis = DiagonalDistance(&(ps[0][i]),point_corner & (0x1<<i*2)); in PointDiagonal()
2138 DiagonalCompress(&(ps[0][i]),point_corner & (0x1<<i*2),dis,diagonal_size); in PointDiagonal()
2142 point_corner &= ~(0x3<<i*2); in PointDiagonal()
2143 point_corner |= 0x1<<i*2; in PointDiagonal()
2151 int i; in PressureSave() local
2156 for(i=0;i<POINT_MAX;i++) in PressureSave()
2158 pressure_now[i] = point_now[i].all >> 28; in PressureSave()
2159 point_now[i].all &= ~(0xf<<28); in PressureSave()
2165 int i,j; in PointPressure() local
2166 for(i=0;i<POINT_MAX;i++) in PointPressure()
2168 if(pa[0][i]!=0 && pa[1][i]==0) in PointPressure()
2170 pressure_report[i] = pa[0][i]*5; in PointPressure()
2172 pa[j][i] = pa[0][i]; in PointPressure()
2175 j = (pressure_report[i]+1)/2 + pa[0][i] + in PointPressure()
2176 pa[1][i] + (pa[2][i]+1)/2 - pressure_report[i]; in PointPressure()
2183 pressure_report[i] = pressure_report[i]+j; in PointPressure()
2189 int i; in gsl_ReportPressure() local
2190 for(i=0;i<POINT_MAX;i++) in gsl_ReportPressure()
2192 if(i < point_num) in gsl_ReportPressure()
2194 if(pressure_now[i] == 0) in gsl_ReportPressure()
2195 p[i] = 0; in gsl_ReportPressure()
2196 else if(pressure_now[i] <= 7) in gsl_ReportPressure()
2197 p[i] = 1; in gsl_ReportPressure()
2198 else if(pressure_now[i] > 63+7) in gsl_ReportPressure()
2199 p[i] = 63; in gsl_ReportPressure()
2201 p[i] = pressure_now[i] - 7; in gsl_ReportPressure()
2204 p[i] = 0; in gsl_ReportPressure()
2217 int i; in DoubleClick() local
2224 for(i=0;i<sizeof(click_count)/sizeof(click_count[0]);i++) in DoubleClick()
2225 click_count[i] = 0; in DoubleClick()
2230 for(i=sizeof(click_count)/sizeof(click_count[0])-1;i>0;i--) in DoubleClick()
2231 click_count[i] = click_count[i-1]; in DoubleClick()
2233 for(i=sizeof(point_click)/sizeof(point_click[0])-1;i>1;i--) in DoubleClick()
2234 point_click[i].all = point_click[i-2].all; in DoubleClick()
2246 for(i=sizeof(click_count)/sizeof(click_count[0])-1;i>0;i--) in DoubleClick()
2247 click_count[i] = click_count[i-1]; in DoubleClick()
2249 for(i=0;i<sizeof(click_count)/sizeof(click_count[0])-1;i++) in DoubleClick()
2250 width[i] = (click_count[i] - click_count[i+1]) & 0xffff; in DoubleClick()
2266 for(i=0;i<sizeof(click_count)/sizeof(click_count[0]);i++) in DoubleClick()
2267 click_count[i] = 0;//?point_click in DoubleClick()
2275 int i,j; in gsl_id_reg_init() local
2277 for(i=0;i<POINT_MAX;i++) in gsl_id_reg_init()
2278 point_array[j][i].all = 0; in gsl_id_reg_init()
2280 for(i=0;i<POINT_MAX;i++) in gsl_id_reg_init()
2281 pressure_array[j][i] = 0; in gsl_id_reg_init()
2282 for(i=0;i<POINT_MAX;i++) in gsl_id_reg_init()
2284 point_delay[i].all = 0; in gsl_id_reg_init()
2285 filter_deep[i] = 0; in gsl_id_reg_init()
2286 point_decimal[i].all = 0; in gsl_id_reg_init()
2319 int i, j; in gsl_DataInit() local
2325 for(i=0;i<32;i++) in gsl_DataInit()
2327 coordinate_correct_coe_x[i] = i; in gsl_DataInit()
2328 coordinate_correct_coe_y[i] = i; in gsl_DataInit()
2337 for(i=0;i<4;i++) in gsl_DataInit()
2338 median_dis[i]=0; in gsl_DataInit()
2340 for(i=0;i<2;i++) in gsl_DataInit()
2342 match_y[i]=0; in gsl_DataInit()
2343 match_x[i]=0; in gsl_DataInit()
2344 ignore_y[i]=0; in gsl_DataInit()
2345 ignore_x[i]=0; in gsl_DataInit()
2356 for(i=0;i<4;i++) in gsl_DataInit()
2357 edge_cut[i] = 0; in gsl_DataInit()
2358 for(i=0;i<32;i++) in gsl_DataInit()
2359 stretch_array[i] = 0; in gsl_DataInit()
2360 for(i=0;i<16;i++) in gsl_DataInit()
2361 shake_all_array[i] = 0; in gsl_DataInit()
2366 for(i=0;i<8*3;i++) in gsl_DataInit()
2367 key_range_array[i] = 0; in gsl_DataInit()
2373 for(i=0;i<4;i++) in gsl_DataInit()
2375 multi_x_array[i]=0; in gsl_DataInit()
2376 multi_y_array[i]=0; in gsl_DataInit()
2402 for(i=0;i<len;i++) in gsl_DataInit()
2403 conf[i] = conf_in[i]; in gsl_DataInit()
2404 for(;i<CONFIG_LENGTH;i++) in gsl_DataInit()
2405 conf[i] = 0; in gsl_DataInit()
2425 for(i=0;i<4;i++) in gsl_DataInit()
2426 median_dis[i] = (unsigned char)conf[19+i]; in gsl_DataInit()
2427 for(i=0;i<2;i++) in gsl_DataInit()
2429 match_y[i] = conf[23+i]; in gsl_DataInit()
2430 match_x[i] = conf[25+i]; in gsl_DataInit()
2431 ignore_y[i] = conf[27+i]; in gsl_DataInit()
2432 ignore_x[i] = conf[29+i]; in gsl_DataInit()
2434 for(i=0;i<64;i++) in gsl_DataInit()
2436 coordinate_correct_coe_x[i] = conf[31+i]; in gsl_DataInit()
2437 coordinate_correct_coe_y[i] = conf[95+i]; in gsl_DataInit()
2439 for(i=0;i<4;i++) in gsl_DataInit()
2440 edge_cut[i] = conf[159+i]; in gsl_DataInit()
2441 for(i=0;i<32;i++) in gsl_DataInit()
2442 stretch_array[i] = conf[163+i]; in gsl_DataInit()
2443 for(i=0;i<16;i++) in gsl_DataInit()
2444 shake_all_array[i] = conf[195+i]; in gsl_DataInit()
2448 for(i=0;i<8*3;i++) in gsl_DataInit()
2449 key_range_array[i] = conf[218+i]; in gsl_DataInit()
2451 for(i=0;i<4;i++) in gsl_DataInit()
2452 filter_coe[i] = conf[243+i]; in gsl_DataInit()
2453 for(i=0;i<4;i++) in gsl_DataInit()
2454 multi_x_array[i] = conf[247+i]; in gsl_DataInit()
2455 for(i=0;i<4;i++) in gsl_DataInit()
2456 multi_y_array[i] = conf[251+i]; in gsl_DataInit()
2458 for(i=0;i<4;i++) in gsl_DataInit()
2460 multi_group[i][j] = conf[256+64*i+j]; in gsl_DataInit()
2461 for(i=0;i<4;i++) in gsl_DataInit()
2465 ps_coe[i][j] = conf[256 + 64*3 + 8*i+j]; in gsl_DataInit()
2466 pr_coe[i][j] = conf[256 + 64*3 + 8*i+j + 32]; in gsl_DataInit()
2511 for(i=0;i<16;i++) in gsl_DataInit()
2513 stretch_array[i*2+0] = conf[0x2a+i] & 0xffff; in gsl_DataInit()
2514 stretch_array[i*2+1] = conf[0x2a+i] >> 16; in gsl_DataInit()
2516 for(i=0;i<8;i++) in gsl_DataInit()
2518 shake_all_array[i*2+0] = conf[0x3a+i] & 0xffff; in gsl_DataInit()
2519 shake_all_array[i*2+1] = conf[0x3a+i] >> 16; in gsl_DataInit()
2532 for(i=0;i<8*3;i++) in gsl_DataInit()
2533 key_range_array[i] = conf[0x61+i]; in gsl_DataInit()
2536 for(i=0;i<4;i++) in gsl_DataInit()
2538 multi_x_array[i] = conf[0x101+i]; in gsl_DataInit()
2539 multi_y_array[i] = conf[0x105+i]; in gsl_DataInit()
2541 for(i=0;i<64;i++) in gsl_DataInit()
2543 coordinate_correct_coe_x[i] = (conf[0x109+i/4]>>(i%4*8)) & 0xff; in gsl_DataInit()
2544 coordinate_correct_coe_y[i] = (conf[0x109+64/4+i/4]>>(i%4*8)) & 0xff; in gsl_DataInit()
2546 for(i=0;i<4;i++) in gsl_DataInit()
2549 multi_group[i][j] = (conf[0x109+64/4*2+(64*i+j)/4]>>((64*i+j)%4*8)) & 0xff; in gsl_DataInit()
2553 for(i=0;i<4;i++) in gsl_DataInit()
2554 filter_coe[i] = conf[0x181+i]; in gsl_DataInit()
2555 for(i=0;i<4;i++) in gsl_DataInit()
2556 median_dis[i] = (unsigned char)conf[0x185+i]; in gsl_DataInit()
2557 for(i=0;i<4;i++) in gsl_DataInit()
2561 ps_coe[i][j] = conf[0x189 + 8*i+j]; in gsl_DataInit()
2562 pr_coe[i][j] = conf[0x189 + 8*i+j + 32]; in gsl_DataInit()
2572 for(i=0;i<8;i++) in gsl_DataInit()
2574 if(shake_all_array[i*2] & 0x8000) in gsl_DataInit()
2575 shake_all_array[i*2] = shake_all_array[i*2] & ~0x8000; in gsl_DataInit()
2577 shake_all_array[i*2] = Sqrt(shake_all_array[i*2]); in gsl_DataInit()
2579 for(i=0;i<2;i++) in gsl_DataInit()
2581 if(match_x[i] & 0x8000) in gsl_DataInit()
2582 match_x[i] |= 0xffff0000; in gsl_DataInit()
2583 if(match_y[i] & 0x8000) in gsl_DataInit()
2584 match_y[i] |= 0xffff0000; in gsl_DataInit()
2585 if(ignore_x[i] & 0x8000) in gsl_DataInit()
2586 ignore_x[i] |= 0xffff0000; in gsl_DataInit()
2587 if(ignore_y[i] & 0x8000) in gsl_DataInit()
2588 ignore_y[i] |= 0xffff0000; in gsl_DataInit()
2590 for(i=0;i<CONFIG_LENGTH;i++) in gsl_DataInit()
2591 config_static[i] = 0; in gsl_DataInit()
2610 int i = 0; in GetFlag() local
2639 for(i=0;i<POINT_MAX;i++) in GetFlag()
2641 if(i >= num_save) in GetFlag()
2642 point_now[i].all = 0; in GetFlag()
2649 int i; in gsl_alg_id_main() local
2651 for(i=0;i<POINT_MAX;i++) in gsl_alg_id_main()
2653 point_now[i].all = (cinfo->id[i]<<28) | in gsl_alg_id_main()
2654 (cinfo->x[i]<<16) | cinfo->y[i]; in gsl_alg_id_main()
2740 int i; in GestureSqrt() local
2741 for(i=14;i>=0;i--) in GestureSqrt()
2743 if((ret + (0x1<<i))*(ret + (0x1<<i)) <= d) in GestureSqrt()
2744 ret |= (0x1<<i); in GestureSqrt()
2790 int i; in GestureStretch() local
2795 for(i=0;i<gesture_num;i++) in GestureStretch()
2797 if(gesture_buf[i].other.x > x_max) in GestureStretch()
2798 x_max = gesture_buf[i].other.x; in GestureStretch()
2799 if (gesture_buf[i].other.x < x_min) in GestureStretch()
2800 x_min = gesture_buf[i].other.x; in GestureStretch()
2801 if (gesture_buf[i].other.y > y_max) in GestureStretch()
2802 y_max = gesture_buf[i].other.y; in GestureStretch()
2803 if (gesture_buf[i].other.y < y_min) in GestureStretch()
2804 y_min = gesture_buf[i].other.y; in GestureStretch()
2808 for(i=0;i<gesture_num;i++) in GestureStretch()
2810 gesture_buf[i].other.x = (gesture_buf[i].other.x - x_min) * in GestureStretch()
2812 gesture_buf[i].other.y = (gesture_buf[i].other.y - y_min) * in GestureStretch()
2820 int i; in GestureLength() local
2822 for(i=1;i<gesture_num;i++) in GestureLength()
2824 len += GestureDistance(&gesture_buf[i],&gesture_buf[i-1],TRUE); in GestureLength()
2831 int i,n,t; in GestureStandard() local
2838 for(i=1,n=0;i<GESTURE_SIZE_NUM-1;i++) in GestureStandard()
2844 if(len_his*(GESTURE_SIZE_NUM-1) >= len_total*i) in GestureStandard()
2849 gesture_standard[i].all = 0; in GestureStandard()
2852 * ((int)len_total*i/(GESTURE_SIZE_NUM-1) - (int)len_his + (int)len_now) in GestureStandard()
2857 gesture_standard[i].other.x = t; in GestureStandard()
2860 * ((int)len_total*i/(GESTURE_SIZE_NUM-1) - (int)len_his + (int)len_now) in GestureStandard()
2865 gesture_standard[i].other.y = t; in GestureStandard()
2875 int i,j,k,n; in GestureModel() local
2891 for(i=0;i<GESTURE_SIZE_NUM;i++) in GestureModel()
2893 if(i+offset[k] < 0 || i+offset[k] >= GESTURE_SIZE_NUM) in GestureModel()
2895 if((i&1)==0) in GestureModel()
2896 model_coor.all = model[j].coor[i/2] & 0x00ff00ff; in GestureModel()
2898 model_coor.all = (model[j].coor[i/2]>>8) & 0x00ff00ff; in GestureModel()
2899 ret_offset += GestureDistance(&gesture_standard[i+offset[k]],&model_coor,FALSE); in GestureModel()
2921 int i; in ChangeXY() local
2922 for(i=0;i<gesture_num && i<GESTURE_BUF_SIZE;i++) in ChangeXY()
2923 gesture_buf[i].all = ((gesture_buf[i].all & 0xfff) << 16) + in ChangeXY()
2924 ((gesture_buf[i].all>>16) & 0xffff); in ChangeXY()
2957 int i; in GestureDeal() local
2987 for(i=0;i<2;i++) in GestureDeal()
2989 if(gesture_val[i] <= gesture_last) in GestureDeal()
2991 // gesture_value = gesture_val[i]; in GestureDeal()
2992 gesture_last = gesture_out[i]; in GestureDeal()
3010 int x1=0,y1=0,x2=0,y2=0,i=0; in GestureLRUD() local
3034 for(i=1;i<gesture_num;i++) in GestureLRUD()
3036 if (abs(gesture_buf[i].other.x - middle_x)<(int)sen_num_nokey * 64 / x_scale)//screen_y_max/8)//30 in GestureLRUD()
3040 if (abs(gesture_buf[i].other.y - middle_y)<(int)drv_num_nokey * 64 / y_scale)//screen_x_max/8)//25 in GestureLRUD()
3044 if ((int)gesture_buf[i].other.x - (int)gesture_buf[i - 1].other.x>min_scale) in GestureLRUD()
3046 else if ((int)gesture_buf[i].other.x - (int)gesture_buf[i - 1].other.x<-min_scale) in GestureLRUD()
3048 if ((int)gesture_buf[i].other.y - (int)gesture_buf[i - 1].other.y>min_scale) in GestureLRUD()
3050 else if ((int)gesture_buf[i].other.y - (int)gesture_buf[i - 1].other.y<-min_scale) in GestureLRUD()
3078 int i; in gsl_GestureBuffer() local
3081 for(i=0;i<gesture_num_last;i++) in gsl_GestureBuffer()
3083 gesture_buf[i].all = ScreenResolution((gsl_POINT_TYPE*)(&gesture_buf[i].all)); in gsl_GestureBuffer()