Rev 206 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
206 | 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 | package org.ligi.ufo; |
||
12 | |||
13 | public class MKStickData |
||
14 | { |
||
15 | // holing stick data |
||
16 | public int[] stick; |
||
17 | |||
18 | // general counter |
||
19 | private int i; |
||
20 | |||
21 | public MKStickData() |
||
22 | { |
||
23 | |||
24 | stick=new int[10]; |
||
25 | for (i=0;i<10;i++) |
||
26 | stick[i]=-1; |
||
27 | |||
28 | } |
||
29 | |||
30 | public void set_by_mk_data(int[] in_arr) |
||
31 | { |
||
32 | |||
33 | for (i=0;i<10;i++) |
||
34 | { |
||
35 | stick[i]=(int)((in_arr[1+i*2]<<8) | in_arr[i*2]); |
||
36 | if ((stick[i]&(1<<15))!=0) |
||
37 | stick[i]=-(stick[i]&(0xFFFF-1))^(0xFFFF-1); |
||
38 | } |
||
39 | |||
40 | } |
||
41 | |||
42 | |||
43 | |||
44 | } |