1 |
|
|
2 |
struct datastruct{ |
struct datastruct{ |
|
|
|
3 |
unsigned short header[2]; |
unsigned short header[2]; |
4 |
unsigned short status; |
unsigned short status; |
5 |
unsigned short hitmap; |
unsigned short hitmap; |
14 |
unsigned short CRC; |
unsigned short CRC; |
15 |
}; |
}; |
16 |
|
|
17 |
|
//physics structure |
18 |
|
datastruct physicsdata; |
19 |
|
|
20 |
|
//pointer to struct |
21 |
|
datastruct *physicspointer; |
22 |
|
|
23 |
|
//read variables |
24 |
|
int i,err,found; |
25 |
|
unsigned short buffer[1000]; |
26 |
|
unsigned short tmp1,tmp2; |
27 |
|
|
28 |
|
int flip(int i16) |
29 |
|
{ |
30 |
|
int temp; |
31 |
|
|
32 |
|
temp = 0; |
33 |
|
temp |= 0xFF00 & ((0x00FF & i16) << 8); |
34 |
|
temp |= 0x00FF & ((0xFF00 & i16) >> 8); |
35 |
|
return temp; |
36 |
|
} |
37 |
|
|
38 |
|
|