Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
81 | ligi | 1 | /********************************************* |
2 | * |
||
3 | * class representing the StickData Structure |
||
4 | * |
||
5 | * Author: Marcus -LiGi- Bueschleb |
||
6 | * |
||
7 | * see README for further Infos |
||
8 | * |
||
9 | ********************************************/ |
||
10 | |||
11 | public class MKStickData |
||
12 | { |
||
13 | // holing stick data |
||
14 | public int[] stick; |
||
15 | |||
16 | // general counter |
||
17 | private int i; |
||
18 | |||
19 | public MKStickData() |
||
20 | { |
||
21 | |||
22 | stick=new int[10]; |
||
23 | for (i=0;i<10;i++) |
||
24 | stick[i]=-1; |
||
25 | |||
26 | } |
||
27 | |||
28 | public void set_by_mk_data(int[] in_arr) |
||
29 | { |
||
30 | |||
31 | for (i=0;i<10;i++) |
||
32 | { |
||
33 | stick[i]=(int)((in_arr[1+i*2]<<8) | in_arr[i*2]); |
||
34 | if ((stick[i]&(1<<15))!=0) |
||
35 | stick[i]=-(stick[i]&(0xFFFF-1))^(0xFFFF-1); |
||
36 | } |
||
37 | |||
38 | } |
||
39 | |||
40 | |||
41 | |||
42 | } |